NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvsipl::ISensorControl Class Referenceabstract

Detailed Description

Interface defining basic Sensor Control functionality.

Definition at line 39 of file ISensorControl.hpp.

Public Member Functions

 ISensorControl ()=default
 Constructor. More...
 
 ISensorControl (ISensorControl const &)=delete
 Prevent ISensorControl from being copy constructed. More...
 
 ISensorControl (ISensorControl &&)=delete
 Prevent ISensorControl from being move constructed. More...
 
ISensorControloperator= (ISensorControl const &) &=delete
 Prevent ISensorControl from being copy assigned. More...
 
ISensorControloperator= (ISensorControl &&) &=delete
 Prevent ISensorControl from being move assigned. More...
 
virtual ~ISensorControl ()=default
 Destructor. More...
 
virtual NvMediaStatus SIPLParseTopEmbDataInfo (DevBlkCDIEmbeddedDataChunk const *const embeddedTopDataChunk, size_t const embeddedDataChunkStructSize, DevBlkCDIEmbeddedDataInfo *const embeddedDataInfo, size_t const dataInfoStructSize)=0
 Interface to parse top sensor embedded data to get sensor settings applied to the captured frame. More...
 
virtual NvMediaStatus SIPLParseBotEmbDataInfo (DevBlkCDIEmbeddedDataChunk const *const embeddedBotDataChunk, size_t const embeddedDataChunkStructSize, DevBlkCDIEmbeddedDataInfo *const embeddedDataInfo, size_t const dataInfoStructSize)=0
 Interface to parse bottom sensor embedded data to get statistics information for the captured frame. More...
 
virtual NvMediaStatus SIPLSetSensorControls (DevBlkCDISensorControl const *const sensorControl, size_t const sensrCtrlStructSize)=0
 Interface to set sensor control parameters. More...
 
virtual NvMediaStatus SIPLGetSensorAttributes (DevBlkCDISensorAttributes *const sensorAttr, size_t const sensorAttrStructSize)=0
 Interface to get the sensor attributes. More...
 
virtual NvMediaStatus SIPLSetSensorCharMode (uint8_t expNo)=0
 Interface to set sensor in characterization mode. More...
 
virtual NvMediaStatus SIPLAuthenticateImage (DevBlkImageDesc const *const imageDesc) const =0
 Interface to request image data authentication. More...
 

Constructor & Destructor Documentation

◆ ISensorControl() [1/3]

nvsipl::ISensorControl::ISensorControl ( )
default

Constructor.

◆ ISensorControl() [2/3]

nvsipl::ISensorControl::ISensorControl ( ISensorControl const &  )
delete

Prevent ISensorControl from being copy constructed.

◆ ISensorControl() [3/3]

nvsipl::ISensorControl::ISensorControl ( ISensorControl &&  )
delete

Prevent ISensorControl from being move constructed.

◆ ~ISensorControl()

virtual nvsipl::ISensorControl::~ISensorControl ( )
virtualdefault

Destructor.

Member Function Documentation

◆ operator=() [1/2]

ISensorControl& nvsipl::ISensorControl::operator= ( ISensorControl &&  ) &
delete

Prevent ISensorControl from being move assigned.

◆ operator=() [2/2]

ISensorControl& nvsipl::ISensorControl::operator= ( ISensorControl const &  ) &
delete

Prevent ISensorControl from being copy assigned.

◆ SIPLAuthenticateImage()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLAuthenticateImage ( DevBlkImageDesc const *const  imageDesc) const
pure virtual

Interface to request image data authentication.

This function calls into DevBlk CDI functionality to request authentication of an image data. Pixel and embedded data can be authenticated.

Authentication session needs to be established by underlying driver prior to calling the API or authentication mismatch will be returned.

Pixel data is a mandatory input parameter, while embedded data is optional and can be NULL if embedded data is not enabled on a sensor or embedded data authentication is not required.

The API may be called for different sensor device objects from multiple threads simultaneously. The API will never be called from multiple threads for the same sensor. Implementation shall ensure thread safety of authentication calls for different sensor objects.

Precondition
  • imageDesc must be a valid sensor description.
  • Sensor device driver implements AuthenticateImage() function.
Parameters
[in]imageDescA description of a RAW image to authenticate Valid value: [non-NULL].
Return values
NVMEDIA_STATUS_OKAuthentication match.
NVMEDIA_STATUS_INCOMPATIBLE_VERSIONImage verification failure (authentication mismatch).
NVMEDIA_STATUS_UNDEFINED_STATEOut-of-order image is detected.
NVMEDIA_STATUS_ERRORInternal failure in crypto operation.
NVMEDIA_STATUS_INVALID_SIZEInput buffer sizes are invalid.
NVMEDIA_STATUS_NOT_SUPPORTEDAuthentication is not supported by the device.
NVMEDIA_STATUS_BAD_PARAMETERInvalid input parameters are passed.
NVMEDIA_STATUS_NOT_INITIALIZEDCrypto state was not initialized before requesting image verification.


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

◆ SIPLGetSensorAttributes()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLGetSensorAttributes ( DevBlkCDISensorAttributes *const  sensorAttr,
size_t const  sensorAttrStructSize 
)
pure virtual

Interface to get the sensor attributes.

Sensor attributes are static properties like sensor name, exposure-gain ranges supported, and number of active exposures.

Note
Exact API behavior is implementation defined.
Precondition
  • A valid sensor device driver created with DriverCreate().
  • Sensor device driver implements GetSensorAttributes() function.
Parameters
[out]sensorAttrA pointer (of type DevBlkCDISensorAttributes) a sensor attributes structure.
[in]sensorAttrStructSizeSize (of type size_t) of the sensorAttr structure. Must be exact size of DevBlkCDISensorAttributes.
Return values
NVMEDIA_STATUS_OKOn successful operation.
(NvMediaStatus)On other sub-routine propagated error.


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

◆ SIPLParseBotEmbDataInfo()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLParseBotEmbDataInfo ( DevBlkCDIEmbeddedDataChunk const *const  embeddedBotDataChunk,
size_t const  embeddedDataChunkStructSize,
DevBlkCDIEmbeddedDataInfo *const  embeddedDataInfo,
size_t const  dataInfoStructSize 
)
pure virtual

Interface to parse bottom sensor embedded data to get statistics information for the captured frame.

If image statistics generation is by the sensor and enabled, this function can be used to retrieve statistics like histogram of the frame.

Note
Exact API behavior is implementation defined.
Precondition
  • A valid sensor device driver created with DriverCreate().
  • Sensor device driver implements ParseBotEmbDataInfo() function.
Parameters
[in]embeddedBotDataChunkA pointer (of type DevBlkCDIEmbeddedDataChunk) to the bottom sensor embedded data chunk structure. Valid value: [non-NULL]
[in]embeddedDataChunkStructSizeSize (of type size_t) of the embeddedTopDataChunk and embeddedBottomDataChunk structures, in bytes. Valid size is device specific.
[out]embeddedDataInfoA pointer (of type DevBlkCDIEmbeddedDataInfo) to the embedded data parsed info structure. Valid size is device specific.
[in]dataInfoStructSizeSize (of type size_t) of the embeddedDataInfo structure, in bytes. Valid size is device specific.
Return values
NVMEDIA_STATUS_OKOn successful operation.
(NvMediaStatus)On other sub-routine propagated error.


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

◆ SIPLParseTopEmbDataInfo()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLParseTopEmbDataInfo ( DevBlkCDIEmbeddedDataChunk const *const  embeddedTopDataChunk,
size_t const  embeddedDataChunkStructSize,
DevBlkCDIEmbeddedDataInfo *const  embeddedDataInfo,
size_t const  dataInfoStructSize 
)
pure virtual

Interface to parse top sensor embedded data to get sensor settings applied to the captured frame.

This function can be used to retrieve sensor settings like exposure, gain, and white balance settings applied to the frame.

Note
Exact API behavior is implementation defined.
Precondition
  • A valid sensor device driver created with DriverCreate().
  • Sensor device driver implements ParseTopEmbDataInfo() function.
Parameters
[in]embeddedTopDataChunkA pointer (of type DevBlkCDIEmbeddedDataChunk) to the top sensor embedded data chunk structure. Valid value: [non-NULL]
[in]embeddedDataChunkStructSizeSize (of type size_t) of the embeddedTopDataChunk and embeddedBottomDataChunk structures, in bytes. Valid size is device specific.
[out]embeddedDataInfoA pointer (of type DevBlkCDIEmbeddedDataInfo) to the embedded data parsed info structure. Valid size is device specific.
[in]dataInfoStructSizeSize (of type size_t) of the embeddedDataInfo structure, in bytes. Valid size is device specific.
Return values
NVMEDIA_STATUS_OKOn successful operation.
(NvMediaStatus)On other sub-routine propagated error.


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

◆ SIPLSetSensorCharMode()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLSetSensorCharMode ( uint8_t  expNo)
pure virtual

Interface to set sensor in characterization mode.

This function calls into DevBlk CDI functionality to provide the ability for the user to configure the sensor for characterization. Sensor characterization provides optimal parameters, corresponding to sensor physical and functional characteristics, for image processing.

Sensor characterization for High Dynamic Range (HDR) sensors with multiple exposures (T1, T2, ... , Tn ) involves characterizing individual exposures separately, if required by the sensor. This API provides the ability to configure sensor to capture each exposure separately, if required by sensor characterization.

This function re-configures the sensor i.e. changes the sensor static attributes like numActiveExposures, sensorExpRange, sensorGainRange and hence, should be called during sensor initialization time. In order to characterize the sensor exposure number 'n', where n = {1,2,3, ... , N} for N-exposure HDR sensor, the input parameter expNo should be set to 'n'. For a non-HDR sensor, the input parameter expNo should always be set to '1'.

Note
Exact API behavior is implementation defined.
Precondition
  • A valid sensor device driver created with DriverCreate().
  • Sensor device driver implements SetSensorCharMode() function.
Parameters
[in]expNoSensor exposure number (of type uint8_t) to be used for characterization. Valid range for expNo : [0, DEVBLK_ISC_MAX_EXPOSURES - 1] For Non-HDR sensor, this should be set to '1'
Return values
NVMEDIA_STATUS_OKOn successful operation.
(NvMediaStatus)On other sub-routine propagated error.


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

◆ SIPLSetSensorControls()

virtual NvMediaStatus nvsipl::ISensorControl::SIPLSetSensorControls ( DevBlkCDISensorControl const *const  sensorControl,
size_t const  sensrCtrlStructSize 
)
pure virtual

Interface to set sensor control parameters.

This function enables caller to control sensor image settings like exposure time, sensor gain, and white balance gain. All parameters provided to this function are applied together at a frame boundary through "group hold" functionality, if supported by the sensor.

This function invokes the device driver function specified by the call to SetSensorControls().

Note
Exact API behavior is implementation defined.
Precondition
  • A valid sensor device driver created with DriverCreate().
  • Sensor device driver implements SetSensorControls() function.
Parameters
[in]sensorControlA pointer (of type DevBlkCDISensorControl) to a sensor control structure for device. Valid value: [non-NULL]
[in]sensrCtrlStructSizeSize (of type size_t) of the sensorControl structure.
Return values
NVMEDIA_STATUS_OKOn successful operation.
(NvMediaStatus)On other sub-routine propagated error.


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: Yes
    • De-Init: No

The documentation for this class was generated from the following file: