V2XAPI¶
V2X technology centers on two key devices: OBU and RSU, which enable vehicle-to-vehicle and vehicle-to-roadside infrastructure communication via wireless links.
| No. | Component | Installation Location | Description | Communication Method |
|---|---|---|---|---|
| 1 | OBU (On-Board Unit) | Inside the vehicle | Serves as the vehicle's communication node | Directly connects to RSU; communicates with other OBUs via LTE broadcast |
| 2 | RSU (Roadside Unit) | Roadside infrastructure | Acts like a large Wi-Fi hotspot, supporting vehicle communication | Broadcasts CSAE2020-standard messages to all vehicle OBUs |
Under the CSAE2020 standard, the RSU is responsible for broadcasting critical safety and navigation information to on-board OBUs, ensuring vehicles receive important communications in a timely manner. The broadcast message types are as follows:
| Message Type | Coverage |
|---|---|
| SPAT | Traffic signal phase and timing information, e.g., signal state changes |
| RSI | Roadside information covering road conditions such as construction, speed limits, etc. |
| RSM | Roadside safety messages, including accident reports, vehicle anomalies, etc. |
| MAP | Map information describing intersection geometry and traffic signal phase details |
V2X API Quick Reference¶
| Use Case | API |
|---|---|
| Active query: fetch a specific type of V2X message on demand (polling mode) | GetV2XInfo |
| Passive reception: register a callback to receive all V2X message updates in real time (recommended, no data loss) | SetV2XInfoUpdateCB |
Polling vs Callback: How to Choose?¶
GetV2XInfo: Suitable for fetching messages on demand at specific points in time (e.g., at the start of each frame). Simple to implement, but high-frequency messages may be missed between frames.SetV2XInfoUpdateCB: Suitable for Scenarios that require processing every V2X message (e.g., traffic signal state tracking). Provides better real-time performance and is the recommended approach.
The infoType parameter corresponds to values in the ESimOne_V2X_MessageFrame_PR enumeration. Refer to the C++ API reference documentation for details.
For the complete API signatures, parameter descriptions, and the
SimOne_Data_V2XNFSstruct definition, see: -GetV2XInfo-SetV2XInfoUpdateCB