DriveWorks SDK Reference

| 0.6.67 Release

SensorManager.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2017 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
44 #ifndef DW_SENSORS_SENSORMANAGER_H__
45 #define DW_SENSORS_SENSORMANAGER_H__
46 
47 #include <dw/sensors/Sensors.h>
49 #include <dw/sensors/imu/IMU.h>
50 #include <dw/sensors/lidar/Lidar.h>
51 #include <dw/sensors/gps/GPS.h>
52 #include <dw/sensors/canbus/CAN.h>
53 #include <dw/sensors/radar/Radar.h>
54 #include <dw/sensors/lidar/Lidar.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 #define DW_SENSORMANGER_MAX_CAMERAS 6U
61 
62 typedef struct dwSensorManagerObject *dwSensorManagerHandle_t;
63 
65 typedef struct {
68 
70  uint32_t sensorId;
71 
74 
75  // Client Data
76  uint64_t clientData[DW_SENSORMANGER_MAX_CAMERAS];
77 
79  size_t numCamFrames;
81 
89 
102 dwStatus dwSensorManager_initialize(dwSensorManagerHandle_t *sm,
103  size_t poolSize, dwSALHandle_t sal);
104 
115 dwStatus dwSensorManager_release(dwSensorManagerHandle_t *sm);
116 
135 dwStatus dwSensorManager_addSensor(dwSensorParams params, uint64_t clientData,
136  dwSensorManagerHandle_t sm);
137 
158 dwStatus dwSensorManager_addCameraSensor(const char *groupName, size_t siblingIndex,
159  dwSensorParams params, uint64_t clientData,
160  dwSensorManagerHandle_t sm);
161 
171 dwStatus dwSensorManager_start(dwSensorManagerHandle_t sm);
172 
182 dwStatus dwSensorManager_stop(dwSensorManagerHandle_t sm);
183 
193 dwStatus dwSensorManager_reset(dwSensorManagerHandle_t sm);
194 
213  dwTime_t timeout_us, dwSensorManagerHandle_t sm);
214 
229  dwSensorManagerHandle_t sm);
230 
244  dwSensorManagerHandle_t sm);
245 
260  size_t index, dwSensorManagerHandle_t sm);
261 
262 #ifdef __cplusplus
263 }
264 #endif
265 
267 
268 #endif // DW_SENSORS_SENSORMANAGER_H__
Holds sets of parameters for sensor creation.
Definition: Sensors.h:86
Defines the structure for a complete radar scan.
Definition: Radar.h:263
NVIDIA DriveWorks API: Radar
DW_API_PUBLIC dwStatus dwSensorManager_reset(dwSensorManagerHandle_t sm)
Resets all sensors.
NVIDIA DriveWorks API: Lidar
const dwRadarScan * radFrame
Definition: SensorManager.h:86
dwSensorType
Defines the type of sensors that are available in DriveWorks.
Definition: Sensors.h:120
DW_API_PUBLIC dwStatus dwSensorManager_getNumSensors(size_t *count, dwSensorType type, dwSensorManagerHandle_t sm)
Gets the number of sensors instantiated for a given sensor type.
uint32_t sensorId
Index of the given sensor (aligns w/ sensor count)
Definition: SensorManager.h:70
DW_API_PUBLIC dwStatus dwSensorManager_start(dwSensorManagerHandle_t sm)
Starts all sensors.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:89
Structure for returning data upon any sensor event.
Definition: SensorManager.h:65
DW_API_PUBLIC dwStatus dwSensorManager_addSensor(dwSensorParams params, uint64_t clientData, dwSensorManagerHandle_t sm)
Adds a sensor to the SAL instance.
struct dwSensorManagerObject * dwSensorManagerHandle_t
Definition: SensorManager.h:62
dwTime_t timestamp_us
Timestamp (us)
Definition: SensorManager.h:73
DW_API_PUBLIC dwStatus dwSensorManager_stop(dwSensorManagerHandle_t sm)
Stops all sensors.
DW_API_PUBLIC dwStatus dwSensorManager_addCameraSensor(const char *groupName, size_t siblingIndex, dwSensorParams params, uint64_t clientData, dwSensorManagerHandle_t sm)
Adds a camera sensor to the SAL instance.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:80
dwStatus
Status definition.
Definition: Status.h:167
NVIDIA DriveWorks API: Sensors
const dwLidarDecodedPacket * lidFrame
Definition: SensorManager.h:87
size_t numCamFrames
Data accessor for camera.
Definition: SensorManager.h:79
DW_API_PUBLIC dwStatus dwSensorManager_acquireNextEvent(const dwSensorEvent **ev, dwTime_t timeout_us, dwSensorManagerHandle_t sm)
Called by the application to consume the next available sensor event ready for consumption.
DW_API_PUBLIC dwStatus dwSensorManager_releaseAcquiredEvent(const dwSensorEvent *ev, dwSensorManagerHandle_t sm)
Releases a previously acquired event back to the pool.
An IMU frame containing sensor readings from the IMU sensor.
Definition: IMU.h:105
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Sensors.h:77
DW_API_PUBLIC dwStatus dwSensorManager_release(dwSensorManagerHandle_t *sm)
Releases the SensorManager module.
NVIDIA DriveWorks API: GPS
NVIDIA DriveWorks API: CAN
dwIMUFrame imuFrame
Definition: SensorManager.h:84
#define DW_SENSORMANGER_MAX_CAMERAS
Definition: SensorManager.h:60
dwGPSFrame gpsFrame
Data accessor for all other sensors.
Definition: SensorManager.h:83
NVIDIA DriveWorks API: Cameras
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:62
DW_API_PUBLIC dwStatus dwSensorManager_getSensorHandle(dwSensorHandle_t *handle, dwSensorType type, size_t index, dwSensorManagerHandle_t sm)
Gets the sensor handle to the specified sensor.
DW_API_PUBLIC dwStatus dwSensorManager_initialize(dwSensorManagerHandle_t *sm, size_t poolSize, dwSALHandle_t sal)
Creates and initializes a SensorManager module.
dwCANMessage canFrame
Definition: SensorManager.h:85
#define DW_API_PUBLIC
Definition: Exports.h:76
NVIDIA DriveWorks API: IMU
dwSensorType type
Type of sensor providing data for this event.
Definition: SensorManager.h:67
Holds a CAN package.
Definition: CAN.h:109
A GPS packet containing localization information.
Definition: GPS.h:60