Public Member Functions | Protected Attributes | Private Member Functions
LABUST::COMMUNICATION::GyrosCommsInterface Class Reference

#include <GyrosCommsInterface.hpp>

Inheritance diagram for LABUST::COMMUNICATION::GyrosCommsInterface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const bool Connected ()
virtual const void * GetCommObject (void)
 GyrosCommsInterface ()
virtual COMMERRORS::CommError Receive (std::vector< labust::xml::GyrosReader > &data, bool wait=false)=0
virtual void RegisterCallbackObject (CommEntity *entity)
virtual COMMERRORS::CommError Send (const labust::xml::GyrosWriter &data, bool wait=false)=0
virtual COMMERRORS::CommError Send (const std::vector< labust::xml::GyrosWriter > &data, bool wait=false)=0
virtual void unRegisterCallbackObject ()
virtual ~GyrosCommsInterface ()

Protected Attributes

CommEntitycallbackObject
bool connected

Private Member Functions

 GyrosCommsInterface (const GyrosCommsInterface &orig)
GyrosCommsInterfaceoperator= (const GyrosCommsInterface &)

Detailed Description

This class represents the communication interface which can be used to send and receive data with other processes It is configured from an XML config file The interface uses the GYROS data format (XML based) The CommsInterface must ensure that any communication protocol can be used in two ways: PASSIVE: data is sent and received by calling member functions ACTIVE: data is sent by calling CommsInterface member functions, and received data is passed from CommsInterface through a callback (see CommEntity)

Definition at line 78 of file GyrosCommsInterface.hpp.


Constructor & Destructor Documentation

Definition at line 82 of file GyrosCommsInterface.hpp.

Definition at line 89 of file GyrosCommsInterface.hpp.


Member Function Documentation

Definition at line 165 of file GyrosCommsInterface.hpp.

virtual const void* LABUST::COMMUNICATION::GyrosCommsInterface::GetCommObject ( void  ) [inline, virtual]

This methods allows to access the hidden comms device. This allows the user to set some specific options. The user is not forced to implement this function.

Returns:
void pointer to the underlaying comm object

Reimplemented in LABUST::COMMUNICATION::GyrosMoosCommsInterface.

Definition at line 137 of file GyrosCommsInterface.hpp.

GyrosCommsInterface& LABUST::COMMUNICATION::GyrosCommsInterface::operator= ( const GyrosCommsInterface ) [private]
virtual COMMERRORS::CommError LABUST::COMMUNICATION::GyrosCommsInterface::Receive ( std::vector< labust::xml::GyrosReader > &  data,
bool  wait = false 
) [pure virtual]

PASSIVE This methods allows to receive data from the comms buffer. Stores all received data in the GYROS vector as multiple objects If lock is set, the call blocks until data is available for receiving, otherwise exits with an empty vector Must be implemented

Parameters:
datavector of gyrosreaders with received data
waittrue if the call should block until data is available, false to return error code
Returns:
COMERRORS::ComError in case of error, 0 if everything is ok

Implemented in LABUST::COMMUNICATION::GyrosMoosCommsInterface.

ACTIVE this method allows user to register an object which will be used as a communications hook in case the comm channel has to initiate communication The comm channel should call this function when it has received data and needs the system to provide or read it

Parameters:
objpointer to object on which callbacks will be executed

Reimplemented in LABUST::COMMUNICATION::GyrosMoosCommsInterface.

Definition at line 151 of file GyrosCommsInterface.hpp.

virtual COMMERRORS::CommError LABUST::COMMUNICATION::GyrosCommsInterface::Send ( const labust::xml::GyrosWriter &  data,
bool  wait = false 
) [pure virtual]

PASSIVE or ACTIVE usage This method allows user to send data over the underlying connection channel data is passed as a GYROS writer object

See also:
GyrosWriter.hpp Must be implemented
Parameters:
datavector of gyroswriters with data to send
waittrue if function should block until the data is sent, false to return immediately
Returns:
COMERRORS::ComError in case of error, 0 if everything is ok

Implemented in LABUST::COMMUNICATION::GyrosMoosCommsInterface.

virtual COMMERRORS::CommError LABUST::COMMUNICATION::GyrosCommsInterface::Send ( const std::vector< labust::xml::GyrosWriter > &  data,
bool  wait = false 
) [pure virtual]

PASSIVE or ACTIVE usage This method allows user to send data over the underlying connection channel data is passed as a GYROS writer object vector

See also:
GyrosWriter.hpp Must be implemented
Parameters:
datavector of gyroswriters with data to send
waittrue if function should block until the data is sent, false to return immediately
Returns:
COMERRORS::ComError in case of error, 0 if everything is ok

Implemented in LABUST::COMMUNICATION::GyrosMoosCommsInterface.

sets callbackobject to NULL Must not delete the object!

Definition at line 160 of file GyrosCommsInterface.hpp.


Member Data Documentation

The comm channel can call the callback method on this object when it is ready to communicate

Definition at line 175 of file GyrosCommsInterface.hpp.

Definition at line 177 of file GyrosCommsInterface.hpp.


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


acoustic_vr
Author(s):
autogenerated on Fri Feb 7 2014 11:37:09