Search code examples
autosar

Routing signal though Composition Software Component


How can I route a "signal" though a Software Composition without having to copy it (with some code)? Use-case: The SW-Composition has some RPorts where the data has to be modified and then provided on some PPorts. But for some RPorts/PPorts combination the data does not need to be touched and therefore "simply routed" from RPort to PPort. The idea would be to simply connect the RPortPrototype with the PPortPrototype with a DelegationSwConnector. But as per specification this is not possible. Any idea how to do this without the need of "copy-code"?


Solution

  • If I understand correctly that your P- and R- ports are on the composition itself (that is, they are outer ports), you can use the pass-through connector (PassThroughSwConnector model element) for your use case. It's a child element of compositions, so you add a PassThroughSwConnector to your CompositionSwComponentType, and use it to connect your two ports directly.

    Note that this will be impossible if there's another path between the two ports via assembly connectors. That would create a loop consisting of pass-through and assembly connectors, which is explicitly forbidden in the specification.