Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
The tcSimSensorSensorBoard class. SimSensor Main class manager for a given sensor board. More...
#include <SimSensorSensorBoard.h>
Public Member Functions | |
tcSimSensorSensorBoard (const std::string &asArgs) | |
virtual | ~tcSimSensorSensorBoard () override |
virtual tcAbstractHandler * | getCustomHandlers (tcAbstractHandler *apTailHandler, std::map< std::string, tcAbstractHandler * > *apStringMap) override |
virtual void | resetFpga () override |
virtual int | GetCameraInfo (tsCameraInfo *apInfo) override |
virtual int32 | initialize () override |
virtual teNackCode | setExposure (int32 anMicroseconds, uint32_t anExpIndex=0) override |
virtual int32 | getExposure (uint32_t anExpIndex=0) override |
virtual uint32 | getMinFrameIntervalMicroS () override |
virtual teNackCode | setFrameInterval (int32 anMicroseconds) override |
virtual int32 | getFrameInterval () override |
virtual teNackCode | setROI (ROI region) override |
virtual ROI | getROI () override |
virtual teNackCode | setVerticalBin (int32 anPixels) override |
virtual int32 | getVerticalBin () override |
virtual teNackCode | setHorizontalBin (int32 anPixels) override |
virtual int32 | getHorizontalBin () override |
virtual teNackCode | setShutterMode (teShutterMode eeMode) override |
virtual int32 | getShutterMode () override |
virtual teNackCode | setBPP (teBPPMode eeMode) override |
virtual teNackCode | setTestPattern (teTestPattern eeSelection) override |
virtual int32 | getTestPattern () override |
virtual teNackCode | setTrigger (teTriggerMode eeTrigger) override |
virtual int32 | getTrigger () override |
virtual int32 | validate () override |
virtual bool | isCapturing () override |
virtual teNackCode | start () override |
virtual teNackCode | stop () override |
virtual std::string | getTemperature (int32 anSensor=0) override |
virtual std::string | getVersion () override |
virtual teNackCode | save (int32 anConfiguration) override |
virtual teNackCode | recall (int32 anConfiguration) override |
virtual uint64_t | fpgaVersion () override |
virtual void | timerTicked (tcTimer *) override |
Public Member Functions inherited from SocCamera::tcSensorBoard | |
tcSensorBoard (int aeType, uint32 anStreamAddr, int32 length, int32 *aaGpioNum) | |
tcSensorBoard (int aeType, uint32_t anFpgaBaseAddr, uint32_t anRamStreamAddr, int32 length, int32 *aaGpioNum) | |
virtual | ~tcSensorBoard () |
int | id () |
int32 | init () |
virtual void | update (tsUpdate asMessage) |
virtual teNackCode | calibrate () |
virtual teNackCode | whiteLevelCalibrate () |
virtual teNackCode | setClockSetting (int32 anSetting) |
virtual teNackCode | getClockSetting (int32 &arSetting) |
virtual void | snap (tsCaptureRequest asSnapRequest) |
start a capture More... | |
teNackCode | setExposure (std::chrono::microseconds anMicroseconds, uint32_t anExpIndex=0) |
std::chrono::microseconds | getMinFrameInterval () |
teNackCode | setFrameInterval (std::chrono::microseconds anMicroseconds) |
virtual ROI | getImageROI () |
virtual teNackCode | setColor (bool) |
virtual teNackCode | peek (int32 anRegister, int *apValue) |
virtual teNackCode | poke (int32 anRegister, int32 anValue) |
virtual float | getTempCelsius () |
virtual float | getBoardTempCelsius () |
virtual teNackCode | setIODirection (int32 anPin, int32 anDirection) |
tcSensorBoard::setIODirection Sets the camera GPIO direction. More... | |
virtual teNackCode | setIOValue (int32 anPinNum, int32 anValue) |
tcSensorBoard::setIOValue Sets the output value of the gpio-camio linux module controlling the cam-gpio.vhd critical link camera IO block. More... | |
virtual teNackCode | setIOInverter (int32 anPinNum, int32 anInvertEnable) |
tcSensorBoard::setIOInverter Sets the camera GPIO invert state. More... | |
virtual teNackCode | power (bool abOn) |
virtual int32 | getIODirection () |
virtual int32 | getIOValue () |
tcSensorBoard::getIOValue More... | |
virtual int32 | getNumPins () |
virtual teNackCode | setMirroring (bool isX, bool Enabled) |
virtual teNackCode | getMirroring (bool isX, bool *Enabled) |
virtual teNackCode | setNoiseReduct (bool enHi, uint16_t threshhi, bool enLo, uint16_t threshlo) |
virtual teNackCode | getNoiseReduct (bool &enHi, uint16_t &threshhi, bool &enLo, uint16_t &threshlo) |
virtual teNackCode | setSqrtCompression (bool enable) |
virtual teNackCode | getSqrtCompression (bool &enable) |
virtual teNackCode | setDemoMode (int32 anMode) |
virtual teNackCode | getDemoMode (int32 &arMode) |
virtual teNackCode | loadColumnBias (const char *asFilename) |
virtual teNackCode | loadColumnGain (const char *asFilename) |
virtual teNackCode | loadPixelCal (const char *asFilename) |
virtual tcRAMStreamer * | getStreamer () |
virtual tcTimestamp * | getTimestamper () |
virtual void | setTimestamper (tcTimestamp *apStamper) |
virtual tcSensorBoard * | self () |
uint32 | getFrameSizeBytes () |
int | getSysIdNumber (unsigned short &major, unsigned short &minor) |
uint32 | getMaxImgCount () |
uint32 | getNumSnapFramesLeft () |
virtual void | Handler (unsigned int gpionum, unsigned int val) |
Handler GPIO Handler notifies changes on any gpio with edges enabled. More... | |
virtual uint32 | getPixelFormat (void) |
Get the pixel format generated by the pixel pipeline. More... | |
virtual tcVoltageSensor * | getVoltageSensor () |
get the temperature monitor object for this sensor More... | |
virtual tcTemperatureSensor * | getTempSensor () |
get the tcTemperature monitor object for this sensor More... | |
virtual void | runPeriodic () |
can be called by framework to do any periodic work. More... | |
virtual int32_t | getSensorWidth () |
virtual int32_t | getSensorHeight () |
Public Member Functions inherited from tcObserver | |
tcObserver () | |
virtual | ~tcObserver () |
Public Member Functions inherited from tcTimedObject | |
tcTimedObject () | |
virtual | ~tcTimedObject () |
Protected Attributes | |
bool | mbCapturing |
true when running a capture More... | |
ROI | msROI |
Selected ROI. More... | |
std::chrono::microseconds | mcEmulatedPorchTime |
std::chrono::microseconds | mcExpTime |
the desired exposure time More... | |
std::chrono::microseconds | mcFrameIntervalTime |
the desired Frame Interval Time More... | |
tcTimer | mcTimer |
timer to kick sending frames More... | |
tcImageGenerator | mcImageGenerator |
utility for building simulated images More... | |
tcTestPatternGenerator * | mpTestPatternGenerator |
a valid FPGA pointer More... | |
Protected Attributes inherited from SocCamera::tcSensorBoard | |
bool | mbIsPowered |
tcMutex | mhMutex |
MityDSP::tcGpio * | mpCamIO |
MityDSP::tcGpio::PinConfig * | maPinConfigs |
int32 | mnPinCount |
tcRAMStreamer * | mpStreamer |
std::map< int, std::pair< tcIntAccessor *, IntAccessorFunction > > | mhPeekMap |
std::map< int, std::pair< tcIntSetter *, IntSetterFunction > > | mhPokeMap |
tcPollingInterruptThread | mcInterruptThread |
MityDSP::tcAD741x * | mpTempSensor |
uint32 | mnMaxImgCount |
const sensors_chip_name * | mpChipnameAD7414 |
lmsensors chipname for AD7414 on A10/CV More... | |
const sensors_chip_name * | mpChipnameLM95235 |
lmsensors chipname for LM95235 on A10 More... | |
int | mnAD7414_sf |
TEMP input subfeature number needed to get the actual temperature. More... | |
int | mnLM95235_die_sf |
TEMP input subfeature for die temperature (CPU) sensor. More... | |
int | mnLM95235_board_sf |
TEMP input subfeature for on-chip sensor. More... | |
Static Protected Attributes | |
static const int | mnPatternGeneratorPixelsPerClock = 4 |
static constexpr float | mnPatternGeneratorClockMhz = 125.0f |
Additional Inherited Members | |
Static Public Attributes inherited from SocCamera::tcSensorBoard | |
static const std::string | NO_TEMPERATURE_SENSOR |
static const std::string | TEMPERATURE_SENSOR_ERROR |
Protected Member Functions inherited from SocCamera::tcSensorBoard | |
void | nextRequest () |
void | initGpios (int32 length, int32 *aaGpioNum) |
virtual uint32 | GetSkipFrames (bool &reload) |
GetSkipFrames If the current sensor needs to skip initially received frames, they can overload this function, which will be called immediately prior to a ::start() call, to set the number of frames to skip. This only works with the RAMStreamer image data. More... | |
uint32 | ConvertPixelFormat (uint32 anFormat, bool abFlipX, bool abFlipY) |
Utility routine to convert PFNC pixel format given flip options. More... | |
teNackCode | GetA10BoardTemp (uint32 anIndex, float &anTemp) |
Utility routine to get the temp sensor readings off an A10 processor card. More... | |
The tcSimSensorSensorBoard class. SimSensor Main class manager for a given sensor board.
The sensor board class is responsible for the management of the electro-optical imager (the Focal Plane Array) and the image signal processing pipeline in the FPGA to the point of image transmission for a given camera configuration. In general, a sensor board implementation is required for each Sensor Board in the MityCAM stack. If done correctly, a single sensor board implementation should support any combination of back end interface boards. This, however, does require some coordination with the FPGA designer (a consistent pipeline is needed for each FPA + interface board permuation).
Typically, a sensor board implementation includes an FPGA helper class (manages the FPGA pipeline) and a sensor helper class (manages the sensor register interface, typically SPI or I2C). This is not required, but in general the pattern most implementations follow.
tcSimSensorSensorBoard::tcSimSensorSensorBoard | ( | const std::string & | asArgs | ) |
Construct a new SimSensor sensorboard.
asDevice | - the /dev/ node for the sensor's SPI port |
|
overridevirtual |
|
inlineoverridevirtual |
Reimplemented from SocCamera::tcSensorBoard.
|
overridevirtual |
Get the camera info for the given sensor board.
apInfo | - pointer to camera structure to fill in. |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
See tcSensorBoard.h for descriptions of these required methods. We must implement the methods below to instantiate this class and operate correctly with the rest of the MityCAM framework.
Reimplemented from SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the currently set exposure time in microseconds.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the frame interval time in microseconds.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Gets the currently set horizontal binning factor being used.
Implements SocCamera::tcSensorBoard.
|
inlineoverridevirtual |
Returns the minimum frame interval period in microseconds
Reimplemented from SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the currently set region of interest for the camera.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the current shutter mode of the camera.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the temperature for the sensor specified if there are multiple. This function returns tcSensorBoard::NO_TEMPERATURE_SENSOR (below absolute 0) if not implemented for a specific sensor.
anSensor | - the sensor to request. |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Get the currently set test pattern from eeTestPatterns.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Returns the currently set trigger mode.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Get the chip version of the sensor board if possible.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Gets the currently set vertical binnign factor being used.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Performs the operations of initialization. This consists of power up, setting default register values and configuring peripherals.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Test if the camera is currently capturing. Used to prevent setting certain paramters when the device is capturing.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Recall a configuration identified by anConfiguration.
anConfiguration | - an int32 specifying the config to recall |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Resets the FPGA if appropriate; this is needed to decouple certain pipeline components from the IOChannel object.
Function is an empty adapter; only some FPGA/IOChannel combos will need this
Reimplemented from SocCamera::tcSensorBoard.
|
overridevirtual |
Saves a configuration identified by anConfiguration.
anConfiguration | - an int32 specifying the config to recall |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
A request to set the BPP mode of the camera.
eeMode | - an int32 from eeBPPMode for the mode to enter |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Sets the exposure time to the nearest valid exposure time which is greater than the parameter.
anMicroseconds | - an int32 - the number of microseconds the exposure should be |
anExpIndex | - index of exposure control, typically 0 (default). Can be used for HDR type configuration to specific a second exposure setting |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Sets the frame interval to the nearest valid interval time which is shorter than the paramter.
anMicroseconds | - an int32 - the number of microseconds the frame interval time should be |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
A request to set the horizontal binning factor of the camera.
anPixels | - an int32 - the number of pixels to bin horizontally |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Sets the ROI from the sensor's perspective; binning will reduce the the actual number of pixels in a frame.
region | - ROI struct - dictates the top left of the region and the size. |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
A request to set the shutter mode of the camera.
eeMode | - an int32 from eeShutterMode to place the camera into. |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Request to set the test pattern from eeTestPatterns.
eeSelection | - an int32 from eeTestPatterns for which pattern to use |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Selects the trigger mode to use.
eeTrigger | - an int32 from eeTriggerModes |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
A request to set the vertical binning factor of the camera.
anPixels | - an int32 - the number of pixels to bin vertically |
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Request to start capturing if configuration is valid.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Request to stop the camera from capturing.
Implements SocCamera::tcSensorBoard.
|
overridevirtual |
Implements tcTimedObject.
|
overridevirtual |
Checks if the current configuration is valid and can be applied when trying to begin capturing.
Implements SocCamera::tcSensorBoard.
|
protected |
true when running a capture
Class Specific methods
|
protected |
|
protected |
the desired exposure time
|
protected |
the desired Frame Interval Time
|
protected |
utility for building simulated images
|
protected |
timer to kick sending frames
|
staticconstexprprotected |
|
staticprotected |
|
protected |
a valid FPGA pointer