主车信息 Main Vehicle¶
说明 / Overview
获取主车列表、主车状态及高精地图数据的接口。
Interfaces for retrieving the ego vehicle list, ego vehicle state, and HD map data.
GetMainVehicleList¶
bool GetMainVehicleList(SimOne_Data_MainVehicle_Info *pMainVehicleInfo)
获取主车信息列表
Retrieve the list of main vehicle information.
此函数用于获取主车信息列表,通常只需要检索一次
This function is used to retrieve the list of main vehicle information, which typically only needs to be retrieved once.
Parameters:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
pMainVehicleInfo |
SimOne_Data_MainVehicle_Info * |
指向主车信息结构的指针,包括车辆ID、数量和类型 Pointer to the main vehicle information structure, including vehicle ID, number, and type. |
— |
Returns:
| 类型 | 描述 |
|---|---|
bool |
成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise. |
GetMainVehicleStatus¶
bool GetMainVehicleStatus(const char *mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus)
获取主车状态信息
Get main vehicle status information.
此函数用于获取指定主车的状态信息
This function is used to retrieve the status information of a specified main vehicle.
Parameters:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
mainVehicleId |
const char * |
主车的ID ID of the main vehicle. |
— |
pMainVehicleStatus |
SimOne_Data_MainVehicle_Status * |
指向主车状态信息的指针 Pointer to the main vehicle status information. |
— |
Returns:
| 类型 | 描述 |
|---|---|
bool |
成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise. |
SetMainVehicleStatusUpdateCB¶
bool SetMainVehicleStatusUpdateCB(void(*cb)(const char *mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus))
获取主车状态信息回调的函数
Get main vehicle status callback function.
此函数用于注册主车状态信息的回调函数
This function is used to register a callback function for the main vehicle status information.
Parameters:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
cb |
void(*)(const char *mainVehicleId, SimOne_Data_MainVehicle_Status *pMainVehicleStatus) |
回调函数,用于获取主车状态信息 Callback function for retrieving main vehicle status information. |
— |
Returns:
| 类型 | 描述 |
|---|---|
bool |
成功注册返回true,否则返回false Returns true if the registration is successful, false otherwise. |
GetHDMapData¶
bool GetHDMapData(SimOne_Data_Map *hdMap)
获取高精度地图元数据信息
Retrieve high-precision map metadata information.
此函数用于获取在SimOne网络应用中配置的高精度地图数据
Parameters:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
hdMap |
SimOne_Data_Map * |
指向高精度地图数据的指针 Pointer to high-precision map data. |
— |
Returns:
| 类型 | 描述 |
|---|---|
bool |
成功获取返回true,否则返回false Returns true if the information is successfully retrieved, false otherwise. |