NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

Defines base types common to all sensors.

Defines methods common to all sensors.

Data Structures

struct  dwSensorTsAndID
 Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame. More...
 
struct  dwSensorStats
 Hold the sensor ID and it's statistics. More...
 
struct  dwSensorParams
 Holds sets of parameters for sensor creation. More...
 
struct  dwSensorSeekTableEntry
 A seek structure is made of memory offset, eventcount and timestamp. More...
 
struct  dwSensorVehicleState
 Vehicle State inputs. More...
 
struct  dwSensorEgomotionState
 Egomotion State inputs. More...
 

Macros

#define DW_SENSOR_TS_AND_ID_SOURCE_COUNT   6
 This amounts to max(SensorTsAndIDSource) + 1, i.e. More...
 
#define DW_SENSOR_STATE_SENSOR_STAT_COUNT   7
 This amounts to max(SensorStatTimeDifference) + 1, i.e. More...
 
#define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH   32
 Maximal length of the protocol name of a sensor. More...
 
#define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH   512
 Maximal length of the parameter string of a sensor. More...
 
#define DW_SENSOR_ERROR_ID_OFFSET_BIT   24U
 bit-shift of dwSensorErrorID when reported via module health service More...
 
#define DW_SENSOR_ERROR_ID_OFFSET   (1U << DW_SENSOR_ERROR_ID_OFFSET_BIT)
 offset of dwSensorErrorID when reported via module health service More...
 

Typedefs

typedef enum dwSensorTsAndIDSource dwSensorTsAndIDSource
 Source of the message. More...
 
typedef struct dwSensorTsAndID dwSensorTsAndID
 Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame. More...
 
typedef enum dwSensorStatTimeDifference dwSensorStatTimeDifference
 Enum used for time delta statistics. More...
 
typedef struct dwSensorStats dwSensorStats
 Hold the sensor ID and it's statistics. More...
 
typedef struct dwSALObject * dwSALHandle_t
 Handle representing the Sensor Abstraction Layer interface. More...
 
typedef struct dwSensorObject * dwSensorHandle_t
 Handle representing a sensor. More...
 
typedef struct dwSensorParams dwSensorParams
 Holds sets of parameters for sensor creation. More...
 
typedef enum dwSensorType dwSensorType
 Defines the type of sensors that are available in DriveWorks. More...
 
typedef struct dwSensorSeekTableEntry dwSensorSeekTableEntry
 A seek structure is made of memory offset, eventcount and timestamp. More...
 
typedef enum dwSensorErrorID dwSensorErrorID
 Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24. More...
 
typedef enum dwSensorDrivingDirection dwSensorDrivingDirection
 Driving Direction options. More...
 
typedef enum dwSensorDrivePositionStatus dwSensorDrivePositionStatus
 Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND). More...
 
typedef enum dwSensorDoorLockState dwSensorDoorLockState
 Door lock (latch) state. More...
 
typedef enum dwSensorTrailerHitchStatus dwSensorTrailerHitchStatus
 Whether a trailer hitch is extended, installed but not extended, or not present. More...
 
typedef enum dwSensorTrailerConnected dwSensorTrailerConnected
 Whether a trailer is connected to the vehicle or not. More...
 
typedef enum dwSensorTemperatureQuality dwSensorTemperatureQuality
 Ambient temperature Signal Quality identifier. More...
 
typedef struct dwSensorVehicleState dwSensorVehicleState
 Vehicle State inputs. More...
 
typedef enum dwSensorMotionState dwSensorMotionState
 Motion state derived from wheeltick, to assess whether ego is stationary or moving. More...
 
typedef struct dwSensorEgomotionState dwSensorEgomotionState
 Egomotion State inputs. More...
 

Enumerations

enum  dwSensorTsAndIDSource {
  DW_SENSOR_TS_AND_ID_SOURCE_UNSPECIFIED = 0,
  DW_SENSOR_TS_AND_ID_SOURCE_SENSOR = 1,
  DW_SENSOR_TS_AND_ID_SOURCE_SVS = 2,
  DW_SENSOR_TS_AND_ID_SOURCE_SENSORSERVICE = 3,
  DW_SENSOR_TS_AND_ID_SOURCE_ACTIVE_SAFETY = 4,
  DW_SENSOR_TS_AND_ID_SOURCE_INFERENCE = 5
}
 Source of the message. More...
 
enum  dwSensorStatTimeDifference {
  DW_SENSOR_STATE_DELTA_HOST_AND_HOST_TIME = 0,
  DW_SENSOR_STATE_DELTA_SENSOR_AND_SENSOR_TIME = 1,
  DW_SENSOR_STATE_DELTA_HOST_AND_SENSOR_TIME = 2,
  DW_SENSOR_STATE_DELTA_CURRENT_AND_HOST_TIME = 3,
  DW_SENSOR_STATE_DELTA_READ_AND_RETURN_FRAME_TIME = 4,
  DW_SENSOR_STATE_DELTA_FREAD_START_AND_STOP = 6
}
 Enum used for time delta statistics. More...
 
enum  dwSensorType {
  DW_SENSOR_CAMERA = 0,
  DW_SENSOR_LIDAR,
  DW_SENSOR_GPS,
  DW_SENSOR_IMU,
  DW_SENSOR_CAN,
  DW_SENSOR_RADAR,
  DW_SENSOR_TIME,
  DW_SENSOR_DATA,
  DW_SENSOR_ULTRASONIC,
  DW_SENSOR_COUNT
}
 Defines the type of sensors that are available in DriveWorks. More...
 
enum  dwSensorErrorID {
  DW_SENSOR_ERROR_CODE_INVALID = 0,
  DW_SENSOR_ERROR_CODE_NO_NEW_DATA = 120001,
  DW_SENSOR_ERROR_NO_DATA_FROM_PUBLISHER,
  DW_SENSOR_ERROR_NOT_ENOUGH_DATA,
  DW_SENSOR_ERROR_E2E_FAILURE,
  DW_SENSOR_ERROR_STATE_MACHINE_DISABLED,
  DW_SENSOR_ERROR_CODE_NON_MONOTONIC_DATA,
  DW_RADAR_ERROR_CODE_AZIMUTH_OUT_OF_RANGE = 121000,
  DW_RADAR_ERROR_CODE_NUM_RETURNS_OUT_OF_RANGE = 121001,
  DW_RADAR_ERROR_CODE_ZERO_RETURNS = 121002,
  DW_RADAR_ERROR_CODE_NON_MONOTONIC_SENSOR_TIME = 121003,
  DW_RADAR_ERROR_CODE_SENSOR_TIME_GREATER_THAN_HOST_TIME = 121004,
  DW_RADAR_ERROR_CODE_END_INDEX = 121199,
  DW_SENSORS_ERROR_CODE_GPS_MODE = 130001,
  DW_SENSORS_ERROR_CODE_GPS_ACCURACY = 130002,
  DW_SENSORS_ERROR_CODE_GPS_ALIGNMENT_STATUS = 130003,
  DW_SENSORS_ERROR_CODE_IMU_ALIGNMENT_STATUS = 140001,
  DW_SENSORS_ERROR_CODE_CAMERA_ICP_AUTH_OUT_OF_ORDER_ERROR = 160001,
  DW_SENSORS_ERROR_CODE_CAMERA_SAL_FRAME_DROP = 160002,
  DW_SENSORS_ERROR_CODE_CAMERA_SAL_AUTH_DEADLINE_VIOLATION = 160003
}
 Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24. More...
 
enum  dwSensorDrivingDirection {
  DW_SENSOR_DRIVING_DIRECTION_UNKNOWN = 0,
  DW_SENSOR_DRIVING_DIRECTION_FORWARD = 1,
  DW_SENSOR_DRIVING_DIRECTION_BACKWARD = 2,
  DW_SENSOR_DRIVING_DIRECTION_COUNT = 3
}
 Driving Direction options. More...
 
enum  dwSensorDrivePositionStatus {
  DW_SENSOR_DRIVE_POSITION_STATUS_D = 0,
  DW_SENSOR_DRIVE_POSITION_STATUS_N = 1,
  DW_SENSOR_DRIVE_POSITION_STATUS_R = 2,
  DW_SENSOR_DRIVE_POSITION_STATUS_P = 3,
  DW_SENSOR_DRIVE_POSITION_STATUS_UNSUPPORTED_MAPPING = 4,
  DW_SENSOR_DRIVE_POSITION_STATUS_FORCE32 = 0x7fffffff
}
 Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND). More...
 
enum  dwSensorDoorLockState {
  DW_SENSOR_DOOR_LOCK_STATE_UNKNOWN = 0,
  DW_SENSOR_DOOR_LOCK_STATE_SECURE_CLOSED = 1,
  DW_SENSOR_DOOR_LOCK_STATE_UNKNOWN_CLOSED = 2,
  DW_SENSOR_DOOR_LOCK_STATE_OPEN = 3,
  DW_SENSOR_DOOR_LOCK_STATE_UNSUPPORTED_MAPPING = 4,
  DW_SENSOR_DOOR_LOCK_STATE_FORCE32 = 0x7fffffff
}
 Door lock (latch) state. More...
 
enum  dwSensorTrailerHitchStatus {
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_UNKNOWN = 0,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_ERROR = 1,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_NOT_FITTED = 2,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_RETRACTED = 3,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_EXTENDED = 4,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_EXTENDED_ATTACHED = 5,
  DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_UNSUPPORTED_MAPPING = 6,
  DW_SENSOR_TRAILER_HITCH_STATUS_FORCE32 = 0x7fffffff
}
 Whether a trailer hitch is extended, installed but not extended, or not present. More...
 
enum  dwSensorTrailerConnected {
  DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_UNKNOWN = 0,
  DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_NO = 1,
  DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_YES = 2,
  DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_ERROR = 3,
  DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_UNSUPPORTED_MAPPING = 4,
  DW_SENSOR_TRAILER_CONNECTED_FORCE32 = 0x7fffffff
}
 Whether a trailer is connected to the vehicle or not. More...
 
enum  dwSensorTemperatureQuality {
  DW_SENSOR_TEMPERATURE_QUALITY_NOT_DEFINED = 0,
  DW_SENSOR_TEMPERATURE_QUALITY_NORMAL_OPERATION = 1,
  DW_SENSOR_TEMPERATURE_QUALITY_REDUCED_QUALITY = 2,
  DW_SENSOR_TEMPERATURE_QUALITY_SIG_DEF = 3,
  DW_SENSOR_TEMPERATURE_QUALITY_FORCE32 = 0x7fffffff
}
 Ambient temperature Signal Quality identifier. More...
 
enum  dwSensorMotionState {
  DW_SENSOR_MOTION_STATE_UNKNOWN = 0,
  DW_SENSOR_MOTION_STATE_STANDSTILL = 1,
  DW_SENSOR_MOTION_STATE_MOVING = 2,
  DW_SENSOR_MOTION_STATE_COUNT = 3
}
 Motion state derived from wheeltick, to assess whether ego is stationary or moving. More...
 

Functions

DW_API_PUBLIC dwStatus dwSAL_initialize (dwSALHandle_t *const sal, dwContextHandle_t const context)
 Creates and initializes a SAL (sensor abstraction layer) module. More...
 
DW_API_PUBLIC dwStatus dwSAL_getContext (dwContextHandle_t *const context, dwSALHandle_t const sal)
 Obtains the handle, used for creation of SAL module. More...
 
DW_API_PUBLIC dwStatus dwSAL_reset (dwSALHandle_t const sal)
 Resets the SAL (sensor abstraction layer) module. More...
 
DW_API_PUBLIC dwStatus dwSAL_release (dwSALHandle_t const sal)
 Releases the SAL (sensor abstraction layer) module. More...
 
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. More...
 
DW_API_PUBLIC dwStatus dwSAL_releaseSensor (dwSensorHandle_t const sensor)
 Releases a sensor managed by the SAL module. More...
 
DW_API_PUBLIC dwStatus dwSAL_start (dwSALHandle_t const sal)
 Bootstraps all sensors managed by the SAL module. More...
 
DW_API_PUBLIC dwStatus dwSAL_getNumSensors (uint32_t *const num, dwSALHandle_t const sal)
 Gets number of available sensors for current platform. More...
 
DW_API_PUBLIC dwStatus dwSAL_getSensorProtocol (const char **const name, uint32_t const idx, dwSALHandle_t const sal)
 Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'. More...
 
DW_API_PUBLIC dwStatus dwSAL_getSensorParameterString (const char **const parameters, uint32_t const idx, dwSALHandle_t const sal)
 Gets the parameter string acceptable by a sensor whose type is determined by the index. More...
 
DW_API_PUBLIC dwStatus dwSAL_setVehicleState (dwSensorVehicleState *const vehicleState, dwSALHandle_t const sal)
 Pass vehicle state to all sensors. More...
 
DW_API_PUBLIC dwStatus dwSAL_setEgomotionState (dwSensorEgomotionState *const egomotionState, dwSALHandle_t const sal)
 Pass egomotion state to all sensors. More...
 
DW_API_PUBLIC dwStatus dwSensor_start (dwSensorHandle_t const sensor)
 Starts the sensor previously successfully created with 'dwSAL_createSensor()'. More...
 
DW_API_PUBLIC dwStatus dwSensor_stop (dwSensorHandle_t const sensor)
 Stops the sensor. More...
 
DW_API_PUBLIC dwStatus dwSensor_resume (dwSensorHandle_t const sensor)
 Resume and init the sensor. More...
 
DW_API_PUBLIC dwStatus dwSensor_reset (dwSensorHandle_t const sensor)
 Resets the sensor. More...
 
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 at a given time (TimeoutUs). More...
 
DW_API_PUBLIC dwStatus dwSensor_returnRawData (const uint8_t *const data, dwSensorHandle_t const sensor)
 Returns RAW data to sensor as a byte array. More...
 
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. More...
 
DW_API_PUBLIC dwStatus dwSensor_getCurrentSeekPosition (size_t *const event, dwSensorHandle_t const sensor)
 Gets the current seek position of the sensor. More...
 
dwStatus dwSensor_getHeader (uint8_t const **const buffer, size_t *bufferSize, dwSensorHandle_t const sensor)
 Returns a pointer to the shared buffer with the contents of the sensor header and bufferSize will contain the number of valid bytes in the buffer. More...
 
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. More...
 
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. More...
 
DW_API_PUBLIC dwStatus dwSensor_createSeekTable (dwSensorHandle_t const sensor)
 Forces recreation of the seek table, for sensors that support seeking. More...
 
DW_API_PUBLIC dwStatus dwSensor_getNumSeekTableEntries (size_t *const size, dwSensorHandle_t const hsensor)
 Get the number of entries in the seek Table. More...
 
DW_API_PUBLIC dwStatus dwSensor_getSeekTableEntries (dwSensorSeekTableEntry *const entries, size_t const numEntries, dwSensorHandle_t const sensor)
 Fill in the pre-allocated dwSensorSeekTableEntry array. More...
 
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. More...
 
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 the OS drivers. More...
 
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 the OS drivers. More...
 
DW_API_PUBLIC dwStatus dwSensor_getStats (dwSensorStats *const stats, dwSensorHandle_t const sensor)
 Gets sensor statistics (if available). More...
 

Macro Definition Documentation

◆ DW_SENSOR_ERROR_ID_OFFSET

#define DW_SENSOR_ERROR_ID_OFFSET   (1U << DW_SENSOR_ERROR_ID_OFFSET_BIT)

offset of dwSensorErrorID when reported via module health service

Definition at line 133 of file SensorTypes.h.

◆ DW_SENSOR_ERROR_ID_OFFSET_BIT

#define DW_SENSOR_ERROR_ID_OFFSET_BIT   24U

bit-shift of dwSensorErrorID when reported via module health service

Definition at line 130 of file SensorTypes.h.

◆ DW_SENSOR_MAX_PARAMETER_STRING_LENGTH

#define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH   512

Maximal length of the parameter string of a sensor.

Definition at line 51 of file SensorTypes.h.

◆ DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH

#define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH   32

Maximal length of the protocol name of a sensor.

Definition at line 48 of file SensorTypes.h.

◆ DW_SENSOR_STATE_SENSOR_STAT_COUNT

#define DW_SENSOR_STATE_SENSOR_STAT_COUNT   7

This amounts to max(SensorStatTimeDifference) + 1, i.e.

the required size of an array if these enum values are interpreted as array offsets.

Definition at line 55 of file SensorStats.h.

◆ DW_SENSOR_TS_AND_ID_SOURCE_COUNT

#define DW_SENSOR_TS_AND_ID_SOURCE_COUNT   6

This amounts to max(SensorTsAndIDSource) + 1, i.e.

the required size of an array if these enum values are interpreted as array offsets.

Definition at line 55 of file SensorExtras.h.

Typedef Documentation

◆ dwSALHandle_t

typedef struct dwSALObject* dwSALHandle_t

Handle representing the Sensor Abstraction Layer interface.

Definition at line 40 of file SensorTypes.h.

◆ dwSensorDoorLockState

Door lock (latch) state.

◆ dwSensorDrivePositionStatus

Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND).

◆ dwSensorDrivingDirection

Driving Direction options.

◆ dwSensorEgomotionState

Egomotion State inputs.

◆ dwSensorErrorID

Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24.

◆ dwSensorHandle_t

typedef struct dwSensorObject* dwSensorHandle_t

Handle representing a sensor.

Definition at line 44 of file SensorTypes.h.

◆ dwSensorMotionState

Motion state derived from wheeltick, to assess whether ego is stationary or moving.

◆ dwSensorParams

Holds sets of parameters for sensor creation.

◆ dwSensorSeekTableEntry

A seek structure is made of memory offset, eventcount and timestamp.

◆ dwSensorStats

typedef struct dwSensorStats dwSensorStats

Hold the sensor ID and it's statistics.

◆ dwSensorStatTimeDifference

Enum used for time delta statistics.

◆ dwSensorTemperatureQuality

Ambient temperature Signal Quality identifier.

◆ dwSensorTrailerConnected

Whether a trailer is connected to the vehicle or not.

◆ dwSensorTrailerHitchStatus

Whether a trailer hitch is extended, installed but not extended, or not present.

◆ dwSensorTsAndID

Hold the timestamp, ID, publishedTimestamp, seqNum and isDropped info of a frame.

◆ dwSensorTsAndIDSource

Source of the message.

◆ dwSensorType

typedef enum dwSensorType dwSensorType

Defines the type of sensors that are available in DriveWorks.

◆ dwSensorVehicleState

Vehicle State inputs.

Enumeration Type Documentation

◆ dwSensorDoorLockState

Door lock (latch) state.

Enumerator
DW_SENSOR_DOOR_LOCK_STATE_UNKNOWN 

undefined value

DW_SENSOR_DOOR_LOCK_STATE_SECURE_CLOSED 

closed fully

DW_SENSOR_DOOR_LOCK_STATE_UNKNOWN_CLOSED 

closed but not secure (two stage lock)

DW_SENSOR_DOOR_LOCK_STATE_OPEN 

open

DW_SENSOR_DOOR_LOCK_STATE_UNSUPPORTED_MAPPING 

Unsupported mapping.

DW_SENSOR_DOOR_LOCK_STATE_FORCE32 

Definition at line 73 of file SensorsVehicleStateTypes.h.

◆ dwSensorDrivePositionStatus

Current vehicle drive position: Parking, Rear, Neutral, Driving (PRND).

Enumerator
DW_SENSOR_DRIVE_POSITION_STATUS_D 

D.

DW_SENSOR_DRIVE_POSITION_STATUS_N 

N.

DW_SENSOR_DRIVE_POSITION_STATUS_R 

R.

DW_SENSOR_DRIVE_POSITION_STATUS_P 

P.

DW_SENSOR_DRIVE_POSITION_STATUS_UNSUPPORTED_MAPPING 

Unsupported mapping.

DW_SENSOR_DRIVE_POSITION_STATUS_FORCE32 

Definition at line 47 of file SensorsVehicleStateTypes.h.

◆ dwSensorDrivingDirection

Driving Direction options.

Enumerator
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_SENSOR_DRIVING_DIRECTION_COUNT 

Enum count.

Definition at line 29 of file SensorsVehicleStateTypes.h.

◆ dwSensorErrorID

Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24.

Enumerator
DW_SENSOR_ERROR_CODE_INVALID 

sensor ok

DW_SENSOR_ERROR_CODE_NO_NEW_DATA 

no new data received

Error number is defined so that health service filters the error and not report to SEH

DW_SENSOR_ERROR_NO_DATA_FROM_PUBLISHER 

No data is received from publisher.

DW_SENSOR_ERROR_NOT_ENOUGH_DATA 

Not enough dats from publisher since initialization.

DW_SENSOR_ERROR_E2E_FAILURE 

E2E failures.

DW_SENSOR_ERROR_STATE_MACHINE_DISABLED 

State machine is disabled.

DW_SENSOR_ERROR_CODE_NON_MONOTONIC_DATA 

Non monotonic timestamp received from the sensor.

Error number is defined so that health service filters the error and not report to SEH

DW_RADAR_ERROR_CODE_AZIMUTH_OUT_OF_RANGE 

Radar specific errors: azimuth is out of range.

DW_RADAR_ERROR_CODE_NUM_RETURNS_OUT_OF_RANGE 

Radar specific errors: return num is out of range.

DW_RADAR_ERROR_CODE_ZERO_RETURNS 

Radar specific errors: zero return.

DW_RADAR_ERROR_CODE_NON_MONOTONIC_SENSOR_TIME 

Radar specific errors: non monotonic sensor time.

DW_RADAR_ERROR_CODE_SENSOR_TIME_GREATER_THAN_HOST_TIME 

Radar specific errors: sensor time treater than host time.

DW_RADAR_ERROR_CODE_END_INDEX 

Radar specific errors: end index.

DW_SENSORS_ERROR_CODE_GPS_MODE 

GPS sensor working mode error.

DW_SENSORS_ERROR_CODE_GPS_ACCURACY 

GPS sensor accuracy warning.

DW_SENSORS_ERROR_CODE_GPS_ALIGNMENT_STATUS 

GPS sensor alignment status warning.

DW_SENSORS_ERROR_CODE_IMU_ALIGNMENT_STATUS 

IMU sensor bad alignment status.

DW_SENSORS_ERROR_CODE_CAMERA_ICP_AUTH_OUT_OF_ORDER_ERROR 

DW_SENSORS_ERROR_CODE_CAMERA_ICP_AUTH_OUT_OF_ORDER_ERROR.

DW_SENSORS_ERROR_CODE_CAMERA_SAL_FRAME_DROP 

DW_SENSORS_ERROR_CODE_CAMERA_SAL_FRAME_DROP.

DW_SENSORS_ERROR_CODE_CAMERA_SAL_AUTH_DEADLINE_VIOLATION 

DW_SENSORS_ERROR_CODE_CAMERA_SAL_AUTH_DEADLINE_VIOLATION.

Definition at line 141 of file SensorTypes.h.

◆ dwSensorMotionState

Motion state derived from wheeltick, to assess whether ego is stationary or moving.

Enumerator
DW_SENSOR_MOTION_STATE_UNKNOWN 

Motion state is unknown.

DW_SENSOR_MOTION_STATE_STANDSTILL 

Motion state is standstill.

DW_SENSOR_MOTION_STATE_MOVING 

Motion state is moving.

DW_SENSOR_MOTION_STATE_COUNT 

Enum count.

Definition at line 250 of file SensorsVehicleStateTypes.h.

◆ dwSensorStatTimeDifference

Enum used for time delta statistics.

Enumerator
DW_SENSOR_STATE_DELTA_HOST_AND_HOST_TIME 

Difference between two consecutive host timestamp.

DW_SENSOR_STATE_DELTA_SENSOR_AND_SENSOR_TIME 

Difference between two consecutive sensor timestamp.

DW_SENSOR_STATE_DELTA_HOST_AND_SENSOR_TIME 

Difference between host timestamp and 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_STATE_DELTA_READ_AND_RETURN_FRAME_TIME 

Difference between readFrame and returnFrame time.

DW_SENSOR_STATE_DELTA_FREAD_START_AND_STOP 

Difference between start and stop of a fread() call. This only applies to replay scenarios.

Definition at line 31 of file SensorStats.h.

◆ dwSensorTemperatureQuality

Ambient temperature Signal Quality identifier.

Enumerator
DW_SENSOR_TEMPERATURE_QUALITY_NOT_DEFINED 

undefined

DW_SENSOR_TEMPERATURE_QUALITY_NORMAL_OPERATION 

Functional and electrical checks passed.

DW_SENSOR_TEMPERATURE_QUALITY_REDUCED_QUALITY 

reduced signal integrity

DW_SENSOR_TEMPERATURE_QUALITY_SIG_DEF 

Signal defect detected.

DW_SENSOR_TEMPERATURE_QUALITY_FORCE32 

Definition at line 151 of file SensorsVehicleStateTypes.h.

◆ dwSensorTrailerConnected

Whether a trailer is connected to the vehicle or not.

Enumerator
DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_UNKNOWN 

Unknown status.

DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_NO 

No trailer connected.

DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_YES 

Trailer connected.

DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_ERROR 

Error.

DW_SENSOR_TRAILER_CONNECTED_TRAILER_CONNECTED_UNSUPPORTED_MAPPING 

Unsupported mapping.

DW_SENSOR_TRAILER_CONNECTED_FORCE32 

Definition at line 130 of file SensorsVehicleStateTypes.h.

◆ dwSensorTrailerHitchStatus

Whether a trailer hitch is extended, installed but not extended, or not present.

Enumerator
DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_UNKNOWN 

unknown status

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_ERROR 

error

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_NOT_FITTED 

not fitted / installed

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_RETRACTED 

Retracted position.

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_EXTENDED 

Working position with nothing plugged in.

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_EXTENDED_ATTACHED 

Working position with device plugged in.

DW_SENSOR_TRAILER_HITCH_STATUS_HITCH_UNSUPPORTED_MAPPING 

Unsupported mapping.

DW_SENSOR_TRAILER_HITCH_STATUS_FORCE32 

Definition at line 99 of file SensorsVehicleStateTypes.h.

◆ dwSensorTsAndIDSource

Source of the message.

Enumerator
DW_SENSOR_TS_AND_ID_SOURCE_UNSPECIFIED 

Unspecified source.

DW_SENSOR_TS_AND_ID_SOURCE_SENSOR 

Regular sensor.

DW_SENSOR_TS_AND_ID_SOURCE_SVS 

SVS node.

DW_SENSOR_TS_AND_ID_SOURCE_SENSORSERVICE 

Sensor services nodes.

DW_SENSOR_TS_AND_ID_SOURCE_ACTIVE_SAFETY 

Sensor nodes in active safety epoch.

DW_SENSOR_TS_AND_ID_SOURCE_INFERENCE 

Sensor nodes in inference machine.

Definition at line 31 of file SensorExtras.h.

◆ dwSensorType

Defines the type of sensors that are available in DriveWorks.

Enumerator
DW_SENSOR_CAMERA 

CAMERA.

DW_SENSOR_LIDAR 

Lidar.

DW_SENSOR_GPS 

GPS.

DW_SENSOR_IMU 

IMU.

DW_SENSOR_CAN 

CAN.

DW_SENSOR_RADAR 

RADAR.

DW_SENSOR_TIME 

TIME.

DW_SENSOR_DATA 

DATA.

DW_SENSOR_ULTRASONIC 

Ultrasonic.

DW_SENSOR_COUNT 

Sensor count which the sensor type value is less than.

Definition at line 83 of file SensorTypes.h.

Function Documentation

◆ dwSAL_createSensor()

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.

@req{GID-AV_REQ-6775279}

Parameters
[out]sensorA pointer to sensor handle that became valid after creation.
[in]paramsSpecifies the parameters for sensor creation.
[in]salSpecifies the handle to the SAL module that will manage the sensor.
Returns
DW_INVALID_ARGUMENT - if pointer to the sensor is NULL or protocol name is NULL
DW_INVALID_HANDLE - if provided SAL handle is invalid.
DW_SAL_NO_DRIVER_FOUND - if provided protocol name is unknown.
DW_SAL_SENSOR_ERROR - if a non recoverable error happens during sensor creation. For a virtual sensor which is reading from a file it could be file I/O error.
DW_BUFFER_FULL - if internal buffer has insufficient capacity to hold parsed value from params.
DW_NOT_SUPPORTED - if user tries to create more than one time-sensors.
DW_SUCCESS - if call is successful.
Note
This returned sensor handle must be released using the 'dwSAL_releaseSensor()' method.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSAL_getContext()

DW_API_PUBLIC dwStatus dwSAL_getContext ( dwContextHandle_t *const  context,
dwSALHandle_t const  sal 
)

Obtains the handle, used for creation of SAL module.

Parameters
[out]contextThe handle to the context under which the SAL module is created.
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'.
Returns
DW_INVALID_HANDLE - if provided SAL handle is invalid.
DW_INVALID_ARGUMENT - if pointer to the context handle is NULL.
DW_SUCCESS - if call is successful.
API Group
  • Init: No
  • Runtime: Yes
  • De-Init: No

◆ dwSAL_getNumSensors()

DW_API_PUBLIC dwStatus dwSAL_getNumSensors ( uint32_t *const  num,
dwSALHandle_t const  sal 
)

Gets number of available sensors for current platform.

req{GID-AV_REQ-6775284}

Note
Only sensor queried for the current platform can be created by using dwSAL_createSensor().
Parameters
[out]numA pointer to return number of sensor in the SAL.
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'.
Returns
DW_INVALID_HANDLE - if provided SAL or sensor handle is invalid.
DW_INVALID_ARGUMENT - if provided pointer is invalid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_getSensorParameterString()

DW_API_PUBLIC dwStatus dwSAL_getSensorParameterString ( const char **const  parameters,
uint32_t const  idx,
dwSALHandle_t const  sal 
)

Gets the parameter string acceptable by a sensor whose type is determined by the index.

A sensor generates a human readable string with parameters it accepts.

req{GID-AV_REQ-6775286}

Parameters
[out]parametersA pointer to the pointer to the null terminated string will be returned here.
[in]idxSpecifies the index of a sensor; index must be between 0 and 'dwSAL_getNumSensors()-1'.
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'.
Returns
DW_INVALID_HANDLE - if provided SAL or sensor handle is invalid.
DW_INVALID_ARGUMENT - if provided pointer is invalid or index outside of range.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_getSensorProtocol()

DW_API_PUBLIC dwStatus dwSAL_getSensorProtocol ( const char **const  name,
uint32_t const  idx,
dwSALHandle_t const  sal 
)

Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'.

req{GID-AV_REQ-6775285}

Parameters
[out]nameA pointer to the pointer of the null terminated string will be returned here.
[in]idxSpecifies the index of a sensor; index must be between 0 and 'dwSAL_getNumSensors()-1'.
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'.
Returns
DW_INVALID_HANDLE - if provided SAL or sensor handle is invalid.
DW_INVALID_ARGUMENT - if provided pointer is invalid or the index outside of range.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_initialize()

DW_API_PUBLIC dwStatus dwSAL_initialize ( dwSALHandle_t *const  sal,
dwContextHandle_t const  context 
)

Creates and initializes a SAL (sensor abstraction layer) module.

@req{GID-AV_REQ-6775276}

Parameters
[out]salA pointer to the SAL handle will be returned here.
[in]contextSpecifies the handle to the context under which the SAL module is created.
Returns
DW_INVALID_ARGUMENT - if pointer to the SAL handle is NULL.
DW_INVALID_HANDLE - if provided context handle is invalid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSAL_release()

DW_API_PUBLIC dwStatus dwSAL_release ( dwSALHandle_t const  sal)

Releases the SAL (sensor abstraction layer) module.

This method releases all created sensors and unloads all drivers.

@req{GID-AV_REQ-6775278}

Note
This method renders the SAL handle unusable.
Parameters
[in]salThe SAL handle to be released.
Returns
DW_INVALID_HANDLE - if provided SAL handle is invalid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwSAL_releaseSensor()

DW_API_PUBLIC dwStatus dwSAL_releaseSensor ( dwSensorHandle_t const  sensor)

Releases a sensor managed by the SAL module.

@req{GID-AV_REQ-6775280}

Note
This method renders the sensor handle unusable.
Parameters
[in]sensorThe handle to a sensor created previously with 'dwSAL_createSensor()'.
Returns
DW_INVALID_HANDLE - if provided SAL or sensor handle is invalid.
DW_SAL_SENSOR_ERROR - if provided sensor is not managed by this SAL.
DW_SUCCESS - if call is successful.
Note
In cases where a specific sensor needs to be released, this method can be used. In all other cases, the automatic sensor release of the 'dwSAL_release()' method is sufficient.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwSAL_reset()

DW_API_PUBLIC dwStatus dwSAL_reset ( dwSALHandle_t const  sal)

Resets the SAL (sensor abstraction layer) module.

This method resets all sensors managed by this module.

@req{GID-AV_REQ-6775277}

Parameters
[in]salSpecifies the SAL handle to reset.
Returns
DW_INVALID_HANDLE - if provided SAL handle is invalid.
DW_ERROR - error of a sensor that could not be reset.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_setEgomotionState()

DW_API_PUBLIC dwStatus dwSAL_setEgomotionState ( dwSensorEgomotionState *const  egomotionState,
dwSALHandle_t const  sal 
)

Pass egomotion state to all sensors.

Parameters
[in]egomotionStateEgomotion state that needs to be passed in the structure of dwEgomotionVehicleState .
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'
Returns
DW_INVALID_ARGUMENT - no function with that pointer exists
DW_INVALID_HANDLE - if provided SM handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_setVehicleState()

DW_API_PUBLIC dwStatus dwSAL_setVehicleState ( dwSensorVehicleState *const  vehicleState,
dwSALHandle_t const  sal 
)

Pass vehicle state to all sensors.

req{GID-AV_REQ-6775287}

Parameters
[in]vehicleStateVehicle state that needs to be passed in the structure of dwSensorVehicleState .
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'
Returns
DW_INVALID_ARGUMENT - no function with that pointer exists
DW_INVALID_HANDLE - if provided SM handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSAL_start()

DW_API_PUBLIC dwStatus dwSAL_start ( dwSALHandle_t const  sal)

Bootstraps all sensors managed by the SAL module.

@req{GID-AV_REQ-6775281}

Parameters
[in]salSpecifies the SAL handle created with 'dwSAL_initialize()'.
Returns
DW_INVALID_HANDLE - if provided SAL is invalid.
DW_NOT_INITIALIZED if the sensor has no initialized component.
DW_SUCCESS if call is successful.
Note
Sensor streaming will not start until dwSensor_start. Calling this API after sensor start will be a NO-OP, as sensor start of any sensor will implicitly bootstrap all sensors.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSensor_createSeekTable()

DW_API_PUBLIC dwStatus dwSensor_createSeekTable ( dwSensorHandle_t const  sensor)

Forces recreation of the seek table, for sensors that support seeking.

@req{GID-AV_REQ-6997915}

Parameters
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_INVALID_ARGUMENT - if given fileName is invalid
DW_NOT_AVAILABLE - if sensor data contains non-monotonic timestamps
DW_SAL_SENSOR_ERROR - if a non recoverable error happens during table creation, for example file I/O error.
DW_SUCCESS - if call is successful.
Note
This method will perform dynamic memory allocations, hence should not be used during run-time. A sensor will be reset to the very first event after table creation.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSensor_getCurrentSeekPosition()

DW_API_PUBLIC dwStatus dwSensor_getCurrentSeekPosition ( size_t *const  event,
dwSensorHandle_t const  sensor 
)

Gets the current seek position of the sensor.

The event index corresponding to the next sensor event which will be read with sensor's read methods.

req{GID-AV_REQ-6997880}

Parameters
[out]eventEvent number which in the range [0;eventCount) of the next event.
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_NOT_AVAILABLE - if sensor supports seeking, but no seeking information is available
DW_END_OF_STREAM - if next read position is end of stream
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_getHeader()

dwStatus dwSensor_getHeader ( uint8_t const **const  buffer,
size_t *  bufferSize,
dwSensorHandle_t const  sensor 
)

Returns a pointer to the shared buffer with the contents of the sensor header and bufferSize will contain the number of valid bytes in the buffer.

req{GID-AV_REQ-6775295}

Parameters
[out]bufferA pointer to the buffer owned by sensor which holds the header information.
[out]bufferSizeA pointer to variable indicating number of valid bytes in the buffer
[in]sensorHandle to the sensor to which the header info is requested
Returns
DW_INVALID_HANDLE - if given sensor handle is invalid DW_INVALID_ARGUMENTS - if given arguments are invalid DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_getNumSeekTableEntries()

DW_API_PUBLIC dwStatus dwSensor_getNumSeekTableEntries ( size_t *const  size,
dwSensorHandle_t const  hsensor 
)

Get the number of entries in the seek Table.

req{GID-AV_REQ-6997928}

Parameters
[out]sizeA pointer to the size of the seek table
[in]hsensorHandle to the sensor to get size of seek table entry
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_SUCCESS - if call is successful.
Note
Use this method after calling dwSensor_createSeekTable
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_getSeekRange()

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.

@req{GID-AV_REQ-6997877}

Parameters
[out]eventCountNumber of events available to be sought to. Each event represents one data unit returned by the sensor from its read() method, e.g. one camera frame for camera, one CAN message, for a CAN sensor, etc.
[out]startTimestampUsTimestamp of the very first event in usec
[out]endTimestampUsTimestamp of the very last event in usec
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_NOT_AVAILABLE - if sensor supports seeking, but no seeking information is available
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_getSeekTableEntries()

DW_API_PUBLIC dwStatus dwSensor_getSeekTableEntries ( dwSensorSeekTableEntry *const  entries,
size_t const  numEntries,
dwSensorHandle_t const  sensor 
)

Fill in the pre-allocated dwSensorSeekTableEntry array.

@req{GID-AV_REQ-6997881}

Parameters
[out]entriesFilled in array with seekTable entries
[in]numEntriesThe number of entries allocated in the entries array
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_INVALID_ARGUMENT - if the table provided is not large enough to fit the entire table
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_getStats()

DW_API_PUBLIC dwStatus dwSensor_getStats ( dwSensorStats *const  stats,
dwSensorHandle_t const  sensor 
)

Gets sensor statistics (if available).

req{GID-AV_REQ-6775304}

Parameters
[out]statsA pointer to a structure containing the statistics.
[in]sensorHandle to the sensor
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality
DW_NOT_AVAILABLE - if attempted to get stats from a running sensor
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_readRawData()

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 at a given time (TimeoutUs).

@req{GID-AV_REQ-6775291}

Parameters
[out]dataA pointer to the pointer to data that is populated with the RAW data.
[out]sizeA pointer to the size of the data array.
[in]timeoutUsSpecifies the timeout in US to wait before unblocking.
[in]sensorSpecifies the sensor to read from.
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_END_OF_STREAM - if currently no new RAW data is available.
DW_CALL_NOT_ALLOWED - if sensor cannot execute the call, for example, due to decoding data.
DW_INVALID_ARGUMENT - if one of the given arguments is invalid.
DW_TIME_OUT - if the requested timed out.
DW_SAL_SENSOR_ERROR - if there was an unrecoverable i/o error.
DW_SUCCESS - if call is successful.
Note
On an I/O error a new read attempt will start before the failed location. Hence on file systems, such as network based file system, a new attempt to read data can be taken. This call must be followed by 'dwSensor_returnRawData'. A sensor might provide access to raw data (i.e., unprocessed as received from hardware) data for an extended usage. Such data can for example be passed to serializer.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_reset()

DW_API_PUBLIC dwStatus dwSensor_reset ( dwSensorHandle_t const  sensor)

Resets the sensor.

The method blocks while the sensor is reset.

@req{GID-AV_REQ-6775290}

Parameters
[in]sensorSpecifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_CUDA_ERROR - if the underlying sensor driver had a CUDA error.
DW_NVMEDIA_ERROR - if underlying sensor driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_resume()

DW_API_PUBLIC dwStatus dwSensor_resume ( dwSensorHandle_t const  sensor)

Resume and init the sensor.

@req{GID-AV_REQ-7028419}

Note
This method is usually called before the dwSensor_start to do sensor initialization only. This function does't start the sensor, after the method called, user must call dwSensor_start() to start the sensor, then new sensor data can be acquired using corresponding sensor methods. If it is unlikely called after dwSensor_start, it will do nothing and return DW_SUCCESS.
Parameters
[in]sensorSpecifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_SUCCESS if sensor resume was performed successfully
DW_FAILURE if sensor resume failed
DW_NOT_INITIALIZED if the sensor has no initialized component
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSensor_returnRawData()

DW_API_PUBLIC dwStatus dwSensor_returnRawData ( const uint8_t *const  data,
dwSensorHandle_t const  sensor 
)

Returns RAW data to sensor as a byte array.

This call must be preceded by 'dwSensor_readRawData'.

req{GID-AV_REQ-6775292}

Parameters
[in]dataA pointer to data that was populated with the RAW data.
[in]sensorSpecifies the sensor the data came from.
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_CALL_NOT_ALLOWED - if sensor cannot execute the call, for example, due to decoding data.
DW_NOT_SUPPORTED - if sensor does not implement this functionality.
DW_INVALID_ARGUMENT - if given data pointer is invalid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_saveSeekTable()

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.

A seek table is available if a virtual sensor has been requested to create/load one during creation. Refer to each individual sensor to see what parameters need to be passed to instantiate or load seek table.

@req{GID-AV_REQ-6997929}

It is guaranteed that any seek table written out by this method can be parsed by the corresponding virtual sensor.

Parameters
[in]fileNameName of the file under a reachable path to write seek table to.
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_FILE_NOT_FOUND - if cannot open the file for writing
DW_END_OF_STREAM - if there was a problem while writing out the file, for example disk full
DW_INVALID_ARGUMENT - if given fileName is invalid
DW_NOT_AVAILABLE - if no seek table is currently available for the sensor
DW_SUCCESS - if call is successful.
Note
Most of the virtual sensors expect their seek table to be stored next to the data file, having same name as the data file with an additional extension .seek, e.g. '/path/canbus.can.seek'
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSensor_seekToEvent()

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.

Next readFrame(), readMessage(), etc. method would start to read from this event.

@req{GID-AV_REQ-6996493}

Parameters
[in]eventNumber of the event to seek to. Must be in the range [0; eventCount)
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_NOT_AVAILABLE - if sensor supports seeking, but no seeking information is available
DW_INVALID_ARGUMENT - if given event number is above available number of events
DW_SUCCESS - if call is successful.
See also
dwSensor_getSeekRange()
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_seekToTime()

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.

Next readFrame(), readMessage(), etc. method would start to read from an event which timestamp is greater or equal to the seek timestamp.

@req{GID-AV_REQ-6997824}

Parameters
[in]timestampUsTimestamp in usec to seek sensor to. Must be in the range [startTimestamp_us; endTimestamp_us]
[in]sensorHandle to the sensor which seek table to write out
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. no seeking
DW_NOT_AVAILABLE - if sensor supports seeking, but no seeking information is available
DW_INVALID_ARGUMENT - if given timestamp is outside the supported range
DW_SUCCESS - if call is successful.
See also
dwSensor_getSeekRange()
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_setThreadAffinity()

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 the OS drivers.

@req{GID-AV_REQ-6775303}

Parameters
[in]affinityMaskBit mask setting 1 to CPU which shall execute sensor thread
[in]sensorHandle to the sensor to set thread priority
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. sensor does not has an internal thread or priority of the internal thread cannot be changed
DW_INVALID_ARGUMENT - if given affinity mask is outside of the valid range, i.e. points to invalid CPU
DW_NOT_AVAILABLE - if sensor is not running yet, i.e. sensor must be started before change can happen
DW_CALL_NOT_ALLOWED - if setting thread affinity is not allowed now, for example due to wrong privileges
DW_INTERNAL_ERROR - an internal error indicating unrecoverable error, in general this should not happen
DW_SUCCESS - if call is successful.
Note
If multiple sensors have been created from same physical sensor, the thread affinity will be applied to the thread communicating with the phyiscal device, hence affecting all these sensors.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_setThreadPriority()

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 the OS drivers.

This method sets the priority of the internal thread, if the sensor implementation supports it.

req{GID-AV_REQ-6775302}

Parameters
[in]priorityPriority of the thread to set. In general the priority is in range [1;99]
[in]sensorHandle to the sensor to set thread priority
Returns
DW_INVALID_HANDLE - if provided sensor handle is invalid.
DW_NOT_SUPPORTED - if sensor does not implement this functionality, i.e. sensor does not has an internal thread or priority of the internal thread cannot be changed
DW_INVALID_ARGUMENT - if given priority number is outside of the valid range
DW_NOT_AVAILABLE - if sensor is not running yet, i.e. sensor must be started before change can happen
DW_CALL_NOT_ALLOWED - if setting thread priority is not allowed now, for example due to wrong privileges
DW_INTERNAL_ERROR - an internal error indicating unrecoverable error, in general this should not happen
DW_SUCCESS - if call is successful.
Note
If multiple sensors have been created from same physical sensor, the thread priority will be applied to the thread communicating with the phyiscal device, hence affecting all these sensors.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwSensor_start()

DW_API_PUBLIC dwStatus dwSensor_start ( dwSensorHandle_t const  sensor)

Starts the sensor previously successfully created with 'dwSAL_createSensor()'.

After a sensor is successfully started, new sensor data can be acquired using corresponding sensor methods.

@req{GID-AV_REQ-6775288}

Note
This method might spawn a thread, depending on the sensor implementation. It is, however, guaranteed that the data returned by the sensor is valid in the calling thread. For example, a CUDA camera image is created in the same CUDA context as the callee. This method can be called independently without call dwSensor_resume() before. Sensor init is not done as part of resume for all sensors. Only cameras support dwSensor_resume() --> dwSensor_start() operations
Parameters
[in]sensorSpecifies the sensor handle of the sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_CUDA_ERROR - if the underlying sensor driver had a CUDA error.
DW_NVMEDIA_ERROR - if underlying sensor driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_END_OF_STREAM - if end of stream reached.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwSensor_stop()

DW_API_PUBLIC dwStatus dwSensor_stop ( dwSensorHandle_t const  sensor)

Stops the sensor.

The method blocks while the sensor is stopped.

@req{GID-AV_REQ-6775289}

Parameters
[in]sensorSpecifies the sensor handle of a sensor previously created with 'dwSAL_createSensor()'.
Returns
DW_CUDA_ERROR - if the underlying sensor driver had a CUDA error.
DW_NVMEDIA_ERROR - if underlying sensor driver had an NvMedia error.
DW_INVALID_HANDLE - if given handle is not valid.
DW_SUCCESS - if call is successful.
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes