fesa-core  7.0.0
fesa::CommandMessage Class Reference

A message type that can be used to send any type of command of up to two arguments as a string. More...

#include <MessageTypes.h>

Inheritance diagram for fesa::CommandMessage:
fesa::AbstractMessage

Public Member Functions

 CommandMessage (const std::string &command, const std::string &parameter1, const std::string &parameter2, uint32_t &prio)
 Constructor. Create a command message containing one command and two parameters. More...
 
 CommandMessage (std::istream &stream)
 Constructor. Create a message from serialized data. More...
 
void serialize (std::ostream &stream) const
 Serialize a command and its two parameters into a stream. More...
 
- Public Member Functions inherited from fesa::AbstractMessage
 AbstractMessage (uint32_t prio, MessageType msgType)
 Constructor.
 
 AbstractMessage (std::istream &stream, MessageType msgType)
 Constructor. Create a message from serialized data. More...
 
virtual ~AbstractMessage ()
 Destructor.
 
bool operator< (const AbstractMessage &msg) const
 Compare priorities (needed because this class is an element of a priority queue) More...
 

Additional Inherited Members

- Public Attributes inherited from fesa::AbstractMessage
uint32_t prio_
 The priority of the message.
 
MessageType msgType_
 The type of the message.
 

Detailed Description

A message type that can be used to send any type of command of up to two arguments as a string.

Constructor & Destructor Documentation

fesa::CommandMessage::CommandMessage ( const std::string &  command,
const std::string &  parameter1,
const std::string &  parameter2,
uint32_t &  prio 
)

Constructor. Create a command message containing one command and two parameters.

Parameters
commandThe command
parameter1The first parameter
parameter2The second parameter
prioThe priority of the message
fesa::CommandMessage::CommandMessage ( std::istream &  stream)

Constructor. Create a message from serialized data.

Parameters
streamThe stream that contains the serialized data

Member Function Documentation

void fesa::CommandMessage::serialize ( std::ostream &  stream) const
virtual

Serialize a command and its two parameters into a stream.

Parameters
Theserialized message

Reimplemented from fesa::AbstractMessage.


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