DriveWorks SDK Reference
5.12.103 Release
For Test and Development only

SensorSerializer.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2016-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
47#ifndef DW_SENSORS_SENSORSERIALIZER_H_
48#define DW_SENSORS_SENSORSERIALIZER_H_
49
50#include <dw/core/base/Config.h>
52#include <dw/core/base/Types.h>
54
55#include <dw/sensors/Sensors.h>
57
58#ifdef __cplusplus
59extern "C" {
60#endif
61
66
69
72
75
78
82
84typedef struct dwSerializerStats
85{
102
109typedef void (*dwSensorSerializerOnDataFunc_t)(const uint8_t* data, size_t size, void* userData);
110
112typedef struct dwSensorSerializerObject* dwSensorSerializerHandle_t;
113
116typedef struct dwSerializerParams
117{
141 const char8_t* parameters;
142
145
147 void* userData;
149
170 dwSerializerParams const* const params,
171 dwSensorHandle_t const sensor);
172
191
210DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
212 dwSensorSerializerHandle_t const masterSerializer);
213
226DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
227dwStatus dwSensorSerializer_isAttached(bool* const isAttached, dwSensorSerializerHandle_t const serializer);
228
250DW_DEPRECATED("This API is deprecated and will be removed in the next major release")
252 dwSensorSerializerHandle_t const masterSerializer);
253
270
284
299dwStatus dwSensorSerializer_serializeData(uint8_t const* const data, size_t const size,
300 dwSensorSerializerHandle_t const serializer);
301
319dwStatus dwSensorSerializer_serializeDataAsync(uint8_t const* const data, size_t const size,
320 dwSensorSerializerHandle_t const serializer);
321
337 dwSensorSerializerHandle_t const serializer);
338
352 dwSensorSerializerHandle_t const serializer);
353
366 dwSensorSerializerHandle_t const serializer);
367#ifdef __cplusplus
368}
369#endif
370
372#endif // DW_SENSORS_SENSORSERIALIZER_H_
NVIDIA DriveWorks API: Cameras
NVIDIA DriveWorks API: Core Methods
dwStatus
Status definition.
Definition: ErrorDefs.h:45
NVIDIA DriveWorks API: Sensors
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Exports
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
Definition: Camera.h:73
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:64
double float64_t
Definition: BasicTypes.h:59
#define DW_DEPRECATED(msg)
Definition: Exports.h:66
#define DW_API_PUBLIC
Definition: Exports.h:54
const char8_t * parameters
Array for additional parameters provided to sensor serializer creation.
float64_t meanDelta[DW_SERIALIZER_STAT_COUNT]
Array of Mean of all the time deltas between various stages of serialization as per the dwSerializerS...
dwTime_t currentDeltaUs[DW_SERIALIZER_STAT_COUNT]
Array of current latencies of all the time deltas between various stages of serialization as per the ...
dwTime_t minDeltaUs[DW_SERIALIZER_STAT_COUNT]
Array of min latencies of all the time deltas between various stages of serialization as per the dwSe...
dwSensorSerializerOnDataFunc_t onData
Callback executed by the serializer on new data available.
float64_t standardDeviationDelta[DW_SERIALIZER_STAT_COUNT]
Array of Variance of all the time deltas between various stages of serialization as per the dwSeriali...
dwTime_t maxDeltaUs[DW_SERIALIZER_STAT_COUNT]
Array of max latencies of all the time deltas between various stages of serialization as per the dwSe...
void * userData
User data to be passed to the callback.
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.
DW_API_PUBLIC dwStatus dwSensorSerializer_detachFrom(dwSensorSerializerHandle_t const serializer, dwSensorSerializerHandle_t const masterSerializer)
This method detaches the serializer previously attached with dwSensorSerializer_attachTo().
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 'dwSensorSerializer_start' i...
dwSerializerStatTimeDifference
Defines the various delta used in statistics.
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeData(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
DW_API_PUBLIC dwStatus dwSensorSerializer_start(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
DW_API_PUBLIC dwStatus dwSensorSerializer_stop(dwSensorSerializerHandle_t const serializer)
Starts serialization of sensor.
DW_API_PUBLIC dwStatus dwSensorSerializer_release(dwSensorSerializerHandle_t const serializer)
Releases a 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_getStats(dwSerializerStats *const outStats, dwSensorSerializerHandle_t const serializer)
Gets serializer statistics (if available).
DW_API_PUBLIC dwStatus dwSensorSerializer_serializeCameraFrameAsync(dwCameraFrameHandle_t const frame, dwSensorSerializerHandle_t const serializer)
Pushes a camera frame to the serializer.
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_serializeDataAsync(uint8_t const *const data, size_t const size, dwSensorSerializerHandle_t const serializer)
Pushes data to the serializer.
struct dwSensorSerializerObject * dwSensorSerializerHandle_t
Handle representing a sensor serializer.
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_SERIALIZER_STAT_STAGE2_TIME
Stat to hold the stage2 time delta.
@ DW_SERIALIZER_STAT_DISK_WRITE_TIME
Stat to hold the disk write time delta.
@ DW_SERIALIZER_STAT_COUNT
Count which the type value is less than.
@ DW_SERIALIZER_STAT_STAGE1_TIME
Stat to hold the stage1 time delta.
@ DW_SERIALIZER_STAT_ENCODE_TIME
Stat to hold the encode time delta.
@ DW_SERIALIZER_STAT_STAGE3_TIME
Stat to hold the stage3 time delta.
Holds the parameters for sensor serializer creation.
Holds the available statistics for a serializer.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
Definition: Sensors.h:86