Scenario:
A composite component with two ports; input and output trigger.
Inside the composite component, one regular component with the same port layout.
Case 1:
See attached picture, case 1. Notice the delegation arrows and the direction.
Generated code:
<COMPONENTDESC id="Composite01#6">
<INPORT mode="trig" type="void" id="C01_ClockIn#7"/>
<OUTPORT mode="trig" type="void" id="C01_ClockOut#8"/>
<REALISATION>
<COMPONENTLIST>
<COMPONENT type="Comp01#9" id="Comp01#9Impl"/>
</COMPONENTLIST>
<CONNECTIONLIST>
<CONNECTION>
<FROM id="Composite01#6Impl" port="C01_ClockOut#8"/>
</CONNECTION>
<CONNECTION>
<FROM id="Comp01#9Impl" port="comp02Out#11"/>
<TO id="Composite01#6Impl" port="C01_ClockOut#8"/>
</CONNECTION>
<CONNECTION>
<FROM id="Comp01#9Impl" port="comp02In#10"/>
<TO id="Composite01#6Impl" port="C01_ClockIn#7"/>
</CONNECTION>
</CONNECTIONLIST>
</REALISATION>
</COMPONENTDESC>
The first connection is I don't know what. The second connection seems ok. The third connection appears to be in the wrong direction (it follow the arrow...)
Case 2:
See attached picture. The delegation arrow for inports is reversed. For me this is the "intuitively correct" delegation direction.
Generated code:
<COMPONENTDESC id="Composite01#6">
<INPORT id="C01_ClockIn#7" mode="trig" type="void"/>
<OUTPORT id="C01_ClockOut#8" mode="trig" type="void"/>
<REALISATION>
<COMPONENTLIST>
<COMPONENT id="Comp01#9Impl" type="Comp01#9"/>
</COMPONENTLIST>
<CONNECTIONLIST>
<CONNECTION>
<FROM id="Composite01#6Impl" port="C01_ClockOut#8"/>
</CONNECTION>
<CONNECTION>
<FROM id="Comp01#9Impl" port="comp02Out#11"/>
<TO id="Composite01#6Impl" port="C01_ClockOut#8"/>
</CONNECTION>
<CONNECTION>
<FROM id="Composite01#6Impl" port="C01_ClockIn#7"/>
</CONNECTION>
</CONNECTIONLIST>
</REALISATION>
</COMPONENTDESC>
There are still three connections, but now two of them have no TO field.
Logged In: YES
user_id=803361
Originator: YES
Attached the project with the above scenario.
File Added: x.Combinations.Composite.01.rar
Logged In: YES
user_id=803361
Originator: YES
Oops! The delegation from internal component trigger port to the composite component trigger port is not compliant with the SaveCCM language.
When this delegation is removed, the generated code in the connection list is (for case 2):
<CONNECTIONLIST>
<CONNECTION>
<FROM id="Composite01#6Impl" port="C01_ClockOut#8"/>
</CONNECTION>
<CONNECTION>
<FROM id="Composite01#6Impl" port="C01_ClockIn#7"/>
</CONNECTION>
Still not good.
Logged In: YES
user_id=803361
Originator: YES
Just to clarify last comment: I was refering to trigger OUT ports.
Logged In: YES
user_id=803361
Originator: YES
Incorrect code generated for delegation arrows affects following:
* Composite Components
* Assemblies
* "IODEF" (delegation TO/FROM environment)
* Switches?
Fairly simple to fix manually but needs to be done after each Generation.