Function SimOneAPI::InitSimOneAPIWithTimeOut

Function Documentation

bool SimOneAPI::InitSimOneAPIWithTimeOut(const char *mainVehicleId = "0", bool isFrameSync = false, const char *serverIP = "127.0.0.1", int port = 23789, int timeOutMS = -1, void (*startCase)() = 0, void (*endCase)() = 0, int registerNodeId = 0)

初始化SimOne API 带超时

Initialize the SimOne API with timeout.

此函数用于带超时的SimOne API初始化,适合自动驾驶算法

This function initializes the SimOne API with a timeout, suitable for autonomous driving algorithms.

参数:
const char *mainVehicleId = "0"

[in]

主机车辆ID(从0到9)

Host vehicle ID (from 0 to 9).

bool isFrameSync = false

[in]

是否进行帧同步

Whether to perform frame synchronization.

const char *serverIP = "127.0.0.1"

[in]

BridgeIO服务器IP地址

BridgeIO server IP address.

int port = 23789

[in]

BridgeIO服务器端口号

BridgeIO server port number.

int timeOutMS = -1

[in]

超时时间,以毫秒为单位

Timeout duration in milliseconds.

void (*startCase)() = 0

[in]

案例开始前的回调函数

Callback function called before the case starts.

void (*endCase)() = 0

[in]

案例结束后的回调函数

Callback function called after the case ends.

int registerNodeId = 0

[in]

注册节点ID(当前未使用)

Register node ID (currently not in use).

返回:

成功初始化返回true,否则返回false

Returns true if initialization is successful, false otherwise.