Function SimOneAPI::SetRadarDetectionsUpdateCB

Function Documentation

bool SimOneAPI::SetRadarDetectionsUpdateCB(void (*cb)(const char *mainVehicleId, const char *sensorId, SimOne_Data_RadarDetection *pDetections))

毫米波雷达目标信息回调

Register Millimeter-Wave Radar Target Information Callback

此函数用于注册获取仿真场景中毫米波雷达目标信息的回调函数

This function is used to register a callback function for getting objects data detected by millimeter-wave radar.

参数:

cb -- [in]

获取仿真场景中毫米波雷达检测数据的回调函数,函数签名为:

void callback(const char* mainVehicleId, const char* sensorId, SimOne_Data_RadarDetection *pDetections)

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

  • sensorId: 毫米波雷达传感器ID / Sensor Index

  • pDetections: 毫米波雷达感知消息 / Radar detections

返回:

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

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