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

#include <AbstractHandler.h>

Inheritance diagram for SocCamera::tcAbstractHandler:
Collaboration diagram for SocCamera::tcAbstractHandler:

Public Member Functions

 tcAbstractHandler (tcSensorBoard *apSensor, tcAbstractHandler *apNextHandler=NULL)
 
virtual ~tcAbstractHandler ()
 
virtual std::string execute (std::string &arCommandString, std::string &arParameters)
 
void appendHandler (tcAbstractHandler *apNextHandler)
 
tcAbstractHandlerprependHandler (tcAbstractHandler *apFirstHandler)
 
virtual void update (tsUpdate asMessage)
 
virtual void SetIOChannel (tcIOChannel *apChannel)
 
void unregisterFromFile ()
 
const std::string & name () const
 return the handler name More...
 
- Public Member Functions inherited from tcObserver
 tcObserver ()
 
virtual ~tcObserver ()
 

Protected Member Functions

void Report (const char *fmt,...)
 
void ReportError (const char *fmt,...)
 

Static Protected Member Functions

static std::string nack (int32 anNack)
 
static std::string ack (std::string *apValue=NULL)
 
static std::string carrotNumber (float anNum)
 
static std::string carrotNumber (int32 anNum)
 
static std::string carrotNumberHex (int32 anNum)
 
static void handleCode (tcRegUpdateUint32Msg *apMsg, teNackCode anCode)
 

Protected Attributes

std::string m_name
 
tcAbstractHandlermpNextHandler
 
tcSensorBoardmpSensor
 

Detailed Description

This is the abstract base class for the chain of responsibility pattern. Commands are passed through the chain and handled when possible

Constructor & Destructor Documentation

◆ tcAbstractHandler()

tcAbstractHandler::tcAbstractHandler ( tcSensorBoard apSensor,
tcAbstractHandler apNextHandler = NULL 
)

◆ ~tcAbstractHandler()

tcAbstractHandler::~tcAbstractHandler ( )
virtual

Member Function Documentation

◆ ack()

std::string tcAbstractHandler::ack ( std::string *  apValue = NULL)
staticprotected

◆ appendHandler()

void SocCamera::tcAbstractHandler::appendHandler ( tcAbstractHandler apNextHandler)

Used to append a handler onto the end of the chain.

Parameters
apNextHandler- the handler to append to the chain.

◆ carrotNumber() [1/2]

std::string tcAbstractHandler::carrotNumber ( float  anNum)
staticprotected

◆ carrotNumber() [2/2]

std::string tcAbstractHandler::carrotNumber ( int32  anNum)
staticprotected

◆ carrotNumberHex()

std::string tcAbstractHandler::carrotNumberHex ( int32  anNum)
staticprotected

◆ execute()

std::string tcAbstractHandler::execute ( std::string &  arCommandString,
std::string &  arParameters 
)
virtual

◆ handleCode()

void SocCamera::tcAbstractHandler::handleCode ( tcRegUpdateUint32Msg apMsg,
teNackCode  anCode 
)
staticprotected

◆ nack()

std::string tcAbstractHandler::nack ( int32  anNack)
staticprotected

◆ name()

const std::string& SocCamera::tcAbstractHandler::name ( ) const
inline

return the handler name

◆ prependHandler()

tcAbstractHandler * SocCamera::tcAbstractHandler::prependHandler ( tcAbstractHandler apFirstHandler)

Used to prepend a handler to the chain.

Parameters
apFirstHandler- the new first handler in the chain.
Returns
the new head of the chain (the parameter)

◆ Report()

void tcAbstractHandler::Report ( const char *  fmt,
  ... 
)
protected

◆ ReportError()

void tcAbstractHandler::ReportError ( const char *  fmt,
  ... 
)
protected

Report Error Fucntion

This method routes error text to stderr

Parameters
[in]buffererror text to display
[in]lengthlength of text to display

◆ SetIOChannel()

virtual void SocCamera::tcAbstractHandler::SetIOChannel ( tcIOChannel apChannel)
inlinevirtual

◆ unregisterFromFile()

void SocCamera::tcAbstractHandler::unregisterFromFile ( )

◆ update()

Member Data Documentation

◆ m_name

std::string SocCamera::tcAbstractHandler::m_name
protected

◆ mpNextHandler

tcAbstractHandler* SocCamera::tcAbstractHandler::mpNextHandler
protected

◆ mpSensor

tcSensorBoard* SocCamera::tcAbstractHandler::mpSensor
protected

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