Rte_Read

Rte_Read implements explicit data read access on a data element prototype of an Rport of a SenderReceiver or NVData interface. The return value of Rte_Read represents the status of the operation, whereas the value of the read element is assigned to a variable passed as argument with direction out to Rte_Read.

Rte_Read is used only for explicit read access with status information; explicit read access without status information uses Rte_DRead.

Explicit data read access of a runnable entity means that the current value of the data element is read from the RTE. Subsequent explicit read access operations within the same runnable entity may result in different values of the data element.

In the ESDL editor for software components, explicit read access without status information can be specified as follows:

Rport.t_mot.explicitRead(t_mot);

In the block diagram editor for software components, explicit read access with status information can be specified as follows:

During code generation for an explicit read access, the return value of Rte_Read, which contains status information, is assigned to a temporary variable named _ASCET_RteStatus.

The status information can be used in the model. In the block diagram editor for SWCs, you have to select Explicit with Status to do so. In the ESDL editor for SWCs, you have to declare a method-/runnable-local variable of type Std_ReturnType, then specify the read access as statusVariable = Rport.t_mot.explicitRead(t_mot);. See also Receiving from a Port – Block Diagram and Receiving from a Port – ESDL.

Rte_Read is non-blocking even if no data is present to be read. If no data is present, the return value from the call is RTE_E_NO_DATA.

See also

Rte_DRead

Receiving from a Port – Block Diagram

Receiving from a Port – ESDL

Receiving from a Port with Status Request