NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NvMediaISCDeviceDriver Struct Reference

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

int32_t NvMediaISCDeviceDriver::dataLength

Holds the target device data length in bytes.

Definition at line 400 of file nvmedia_isc.h.

char* NvMediaISCDeviceDriver::deviceName

Holds the device name.

Definition at line 396 of file nvmedia_isc.h.

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.

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.

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

Holds the function that gets module configuration.

Definition at line 742 of file nvmedia_isc.h.

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.

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.

int32_t NvMediaISCDeviceDriver::regLength

Holds the target device offset length in bytes.

Definition at line 398 of file nvmedia_isc.h.

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.

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
if(sensorControl->frameReportControl.frameReportValid == NVMEDIA_TRUE)
{
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: