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

#include <FilesystemIO.h>

Inheritance diagram for tcFilesystemIO:
Collaboration diagram for tcFilesystemIO:

Public Member Functions

 tcFilesystemIO (SocCamera::tcSensorBoard *apSensor)
 
virtual ~tcFilesystemIO ()
 
void registerWatcher (tcFilesystemIOWatcher *apWatcher)
 
void unregisterWatcher (tcFilesystemIOWatcher *apWatcher)
 
virtual SocCamera::teNackCode capture (tsCaptureRequest asRequest)
 
virtual SocCamera::teNackCode setBpp (SocCamera::teBPPMode aeBppMode)
 
virtual void sendUpdate (tsNewFrameMsg *apMsg)
 
SocCamera::teNackCode setFilenamePrefix (std::string asName)
 
std::string getFilenamePrefix ()
 
SocCamera::teNackCode setImagesPerFile (uint32 anImagesPerFile)
 
uint32 getImagesPerFile ()
 
SocCamera::teNackCode setPath (std::string asPath, bool abCreate=true)
 
std::string getPath ()
 
SocCamera::teNackCode flush ()
 
uint32 getCurrentFrameIndex ()
 
- 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)
 

Detailed Description

This class is used to control output to a filesystem. It has facilities to change filename, path and other options.

Constructor & Destructor Documentation

◆ tcFilesystemIO()

tcFilesystemIO::tcFilesystemIO ( SocCamera::tcSensorBoard apSensor)

◆ ~tcFilesystemIO()

tcFilesystemIO::~tcFilesystemIO ( )
virtual

Member Function Documentation

◆ capture()

teNackCode tcFilesystemIO::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.

Stopping this and starting causes the frame index to reset. This

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

Implements tcIOChannel.

◆ flush()

teNackCode tcFilesystemIO::flush ( )

Sync the system to ensure all writes are flushed to the filesystem.

Returns
eeCameraNotResponding if the sync returns a non-zero error code; otherwise eeNoError

◆ getCurrentFrameIndex()

uint32 tcFilesystemIO::getCurrentFrameIndex ( )

Returns the current frame index number.

Returns
the value of the current frame index.

◆ getFilenamePrefix()

std::string tcFilesystemIO::getFilenamePrefix ( )

Return the filename prefix that is set.

Returns
the filename prefix being used.

◆ getImagesPerFile()

uint32 tcFilesystemIO::getImagesPerFile ( )
Returns
the number of images stored per file.

◆ getPath()

std::string tcFilesystemIO::getPath ( )

Return the path where files are being saved to.

Returns
the path where files are being saved to.

◆ registerWatcher()

void tcFilesystemIO::registerWatcher ( tcFilesystemIOWatcher apWatcher)

Register a callback which is executed when a file is saved and closed.

◆ sendUpdate()

void tcFilesystemIO::sendUpdate ( tsNewFrameMsg apMsg)
virtual

Process the update

Parameters
apMsg

Implements tcIOChannel.

◆ setBpp()

teNackCode tcFilesystemIO::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.

◆ setFilenamePrefix()

teNackCode tcFilesystemIO::setFilenamePrefix ( std::string  asName)

The prefix of the files to write. A .bin extension is used.

Parameters
asName- the prefix of the names to use
Returns
the success of the operation.

◆ setImagesPerFile()

SocCamera::teNackCode tcFilesystemIO::setImagesPerFile ( uint32  anImagesPerFile)

Sets the number of images to store per file. Set to 0 for continuous recording to the same file until stopped.

Parameters
anImagesPerFile- the number of images to save to each file.
Returns
the nack code for the operation.

◆ setPath()

teNackCode tcFilesystemIO::setPath ( std::string  asPath,
bool  abCreate = true 
)

Set the path to save files to.

Parameters
asPath- the path to store files.
Returns
a nack code for the operation (error if doesn't exist etc)

◆ unregisterWatcher()

void tcFilesystemIO::unregisterWatcher ( tcFilesystemIOWatcher apWatcher)

Unregister a callback.


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