In AUTOSAR, SenderReceiverInterface can have multiple data elements as shown below snippet. Is there any advantage or implementation difference when multiple data elements are used in a single software port compared to multiple software ports and each having single data elemment in the respective SenderReceiverInterface? Does all data elements of a single SenderReceiverInterface on a Software Port are received or transmitted in atomic way all together by RTE?
The collection of dataElement
s in a SenderReceiverInterface
is mostly a logistical choice. Designing SenderReciverInterface
s with few or only one dataElement
may increase the chance of being able to re-use the SenderReceiverInterface
in other contexts. But there's also motivation to create more complex SenderReceiverInterface
s because this saves time and takes away complexity for creating connectors between PortPrototype
s.
The dataElement
s are sent/received entirely separate from each other. If you want atomicity, there is always the choice to create dataElement
s of composite data types. The elements of such a composite data type are always send and received atomically.