SimOne C++ API Reference 3.7.0
SimOne 仿真平台C++接口文档
Loading...
Searching...
No Matches
SimOnePNCAPI.h
Go to the documentation of this file.
1// ==========================================================================
2// Copyright (C) 2018 - 2021 Beijing 51WORLD Digital Twin Technology Co., Ltd.
3// , and/or its licensors. All rights reserved.
4//
5// The coded instructions, statements, computer programs, and/or related
6// material (collectively the "Data") in these files contain unpublished
7// information proprietary to Beijing 51WORLD Digital Twin Technology Co., Ltd.
8// ("51WORLD") and/or its licensors, which is protected by the People's
9// Republic of China and/or other countries copyright law and by
10// international treaties.
11//
12// The Data may not be disclosed or distributed to third parties or be
13// copied or duplicated, in whole or in part, without the prior written
14// consent of 51WORLD.
15//
16// The copyright notices in the Software and this entire statement,
17// including the above license grant, this restriction and the following
18// disclaimer, must be included in all copies of the Software, in whole
19// or in part, and all derivative works of the Software, unless such copies
20// or derivative works are solely in the form of machine-executable object
21// code generated by a source language processor.
22
23// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
24// 51WORLD DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED
25// WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF
26// NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE,
27// OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO
28// EVENT WILL 51WORLD AND/OR ITS LICENSORS BE LIABLE FOR ANY LOST
29// REVENUES, DATA, OR PROFITS, OR SPECIAL, DIRECT, INDIRECT, OR
30// CONSEQUENTIAL DAMAGES, EVEN IF 51WORLD AND/OR ITS LICENSORS HAS
31// BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES.
32// ==========================================================================
33#pragma once
34#ifndef WITHOUT_PNC
35#ifdef BUILD_SIMONE_API
36#if defined(WIN32) || defined(_WIN32)
37#define SIMONE_API __declspec(dllexport)
38#elif defined(__linux__) || defined(__linux)
39#define SIMONE_API __attribute__((visibility("default")))
40#endif
41#else
42#define SIMONE_API
43#endif
44
45#include <string>
46#include "Service/SimOneIOStruct.h"
47
48#ifdef __cplusplus
49extern "C"
50{
51#endif
52
53 namespace SimOneAPI {
54
69 SIMONE_API bool RegisterVehicleState(const char* mainVehicleId, ESimOne_Data_Vehicle_State *pStateIndics, int size);
70
83 SIMONE_API bool GetVehicleState(const char* mainVehicleId, SimOne_Data_Vehicle_Extra* pVehExtraState);
84
97 SIMONE_API bool SetPose(const char* mainVehicleId, SimOne_Data_Pose_Control *pPose);
98
111 SIMONE_API bool SetDrive(const char* mainVehicleId, SimOne_Data_Control *pControl);
112
133 SIMONE_API bool SetDriveMode(const char* mainVehicleId, ESimOne_Drive_Mode driveMode);
134
147 SIMONE_API bool SetTrajectory(const char* mainVehicleId, SimOne_Data_Trajectory *pTrajectory);
148
161 SIMONE_API bool SetDriveTrajectory(const char* mainVehicleId, SimOne_Data_Control_Trajectory *pControlTrajectory);
162
175 SIMONE_API void SetDriverName(const char* mainVehicleId, const char* name);
176
189 SIMONE_API bool SetVehicleEvent(const char* mainVehicleId, SimOne_Data_Vehicle_EventInfo *pVehicleEvent);
190
203 SIMONE_API bool SetSignalLights(const char* mainVehicleId, SimOne_Data_Signal_Lights *pSignalLights);
204
217 SIMONE_API bool GetControlMode(const char* mainVehicleId, SimOne_Data_Control_Mode* pControlMode);
218
231 SIMONE_API bool GetDriverControl(const char* mainVehicleId, SimOne_Data_Control* pControl);
232
245 SIMONE_API bool GetWayPoints(const char* mainVehicleId, SimOne_Data_WayPoints* pWayPoints);
246
265 SIMONE_API bool SetScenarioEventCB(void(*cb)(const char* source, const char* target, const char* type, const char* content));
266
277 SIMONE_API bool SetVehicleToInitState(const char* mainVehicleId);
278
291 SIMONE_API bool SetVehicleInitState(const char* mainVehicleId,SimOne_Vehicle_Init_State initState);
292
305 SIMONE_API bool SetRoadCoefficient(const char* mainVehicleId, SimOne_Data_Road_Coefficient roadCoeff);
306
307 }
308#ifdef __cplusplus
309}
310#endif
311#endif
#define SIMONE_API
Definition SimOneEvaluationAPI.h:42
ESimOne_Data_Vehicle_State
Definition SimOneIOStruct.h:546
ESimOne_Drive_Mode
Definition SimOneIOStruct.h:232
Definition SimOneControlTransAPI.h:20
SIMONE_API bool GetWayPoints(const char *mainVehicleId, SimOne_Data_WayPoints *pWayPoints)
获取案例主车路径点 Get Main Vehicle WayPoints.
SIMONE_API bool SetDriveMode(const char *mainVehicleId, ESimOne_Drive_Mode driveMode)
主车控制模式 Set the driving mode of the vehicle dynamics.
SIMONE_API bool SetVehicleToInitState(const char *mainVehicleId)
重置主车到初始状态 Reset the main vehicle state to the initial state.
SIMONE_API bool SetTrajectory(const char *mainVehicleId, SimOne_Data_Trajectory *pTrajectory)
预测轨迹设置 Set vehicle waypoints.
SIMONE_API bool SetPose(const char *mainVehicleId, SimOne_Data_Pose_Control *pPose)
设置主车位置 Set the main vehicle's pose.
SIMONE_API bool SetVehicleInitState(const char *mainVehicleId, SimOne_Vehicle_Init_State initState)
设置主车初始状态 Set the main vehicle initial state.
SIMONE_API bool SetDrive(const char *mainVehicleId, SimOne_Data_Control *pControl)
主车控制 Set vehicle drive control.
SIMONE_API bool SetRoadCoefficient(const char *mainVehicleId, SimOne_Data_Road_Coefficient roadCoeff)
设置路面摩擦系数 Set the main vehicle initial state.
SIMONE_API bool GetVehicleState(const char *mainVehicleId, SimOne_Data_Vehicle_Extra *pVehExtraState)
获取通过RegisterSimOneVehicleState注册的主车状态信息 Get states of main vehicle dynamics which are registered by R...
SIMONE_API bool GetDriverControl(const char *mainVehicleId, SimOne_Data_Control *pControl)
获取SimOneDriver控制信号 Get SimOneDriver drive control signals.
SIMONE_API void SetDriverName(const char *mainVehicleId, const char *name)
设置主车控制器的名字 Set the main vehicle driver's name.
SIMONE_API bool RegisterVehicleState(const char *mainVehicleId, ESimOne_Data_Vehicle_State *pStateIndics, int size)
注册SimOne_Data_Gps包含的状态以外的主车状态信息 Register states of main vehicle dynamics beyond those included in Sim...
SIMONE_API bool SetScenarioEventCB(void(*cb)(const char *source, const char *target, const char *type, const char *content))
场景事件回调 Register the callback for scenario events.
SIMONE_API bool SetDriveTrajectory(const char *mainVehicleId, SimOne_Data_Control_Trajectory *pControlTrajectory)
主车控制:通过规划轨迹进行控制 Set vehicle drive control by planning trajectory.
SIMONE_API bool GetControlMode(const char *mainVehicleId, SimOne_Data_Control_Mode *pControlMode)
获取车辆控制模式 Get the vehicle control mode.
SIMONE_API bool SetVehicleEvent(const char *mainVehicleId, SimOne_Data_Vehicle_EventInfo *pVehicleEvent)
设置主车预警消息 Set vehicle event information.
SIMONE_API bool SetSignalLights(const char *mainVehicleId, SimOne_Data_Signal_Lights *pSignalLights)
设置车辆信号灯状态 Set signal lights for the vehicle.
Definition SimOneIOStruct.h:1499
Definition SimOneIOStruct.h:256
Definition SimOneIOStruct.h:199
Definition SimOneIOStruct.h:113
Definition SimOneIOStruct.h:541
Definition SimOneIOStruct.h:876
Definition SimOneIOStruct.h:342
Definition SimOneIOStruct.h:308
Definition SimOneIOStruct.h:710
Definition SimOneIOStruct.h:103
Definition SimOneIOStruct.h:534