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

#include <CameraLinkIO.h>

Inheritance diagram for tcCameraLinkIO:
Collaboration diagram for tcCameraLinkIO:

Classes

struct  tsPllReconfigTableEntry
 

Public Types

enum  teOutputMode { eeExpanded = 0, eeBase = 1, eeMedium = 2, eeFull = 3 }
 

Public Member Functions

 tcCameraLinkIO (SocCamera::tcSensorBoard *apSensor, int32 anCamLinkFPGAControlAddress=0xFF240000, tcPllReconfig *apReconfig=NULL, const char *apFilename="pixel_clock_pll_table.txt")
 
virtual ~tcCameraLinkIO ()
 
virtual SocCamera::teNackCode capture (tsCaptureRequest asRequest)
 
virtual void sendUpdate (tsNewFrameMsg *apMsg)
 
void setSerDebug (bool abOn)
 
virtual SocCamera::teNackCode setBpp (SocCamera::teBPPMode aeBppMode)
 
virtual SocCamera::teNackCode setOutputMode (tcCameraLinkIO::teOutputMode aeOutputMode)
 
void setTestPattern (bool abEnable)
 
void enableStreaming (bool abEnable)
 
teOutputMode getOutputMode ()
 
void setPseudoSinglePort (bool abEnable)
 
SocCamera::teNackCode setPixelClock (double anFreqMHz)
 
double getPixelClock ()
 
int setBackpressureRows (int rows)
 
- Public Member Functions inherited from tcIOChannel
 tcIOChannel (SocCamera::teIOChannels aeIOId, SocCamera::tcSensorBoard *apSensor)
 Construct a new tcIOChannel::tcIOChannel object. More...
 
virtual ~tcIOChannel ()
 
virtual void initialized ()
 
SocCamera::teBPPMode getBpp ()
 
virtual void processUpdate (tsNewFrameMsg *apMsg)
 
void setEnable (bool abEnable)
 
tcImagegrabImage ()
 
SocCamera::teIOChannels id ()
 
virtual void invalidateCache (void *apMem, size_t anSize)
 
virtual void * memory ()
 
- Public Member Functions inherited from tcIOCallback
 tcIOCallback ()
 
virtual ~tcIOCallback ()
 

Protected Member Functions

void resetCamLink (bool abSet)
 
uint32 numTransferred ()
 
- Protected Member Functions inherited from tcIOChannel
void invalidateCache (tsNewFrameMsg *apMsg)
 
void invalidateCache ()
 
void Report (const char *fmt,...)
 This method routes text to stderr. More...
 
void ReportError (const char *fmt,...)
 

Protected Attributes

tcFPGARegister< uint32mhCLComponent
 
- Protected Attributes inherited from tcIOChannel
std::string m_name
 
SocCamera::teIOChannels meIOId
 
SocCamera::tcSensorBoardmpSensor
 
SocCamera::teBPPMode meBppMode
 
int64 mnImgCount
 
std::list< tsNewFrameMsgmlUpdates
 
tcMutex mcMutex
 
tcCondition mcCond
 
void * mpMemory
 
tcIOChannelThread mcThread
 
tsNewFrameMsg msLastUpdate
 
bool mbSimRAM
 

Additional Inherited Members

- Static Protected Attributes inherited from tcIOChannel
static uint32 CAPTURE_START_ADDR = (0x20000000)
 
static uint32 MEMORY_BLOCK_SIZE = (0x20000000)
 
static bool CMEM_USED = (true)
 
static bool MMAP_USED = (true)
 

Member Enumeration Documentation

◆ teOutputMode

Camera link output mode format. Compbined with bits per pixel defines output serialization mode.

Enumerator
eeExpanded 
eeBase 
eeMedium 
eeFull 

Constructor & Destructor Documentation

◆ tcCameraLinkIO()

tcCameraLinkIO::tcCameraLinkIO ( SocCamera::tcSensorBoard apSensor,
int32  anCamLinkFPGAControlAddress = 0xFF240000,
tcPllReconfig *  apReconfig = NULL,
const char *  apFilename = "pixel_clock_pll_table.txt" 
)

◆ ~tcCameraLinkIO()

tcCameraLinkIO::~tcCameraLinkIO ( )
virtual

Member Function Documentation

◆ capture()

teNackCode tcCameraLinkIO::capture ( tsCaptureRequest  asRequest)
virtual

Start a capture with this request. If the requests number of frames is tsNewRequest::CANCEL_CAPTURE then the current capture is stopped if possible.

Parameters
asRequest- the request for capture being made.
Returns
a nack code if the capture parameters are inelligable for this IOChannel.

Implements tcIOChannel.

Reimplemented in SocCamera::tcBufferedCameraLinkIO.

◆ enableStreaming()

void tcCameraLinkIO::enableStreaming ( bool  abEnable)

Enable/disable the reset bit to enable streaming.

Parameters
abEnable- true to DISABLE the reset bit; false to enable it.

◆ getOutputMode()

tcCameraLinkIO::teOutputMode tcCameraLinkIO::getOutputMode ( )

◆ getPixelClock()

double tcCameraLinkIO::getPixelClock ( )

Get the configured pixel clock frequency.

Returns
the pixel clock frequency in MHz.

◆ numTransferred()

uint32 tcCameraLinkIO::numTransferred ( )
protected

Reads the number of frames transferred out the camera link; this is an FPGA register.

Returns
the number of frames output since the last reset.

◆ resetCamLink()

void tcCameraLinkIO::resetCamLink ( bool  abSet)
protected

Reset or un-reset the CameraLink component.

Parameters
abSet- true to place the component in reset; false to take it out.

◆ sendUpdate()

void tcCameraLinkIO::sendUpdate ( tsNewFrameMsg apMsg)
virtual

Process the update

Parameters
apMsg- the update message.

Implements tcIOChannel.

Reimplemented in SocCamera::tcBufferedCameraLinkIO.

◆ setBackpressureRows()

int tcCameraLinkIO::setBackpressureRows ( int  rows)

Set the number of rows to buffer before applying backpressure

Parameters
rowsnumber of rows, to apply 0-14, 15 = no backpressure
Returns
non-zero on error

◆ setBpp()

teNackCode tcCameraLinkIO::setBpp ( SocCamera::teBPPMode  aeBppMode)
virtual

Sets the bits-per-pixel output of the camera.

Parameters
aeBppMode- the bits per pixel mode.
Returns
the nack code for the operation

Implements tcIOChannel.

Reimplemented in SocCamera::tcBufferedCameraLinkIO.

◆ setOutputMode()

teNackCode tcCameraLinkIO::setOutputMode ( tcCameraLinkIO::teOutputMode  aeOutputMode)
virtual

Toggles between the various camera link output modes (expanded, full, medium, base).

Parameters
aeOutputMode- the mode to move into.
Returns
a nack code if the output mode is not supported.

Reimplemented in SocCamera::tcBufferedCameraLinkIO.

◆ setPixelClock()

teNackCode tcCameraLinkIO::setPixelClock ( double  anFreqMHz)

Reconfigure the output clock to the specified frequency (closest fastest).

Parameters
anFreqMHz- the desired frequency to set.
Returns
the nack code for the operation.

◆ setPseudoSinglePort()

void tcCameraLinkIO::setPseudoSinglePort ( bool  abEnable)

Enable/Disable the pseudo-single port mode feature for a CIS2521 camera link output.

Parameters
abEnable- true to enable the mode; false to disable it.

◆ setSerDebug()

void tcCameraLinkIO::setSerDebug ( bool  abOn)

◆ setTestPattern()

void tcCameraLinkIO::setTestPattern ( bool  abEnable)

Set the enable for the test pattern bit.

Parameters
abEnable- true to enable test pattern, false to disable.

Member Data Documentation

◆ mhCLComponent

tcFPGARegister<uint32> tcCameraLinkIO::mhCLComponent
protected

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