NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only

Detailed Description

Holds device driver data.

Definition at line 394 of file nvmedia_isc.h.

Data Fields

char * deviceName
 Holds the device name. More...
 
int32_t regLength
 Holds the target device offset length in bytes. More...
 
int32_t dataLength
 Holds the target device data length in bytes. More...
 
NvMediaStatus(* DriverCreate )(NvMediaISCDevice *handle, void *clientContext)
 Holds the function that creates device driver
This function is invoked by NvMediaISCDeviceCreate function call. More...
 
NvMediaStatus(* DriverDestroy )(NvMediaISCDevice *handle)
 Holds the function that destroy the device driver
This function is invoked by NvMediaISCDeviceDestroy function call. More...
 
NvMediaStatus(* SetSensorControls )(NvMediaISCDevice *handle, const struct NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
 Holds the function that sets sensor controls
This function is invoked by NvMediaISCSetSensorControls function call. More...
 
NvMediaStatus(* ParseEmbedDataInfo )(NvMediaISCDevice *handle, const struct NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const struct NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t dataChunkStructSize, struct NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
 Holds a pointer to the function that parses embedded data returned as part of a captured buffer. More...
 
NvMediaStatus(* GetSensorAttributes )(NvMediaISCDevice *handle, struct NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
 Holds the function that gets sensor attributes. More...
 
NvMediaStatus(* GetModuleConfig )(NvMediaISCDevice *handle, struct NvMediaISCModuleConfig *moduleConfig)
 Holds the function that gets module configuration. More...
 
NvMediaStatus(* SetSensorCharMode )(NvMediaISCDevice *handle, uint8_t expNo)
 Holds the function that sets sensor in characterization mode. More...
 

Field Documentation

◆ dataLength

int32_t NvMediaISCDeviceDriver::dataLength

Holds the target device data length in bytes.

Definition at line 400 of file nvmedia_isc.h.

◆ deviceName

char* NvMediaISCDeviceDriver::deviceName

Holds the device name.

Definition at line 396 of file nvmedia_isc.h.

◆ DriverCreate

NvMediaStatus(* NvMediaISCDeviceDriver::DriverCreate) (NvMediaISCDevice *handle, void *clientContext)

Holds the function that creates device driver
This function is invoked by NvMediaISCDeviceCreate function call.


Sample Pseudo Code:
//Pseudo code for isc device driver function DriverCreate invoked by NvMediaISCDriverCreate function call.
void *clientContext)
{
_DriverHandle *driverHandle = NULL;
// check input parameters
if (!handle || !clientContext)
{
}
// allocate memory to driver handle
driverHandle = calloc(...);
if (!driverHandle)
{
}
// initialize other members
driverHandle->... = ...;
// initialize the context
driverHandle->modulecfg... = clientContext->modulecfg...;
// set the driver handle
handle->deviceDriverHandle = (void *)drvHandle;
}

Definition at line 444 of file nvmedia_isc.h.

◆ DriverDestroy

NvMediaStatus(* NvMediaISCDeviceDriver::DriverDestroy) (NvMediaISCDevice *handle)

Holds the function that destroy the device driver
This function is invoked by NvMediaISCDeviceDestroy function call.


Sample Pseudo Code:
//Pseudo code for isc device driver function DriverDestroy invoked by NvMediaISCDeviceDestroy function call.
{
// check input parameters
if (!handle)
{
}
// free driver handle memory
if (handle->deviceDriverHandle != NULL) {
free(handle->deviceDriverHandle);
handle->deviceDriverHandle = NULL;
}
}

Definition at line 479 of file nvmedia_isc.h.

◆ GetModuleConfig

NvMediaStatus(* NvMediaISCDeviceDriver::GetModuleConfig) (NvMediaISCDevice *handle, struct NvMediaISCModuleConfig *moduleConfig)

Holds the function that gets module configuration.

Definition at line 742 of file nvmedia_isc.h.

◆ GetSensorAttributes

NvMediaStatus(* NvMediaISCDeviceDriver::GetSensorAttributes) (NvMediaISCDevice *handle, struct NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)

Holds the function that gets sensor attributes.

Sample Usage:
//Pseudo code for isc device driver function GetSensorAttributes invoked by NvMediaISCGetSensorAttributes function call.
const size_t sensorAttrStructSize)
{
// check input parameters
if (!handle || !sensorAttr || !sensorAttrStructSize)
{
}
// check api version
if(sensorAttrStructSize != sizeof(NvMediaISCSensorAttributes))
{
}
// populate sensorAttr(NvMediaISCSensorAttributes) structure
memset(sensorAttr, 0, sizeof(NvMediaISCSensorAttributes));
//populate attribute sensor name
status = GetDeviceDriverName(handle,&sensorAttr->sensorName, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
//populate attribute sensor fuse id
status = GetSensorFuseId(handle, &sensorAttr->fuseId, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
//populate attribute number of active exposures
status = GetNumActiveExposures(handle, &sensorAttr->numActiveExposures, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate attributes sensor exposure range, gain range for active exposures
For each i in array [0, sensorAttr->numActiveExposures)
{
sensorAttr->sensorExpRange[i].min = ...
sensorAttr->sensorExpRange[i].max = ...
.
.
.
sensorAttr->sensorGainRange[i].min = ...
sensorAttr->sensorGainRange[i].max = ...
sensorAttr->sensorGainFactor[i] = 1.0;
}
// populate sensor frame report bytes, if supported by sensor driver
sensorAttr->numFrameReportBytes = ...
return status;
}

Definition at line 735 of file nvmedia_isc.h.

◆ ParseEmbedDataInfo

NvMediaStatus(* NvMediaISCDeviceDriver::ParseEmbedDataInfo) (NvMediaISCDevice *handle, const struct NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const struct NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t dataChunkStructSize, struct NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)

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

NvMediaISCParseEmbedDataInfo() invokes this function.

Sample Usage:
//Pseudo code for isc device driver function ParseEmbedDataInfo invoked by \ref NvMediaISCParseEmbedDataInfo function call.
const NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk,
const NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk,
const size_t embeddedDataChunkStructSize,
NvMediaISCEmbeddedDataInfo *embeddedDataInfo,
const size_t dataInfoStructSize);
{
// check input parameters
if(!handle || !embeddedTopDataChunk || !embeddedBotDataChunk ||
!embeddedDataChunkStructSize || !dataInfoStructSize)
{
}
// check api version
if ((embeddedDataChunkStructSize != sizeof(NvMediaISCEmbeddedDataChunk)) ||
(dataInfoStructSize != sizeof(NvMediaISCEmbeddedDataInfo))) {
// Handle version mismatch
}
memset(parsedInfo, 0, sizeof(NvMediaISCEmbeddedDataInfo));
// decode top embedded lines
status = DepackTopEmbeddedLine (handle, embeddedTopDataChunk, … );
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// decode bottom embedded lines, if supported by sensor driver
status = DepackBottomEmbeddedLine (handle, embeddedBotDataChunk, … );
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate number of active exposures for the captured frame
status = ParseNumExposures(&parsedInfo->numActiveExposures);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame exposure info block
status = ParseExposure(&parsedInfo->sensorExpInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame white balance info block
status = ParseWBGain(&parsedInfo->sensorWBInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// populate frame temperature info block
status = ParseTemperatureInfo(&parsedInfo->sensorTempInfo, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
// Set valid flag to FALSE for unsupported info blocks
parsedInfo->sensorReportInfo.frameReportValid = NVMEDIA_FALSE;
parsedInfo->sensorTempInfo.tempValid = NVMEDIA_FALSE;
return status;
}

Definition at line 656 of file nvmedia_isc.h.

◆ regLength

int32_t NvMediaISCDeviceDriver::regLength

Holds the target device offset length in bytes.

Definition at line 398 of file nvmedia_isc.h.

◆ SetSensorCharMode

NvMediaStatus(* NvMediaISCDeviceDriver::SetSensorCharMode) (NvMediaISCDevice *handle, uint8_t expNo)

Holds the function that sets sensor in characterization mode.


This function is invoked by NvMediaISCSetSensorCharMode function call.

Sample Usage:
//Pseudo code for isc device driver function SetSensorCharMode invoked by NvMediaISCSetSensorCharMode function call.
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;
}

Definition at line 785 of file nvmedia_isc.h.

◆ SetSensorControls

NvMediaStatus(* NvMediaISCDeviceDriver::SetSensorControls) (NvMediaISCDevice *handle, const struct NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)

Holds the function that sets sensor controls
This function is invoked by NvMediaISCSetSensorControls function call.


Sample Usage:
//Pseudo code for isc device driver function SetSensorControls invoked by NvMediaISCSetSensorControls function call.
const NvMediaISCSensorControl *sensorControl,
const size_t sensrCtrlStructSize)
{
uint8_t regVal[2];
// check input parameters
if (!handle || !sensorControl || !sensrCtrlStructSize)
{
}
// check api version
if(sensrCtrlStructSize != sizeof(NvMediaISCSensorControl))
{
}
// check num sensor context
if(sensorControl->numSensorContexts IS NOT SUPPORTED) {
}
// set sensor group hold acquire register, if supported
regVal[0] = ...
status = WriteRegister(handle,...,REG_GROUP_HOLD, regVal);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
For each i in array [0, sensorControl->numSensorContexts)
{
// apply sensor exposure control settings
if(sensorControl->exposureControl[i].expTimeValid IS NVMEDIA_TRUE ||
sensorControl->exposureControl[i].gainValid IS NVMEDIA_TRUE)
{
status = SetExposure(&sensorControl->exposureControl[i], ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
// apply sensor white balance control settings
if(sensorControl->wbControl[i].wbValid == NVMEDIA_TRUE)
{
status = SetSensorWbGain(&sensorControl->wbControl[i], ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
}
// apply sensor frame report control settings
{
status = SetSensorFrameReport(&sensorControl->frameReportControl, ...);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling
}
}
// set group hold release register
regVal[0] = ...
status = WriteRegister(handle,.., REG_GROUP_HOLD, regVal);
if (status is NOT NVMEDIA_STATUS_OK) {
// Error Handling //
}
return status;
}

Definition at line 568 of file nvmedia_isc.h.


The documentation for this struct was generated from the following file:
NvMediaISCAttrRange::min
float_t min
Holds the sensor attribute's minimum value.
Definition: nvmedia_isc.h:904
NvMediaISCSensorControl::wbControl
NvMediaISCWhiteBalance wbControl[NVMEDIA_ISC_MAX_SENSOR_CONTEXTS]
Holds the sensor white balance settings to set for each context.
Definition: nvmedia_isc.h:1201
NVMEDIA_TRUE
#define NVMEDIA_TRUE
A true NvMediaBool value.
Definition: nvmedia_core.h:72
NvMediaISCDeviceDriver::SetSensorControls
NvMediaStatus(* SetSensorControls)(NvMediaISCDevice *handle, const struct NvMediaISCSensorControl *sensorControl, const size_t sensrCtrlStructSize)
Holds the function that sets sensor controls This function is invoked by NvMediaISCSetSensorControl...
Definition: nvmedia_isc.h:568
NvMediaISCSensorControl::exposureControl
NvMediaISCExposure exposureControl[NVMEDIA_ISC_MAX_SENSOR_CONTEXTS]
Holds the sensor exposure settings to set for each context.
Definition: nvmedia_isc.h:1196
NvMediaISCWhiteBalance::wbValid
NvMediaBool wbValid
Holds a flag which enables or disables the white balance gain block.
Definition: nvmedia_isc.h:1043
NvMediaISCAttrRange::max
float_t max
Holds the sensor attribute's maximum value.
Definition: nvmedia_isc.h:909
NVMEDIA_STATUS_OK
@ NVMEDIA_STATUS_OK
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:183
NvMediaISCDeviceDriver::DriverDestroy
NvMediaStatus(* DriverDestroy)(NvMediaISCDevice *handle)
Holds the function that destroy the device driver This function is invoked by NvMediaISCDeviceDestr...
Definition: nvmedia_isc.h:479
NvMediaISCSensorAttributes::numFrameReportBytes
uint32_t numFrameReportBytes
Holds the number of frame report bytes supported by the sensor.
Definition: nvmedia_isc.h:980
NvMediaISCDeviceDriver::SetSensorCharMode
NvMediaStatus(* SetSensorCharMode)(NvMediaISCDevice *handle, uint8_t expNo)
Holds the function that sets sensor in characterization mode.
Definition: nvmedia_isc.h:785
NvMediaISCSensorAttributes::numActiveExposures
uint8_t numActiveExposures
Holds the number of active exposures attribute.
Definition: nvmedia_isc.h:936
NvMediaISCDeviceDriver::DriverCreate
NvMediaStatus(* DriverCreate)(NvMediaISCDevice *handle, void *clientContext)
Holds the function that creates device driver This function is invoked by NvMediaISCDeviceCreate fu...
Definition: nvmedia_isc.h:444
NvMediaISCDeviceDriver::GetSensorAttributes
NvMediaStatus(* GetSensorAttributes)(NvMediaISCDevice *handle, struct NvMediaISCSensorAttributes *sensorAttr, const size_t sensorAttrStructSize)
Holds the function that gets sensor attributes.
Definition: nvmedia_isc.h:735
NvMediaISCDeviceDriver::ParseEmbedDataInfo
NvMediaStatus(* ParseEmbedDataInfo)(NvMediaISCDevice *handle, const struct NvMediaISCEmbeddedDataChunk *embeddedTopDataChunk, const struct NvMediaISCEmbeddedDataChunk *embeddedBotDataChunk, const size_t dataChunkStructSize, struct NvMediaISCEmbeddedDataInfo *embeddedDataInfo, const size_t dataInfoStructSize)
Holds a pointer to the function that parses embedded data returned as part of a captured buffer.
Definition: nvmedia_isc.h:656
NVMEDIA_STATUS_NOT_SUPPORTED
@ NVMEDIA_STATUS_NOT_SUPPORTED
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:196
NvMediaISCEmbeddedDataInfo
Holds the sensor embedded data parsed info structure.
Definition: nvmedia_isc.h:1257
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NVMEDIA_FALSE
#define NVMEDIA_FALSE
A false NvMediaBool value.
Definition: nvmedia_core.h:74
NvMediaISCSensorControl::frameReportControl
NvMediaISCFrameReport frameReportControl
Holds the sensor frame report value to be programmed.
Definition: nvmedia_isc.h:1209
NvMediaISCSensorAttributes
Holds the sensor attributes.
Definition: nvmedia_isc.h:916
NvMediaISCSensorControl::numSensorContexts
uint8_t numSensorContexts
Holds the number of sensor contexts to activate.
Definition: nvmedia_isc.h:1191
NvMediaISCDevice
Holds the handle for an NvMediaISCDevice object.
Definition: nvmedia_isc.h:180
NvMediaISCExposure::expTimeValid
NvMediaBool expTimeValid
Holds a flag which enables or disables the exposure block.
Definition: nvmedia_isc.h:1014
NvMediaISCSensorAttributes::sensorGainRange
NvMediaISCAttrRange sensorGainRange[NVMEDIA_ISC_MAX_EXPOSURES]
Holds the sensor gain ranges for active exposures.
Definition: nvmedia_isc.h:946
NvMediaISCSensorAttributes::sensorGainFactor
float_t sensorGainFactor[NVMEDIA_ISC_MAX_EXPOSURES]
Holds the additional sensor gain factor between active exposures.
Definition: nvmedia_isc.h:973
NvMediaISCSensorAttributes::sensorExpRange
NvMediaISCAttrRange sensorExpRange[NVMEDIA_ISC_MAX_EXPOSURES]
Holds the sensor exposure ranges for active exposures.
Definition: nvmedia_isc.h:941
NVMEDIA_STATUS_OUT_OF_MEMORY
@ NVMEDIA_STATUS_OUT_OF_MEMORY
Specifies that the process is out of memory.
Definition: nvmedia_core.h:191
NvMediaISCSensorControl
Holds the sensor control structure.
Definition: nvmedia_isc.h:1181
NvMediaISCDevice::deviceDriverHandle
void * deviceDriverHandle
Definition: nvmedia_isc.h:181
NvMediaISCExposure::gainValid
NvMediaBool gainValid
Holds a flag which enables or disables the sensor gain block.
Definition: nvmedia_isc.h:1025
NvMediaISCSensorAttributes::sensorName
char sensorName[NVMEDIA_ISC_MAX_SENSOR_NAME_LENGTH]
Holds the name attribute.
Definition: nvmedia_isc.h:920
NvMediaISCFrameReport::frameReportValid
NvMediaBool frameReportValid
Holds a flag which enables or disables frame report block.
Definition: nvmedia_isc.h:1066
NvMediaISCEmbeddedDataChunk
Definition: nvmedia_isc.h:1308
NVMEDIA_STATUS_BAD_PARAMETER
@ NVMEDIA_STATUS_BAD_PARAMETER
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:185