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

#include <GigEInterface.h>

Inheritance diagram for SocCamera::tcGigEInterface:
Collaboration diagram for SocCamera::tcGigEInterface:

Public Member Functions

 tcGigEInterface (tcIOChannel *apChannel, tcSensorBoard *apSensor)
 
virtual ~tcGigEInterface ()
 
virtual void * run ()
 Main body of the run thread for the GigE interface. More...
 
void getInput (std::string *)
 
std::string parseInput (std::string &)
 
void respond (std::string)
 
void finish (std::string &)
 
virtual void update_payload_size (const uint32_t payload_size)
 
- Public Member Functions inherited from SocCamera::tcCommandInterface
 tcCommandInterface (const char *ifacename, tcSensorBoard *apSensor, tcIOChannel *apChannel)
 
virtual ~tcCommandInterface ()
 Destructor. More...
 
void initializeCommandHandlers ()
 
virtual void addTEC (tcPIDControl *apPID)
 
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 tcPayloadSetter
 tcPayloadSetter ()
 
virtual ~tcPayloadSetter ()
 

Static Public Member Functions

static const char * getCommandName (uint16_t cmd)
 
static const char * getStatusName (GEV_STATUS status)
 
- Static Public Member Functions inherited from SocCamera::tcCommandInterface
static std::string registerName (uint32_t anReg)
 

Public Attributes

tcRegisterFilempRegisterFile
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ tcGigEInterface()

tcGigEInterface::tcGigEInterface ( tcIOChannel apChannel,
tcSensorBoard apSensor 
)

◆ ~tcGigEInterface()

tcGigEInterface::~tcGigEInterface ( )
virtual

Member Function Documentation

◆ finish()

void SocCamera::tcGigEInterface::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.

◆ getCommandName()

const char * tcGigEInterface::getCommandName ( uint16_t  cmd)
static

This function returns a human readable string for the command ID specified. It's just for debugging messages.

Parameters
[in]cmdThe GigE command ID.
Returns
A string describing the command ID.

◆ getInput()

void SocCamera::tcGigEInterface::getInput ( std::string *  )
inlinevirtual

This group of functions is required by the base class tcCommandInterface for the function tcCommandInterface::run(). These functions are repeatedly called by tcCommandInterface::run() in a loop which looks like:

while (!mbKillThread) {
buffer.clear();
getInput(&buffer);
response = parseInput(buffer);
respond(response);
finish(buffer);
}

The base classes run function is written expecting the commands and responses to be ascii string based. That doesn't make any sense for this interface as we are NOT dealing with string commands and responses. So we're not going to pay attention to it. We do require a cycling call to drive us to do our stuff. So we're accomplishing that by overriding the base classes run() function. It would be nice if the base class didn't make these functions pure virtual, since it allows us to override the run() function anyway.

Implements SocCamera::tcCommandInterface.

◆ getStatusName()

const char * tcGigEInterface::getStatusName ( GEV_STATUS  status)
static

This function returns a human readable string for the GigE status specified. It's just for debugging messages.

Parameters
[in]statusThe GigE status ID.
Returns
A string describing the status ID.

◆ parseInput()

std::string SocCamera::tcGigEInterface::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()

void SocCamera::tcGigEInterface::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 * SocCamera::tcGigEInterface::run ( )
virtual

Main body of the run thread for the GigE interface.

Reimplemented from SocCamera::tcCommandInterface.

◆ update_payload_size()

void SocCamera::tcGigEInterface::update_payload_size ( const uint32_t  payload_size)
virtual

Implements tcPayloadSetter.

Member Data Documentation

◆ mpRegisterFile

tcRegisterFile* SocCamera::tcGigEInterface::mpRegisterFile

The documentation for this class was generated from the following files:
SocCamera::tcGigEInterface::parseInput
std::string parseInput(std::string &)
Definition: GigEInterface.h:57
SocCamera::tcGigEInterface::respond
void respond(std::string)
Definition: GigEInterface.h:58
SocCamera::tcGigEInterface::getInput
void getInput(std::string *)
Definition: GigEInterface.h:56
SocCamera::tcGigEInterface::finish
void finish(std::string &)
Definition: GigEInterface.h:59
tcThread::mbKillThread
bool mbKillThread
Definition: Thread.h:56