Function SimOneAPI::SetGpsUpdateCB

Function Documentation

bool SimOneAPI::SetGpsUpdateCB(void (*cb)(const char *mainVehicleId, SimOne_Data_Gps *pGps))

注册主车GPS更新回调

Register callback function of applying for GPS information.

此函数用于注册获取主车GPS信息的回调函数

This function is used to register a callback function for getting GPS data of the main vehicle.

参数:

cb -- [in]

获取主车GPS信息的回调函数,函数签名为:

void callback(const char* mainVehicleId, SimOne_Data_Gps *pGps)

  • mainVehicleId: 主车的ID / Id of the main vehicle

  • pGps: GPS消息 / GPS data

返回:

如果注册回调函数成功,则返回true,否则返回false

Returns true if the callback registration is successful, false otherwise.