DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

SensorSerializer.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) 2016-2020 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 
47 #ifndef DW_SENSORS_SENSORSERIALIZER_H_
48 #define DW_SENSORS_SENSORSERIALIZER_H_
49 
50 #include <dw/core/Config.h>
51 #include <dw/core/base/Exports.h>
52 #include <dw/core/base/Types.h>
54 
55 #include <dw/sensors/Sensors.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
67 typedef void (*dwSensorSerializerOnDataFunc_t)(const uint8_t* data, size_t size, void* userData);
68 
70 typedef struct dwSensorSerializerObject* dwSensorSerializerHandle_t;
71 
74 typedef struct dwSerializerParams
75 {
100 
103 
105  void* userData;
107 
125 dwStatus dwSensorSerializer_initialize(dwSensorSerializerHandle_t* const serializer,
126  dwSerializerParams const* const params,
127  dwSensorHandle_t const sensor);
128 
146 dwStatus dwSensorSerializer_release(dwSensorSerializerHandle_t const serializer);
147 
166 DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
167 dwStatus dwSensorSerializer_attachTo(dwSensorSerializerHandle_t const serializer,
168  dwSensorSerializerHandle_t const masterSerializer);
169 
182 DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
183 dwStatus dwSensorSerializer_isAttached(bool* const isAttached, dwSensorSerializerHandle_t const serializer);
184 
206 DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
207 dwStatus dwSensorSerializer_detachFrom(dwSensorSerializerHandle_t const serializer,
208  dwSensorSerializerHandle_t const masterSerializer);
209 
225 dwStatus dwSensorSerializer_start(dwSensorSerializerHandle_t const serializer);
226 
239 dwStatus dwSensorSerializer_stop(dwSensorSerializerHandle_t const serializer);
240 
255 dwStatus dwSensorSerializer_serializeData(uint8_t const* const data, size_t const size,
256  dwSensorSerializerHandle_t const serializer);
257 
275 dwStatus dwSensorSerializer_serializeDataAsync(uint8_t const* const data, size_t const size,
276  dwSensorSerializerHandle_t const serializer);
277 
291 dwStatus
293  dwSensorSerializerHandle_t const serializer);
294 
308  dwSensorSerializerHandle_t const serializer);
309 
310 #ifdef __cplusplus
311 }
312 #endif
313 
315 #endif // DW_SENSORS_SENSORSERIALIZER_H_
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwSensorSerializer_stop(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
NVIDIA DriveWorks API: Cameras
struct dwSensorSerializerObject * dwSensorSerializerHandle_t
Handle representing a sensor serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_start(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
dwSensorSerializerOnDataFunc_t onData
Callback executed by the serializer on new data available.
const char8_t * parameters
Array for additional parameters provided to sensor serializer creation.
Holds the parameters for sensor serializer creation.
void(* dwSensorSerializerOnDataFunc_t)(const uint8_t *data, size_t size, void *userData)
Callback type for getting data from sensor serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_isAttached(bool *const isAttached, dwSensorSerializerHandle_t const serializer)
Query method to check whether the serializer is attached to another.
DW_API_PUBLIC dwStatus dwSensorSerializer_release(dwSensorSerializerHandle_t const serializer)
Releases a sensor serializer.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:84
dwStatus
Status definition.
Definition: Status.h:180
NVIDIA DriveWorks API: Sensors
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
void * userData
User data to be passed to the callback.
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeCameraFrameAsync(dwCameraFrameHandle_t const frame, dwSensorSerializerHandle_t const serializer)
Pushes a camera frame to the serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_detachFrom(dwSensorSerializerHandle_t const serializer, dwSensorSerializerHandle_t const masterSerializer)
This method detaches the serializer previously attached with dwSensorSerializer_attachTo().
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:67
NVIDIA DriveWorks API: Core Methods
char char8_t
Definition: Types.h:72
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeCameraFrame(dwCameraFrameHandle_t const frame, dwSensorSerializerHandle_t const serializer)
Pushes a camera frame to the serializer.This method must only be used if &#39;dwSensorSerializer_start&#39; i...
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeDataAsync(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeData(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
#define DW_API_PUBLIC
Definition: Exports.h:54
DW_API_PUBLIC dwStatus dwSensorSerializer_attachTo(dwSensorSerializerHandle_t const serializer, dwSensorSerializerHandle_t const masterSerializer)
Starts and stops serialization of a sensor with a master serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_initialize(dwSensorSerializerHandle_t *const serializer, dwSerializerParams const *const params, dwSensorHandle_t const sensor)
Initializes a sensor serializer with the parameters provided.
NVIDIA DriveWorks API: Core Exports