DoIP (ISO13400) Server Stack
Overview
RAPIDSEA supports DoIP protocol as explained in the ISO13400 - DoIP Protocol page. This page explains the server architecture and details how the user should interface the stack with their custom logic and realize the ECU implementation quickly. It also provides guidelines on adopting the stack for different systems.
The below diagram captures the block level diagram of the DoIP server and how it interfaces with other modules.
Application Interface
While the RAPIDSEA DoIP server stack can handle most of the functionality such as message validation, vehicle identification request, routing activation request, diagnostic request message handling etc, the business logic has to implement the application functionality. the RAPIDSEA DoIP server clearly defines API and callback functions that are essential for the user to use/implement.
The below table captures the function that are to be called from the application logic.
Function |
Description |
|---|---|
rs_iso13400_server_open |
To initialize the DoIP server instance structure for both UDP and TCP process |
rs_iso13400_server_timer_init |
To initialize the DoIP server timer |
rs_iso13400_server_run |
To be called to set the run state for state machine for both UDP and TCP process. |
rs_iso13400_server_udp_set_tx_msg_buf |
To set up the transmit buffers to be used for the DoIP server UDP communication |
rs_iso13400_server_udp_set_rx_msg_buf |
To set up the receive buffers to be used for the DoIP server UDP communication. |
rs_iso13400_server_tcp_set_tx_msg_buf |
To set up the transmit buffers to be used for the DoIP server TCP communication |
rs_iso13400_server_tcp_set_rx_msg_buf |
To set up the receive buffers to be used for the DoIP server TCP communication. |
rs_iso13400_server_set_tx_msg_buf |
To set up the transmit buffers to be used for the DoIP server and UDS communication. |
rs_iso13400_server_set_rx_msg_buf |
To set up the receive buffers to be used for the DoIP server and UDS communication. |
rs_iso13400_server_comm_process |
To be called periodically to process the incoming/outgoing messages of both UDP and TCP process. |
rs_iso13400_server_process |
To be called periodically to get the response from the UDS stack and frame doip layer on top of UDS response and sent to client. |
rs_iso13400_server_close |
To be called to release the DoIP client handle |
These functions are documented in detail in the below sections. It is important for the server to implement these functions correct for proper operation of the system.
Implementation Guide
This section explains how the DoIP server can be implemented using the RAPIDSEA stack. Whether the stack is available in source form or in binary form, the steps to be followed are
Implement the Callback functions mentioned above
Initialize the buffers necessary for the operation
Initialize the DoIP stack function.
Periodically call the communication process and server process functions so that internal timeouts are handled.
High level flow chart is depicted below:
The below diagram captures the high level sequence of operations associated with the DoIP stack.
This can be implemented in a bare-metal system or over RTOS or over full fledged OS such as Linux etc.
Dependency
This stack depends on the below RAPIDSEA interfaces that can be obtained or custom implemented.
Example demo
An example implementation is available along with the release and is described in DoIP UDS Server Demo.
DoIP Server Header Details
Documentation from the relevant header as follows:
Warning
doxygenfile: Cannot find file “rs_iso13400_server.h