AUTOSAR RTE — part 1
RTE is the realization (implementation) of VFB for a single ECU. It provides mechanisms to application SW-Cs to communicate with each other and supports the scheduling of the components. Software component interaction is designed against a VirtualFunction Bus (VFB).
The VFB provides a design abstraction that allows interacting soft-ware components to be specified and built without detailed knowledge about which ECU they will be allocated at integration time, how ECUs in the vehicle network communicate, the vehicle network topology, etc.. In VFB model components communicate with each other through ports. There are two types of ports provider port and receiver port.
Provider Ports are used by a software component to provide data or services to other software components. Provided ports implement senders and servers
Reciever Ports are used by a software component to require data or services from other software components. Required ports implement receivers and clients.
Sender-receiver ports are for data transfer between two components. Let’s say you want a variable to be shared between two components, then in a normal SW development, we could use global variables or buffers or function calls, etc.. In Autosar we can use APIs to transfer data
The above image shows the component distribute_v is giving out the data with the API Rte_write_p_v() and the component v_warn uses Rte_Read_p_v() to get the data. The definition of these RTE calls will be generated typically by an RTE generator tool at the time of SW Integration. How the function is implemented vary from tool to tool and from use-case to use-case. But how the function is implemented is not of any concern to the developer coding the components. They just have to know what type of interface that needs transfer and its properties
The sender-receiver ports could use two kinds of communication mechanisms, Implicit and Explicit. Implicit means there will not be any dedicated code that will run to transfer the data when the RTE function is called by the component,instead, there will be a fixed time slot where one or group of implicit ports will be written or read.
Implicit RTE calls start with RTE_IRead_* or RTE_IWrite_*.
For Explicit ports on the other hand, as soon as the RTE call is made a code will run to update the data(send or receive) immediately. Explicit RTE calls start with RTE_Read_* or RTE_Write_*.
The service ports are used to perform some activity, for eg., A DEM function is used to report an error that occurred.
Originally published at https://www.vtronics.in on September 28, 2019.