跳转至

状态查询 State Query


RegisterVehicleState

bool RegisterVehicleState(const char *mainVehicleId, ESimOne_Data_Vehicle_State *pStateIndics, int size)

注册SimOne_Data_Gps包含的状态以外的主车状态信息
Register states of main vehicle dynamics beyond those included in SimOne_Data_Gps.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pStateIndics ESimOne_Data_Vehicle_State * 状态名称的数组
Array of state names.
size int pStateIndics中状态的数量
Number of states in pStateIndics.

返回值:

类型 说明
bool 如果注册成功,则返回true,否则返回false
Returns true if registration is successful, false otherwise.

GetVehicleState

bool GetVehicleState(const char *mainVehicleId, SimOne_Data_Vehicle_Extra *pVehExtraState)

获取通过RegisterSimOneVehicleState注册的主车状态信息
Get states of main vehicle dynamics which are registered by RegisterSimOneVehicleState.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pVehExtraState SimOne_Data_Vehicle_Extra * 主车动态状态信息
States of main vehicle dynamics.

返回值:

类型 说明
bool 如果成功获取状态信息,则返回true,否则返回false
Returns true if the states are successfully retrieved, false otherwise.

GetControlMode

bool GetControlMode(const char *mainVehicleId, SimOne_Data_Control_Mode *pControlMode)

获取车辆控制模式
Get the vehicle control mode.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pControlMode SimOne_Data_Control_Mode * 车辆控制模式
Vehicle control mode.

返回值:

类型 说明
bool 如果成功获取控制模式,则返回true,否则返回false
Returns true if the control mode is successfully retrieved, false otherwise.

GetDriverControl

bool GetDriverControl(const char *mainVehicleId, SimOne_Data_Control *pControl)

获取SimOneDriver控制信号
Get SimOneDriver drive control signals.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pControl SimOne_Data_Control * 由SimOneDriver提供的车辆控制数据
Vehicle control data from SimOneDriver.

返回值:

类型 说明
bool 如果成功获取控制数据,则返回true,否则返回false
Returns true if the control data is successfully retrieved, false otherwise.

GetWayPoints

bool GetWayPoints(const char *mainVehicleId, SimOne_Data_WayPoints *pWayPoints)

获取案例主车路径点
Get Main Vehicle WayPoints.

参数:

名称 类型 说明
mainVehicleId const char * 主车的ID
Id of the main vehicle.
pWayPoints SimOne_Data_WayPoints * 主车路径点数据
Main Vehicle WayPoints data.

返回值:

类型 说明
bool 如果成功获取路径点数据,则返回true,否则返回false
Returns true if the waypoint data is successfully retrieved, false otherwise.