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

#include <MityViewerInterface.h>

Inheritance diagram for SocCamera::tcMityViewerInterface:
Collaboration diagram for SocCamera::tcMityViewerInterface:

Public Member Functions

 tcMityViewerInterface (tcIOChannel *apChannel, tcSensorBoard *apSensor)
 
 tcMityViewerInterface (tcIOChannel *apChannel, tcSensorBoard *apSensor, int32 anNum)
 
virtual ~tcMityViewerInterface ()
 
virtual void getInput (std::string *apStringOutput)
 
virtual std::string parseInput (std::string &arStringToParse)
 
virtual void respond (std::string anResponse)
 
virtual void finish (std::string &arOriginalBuffer)
 
virtual void * run ()
 
virtual void addTEC (tcPIDControl *apPID)
 
virtual void updateStatus (teStatus aeStatus, const char *apMessage) override
 
- Public Member Functions inherited from SocCamera::tcCommandInterface
 tcCommandInterface (const char *ifacename, tcSensorBoard *apSensor, tcIOChannel *apChannel)
 
virtual ~tcCommandInterface ()
 Destructor. More...
 
void initializeCommandHandlers ()
 
tcAbstractHandlergetChain (void)
 
tcAbstractHandlergetHandler (std::string name)
 
- Public Member Functions inherited from tcThread
 tcThread ()
 
virtual ~tcThread ()
 
void join ()
 
virtual void start ()
 
virtual void stop ()
 
- Public Member Functions inherited from tcStatusReporter
 tcStatusReporter ()
 
virtual ~tcStatusReporter ()
 
virtual void disableIndicators (bool abDisable)
 

Additional Inherited Members

- Public Types inherited from tcStatusReporter
enum  teStatus {
  eeCapturingStart, eeCapturingEnd, eeGood, eeWarning,
  eeError, eeClear, eeInfo
}
 
- Static Public Member Functions inherited from SocCamera::tcCommandInterface
static std::string registerName (uint32_t anReg)
 
- Static Public Member Functions inherited from tcStatusReporter
static void UpdateStatus (teStatus aeStatus, const char *apMessage)
 
static void DisableIndicators (bool abDisable)
 
- Static Public Attributes inherited from tcThread
static const int HIGHEST_PRIORITY = -2
 
static const int HIGH_PRIORITY = -1
 
static const int NORMAL_PRIORITY = 0
 
static const int LOW_PRIORITY = 1
 
static const int LOWEST_PRIORITY = 2
 
- Protected Member Functions inherited from SocCamera::tcCommandInterface
void Report (const char *fmt,...)
 This method routes text to stderr. More...
 
void ReportError (const char *fmt,...)
 
- Protected Member Functions inherited from tcThread
void setPriority (int anRelativePriority)
 
- Protected Member Functions inherited from tcStatusReporter
const char * statusToString (teStatus aeStatus)
 
- Protected Attributes inherited from SocCamera::tcCommandInterface
std::string m_ifacename
 
tcSensorBoardmpSensor
 
tcIOChannelmpChannel
 
- Protected Attributes inherited from tcThread
bool mbKillThread
 
- Static Protected Attributes inherited from SocCamera::tcCommandInterface
static tcAbstractHandlergpChainHead = NULL
 
static tcAbstractHandlergpChainTail = NULL
 
static std::map< std::string, tcAbstractHandler * > mcStringMap
 
static tcMutex chain_initializer = tcMutex()
 
- Static Protected Attributes inherited from tcStatusReporter
static std::list< tcStatusReporter * > mcReporters
 

Constructor & Destructor Documentation

◆ tcMityViewerInterface() [1/2]

tcMityViewerInterface::tcMityViewerInterface ( tcIOChannel apChannel,
tcSensorBoard apSensor 
)

◆ tcMityViewerInterface() [2/2]

SocCamera::tcMityViewerInterface::tcMityViewerInterface ( tcIOChannel apChannel,
tcSensorBoard apSensor,
int32  anNum 
)

◆ ~tcMityViewerInterface()

tcMityViewerInterface::~tcMityViewerInterface ( )
virtual

Member Function Documentation

◆ addTEC()

void SocCamera::tcMityViewerInterface::addTEC ( tcPIDControl apPID)
virtual

When a TEC cooler is present to control, call this function to add control into the chain.

Function is virtual because some interfaces (like MityViewer) don't use the chain and would like to have more direct control over the result.

Parameters
apPID- pointer to the PID controller object

Reimplemented from SocCamera::tcCommandInterface.

◆ finish()

virtual void SocCamera::tcMityViewerInterface::finish ( std::string &  arOriginalBuffer)
inlinevirtual

Perform cleanup tasks. (eg: reboot, signal thread to die, etc).

Parameters
arOriginalBuffer- the original buffer that was gotten

Implements SocCamera::tcCommandInterface.

◆ getInput()

virtual void SocCamera::tcMityViewerInterface::getInput ( std::string *  apStringOutput)
inlinevirtual

Gets the input from whatever means it has to and stores it in the std::string pointed to by the parameter.

Parameters
apStringOutput- pointer to the location to store the input

Implements SocCamera::tcCommandInterface.

◆ parseInput()

virtual std::string SocCamera::tcMityViewerInterface::parseInput ( std::string &  arStringOutput)
inlinevirtual

Process the input string and call whatever functions are appropriate. Returns a value which will be passed to respond().

Parameters
arStringOutput- the input string to process.
Returns
an int32 code corresponding to the success of processing.

Implements SocCamera::tcCommandInterface.

◆ respond()

virtual void SocCamera::tcMityViewerInterface::respond ( std::string  ahResponse)
inlinevirtual

Send the <ACK>, <NACK> or whatever other response.

Parameters
ahResponse- the string to output back over the source

Implements SocCamera::tcCommandInterface.

◆ run()

void * tcMityViewerInterface::run ( )
virtual

run() should spin getting input from getInput() and sends it to parseInput() for processing. This fully abstracts threading.

Returns
unused

TODO – correct shutdown here...

Reimplemented from SocCamera::tcCommandInterface.

◆ updateStatus()

virtual void SocCamera::tcMityViewerInterface::updateStatus ( teStatus  aeStatus,
const char *  apMessage 
)
inlineoverridevirtual

Signifies that the StatusReporter object should update.

Parameters
aeStatus- the status to report.

Implements tcStatusReporter.


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