定位传感器(GPS) GPS¶
GetGps¶
bool GetGps(const char *mainVehicleId, SimOne_Data_Gps *pGps)
获取主车GPS信息.
Get main vehicle GPS
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
mainVehicleId |
const char * |
主车的ID Id of the main vehicle |
pGps |
SimOne_Data_Gps * |
GPS消息 GPS data |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果成功获取GPS数据,则返回true,否则返回false Returns true if the GPS data is successfully retrieved, false otherwise |
SetGpsUpdateCB¶
bool SetGpsUpdateCB(void(*cb)(const char *mainVehicleId, SimOne_Data_Gps *pGps))
注册主车GPS更新回调.
Register callback function of applying for GPS information.
参数:
| 名称 | 类型 | 说明 |
|---|---|---|
cb |
void(*)(const char *mainVehicleId, SimOne_Data_Gps *pGps) |
获取主车GPS信息的回调函数 GPS data update callback function |
返回值:
| 类型 | 说明 |
|---|---|
bool |
如果注册回调函数成功,则返回true,否则返回false Returns true if the callback registration is successful, false otherwise. |