Function SimOneAPI::InitSimOneAPI¶
Defined in File SimOneServiceAPI.h
Function Documentation¶
-
bool SimOneAPI::InitSimOneAPI(const char *mainVehicleId = "0", bool isFrameSync = false, const char *serverIP = "127.0.0.1", int port = 23789, void (*startCase)() = 0, void (*endCase)() = 0, int registerNodeId = 0)¶
初始化SimOne API
Initialize the SimOne API.
此函数用于启动SimOne API,适用于自动驾驶算法的初始化
This function is used to start the SimOne API, suitable for initializing autonomous driving algorithms.
- 参数:¶
- const char *mainVehicleId = "0"¶
[in]
主车的ID,字符串类型,默认为"0"
Main vehicle ID as a string, default is "0".
- bool isFrameSync = false¶
[in]
是否同步帧,true表示同步,false表示异步,默认为false
Whether to synchronize frames, true for synchronization, false for asynchronous, default is false.
- const char *serverIP = "127.0.0.1"¶
[in]
BridgeIO服务器IP地址,默认为"127.0.0.1"
BridgeIO server IP address, default is "127.0.0.1".
- int port = 23789¶
[in]
BridgeIO服务器端口号,默认为23789
BridgeIO server port number, default is 23789.
- void (*startCase)() = 0¶
[in]
案例开始前调用的回调函数,函数签名为:void startCase()
Callback function called before the case starts, function signature: void startCase().
- void (*endCase)() = 0¶
[in]
案例结束后调用的回调函数,函数签名为:void endCase()
Callback function called after the case ends, function signature: void endCase().
- int registerNodeId = 0¶
[in]
注册节点ID(当前未使用),默认为0
Register node ID (currently not in use), default is 0.
- 返回:¶
成功初始化返回true,否则返回false
Returns true if initialization is successful, false otherwise.