54#ifndef DW_SENSORS_SENSORS_H_
55#define DW_SENSORS_SENSORS_H_
89#define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH 32
91#define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH 512
DriveWorks API: Signal Status Library
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Core Exports
struct dwContextObject * dwContextHandle_t
Context handle.
uint8_t dwSignalValidity
The type of the encoded status field.
dwStatus
Status definition.
float float32_t
Specifies POD types.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
dwTime_t timeDeltaMax
Maximum observed host timestamp difference between two consecutive packets.
float64_t standardDeviationDelta[DW_SENSOR_STATE_SENSOR_STAT_COUNT]
Array of Variance of all the deltas between consecutive timestamps as per the dwSensorStatTimeDiffere...
uint64_t event
counter of this event
uint64_t offset
offset into a file of this event
const void * auxiliarydata
Additional data to pass to sensor creation function.
dwTime_t minDelta[DW_SENSOR_STATE_SENSOR_STAT_COUNT]
Array of Minimum observed time difference between two consecutive packets as per the dwSensorStatTime...
uint64_t errors
Number of encountered errors.
uint64_t drops
Number of events dropped.
uint64_t events
Number of normal events (excluding errors and drops).
float64_t meanDelta[DW_SENSOR_STATE_SENSOR_STAT_COUNT]
Array of Mean of all the deltas between consecutive timestamps as per the dwSensorStatTimeDifference.
dwTime_t timestamp_us
Timestamp for the current message.
dwTime_t timeDeltaMin
Minimum observed host timestamp difference between two consecutive packets.
float64_t timeDeltaStandardDeviation
Variance of all the deltas between consecutive host timestamps.
struct dwSensorVehicleState::@7 validityInfo
Validity info.
dwTime_t currentDelta[DW_SENSOR_STATE_SENSOR_STAT_COUNT]
Array of Current time difference between two consecutive packets as per the dwSensorStatTimeDifferenc...
dwSensorDrivingDirection direction
driving direction
float32_t speed
vehicle velocity (m/s)
dwTime_t maxDelta[DW_SENSOR_STATE_SENSOR_STAT_COUNT]
Array of Maximum observed time difference between two consecutive packets as per the dwSensorStatTime...
float64_t timeDeltaMean
Mean of all the deltas between consecutive host timestamps.
const char8_t * parameters
Array to additional parameters provided to sensor creation.
dwTime_t timeDeltaCur
Current host timestamp difference between two consecutive packets.
uint64_t size
size of the event present in the virtual data file, in bytes
const char8_t * protocol
Name of the protocol.
dwTime_t timestamp
timestamp of this entry
float32_t temperature
ambient temperature (C)
DW_API_PUBLIC dwStatus dwSensor_getNumSeekTableEntries(size_t *const size, dwSensorHandle_t const hsensor)
Get the number of entries in the seek Table.
DW_API_PUBLIC dwStatus dwSensor_createSeekTable(dwSensorHandle_t const sensor)
Forces recreation of the seek table, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSensor_getStats(dwSensorStats *const stats, dwSensorHandle_t const sensor)
Gets sensor statistics (if available).
dwSensorStatTimeDifference
Defines the various delta used in statistics.
DW_API_PUBLIC dwStatus dwSensor_reset(dwSensorHandle_t const sensor)
Resets the sensor.
DW_API_PUBLIC dwStatus dwSAL_getPlatform(dwPlatformOS *const os, dwSALHandle_t sal)
Gets current platform the SDK is running on.
DW_API_PUBLIC dwStatus dwSensor_setThreadPriority(int32_t const priority, dwSensorHandle_t const sensor)
Sets the priority of the internal thread, for sensors that use an internal thread to communicate to t...
DW_API_PUBLIC dwStatus dwSensor_saveSeekTable(const char *const fileName, dwSensorHandle_t const sensor)
Saves the seek table for the sensor to a file, for sensors that support seek tables.
DW_API_PUBLIC dwStatus dwSAL_setVehicleState(dwSensorVehicleState *const vehicleState, dwSALHandle_t const sal)
Pass vehicle state to all sensors.
dwStatus dwSensor_getHeader(uint8_t const **const buffer, size_t *bufferSize, dwSensorHandle_t const sensor)
DW_API_PUBLIC dwStatus dwSAL_createSensor(dwSensorHandle_t *const sensor, dwSensorParams const params, dwSALHandle_t const sal)
Creates a new sensor managed by the SAL module with the given parameters.
DW_API_PUBLIC dwStatus dwSensor_start(dwSensorHandle_t const sensor)
Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
DW_API_PUBLIC dwStatus dwSAL_start(dwSALHandle_t const sal)
Bootstraps all sensors managed by the SAL module.
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
DW_API_PUBLIC dwStatus dwSensor_getSeekRange(size_t *const eventCount, dwTime_t *const startTimestampUs, dwTime_t *const endTimestampUs, dwSensorHandle_t const sensor)
Retrieves the valid range of seek parameters, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSAL_release(dwSALHandle_t const sal)
Releases the SAL (sensor abstraction layer) module.
DW_API_PUBLIC dwStatus dwSensor_seekToEvent(size_t const event, dwSensorHandle_t const sensor)
Seeks the sensor to an event, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSAL_getNumSensors(uint32_t *const num, dwPlatformOS const os, dwSALHandle_t const sal)
Gets number of available sensors for a platform.
DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t const sensor)
Stops the sensor.
DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *const sal, dwContextHandle_t const context)
Creates and initializes a SAL (sensor abstraction layer) module.
dwSensorDrivingDirection
Driving Direction options.
DW_API_PUBLIC dwStatus dwSensor_readRawData(const uint8_t **const data, size_t *const size, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads RAW data from sensor as byte array.
DW_API_PUBLIC dwStatus dwSensor_returnRawData(const uint8_t *const data, dwSensorHandle_t const sensor)
Returns RAW data to sensor as a byte array.
DW_API_PUBLIC dwStatus dwSAL_getPlatformInfo(char8_t const **const osName, dwPlatformOS const os, dwSALHandle_t const sal)
Gets detailed information about the running hardware platform and operating system.
DW_API_PUBLIC dwStatus dwSAL_getSensorProtocol(const char **const name, uint32_t const idx, dwPlatformOS const os, dwSALHandle_t const sal)
Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'.
DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t const sensor)
Releases a sensor managed by the SAL module.
dwSensorType
Defines the type of sensors that are available in DriveWorks.
dwPlatformOS
Defines the operating system in use.
DW_API_PUBLIC dwStatus dwSensor_setThreadAffinity(uint32_t const affinityMask, dwSensorHandle_t const sensor)
Sets the affinity of the internal thread, for sensors that use an internal thread to communicate to t...
DW_API_PUBLIC dwStatus dwSAL_getSensorParameterString(const char **const parameters, uint32_t const idx, dwPlatformOS const os, dwSALHandle_t const sal)
Gets the parameter string acceptable by a sensor.
DW_API_PUBLIC dwStatus dwSensor_getSeekTableEntries(dwSensorSeekTableEntry *const entries, size_t const numEntries, dwSensorHandle_t const sensor)
Fill in the pre-allocated dwSensorSeekTableEntry array.
dwSensorErrorID
Sensor Error ID to be used in dwErrorSignal.errorID[31:24].
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
DW_API_PUBLIC dwStatus dwSensor_getCurrentSeekPosition(size_t *const event, dwSensorHandle_t const sensor)
Gets the current seek position of the sensor.
DW_API_PUBLIC dwStatus dwSensor_seekToTime(dwTime_t const timestampUs, dwSensorHandle_t const sensor)
Seeks the sensor to a specific timestamp, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSAL_reset(dwSALHandle_t const sal)
Resets the SAL (sensor abstraction layer) module.
@ DW_SENSOR_STATE_DELTA_HOST_AND_SENSOR_TIME
Difference between host timestamp and sensor timestamp.
@ DW_SENSOR_STATE_DELTA_HOST_AND_HOST_TIME
Difference between two consecutive host timestamp.
@ DW_SENSOR_STATE_SENSOR_STAT_COUNT
@ DW_SENSOR_STATE_DELTA_SENSOR_AND_SENSOR_TIME
Difference between two consecutive sensor timestamp.
@ DW_SENSOR_STATE_DELTA_CURRENT_AND_HOST_TIME
Difference between current time and the last host timestamp when sensor data was received.
@ DW_SENSOR_DRIVING_DIRECTION_UNKNOWN
Driving direction is unknown or no moving.
@ DW_SENSOR_DRIVING_DIRECTION_FORWARD
Driving direction is fowarding.
@ DW_SENSOR_DRIVING_DIRECTION_BACKWARD
Driving direction is backwarding.
@ DW_PLATFORM_OS_V5Q
aarch64 based Drive 5 QNX.
@ DW_PLATFORM_OS_V5L
aarch64 based Drive 5 Linux.
@ DW_PLATFORM_OS_LINUX
Default Linux based platform.
@ DW_PLATFORM_NUM
Number of available platforms.
@ DW_SENSOR_ERROR_CODE_NO_NEW_DATA
@ DW_SENSOR_ERROR_CODE_OK
Holds sets of parameters for sensor creation.
A seek structure is made of memory offset, eventcount and timestamp.
Holds the available statistics for a sensor.
NVIDIA DriveWorks API: Health Signal Methods