Computing Cable Core Mapping (L2P_Compute3DCableCoreMapping)

An opening ID is an entry point used to customize business logic. The Computing Cable Core Mapping opening ID is available in the Logical to Physical Assistant Resources resource set.

This page discusses:

General Information

User can customize mapping between Logical Wire (inside Logical Cable) and physical cable core with following business rule.

Definition Description
PLM Opening ID L2P_Compute3DCableCoreMapping
Customization intent Computation
Execution context Client

Input Objects

An L2PItem_Cable of which you want map Logical Wires with Physical Cable Core.

  • ThisObject
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
ListOfLogicalCoreItems List Read/Write List of L2P Item having 2D Facets already valuated. These L2P Item are children of ThisObject (L2PItem_Cable). It can have NULL members.
ListOfPhysicalCoreItems List Read/Write List of L2P items having 3D facets already valuated. This list is semantic with ListOfLogicalCoreItems defining mapping between them. It can have NULL members. Size of this list should match with ListOfLogicalCoreItems
Note:
  • Analysis: At the time of analysis, if there is unitary L2P Item for cable with valid 2D and 3D facets, this business rule is executed for mapping of its children (Logical wires from logical cable and physical cores from physical cable).
  • Auto Place (When cable raw material is being set): After auto place where cable raw material is set, set of physical cores are created with respect to raw material. As cores are not created by referring to logical wire hierarchy, mapping need to executed between logical wire and physical cores.
  • Synchronize (When cable raw material is being set): After synchronize where cable raw material set or is changed.
  • If the L2P_Compute3DCableCoreMapping BR is present, the mapping between logical and physical cores is performed using EKL within the BR. Otherwise, the default mapping criterion, which is the color attribute, is used. This works only if the color attribute is defined on the logical items (Logical Wire / Logical Cable) under Properties → Reference option.

Sample

let  ChildrenItems(LIST)
let  ListOfLogicalCoreItems(LIST)
let  ListOfPhysicalCoreItems(LIST)
let  MappedListOfLogicalCoreItems(LIST)
let  MappedListOfPhysicalCoreItems(LIST)
let iSize(integer)
let childL2pItem(L2pItem)
let childL2pItemWithLogicalFacet(L2pItem)
let childL2pItemWithPhysicalFacet(L2pItem)
let i(Integer)
let j(Integer)
Let Facet2DColor(string)
Let Facet3DColor(string)

set ChildrenItems = ThisObject.Children
if(NULL <> ChildrenItems)
{
	iSize = ChildrenItems.Size()
	Notify("ChildrenItesm found : " + iSize)
	
}

if (ChildrenItems.Size() > 0)
{			
	for i=1 while i<= ChildrenItems.Size()
	{							
		childL2pItem = ChildrenItems.GetItem(i)
		If( childL2pItem.Facet2D <> NULL)
		{
			ListOfLogicalCoreItems.Append(childL2pItem)
		}
		Else
		{
			ListOfPhysicalCoreItems.Append(childL2pItem)
		}
		
	}
}
//Here, for example, mapping critera is color attribute matching. Mapping can be done based on any attribute matching.
for i=1 while i<= ListOfLogicalCoreItems.Size()
{							
	set childL2pItemWithLogicalFacet = ListOfLogicalCoreItems.GetItem(i)
	set Facet2DColor = childL2pItemWithLogicalFacet.GetAttributeString("L2P_ExpectedColor")
	for j=1 while i<= ListOfPhysicalCoreItems.Size()
	{
		set childL2pItemWithPhysicalFacet = ListOfPhysicalCoreItems.GetItem(j)
		set Facet3DColor = childL2pItemWithPhysicalFacet.GetAttributeString("L2P_CurrentColor")
		If( Facet2DColor <> Facet3DColor)
		{
			MappedListOfLogicalCoreItems.Append(childL2pItemWithLogicalFacet)
			MappedListOfPhysicalCoreItems.Append(childL2pItemWithPhysicalFacet)
			ListOfLogicalCoreItems.RemoveItem(i)
			ListOfPhysicalCoreItems.RemoveItem(j)
		}
		
	}
	
}
for i=1 while i<= ListOfLogicalCoreItems.Size()
{
	MappedListOfLogicalCoreItems.Append(ListOfLogicalCoreItems.GetItem(i))
	MappedListOfPhysicalCoreItems.Append(NULL)
}
for j=1 while i<= ListOfPhysicalCoreItems.Size()
{
	MappedListOfLogicalCoreItems.Append(NULL)
	MappedListOfPhysicalCoreItems.Append(ListOfPhysicalCoreItems.GetItem(j))
}


Parameters.Severity = 0
Parameters.SetAttributeInteger("severity", 0)
Parameters.SetAttributeObject("ListOfLogicalCoreItems", MappedListOfLogicalCoreItems)
Parameters.SetAttributeObject("ListOfPhysicalCoreItems", MappedListOfPhysicalCoreItems)
Parameters.Message = "Done"