SimOne C++ API Reference 3.7.0
SimOne 仿真平台C++接口文档
Loading...
Searching...
No Matches
SimOneStreamingAPI.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
35#if defined(WIN32) || defined(_WIN32)
36#define SIMONE_NET_API __declspec(dllexport)
37#elif defined(__linux__) || defined(__linux)
38#define SIMONE_NET_API __attribute__((visibility("default")))
39#endif
40
41#pragma pack(push)
42#pragma pack(1)
44{
45 long long timestamp = 0; // timestamp millisecond
46 int frame; // frame with 1000hz
47 int version = 0; // API version
48};
49// ----------------------------
50// Image data (SimOne Output)
51// ----------------------------
52#define SOSM_IMAGE_WIDTH_MAX 3840
53#define SOSM_IMAGE_HEIGHT_MAX 2160
54#define SOSM_IMAGE_DATA_SIZE_MAX SOSM_IMAGE_WIDTH_MAX*SOSM_IMAGE_HEIGHT_MAX*3
62
64{
65 int width; // Image resolution width 1920 max
66 int height; // Image resolution height 1200 max
67 ESimOne_Streaming_Image_Format format; // Image format, RGB only for now
68 int imageDataSize; // image data size
69 char imageData[SOSM_IMAGE_DATA_SIZE_MAX]; // 1920 x 1200 x 3 max
70};
71// ----------------------------
72// Point cloud data (SimOne Output)
73// ----------------------------
75{
76 float x;
77 float y;
78 float z;
79 float intensity;
80};
81
82#define RADAR4D_POINTS_SIZE_MAX 1050
84{
85 float azimuth; // azimuth unit: deg
86 float elevation; // elevation unit : deg
87 float range; // range unit : m
88 float doppler; // doppler unit : m/s
89 float rcs; // rcs unit : dBsm
90};
91
92#define SOSM_POINT_DATA_SIZE_MAX 6429600 // PointCloud Max Memory Size
101#pragma pack(pop)
102
103#ifdef __cplusplus
104extern "C"
105{
106#endif
107 namespace SimOneAPI {
108
123 SIMONE_NET_API bool GetStreamingImage(const char *ip, unsigned short port, SimOne_Streaming_Image *pImage);
124
141 SIMONE_NET_API bool SetStreamingImageUpdateCB(const char* ip, unsigned short port, void(*cb)(SimOne_Streaming_Image *pImage));
142
159 SIMONE_NET_API bool GetStreamingPointCloud(const char* ip, unsigned short port, unsigned short infoPort, SimOne_Streaming_Point_Cloud *pPointCloud);
160
179 SIMONE_NET_API bool SetStreamingPointCloudUpdateCB(const char* ip, unsigned short port, unsigned short infoPort, void(*cb)(SimOne_Streaming_Point_Cloud *pPointCloud));
180
197 SIMONE_NET_API bool GetStreamingRadar4DPointCloud(const char* ip, unsigned short port, SimOne_Streaming_Point_Cloud *pPointCloud);
198
217 SIMONE_NET_API bool SetStreamingRadar4DPointCloudUpdateCB(const char* ip, unsigned short port, void(*cb)(SimOne_Streaming_Point_Cloud *pPointCloud));
218 }
219#ifdef __cplusplus
220}
221#endif
#define SOSM_POINT_DATA_SIZE_MAX
Definition SimOneStreamingAPI.h:92
ESimOne_Streaming_Image_Format
Definition SimOneStreamingAPI.h:56
@ ESimOne_Streaming_Image_Format_JPEG
Definition SimOneStreamingAPI.h:59
@ ESimOne_Streaming_Image_Format_H265
Definition SimOneStreamingAPI.h:60
@ ESimOne_Streaming_Image_Format_RGB
Definition SimOneStreamingAPI.h:57
@ ESimOne_Streaming_Image_Format_RLESegmentation
Definition SimOneStreamingAPI.h:58
#define SOSM_IMAGE_DATA_SIZE_MAX
Definition SimOneStreamingAPI.h:54
Definition SimOneControlTransAPI.h:20
SIMONE_NET_API bool GetStreamingPointCloud(const char *ip, unsigned short port, unsigned short infoPort, SimOne_Streaming_Point_Cloud *pPointCloud)
获得物理级激光雷达点云数据. Retrieve point cloud data from streaming based lidar.
SIMONE_NET_API bool GetStreamingRadar4DPointCloud(const char *ip, unsigned short port, SimOne_Streaming_Point_Cloud *pPointCloud)
获得4D毫米波雷达点云数据. Retrieve point cloud data from streaming based 4D radar.
SIMONE_NET_API bool SetStreamingRadar4DPointCloudUpdateCB(const char *ip, unsigned short port, void(*cb)(SimOne_Streaming_Point_Cloud *pPointCloud))
获得4D毫米波雷达点云数据更新回调. Callback for Updates on point cloud data from streaming based 4D radar.
SIMONE_NET_API bool GetStreamingImage(const char *ip, unsigned short port, SimOne_Streaming_Image *pImage)
获得物理级摄像头图像数据. Retrieve image data from streaming based camera.
SIMONE_NET_API bool SetStreamingPointCloudUpdateCB(const char *ip, unsigned short port, unsigned short infoPort, void(*cb)(SimOne_Streaming_Point_Cloud *pPointCloud))
获得物理级激光雷达点云数据更新回调. Callback for Updates on point cloud data from streaming based lidar.
SIMONE_NET_API bool SetStreamingImageUpdateCB(const char *ip, unsigned short port, void(*cb)(SimOne_Streaming_Image *pImage))
获得物理级摄像头图像数据更新回调. Callback for Updates on image data from streaming based camera.
Definition SimOneStreamingAPI.h:44
long long timestamp
Definition SimOneStreamingAPI.h:45
int frame
Definition SimOneStreamingAPI.h:46
int version
Definition SimOneStreamingAPI.h:47
Definition SimOneStreamingAPI.h:64
int width
Definition SimOneStreamingAPI.h:65
ESimOne_Streaming_Image_Format format
Definition SimOneStreamingAPI.h:67
char imageData[SOSM_IMAGE_DATA_SIZE_MAX]
Definition SimOneStreamingAPI.h:69
int imageDataSize
Definition SimOneStreamingAPI.h:68
int height
Definition SimOneStreamingAPI.h:66
Definition SimOneStreamingAPI.h:94
int height
Definition SimOneStreamingAPI.h:96
int width
Definition SimOneStreamingAPI.h:95
int pointCloudDataSize
Definition SimOneStreamingAPI.h:98
char pointCloudData[SOSM_POINT_DATA_SIZE_MAX]
Definition SimOneStreamingAPI.h:99
int pointStep
Definition SimOneStreamingAPI.h:97
Definition SimOneStreamingAPI.h:75
float y
Definition SimOneStreamingAPI.h:77
float intensity
Definition SimOneStreamingAPI.h:79
float x
Definition SimOneStreamingAPI.h:76
float z
Definition SimOneStreamingAPI.h:78
Definition SimOneStreamingAPI.h:84
float rcs
Definition SimOneStreamingAPI.h:89
float elevation
Definition SimOneStreamingAPI.h:86
float doppler
Definition SimOneStreamingAPI.h:88
float range
Definition SimOneStreamingAPI.h:87
float azimuth
Definition SimOneStreamingAPI.h:85