Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>

  • DriveWorks SDK Reference
    5.8.83 Release
    For Test and Development only

    All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Sensors.h File Reference

    Detailed Description

    NVIDIA DriveWorks API: Sensors

    Description: This file defines the sensor abstraction layer (SAL).

    Definition in file Sensors.h.

    Go to the source code of this file.

    Data Structures

    struct  dwSensorParams
     Holds sets of parameters for sensor creation. More...
     
    struct  dwSensorSeekTable
     
    struct  dwSensorSeekTableEntry
     A seek structure is made of memory offset, eventcount and timestamp. More...
     
    struct  dwSensorStats
     Holds the available statistics for a sensor. More...
     
    struct  dwSensorTsAndID
     
    struct  dwSensorVehicleState
     Vehicle State inputs. More...
     
    struct  dwSensorVehicleState.validityInfo
     Validity info. More...
     

    Macros

    #define DW_SENSOR_ERROR_ID_OFFSET   (1U << DW_SENSOR_ERROR_ID_OFFSET_BIT)
     offset of dwSensorErrorID when reported via module health service More...
     
    #define DW_SENSOR_ERROR_ID_OFFSET_BIT   24U
     bit-shift of dwSensorErrorID when reported via module health service More...
     
    #define DW_SENSOR_MAX_PARAMETER_STRING_LENGTH   512
     Maximal length of the parameter string of a sensor. More...
     
    #define DW_SENSOR_MAX_PROTOCOL_NAME_LENGTH   32
     Maximal length of the protocol name of a sensor. More...
     

    Typedefs

    typedef struct dwSALObject * dwSALHandle_t
     Handle representing the Sensor Abstraction Layer interface. More...
     
    typedef struct dwSensorObject * dwSensorHandle_t
     Handle representing a sensor. More...
     

    Enumerations

    enum  dwPlatformOS {
      DW_PLATFORM_OS_LINUX = 0 ,
      DW_PLATFORM_OS_V5L = 1 ,
      DW_PLATFORM_OS_V5Q = 2 ,
      DW_PLATFORM_NUM = 3
    }
     Defines the operating system in use. More...
     
    enum  dwSensorDrivingDirection {
      DW_SENSOR_DRIVING_DIRECTION_UNKNOWN = 0 ,
      DW_SENSOR_DRIVING_DIRECTION_FORWARD = 1 ,
      DW_SENSOR_DRIVING_DIRECTION_BACKWARD = 2
    }
     Driving Direction options. More...
     
    enum  dwSensorErrorID {
      DW_SENSOR_ERROR_CODE_INVALID = 0 ,
      DW_SENSOR_ERROR_CODE_NO_NEW_DATA = 1
    }
     Sensor Error ID to be used in, e.g., dwErrorSignal.errorID[31:24] when DW_SENSOR_ERROR_CODE_OFFSET_BIT equals 24. 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_SENSOR_STAT_COUNT = 4
    }
     Defines the various delta used in 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...
     

    Functions

    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_getNumSensors (uint32_t *const num, dwPlatformOS const os, dwSALHandle_t const sal)
     Gets number of available sensors for a platform. More...
     
    DW_API_PUBLIC dwStatus dwSAL_getPlatform (dwPlatformOS *const os, dwSALHandle_t sal)
     Gets current platform the SDK is running on. More...
     
    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. More...
     
    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. More...
     
    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'. More...
     
    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_release (dwSALHandle_t const sal)
     Releases the SAL (sensor abstraction layer) module. 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_reset (dwSALHandle_t const sal)
     Resets the SAL (sensor abstraction layer) module. 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_start (dwSALHandle_t const sal)
     Bootstraps all sensors managed by the SAL module. 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_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)
     
    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_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_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_getStats (dwSensorStats *const stats, dwSensorHandle_t const sensor)
     Gets sensor statistics (if available). 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. More...
     
    DW_API_PUBLIC dwStatus dwSensor_reset (dwSensorHandle_t const sensor)
     Resets the sensor. 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_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_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_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_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_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_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...
     
    人人超碰97caoporen国产