58 #ifndef DW_SENSORS_SENSORS_H_ 59 #define DW_SENSORS_SENSORS_H_ 91 #define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH 32 92 #define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH 512 435 dwSensorHandle_t sensor);
471 dwSensorHandle_t sensor);
672 #endif // DW_SENSORS_SENSORS_H_ Holds sets of parameters for sensor creation.
dwTime_t timeDeltaMax
Maximum observed time difference between two consecutive packets.
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwSensor_createSeekTable(dwSensorHandle_t sensor)
Forces recreation of the seek table, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSensor_getNumSeekTableEntries(size_t *size, dwSensorHandle_t hsensor)
Get the number of entries in the seek Table.
dwSensorType
Defines the type of sensors that are available in DriveWorks.
dwTime_t timeDeltaMin
Minimum observed time difference between two consecutive packets.
DW_API_PUBLIC dwStatus dwSensor_returnRawData(const uint8_t *data, dwSensorHandle_t sensor)
Returns RAW data to sensor as a byte array.
DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t sensor)
Stops the sensor.
DW_API_PUBLIC dwStatus dwSensor_seekToTime(dwTime_t timestamp_us, dwSensorHandle_t sensor)
Seeks the sensor to a specific timestamp, for sensors that support seeking.
const void * auxiliarydata
Additional data to pass to sensor creation function.
Holds the available statistics for a sensor.
uint64_t size
size of the event present in the virtual data file, in bytes
DW_API_PUBLIC dwStatus dwSensor_setThreadPriority(int32_t priority, dwSensorHandle_t sensor)
Sets the priority of the internal thread, for sensors that use an internal thread to communicate to t...
NVIDIA DriveWorks API: Core Methods
const char * parameters
Array to additional parameters provided to sensor creation.
aarch64 based Drive 5 QNX.
A seek structure is made of memory offset, eventcount and timestamp.
aarch64 based Drive 5 Linux.
uint64_t drops
Number of events dropped.
uint64_t events
Number of normal events (excluding errors and drops).
DW_API_PUBLIC dwStatus dwSAL_getSensorParameterString(const char **parameters, uint32_t idx, dwPlatformOS os, dwSALHandle_t sal)
Gets the parameter string acceptable by a sensor.
DW_API_PUBLIC dwStatus dwSAL_getSensorProtocol(const char **name, uint32_t idx, dwPlatformOS os, dwSALHandle_t sal)
Gets protocol name of a sensor for a given index, e.g., 'camera.gmsl' or 'can.file'.
DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *sal, dwContextHandle_t context)
Creates and initializes a SAL (sensor abstraction layer) module.
const char * protocol
Name of the protocol.
DW_API_PUBLIC dwStatus dwSAL_getNumSensors(uint32_t *num, dwPlatformOS os, dwSALHandle_t sal)
Gets number of available sensors for a platform.
struct dwSensorObject * dwSensorHandle_t
Handle representing a sensor.
dwStatus
Status definition.
uint64_t offset
offset into a file of this event
DW_API_PUBLIC dwStatus dwSensor_start(dwSensorHandle_t sensor)
Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
DW_API_PUBLIC dwStatus dwSensor_setThreadAffinity(int32_t affinityMask, dwSensorHandle_t sensor)
Sets the affinity of the internal thread, for sensors that use an internal thread to communicate to t...
DW_API_PUBLIC dwStatus dwSensor_getSeekRange(size_t *eventCount, dwTime_t *startTimestamp_us, dwTime_t *endTimestamp_us, dwSensorHandle_t sensor)
Retrieves the valid range of seek parameters, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSensor_reset(dwSensorHandle_t sensor)
Resets the sensor.
dwTime_t timeDeltaCur
Current time difference between two consecutive packets.
dwTime_t timestamp
timestamp of this entry
dwPlatformOS
Defines the operating system in use.
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t sensor)
Releases a sensor managed by the SAL module.
Default Linux based platform.
uint64_t event
counter of this event
DW_API_PUBLIC dwStatus dwSensor_readRawData(const uint8_t **data, size_t *size, dwTime_t timeout_us, dwSensorHandle_t sensor)
Reads RAW data from sensor as byte array.
DW_API_PUBLIC dwStatus dwSensor_saveSeekTable(const char *fileName, dwSensorHandle_t sensor)
Saves the seek table for the sensor to a file, for sensors that support seek tables.
struct dwContextObject * dwContextHandle_t
Context handle.
DW_API_PUBLIC dwStatus dwSAL_getPlatformInfo(const char **osName, dwPlatformOS os, dwSALHandle_t sal)
Gets detailed information about the running hardware platform and operating system.
Number of available platforms.
DW_API_PUBLIC dwStatus dwSensor_getStats(dwSensorStats *stats, dwSensorHandle_t sensor)
Gets sensor statistics (if available).
NVIDIA DriveWorks API: Core Exports
DW_API_PUBLIC dwStatus dwSensor_getSeekTableEntries(dwSensorSeekTableEntry *entries, size_t numEntries, dwSensorHandle_t sensor)
Fill in the pre-allocated dwSensorSeekTableEntry array.
DW_API_PUBLIC dwStatus dwSensor_seekToEvent(size_t event, dwSensorHandle_t sensor)
Seeks the sensor to an event, for sensors that support seeking.
DW_API_PUBLIC dwStatus dwSAL_createSensor(dwSensorHandle_t *sensor, dwSensorParams params, dwSALHandle_t sal)
Creates a new sensor managed by the SAL module with the given parameters.
DW_API_PUBLIC dwStatus dwSensor_getCurrentSeekPosition(size_t *event, dwSensorHandle_t sensor)
Gets the current seek position of the sensor.
DW_API_PUBLIC dwStatus dwSAL_getPlatform(dwPlatformOS *os, dwSALHandle_t sal)
Gets current platform the SDK is running on.
DW_API_PUBLIC dwStatus dwSAL_release(dwSALHandle_t sal)
Releases the SAL (sensor abstraction layer) module.
float64_t timeDeltaStandardDeviation
Variance of all the deltas between consecutive timestamps.
DW_API_PUBLIC dwStatus dwSAL_reset(dwSALHandle_t sal)
Resets the SAL (sensor abstraction layer) module.
float64_t timeDeltaMean
Mean of all the deltas between consecutive timestamps.
uint64_t errors
Number of encountered errors.