Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
tcPixelCal Class Reference

#include <PixelCal.h>

Collaboration diagram for tcPixelCal:

Public Types

enum  teSetPixelCalReturn { FILE_MISSING_PIXELS = -1, FILE_NOT_FOUND = -2 }
 

Public Member Functions

 tcPixelCal (uint32 anControlAddress, uint32 anMemoryAddress, int32 anWidth, int32 anHeight, tcSGDMADispatcher *apSGDMA)
 
virtual ~tcPixelCal ()
 
bool initialized ()
 
int32 reset (bool abOn)
 
int32 clearMemory ()
 
int32 setPixelCal (const char *apFilename, SocCamera::ROI asROI)
 
int32 setPixelCal (const int16 *aaBias, const uint16 *aaGain, SocCamera::ROI asROI)
 
int32 setClipValue (uint16 anClipValue)
 

Member Enumeration Documentation

◆ teSetPixelCalReturn

Enumerator
FILE_MISSING_PIXELS 
FILE_NOT_FOUND 

Constructor & Destructor Documentation

◆ tcPixelCal()

tcPixelCal::tcPixelCal ( uint32  anControlAddress,
uint32  anMemoryAddress,
int32  anWidth,
int32  anHeight,
tcSGDMADispatcher *  apSGDMA 
)

Create a new PixelCal component.

Parameters
anControlAddress- the register memory mapped interface
anMemoryAddress- the RAM to store and point the SGDMA at
anNumPixels- the number of pixels to support.
apSGDMA- pointer to the SGDMA to set and park.

◆ ~tcPixelCal()

tcPixelCal::~tcPixelCal ( )
virtual

Member Function Documentation

◆ clearMemory()

int32 tcPixelCal::clearMemory ( )

Resets the biases to 0 and the multipliers to 1.

Returns
0 on success; negative for an error.

◆ initialized()

bool tcPixelCal::initialized ( )

Returns true if the core is ready to use. false otherwise.

Returns
true if the core is ready to use

◆ reset()

int32 tcPixelCal::reset ( bool  abOn)

Reset the component or take it out of reset.

Parameters
abOn- the state of the reset bit; true to turn it on, false to turn it off
Returns
zero for success; non-zero for error.

◆ setClipValue()

int32 tcPixelCal::setClipValue ( uint16  anClipValue)

Sets the maximum value to clip at.

Parameters
anClipValue- the value to clip at.
Returns
zero if successful; non-zero if error occurs.

◆ setPixelCal() [1/2]

int32 tcPixelCal::setPixelCal ( const char *  apFilename,
SocCamera::ROI  asROI 
)

Convenience function to open a file where each line contains the two calibration words. Function must be called any time the ROI changes.

Parameters
apFilename- the name of the input file to read. File should be for the whole sensor.
Returns
zero if successful; non-zero if error; see the enum above.

◆ setPixelCal() [2/2]

int32 tcPixelCal::setPixelCal ( const int16 aaBias,
const uint16 aaGain,
SocCamera::ROI  asROI 
)

Function which takes the arrays of biases and coefficients and applies them. Must be called any time to the ROI changes.

Both Bias and Gain arrays NEED to be the size of the whole ROI. This function will handle properly indexing into the arrays.

Parameters
aaBias- the bias array to apply for the whole sensor
aaGain- the gain array to apply for the whole sensor
asROI- the ROI being used.

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