AUTOSAR COM
What COM tells the application
COM can call the application when something happens. There are six kinds of message. This lesson also puts the receiving steps of lessons 5 to 8 in order.
Two ways to stay informed
Ask
The application reads the signal whenever it likes and gets the current value. Simple, but it does not know when something changed.
Be told
COM calls the application at the moment something happens. Each kind of message can be switched on per signal.
The six messages
| Side | COM says | When |
|---|---|---|
| Receive | "A new value is here." | A signal arrived and passed all checks. |
| Receive | "This signal is overdue." | Receive timeout (lesson 6). |
| Receive | "The value is invalid." | The reserved value arrived and the choice is NOTIFY (lesson 7). |
| Send | "It was sent." | The bus confirmed the packet. With repeats: after the last one. |
| Send | "It was not sent in time." | Send timeout (lesson 6). |
| Send | "It could not be sent." | For example the packet was switched off while a send was still waiting (lesson 11). |
Remember immediate and deferred from lesson 2? That setting decides when these calls are made: in the moment itself, or at COM's next heartbeat.
The receiving steps, in order
When a packet arrives, each signal in it goes through the same fixed line of steps. A signal can drop out along the way. Pick a situation and see how far it gets.
The order explains some behaviour you might otherwise find odd. The packet's stopwatch is reset first, so even a packet whose signals are all dropped still counts as "the sender is alive". And the filter comes after the invalid check, so an invalid value never reaches the filter with choice NOTIFY.
Check yourself
Optional. Answer from memory.
The AUTOSAR words
| Plain word here | AUTOSAR word |
|---|---|
| Message to the application | Notification, done through a callback |
| "A new value is here" / "It was sent" | Rx acknowledge / Tx acknowledge |
| "Overdue" / "Not sent in time" | Rx timeout / Tx timeout |
| "Invalid" / "Could not be sent" | Invalid notification / Tx error |
Source: AUTOSAR COM specification, R25-11, sections 7.2.7 and 7.12 (SWS_Com_00883, 00396, 00680, 00479). Finer point: in a real system the application is not called directly. The calls go to the layer between COM and the application, the RTE, which passes them on.