Status of Explicit and Implicit Access
Explicit Access
Status information for explicit read access to a data element in a SenderReceiver or NVData interface prototype can easily be obtained via the RTE Access operator; see section "Explicit" in Receiving from a Port – Block Diagram and "Explicit with Status" in Receiving from a Port – ESDL.
The same is true for status information for explicit write access to a data element in a SenderReceiver or NVData interface prototype; see section "Explicit" in Sending to a Port – Block Diagram and section "Explicit with Status" in Sending to a Port – ESDL.
Implicit Access
Status information for implicit read access to a data element in a SenderReceiver interface prototype can be obtained via the Rte_IStatus access macro.
Note |
|---|
This functionality is only available for SenderReceiver interfaces used as Rport. |
There are several ways to enable the generation of the Rte_IStatus macro by the RTE generator. Not all of them are available in each RTE generator, therefore, you can configure the capabilities of the RTE generator in the ASCET options window, Operating System\RTE-AUTOSAR 4.* node.
A SenderReceiver interface port has some attributes that control the generation of the Rte_IStatus macro. In ASCET, these attributes can be set in the implementation editor of the parent SWC component, AUTOSAR tab.
AUTOSAR provides a mechanism to specify that a value may become invalid, e.g., due to a broken sensor. This is one way to trigger the generation of the Rte_IStatus macro. In ASCET, this invalidation policy is set in the implementation editors for scalar/array and record elements of SenderReceiver interfaces.
The Rte_IStatus macro is generated if at least one of the following conditions is true:
Alive Timeout for the Rport is > 0 and
RTE supports aliveTimeout is activated
Handle Never Received for the Rport is set to true and
RTE supports handleNeverReceived is activated
Handle Out Of Range for the Rport is set to a value other than none and
RTE supports handleOutOfRange is activated
Handle Data Status for the Rport is set to true and
RTE supports handleDataStatus is activated
Invalidation Policy for the data element is set to keep and
RTE supports invalidationPolicy is activated
If settings for the Rport or its data elements require the generation of the Rte_IStatus macro, but the functionality is not activated in the Operating System\RTE-AUTOSAR 4.* node (see the
example), a warning (WIle58) is issued to inform users that Rte_IStatus and error handling is not generated.
In ASCET, status information for implicit read of a SenderReceiver Rport is specified via the Communication Status operator. This operator can be applied to data elements of SenderReceiver Rports, and to messages (in modules) mapped to data elements of SenderReceiver Rports.
Keep in mind the following:
- If the Communication Status operator is applied to an element without read access, an error MMdl1193 is issued.
- If the Communication Status operator is applied to an Rport other than a SenderReceiver Rport, an error MMdl1194 is issued.
- If, due to missing preconditions for generation, the Rte_IStatus macro cannot be generated, the Rte_IStatus is replaced by RTE_E_OK and a warning WIle59 is issued.
See also
Receiving from a Port – Block Diagram
Sending to a Port – Block Diagram
ASCET Options – Operating System Options
Implementation Editor – AUTOSAR Tab (SWC)
Implementation Editor – AUTOSAR Tab (Scalar Elements)