Critical Link MityCam SoC Firmware  1.0
Critical Link MityCam SoC Firmware
SocCamera::tcQueueIO Class Reference

#include <QueueIO.h>

Inheritance diagram for SocCamera::tcQueueIO:
Collaboration diagram for SocCamera::tcQueueIO:

Public Member Functions

 tcQueueIO (tcSensorBoard *apSensor)
 
virtual ~tcQueueIO ()
 
virtual SocCamera::teNackCode capture (tsCaptureRequest asRequest)
 
virtual void sendUpdate (tsNewFrameMsg *apMsg)
 
virtual SocCamera::teNackCode setBpp (SocCamera::teBPPMode aeBppMode)
 
void setThreshold (uint32_t anMaxSize)
 
tsNewFrameMsg takeMessage ()
 
tcImagetakeImage ()
 
uint32_t currentSize ()
 
void flush ()
 
void registerWatcher (tcQueueWatcher *apNewWatcher)
 
void unregisterWatcher (tcQueueWatcher *apWatcher)
 
- 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 ()
 

Additional Inherited Members

- 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 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
 
- 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)
 

Constructor & Destructor Documentation

◆ tcQueueIO()

tcQueueIO::tcQueueIO ( tcSensorBoard apSensor)

◆ ~tcQueueIO()

tcQueueIO::~tcQueueIO ( )
virtual

Member Function Documentation

◆ capture()

teNackCode tcQueueIO::capture ( tsCaptureRequest  asRequest)
virtual

Start a capture with this request. If the request's 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.

◆ currentSize()

uint32_t SocCamera::tcQueueIO::currentSize ( )

The current size of the queue. If it is greater than the number of images that can fit in RAM, the takeImage() function is undefined on what it will return.

Returns
the current size of the queue.

◆ flush()

void SocCamera::tcQueueIO::flush ( )

Flush all contents from the queue.

◆ registerWatcher()

void SocCamera::tcQueueIO::registerWatcher ( tcQueueWatcher apNewWatcher)

◆ sendUpdate()

void tcQueueIO::sendUpdate ( tsNewFrameMsg apMsg)
virtual

When this is called, a stream into memory is complete.

Parameters
apMsg- the update message.

Implements tcIOChannel.

◆ setBpp()

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

Operation not supported; p-resent for compatibility with library.

All images are 16 bit.

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

Implements tcIOChannel.

◆ setThreshold()

void SocCamera::tcQueueIO::setThreshold ( uint32_t  anMaxSize)

Set the maximum number of images that can be in the queue at any given time.

When the threshold is exceeded, the threshold exceeded function of the watcher classes will be called.

Parameters
themaximum size of the queue.

◆ takeImage()

tcImage * SocCamera::tcQueueIO::takeImage ( )

Pops an image from the queue.

Returns
a heap allocated pointer to an image that is now the caller's responsibility. NULL if there is no image to take (when currentSize() == 0).

◆ takeMessage()

tsNewFrameMsg SocCamera::tcQueueIO::takeMessage ( )

Take just the new frame message.

Returns
the new frame message from the front of the queue. It is then popped off the queue.

◆ unregisterWatcher()

void SocCamera::tcQueueIO::unregisterWatcher ( tcQueueWatcher apWatcher)

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