• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.4 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    DevBlkCDIDeviceDriver Struct Reference

    Detailed Description

    Holds device driver data.

    Definition at line 741 of file devblk_cdi.h.

    Data Fields

    const char * deviceName
     Holds the device name. More...
     
    uint32_t regLength
     Holds the target device offset length in bytes. More...
     
    uint32_t dataLength
     Holds the target device data length in bytes. More...
     
    NvMediaStatus(* DriverCreate )(DevBlkCDIDevice *handle, void const *clientContext)
     Holds the function that creates device driver. More...
     
    NvMediaStatus(* DriverDestroy )(DevBlkCDIDevice *handle)
     Holds the function that destroy the driver for a device. More...
     
    NvMediaStatus(* SetSensorControls )(DevBlkCDIDevice const *handle, const struct DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize)
     Holds the function that sets sensor controls. More...
     
    NvMediaStatus(* ParseTopEmbDataInfo )(DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *topEmbDataChunk, const size_t topChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
     Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer. More...
     
    NvMediaStatus(* ParseBotEmbDataInfo )(DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *botEmbDataChunk, const size_t botChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
     Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer. More...
     
    NvMediaStatus(* GetSensorAttributes )(DevBlkCDIDevice const *handle, struct DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
     Holds the function that gets sensor attributes. More...
     
    NvMediaStatus(* GetModuleConfig )(DevBlkCDIDevice *handle, struct DevBlkCDIModuleConfig *moduleConfig)
     Holds the function that gets module configuration. More...
     
    NvMediaStatus(* SetSensorCharMode )(DevBlkCDIDevice *handle, uint8_t expNo)
     Holds the function that sets sensor in characterization mode. More...
     
    NvMediaStatus(* ReadRegister )(DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)
     Holds the function that reads a block from an I2C device. More...
     
    NvMediaStatus(* WriteRegister )(DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t const *dataBuff)
     Holds the function that writes a block to an I2C device. More...
     

    Field Documentation

    ◆ dataLength

    uint32_t DevBlkCDIDeviceDriver::dataLength

    Holds the target device data length in bytes.

    Definition at line 747 of file devblk_cdi.h.

    ◆ deviceName

    const char* DevBlkCDIDeviceDriver::deviceName

    Holds the device name.

    Definition at line 743 of file devblk_cdi.h.

    ◆ DriverCreate

    NvMediaStatus(* DevBlkCDIDeviceDriver::DriverCreate) (DevBlkCDIDevice *handle, void const *clientContext)

    Holds the function that creates device driver.

    The implementation should allocate and initialize the device driver internal handle and module configuration. DriverCreate should not communicate with the device, only set up driver data structures.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL].
    [in]clientContextA non-NULL pointer to the device context to use when driver is created. If NULL, the default context will be used in driver.
    Return values
    NVMEDIA_STATUS_OKwhen all internal structures are initialized successfully.
    NVMEDIA_STATUS_OUT_OF_MEMORYwhen an internal allocation fails. (Failure)
    NVMEDIA_STATUS_BAD_PARAMETERwhen handle is NULL. (Failure)
    NVMEDIA_STATUS_*May return a different NvMedia error status for implementation-defined reasons. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    Definition at line 782 of file devblk_cdi.h.

    ◆ DriverDestroy

    NvMediaStatus(* DevBlkCDIDeviceDriver::DriverDestroy) (DevBlkCDIDevice *handle)

    Holds the function that destroy the driver for a device.

    The implementation should release all resources allocated in DriverCreate(). It should not communicate with the device.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL].
    Return values
    NVMEDIA_STATUS_OKwhen all resources are successfully released.
    NVMEDIA_STATUS_*May return an NvMedia error status for implementation-defined reasons. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes

    Definition at line 814 of file devblk_cdi.h.

    ◆ GetModuleConfig

    NvMediaStatus(* DevBlkCDIDeviceDriver::GetModuleConfig) (DevBlkCDIDevice *handle, struct DevBlkCDIModuleConfig *moduleConfig)

    Holds the function that gets module configuration.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    Definition at line 1025 of file devblk_cdi.h.

    ◆ GetSensorAttributes

    NvMediaStatus(* DevBlkCDIDeviceDriver::GetSensorAttributes) (DevBlkCDIDevice const *handle, struct DevBlkCDISensorAttributes *sensorAttr, const size_t sensorAttrStructSize)

    Holds the function that gets sensor attributes.

    The sensorAttrStructSize parameter can be used to check if the application was built against the same version of CDI as the driver.

    The function should fill out the provided DevBlkCDISensorAttributes completely.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL].
    [in]sensorAttrA pointer to the DevBlkCDISensorAttributes structure. Valid value: [non-NULL].
    [in]sensorAttrStructSizeSize of the sensorAttr structure, in bytes; The size must > 0.
    Return values
    NVMEDIA_STATUS_OKon success.
    NVMEDIA_STATUS_*if parameter validation or another internal operation fails. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    Definition at line 1000 of file devblk_cdi.h.

    ◆ ParseBotEmbDataInfo

    NvMediaStatus(* DevBlkCDIDeviceDriver::ParseBotEmbDataInfo) (DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *botEmbDataChunk, const size_t botChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)

    Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer.

    DevBlkCDIParseBotEmbDataInfo() invokes this function.

    The embeddedDataChunkStructSize and dataInfoStructSize parameters can be used to validate that the client is using the same CDI version as the driver.

    The provided botEmbDataChunk provides access to the bottom data chunks. These should be used to fill out the information requested by embeddedDataInfo, as supported by the sensor. Unsupported elements should have their corresponding valid flag set to false. For example, if a given sensor doesn't support reporting temperature information, embeddedDataInfo->sensorTempInfo->tempValid should be set to false after this function runs.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL.
    [in]botEmbDataChunkA pointer to the top sensor embedded data DevBlkCDIEmbeddedDataChunk structure. Valid value: [non-NULL].
    [in]botChunkStructSizeSize of the botEmbDataChunk in bytes; The size must > 0.
    [in]embeddedDataInfoA pointer to the buffer that holds the parsed embedded data info. Valid value: [non-NULL].
    [in]dataInfoStructSizeSize of the embeddedDataInfo structure, in bytes; The size must > 0.
    Return values
    NVMEDIA_STATUS_OKwhen all operations succeed.
    NVMEDIA_STATUS_*May return an NvMedia error status for implementation-defined reasons. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    Definition at line 960 of file devblk_cdi.h.

    ◆ ParseTopEmbDataInfo

    NvMediaStatus(* DevBlkCDIDeviceDriver::ParseTopEmbDataInfo) (DevBlkCDIDevice const *handle, const struct DevBlkCDIEmbeddedDataChunk *topEmbDataChunk, const size_t topChunkStructSize, struct DevBlkCDIEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)

    Holds a pointer to the function that parses top section embedded data returned as part of a captured buffer.

    DevBlkCDIParseTopEmbDataInfo() invokes this function.

    The embeddedDataChunkStructSize and dataInfoStructSize parameters can be used to validate that the client is using the same CDI version as the driver.

    The provided topEmbDataChunk provides access to the top data chunks. These should be used to fill out the information requested by embeddedDataInfo, as supported by the sensor. Unsupported elements should have their corresponding valid flag set to false. For example, if a given sensor doesn't support reporting temperature information, embeddedDataInfo->sensorTempInfo->tempValid should be set to false after this function runs.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL.
    [in]topEmbDataChunkA pointer to the top sensor embedded data DevBlkCDIEmbeddedDataChunk structure. Valid value: [non-NULL].
    [in]topChunkStructSizeSize of the topEmbDataChunk in bytes; The size must > 0.
    [in]embeddedDataInfoA pointer to the buffer that holds the parsed embedded data info. Valid value: [non-NULL].
    [in]dataInfoStructSizeSize of the embeddedDataInfo structure, in bytes; The size must > 0.
    Return values
    NVMEDIA_STATUS_OKwhen all operations succeed.
    NVMEDIA_STATUS_*May return an NvMedia error status for implementation-defined reasons. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Thread-safe: No

    Definition at line 905 of file devblk_cdi.h.

    ◆ ReadRegister

    NvMediaStatus(* DevBlkCDIDeviceDriver::ReadRegister) (DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t *dataBuff)

    Holds the function that reads a block from an I2C device.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes

    Definition at line 1109 of file devblk_cdi.h.

    ◆ regLength

    uint32_t DevBlkCDIDeviceDriver::regLength

    Holds the target device offset length in bytes.

    Definition at line 745 of file devblk_cdi.h.

    ◆ SetSensorCharMode

    NvMediaStatus(* DevBlkCDIDeviceDriver::SetSensorCharMode) (DevBlkCDIDevice *handle, uint8_t expNo)

    Holds the function that sets sensor in characterization mode.


    This function is invoked by DevBlkCDISetSensorCharMode function call.

    Sample Usage:
    Pseudo code for cdi device driver function SetSensorCharMode invoked by DevBlkCDISetSensorCharMode function call.
    NvMediaStatus
    DevBlkCDIDevice *handle,
    uint8_t expNo);
    {
    check input parameters
    if (!handle || !expNo)
    {
    }
    set sensor in characterization mode for expNo
    status = ExpBypass(handle, expNo, ...)
    if (status is NOT NVMEDIA_STATUS_OK) {
    Error Handling
    }
    update driver internal state and sensor attributes
    drvrHandle->numActiveExposures = 1;
    drvrHandle->charModeEnabled = NVMEDIA_TRUE;
    drvrHandle->charModeExpNo = expNo;
    return status;
    }


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    Definition at line 1084 of file devblk_cdi.h.

    ◆ SetSensorControls

    NvMediaStatus(* DevBlkCDIDeviceDriver::SetSensorControls) (DevBlkCDIDevice const *handle, const struct DevBlkCDISensorControl *sensorControl, const size_t sensrCtrlStructSize)

    Holds the function that sets sensor controls.

    This function is invoked by DevBlkCDISetSensorControls function call.

    sensrCtrlStructSize can be used to determine the API version, as its size will change on every revision. Drivers should use this to ensure they are used only with compatible clients.

    The implementation may receive a DevBlkCDISensorControl which requests more sensor contexts than are supported by the driver or sensor, in which case an error should be returned and no sensor configuration modified.

    If supported by the device, drivers should set hold acquire during device configuration.

    For each requested sensor context i, each of the following parameters should be programmed:

    • Exposure time, if exposureControl[i].expTimeValid is set
    • Exposure gain, if exposureControl[i].gainValid is set
    • White balance gain, if wbControl[i].wbValid is set

    If frameReportControl.frameReportValid is set, frame reporting should be enabled with given configuration.

    Parameters
    [in]handleA pointer to the device to use; Valid value: [non-NULL].
    [in]sensorControlA pointer to a sensor control structure for device; Valid value: [non-NULL].
    [in]sensrCtrlStructSizeSize of the sensorControl structure; The size must > 0.
    Return values
    NVMEDIA_STATUS_OKwhen all operations succeed.
    NVMEDIA_STATUS_*May return an NvMedia error status for implementation-defined reasons. (Failure)


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    Definition at line 865 of file devblk_cdi.h.

    ◆ WriteRegister

    NvMediaStatus(* DevBlkCDIDeviceDriver::WriteRegister) (DevBlkCDIDevice const *handle, uint32_t deviceIndex, uint32_t registerNum, uint32_t dataLength, uint8_t const *dataBuff)

    Holds the function that writes a block to an I2C device.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: Yes

    Definition at line 1136 of file devblk_cdi.h.


    The documentation for this struct was generated from the following file:
    DevBlkCDIDeviceDriver::SetSensorCharMode
    NvMediaStatus(* SetSensorCharMode)(DevBlkCDIDevice *handle, uint8_t expNo)
    Holds the function that sets sensor in characterization mode.
    Definition: devblk_cdi.h:1084
    NVMEDIA_STATUS_OK
    @ NVMEDIA_STATUS_OK
    Specifies that the operation completed successfully (with no error).
    Definition: nvmedia_core.h:107
    DevBlkCDISetSensorCharMode
    NvMediaStatus DevBlkCDISetSensorCharMode(DevBlkCDIDevice *device, uint8_t expNo)
    Set sensor in characterization mode.
    NvMediaStatus
    NvMediaStatus
    Defines all possible error codes.
    Definition: nvmedia_core.h:104
    NVMEDIA_STATUS_BAD_PARAMETER
    @ NVMEDIA_STATUS_BAD_PARAMETER
    Specifies that a bad parameter was passed.
    Definition: nvmedia_core.h:109
    DevBlkCDIDevice
    Holds the handle for an DevBlkCDIDevice object.
    Definition: devblk_cdi.h:119
    NVMEDIA_TRUE
    #define NVMEDIA_TRUE
    A true NvMediaBool value.
    Definition: nvmedia_core.h:63
    人人超碰97caoporen国产