Wyatt  1.0.1
Public Member Functions | Protected Attributes | List of all members
IMessage Class Referenceabstract

#include <IMessage.h>

Inheritance diagram for IMessage:
Inheritance graph
[legend]
Collaboration diagram for IMessage:
Collaboration graph
[legend]

Public Member Functions

 IMessage (Hardware hardware)
 
virtual ~IMessage ()
 
Hardware getHardware ()
 
virtual std::string serialize ()=0
 

Protected Attributes

Hardware hardware
 

Detailed Description

Message interface. All messages are required to state the hardware they are sent to/come from. In addition, they must all serialize themselves into string format.

Definition at line 10 of file IMessage.h.

Constructor & Destructor Documentation

IMessage::IMessage ( Hardware  hardware)
inline

Constructor.

Parameters
hardwareThe hardware the message is destined to/coming from.

Definition at line 17 of file IMessage.h.

virtual IMessage::~IMessage ( )
inlinevirtual

Destructor.

Definition at line 24 of file IMessage.h.

Member Function Documentation

Hardware IMessage::getHardware ( )
inline

Returns the hardware associated with the message

Returns
Hardware associated with the message

Definition at line 30 of file IMessage.h.

virtual std::string IMessage::serialize ( )
pure virtual

Serialize the message as a string. The hardware address is appended to the front of the string.

Returns
A string representation of the message.

Implemented in EncoderMessage, MotorMessage, and MockIRRangeFinderSensorMessage.

Member Data Documentation

Hardware IMessage::hardware
protected

Hardware associated with the message

Definition at line 45 of file IMessage.h.


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