Function SimOneAPI::InitSimOneAPIWithTimeOut
Defined in File SimOneServiceAPI.h
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.
- 参数:
mainVehicleId -- [in]
主机车辆ID(从0到9)
Host vehicle ID (from 0 to 9).
isFrameSync -- [in]
是否进行帧同步
Whether to perform frame synchronization.
serverIP -- [in]
BridgeIO服务器IP地址
BridgeIO server IP address.
port -- [in]
BridgeIO服务器端口号
BridgeIO server port number.
timeOutMS -- [in]
超时时间,以毫秒为单位
Timeout duration in milliseconds.
startCase -- [in]
案例开始前的回调函数
Callback function called before the case starts.
endCase -- [in]
案例结束后的回调函数
Callback function called after the case ends.
registerNodeId -- [in]
注册节点ID(当前未使用)
Register node ID (currently not in use).
- 返回:
成功初始化返回true,否则返回false
Returns true if initialization is successful, false otherwise.