AUTOSAR COM

Signal groups

Some values only make sense together, like the x and y of a position. A signal group makes sure they always travel as a matching set.

The problem

An application writes x, then y. These are two separate steps. If the packet happens to go out between them, it carries the new x with the old y. The receiver gets a position that never existed.

The fix: a staging area

Put x and y into a signal group. Now writing x or y does not touch the packet. The values go into a staging area first. When all of them are written, the application says "hand over the group", and COM copies the whole set into the packet in one uninterruptible step.

Applicationwrites x, writes y, then: "hand over the group"
→
Staging areaholds the set while it is being put together
→
Packetonly ever sees complete sets

Receiving works the same way in reverse: "fetch the group" copies the whole set from the packet into the staging area in one step, and the application then reads x and y from there.

Try it

Move the position from (1, 1) to (2, 2). Try to catch COM in between: write x, then let the packet go out before writing y.

Staging area

Packet

What belongs to the group, what to its members

The group is treated as one thing. So most extras from the earlier lessons are set once for the whole group, not per member.

FeatureSet for
Update-bitThe whole group
Messages to the application, timeoutsThe whole group
Triggered or pendingThe whole group, or finer per member
Filter, send-setting conditionEach member

All or nothing also holds on the receiving side: if a filter blocks one member, the whole group is dropped. If one member carries the "invalid" value, the whole group is treated as invalid.

Check yourself

Optional. Answer from memory.

The AUTOSAR words

Plain word hereAUTOSAR word
Values that belong togetherComplex data type (like a struct)
Member of a groupGroup signal
Staging areaShadow buffer
Hand over / fetch the groupCom_SendSignalGroup / Com_ReceiveSignalGroup

Source: AUTOSAR COM specification, R25-11, section 7.3 (SWS_Com_00050, 00051, Table 7.5, SWS_Com_00836, 00682). Finer point: there is a second way without a staging area. The application hands COM the whole group as one ready-made block of bytes ("array access"). It is used when the data was already put into bytes by another part of the software.