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
    SensorCommonPlugin.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) 2019-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
    38#ifndef DW_SENSORS_COMMON_PLUGIN_H
    39#define DW_SENSORS_COMMON_PLUGIN_H
    40
    41#include <dw/core/base/Types.h>
    43
    44#include <dw/sensors/Sensors.h>
    45
    67#ifdef __cplusplus
    68extern "C" {
    69#endif
    70
    72
    73// Enum to indicate the relationship between raw and decoded data for a custom sensor
    74typedef enum {
    82
    84typedef struct
    85{
    87 size_t packetSize;
    91
    92// Holds the sensor firmware version information
    93typedef struct
    94{
    95 // Separate the fwVersion string into three pieces.
    96 uint64_t versionMajor; // Firmware version major number
    97 uint64_t versionMinor; // Firmware version minor number
    98 uint64_t versionPatch; // Firmware version patch number
    99 char* versionString; // Firmware version string
    101
    102// Holds the sensor information
    103typedef struct
    104{
    107
    108// Enum to indicate which level the raw data to read from
    109typedef enum {
    110 DW_SENSORS_RAW_DATA_LEVEL_ZERO = 0, // Raw data same as from readRawData, TP segment in SOME/IP use case
    111 DW_SENSORS_RAW_DATA_LEVEL_ONE = 1, // Raw data combined from LEVEL_ZERO raw Data, reassembled pdu(from segments) in SOME/IP use case
    112 DW_SENSORS_RAW_DATA_LEVEL_TWO = 2, // Raw data combined from LEVEL_ONE raw Data, combined pdu(from split pdus)
    113 DW_SENSORS_RAW_DATA_LEVEL_COUNT = 3 // Count for validating user passed level
    115
    129 dwSensorPluginProperties* properties,
    130 const char* params, dwContextHandle_t ctx);
    131
    144
    159
    173
    184
    197
    236typedef dwStatus (*dwSensorPlugin_readRawData)(const uint8_t** data, size_t* size, dwTime_t* timestamp,
    237 dwTime_t timeout_us, dwSensorPluginSensorHandle_t handle);
    238
    253
    274typedef dwStatus (*dwSensorPlugin_pushData)(size_t* lenPushed, const uint8_t* data, size_t const size, dwSensorPluginSensorHandle_t handle);
    275
    286
    309typedef dwStatus (*dwSensorPlugin_getRawPackets)(uint8_t const* const rawData, size_t* const size,
    310 dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const** const data, dwSensorPluginSensorHandle_t handle);
    325typedef dwStatus (*dwSensorPlugin_rawDataReadyForDecode)(size_t* offset, size_t* size, uint8_t const* const data, dwSensorPluginSensorHandle_t ctx);
    326
    328typedef struct
    329{
    344
    347#ifdef __cplusplus
    348}
    349#endif
    350
    351#endif
    NVIDIA DriveWorks API: Sensors
    NVIDIA DriveWorks API: Core Types
    NVIDIA DriveWorks API: Core Methods
    struct dwContextObject * dwContextHandle_t
    Context handle.
    Definition: Context.h:82
    dwStatus
    Status definition.
    Definition: Status.h:171
    int64_t dwTime_t
    Specifies a timestamp unit, in microseconds.
    Definition: Types.h:82
    size_t packetSize
    Packet size for each raw data message.
    dwSensorPlugin_returnRawData returnRawData
    dwSensorPlugin_rawToDecMap rawToDec
    Indicate the relationship between raw data and decoded packet.
    dwSensorPlugin_firmwareVersion firmware
    dwSensorPlugin_pushData pushData
    dwSensorPlugin_getSensorInformation getSensorInformation
    dwSensorPlugin_createHandle createHandle
    dwSensorPlugin_release release
    dwSensorPlugin_rawDataReadyForDecode rawDataReadyForDecode
    Funciton pointer used to check if raw data is ready for decode.
    dwSensorPlugin_readRawData readRawData
    dwSensorPlugin_createSensor createSensor
    dwSensorPlugin_getRawPackets getRawPackets
    dwStatus(* dwSensorPlugin_stop)(dwSensorPluginSensorHandle_t handle)
    Stops the sensor.
    dwSensorPlugin_rawToDecMap
    dwStatus(* dwSensorPlugin_release)(dwSensorPluginSensorHandle_t handle)
    Releases a sensor managed by the plugin module.
    dwStatus(* dwSensorPlugin_rawDataReadyForDecode)(size_t *offset, size_t *size, uint8_t const *const data, dwSensorPluginSensorHandle_t ctx)
    API for sensor that raw data and decoded packet are many to one relationship.
    dwStatus(* dwSensorPlugin_createHandle)(dwSensorPluginSensorHandle_t *handle, dwSensorPluginProperties *properties, const char *params, dwContextHandle_t ctx)
    Creates a new handle to the sensor managed by the plugin module.
    dwStatus(* dwSensorPlugin_getRawPackets)(uint8_t const *const rawData, size_t *const size, dwSensorPlugin_rawDataLevel level, int32_t groupNum, uint8_t const **const data, dwSensorPluginSensorHandle_t handle)
    Reads RAW data from different level.
    dwStatus(* dwSensorPlugin_start)(dwSensorPluginSensorHandle_t handle)
    Starts the sensor previously successfully created with 'dwSensorPlugin_createSensor' interface.
    dwStatus(* dwSensorPlugin_returnRawData)(const uint8_t *data, dwSensorPluginSensorHandle_t handle)
    Returns RAW data to sensor as a byte array.
    void * dwSensorPluginSensorHandle_t
    dwStatus(* dwSensorPlugin_getSensorInformation)(dwSensorPlugin_information *information, dwSensorPluginSensorHandle_t sensor)
    Gets information of this sensor.
    dwStatus(* dwSensorPlugin_pushData)(size_t *lenPushed, const uint8_t *data, size_t const size, dwSensorPluginSensorHandle_t handle)
    Pushes raw data obtained from a previous 'dwSensorPlugin_readRawData' call for decoding.
    dwStatus(* dwSensorPlugin_readRawData)(const uint8_t **data, size_t *size, dwTime_t *timestamp, dwTime_t timeout_us, dwSensorPluginSensorHandle_t handle)
    Reads RAW data for one single message from the sensor as byte array.
    dwSensorPlugin_rawDataLevel
    dwStatus(* dwSensorPlugin_reset)(dwSensorPluginSensorHandle_t handle)
    Resets the sensor.
    dwStatus(* dwSensorPlugin_createSensor)(const char *params, dwSALHandle_t sal, dwSensorPluginSensorHandle_t handle)
    Creates and initializes a new sensor managed by the plugin.
    @ DW_SENSORS_RAW_DEC_NOT_SUPPORTED
    Not supported.
    @ DW_SENSORS_RAW_DEC_MANY_TO_ONE
    N-1(N>1) map between raw data and decoded packet.
    @ DW_SENSORS_RAW_DEC_ONE_TO_ONE
    1-1 map between raw data and decoded packet
    @ DW_SENSORS_RAW_DATA_LEVEL_TWO
    @ DW_SENSORS_RAW_DATA_LEVEL_ZERO
    @ DW_SENSORS_RAW_DATA_LEVEL_ONE
    @ DW_SENSORS_RAW_DATA_LEVEL_COUNT
    Function Table exposing common plugin functions.
    Structure for generic constants returned by the plugin.
    struct dwSALObject * dwSALHandle_t
    Handle representing the Sensor Abstraction Layer interface.
    Definition: Sensors.h:83
    人人超碰97caoporen国产