![]() |
|
PhoenixSwarm
3.5.0
Library to ease communication between daemons
|
Message exchanged by Daemons. More...
#include <Representation.h>
Collaboration diagram for Message:Public Member Functions | |
| Data & | getData () |
| Gets the data of the Message. | |
| const Data & | getData () const |
| Gets the data of the Message. | |
| size_t & | getId () |
| Gets the id of the Message. | |
| size_t | getId () const |
| Gets the id of the Message. | |
| bool & | getIsConfirmationNeeded () |
| Gets the isConfirmationNeeded of the Message. | |
| bool | getIsConfirmationNeeded () const |
| Gets the isConfirmationNeeded of the Message. | |
| PString & | getSender () |
| Gets the sender of the Message. | |
| const PString & | getSender () const |
| Gets the sender of the Message. | |
| time_t & | getSendTime () |
| Gets the sendTime of the Message. | |
| const time_t & | getSendTime () const |
| Gets the sendTime of the Message. | |
| MessageType::MessageType & | getType () |
| Gets the type of the Message. | |
| const MessageType::MessageType & | getType () const |
| Gets the type of the Message. | |
| std::vector< PString > & | getVecRecver () |
| Gets the vecRecver of the Message. | |
| const std::vector< PString > & | getVecRecver () const |
| Gets the vecRecver of the Message. | |
| Message () | |
| Constructor of class Message. | |
| Message (const Message &other) | |
| Copy Constructor of class Message. | |
| Message & | operator= (const Message &other) |
| Operator = of class Message. | |
| template<typename Stream, DataStreamMode::DataStreamMode Mode> | |
| bool | readWriteStream (Stream &ds) |
| Load the current Message with a stream. | |
| void | setData (const Data &data) |
| Sets the data of the Message. | |
| void | setId (size_t id) |
| Sets the id of the Message. | |
| void | setIsConfirmationNeeded (bool isConfirmationNeeded) |
| Sets the isConfirmationNeeded of the Message. | |
| void | setSender (const PString &sender) |
| Sets the sender of the Message. | |
| void | setSendTime (const time_t &sendTime) |
| Sets the sendTime of the Message. | |
| void | setType (const MessageType::MessageType &type) |
| Sets the type of the Message. | |
| void | setVecRecver (const std::vector< PString > &vecRecver) |
| Sets the vecRecver of the Message. | |
| virtual | ~Message () |
| Destructor of class Message. | |
Protected Member Functions | |
| void | copyMessage (const Message &other) |
| Copy Function of class Message. | |
Private Member Functions | |
| void | initialisationMessage () |
| Initialisation Function of class Message. | |
Private Attributes | |
| Data | p_data |
| Data in the message. | |
| size_t | p_id |
| Id of the message (will be usefull to trigger method when a transmission is confirmed) | |
| bool | p_isConfirmationNeeded |
| True if the MESSAGE_CONFIRMATION is needed. | |
| PString | p_sender |
| Address of the Daemon which sends the message. | |
| time_t | p_sendTime |
| Time when the message was sent. | |
| MessageType::MessageType | p_type |
| Type of the message. | |
| std::vector< PString > | p_vecRecver |
| Addresses of Daemons which receive the message. | |
Message exchanged by Daemons.
Definition at line 167 of file Representation.h.
| Message::Message | ( | ) |
Constructor of class Message.
Definition at line 342 of file Representation.cpp.
References initialisationMessage().
Referenced by copyMessage(), Message(), and operator=().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
| Message::Message | ( | const Message & | other | ) |
Copy Constructor of class Message.
| other | : Message we want ot copy |
Definition at line 354 of file Representation.cpp.
References copyMessage(), and Message().
Here is the call graph for this function:
|
protected |
Copy Function of class Message.
| other | : Message we want ot copy |
Definition at line 517 of file Representation.cpp.
References Message(), p_data, p_id, p_isConfirmationNeeded, p_sender, p_sendTime, p_type, and p_vecRecver.
Referenced by Message(), and operator=().
Here is the call graph for this function:
Here is the caller graph for this function:| Data & Message::getData | ( | ) |
| const Data & Message::getData | ( | ) | const |
Gets the data of the Message.
Definition at line 503 of file Representation.cpp.
References p_data.
Referenced by CheckStream< Message >::check_stream(), BaseDaemon::processConfirmedMessage(), and Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| size_t & Message::getId | ( | ) |
| size_t Message::getId | ( | ) | const |
Gets the id of the Message.
Definition at line 433 of file Representation.cpp.
References p_id.
Referenced by BaseDaemon::addMessageToConfirm(), CheckStream< Message >::check_stream(), and Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| bool & Message::getIsConfirmationNeeded | ( | ) |
Gets the isConfirmationNeeded of the Message.
Definition at line 454 of file Representation.cpp.
References p_isConfirmationNeeded.
| bool Message::getIsConfirmationNeeded | ( | ) | const |
Gets the isConfirmationNeeded of the Message.
Definition at line 447 of file Representation.cpp.
References p_isConfirmationNeeded.
Referenced by CheckStream< Message >::check_stream(), Daemon< _TBackend >::processInputMessage(), and Daemon< _TBackend >::sendMessage().
Here is the caller graph for this function:| PString & Message::getSender | ( | ) |
| const PString & Message::getSender | ( | ) | const |
Gets the sender of the Message.
Definition at line 461 of file Representation.cpp.
References p_sender.
Referenced by CheckStream< Message >::check_stream(), and Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| time_t & Message::getSendTime | ( | ) |
Gets the sendTime of the Message.
Definition at line 426 of file Representation.cpp.
References p_sendTime.
| const time_t & Message::getSendTime | ( | ) | const |
Gets the sendTime of the Message.
Definition at line 419 of file Representation.cpp.
References p_sendTime.
Referenced by CheckStream< Message >::check_stream(), BaseDaemon::checkMessageTimeout(), BaseDaemon::processConfirmedMessage(), and Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| MessageType::MessageType & Message::getType | ( | ) |
| const MessageType::MessageType & Message::getType | ( | ) | const |
Gets the type of the Message.
Definition at line 489 of file Representation.cpp.
References p_type.
Referenced by CheckStream< Message >::check_stream(), and Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| std::vector< PString > & Message::getVecRecver | ( | ) |
Gets the vecRecver of the Message.
Definition at line 482 of file Representation.cpp.
References p_vecRecver.
| const std::vector< PString > & Message::getVecRecver | ( | ) | const |
Gets the vecRecver of the Message.
Definition at line 475 of file Representation.cpp.
References p_vecRecver.
Referenced by CheckStream< Message >::check_stream(), BaseDaemon::checkMessageTimeout(), BaseDaemon::processConfirmedMessage(), Daemon< _TBackend >::processInputMessage(), Daemon< _TBackend >::sendData(), and Daemon< _TBackend >::sendMessage().
Here is the caller graph for this function:
|
private |
Initialisation Function of class Message.
Definition at line 528 of file Representation.cpp.
References p_id, p_isConfirmationNeeded, and p_sender.
Referenced by Message().
Here is the caller graph for this function:Operator = of class Message.
| other | : Message we want ot copy |
Definition at line 362 of file Representation.cpp.
References copyMessage(), and Message().
Here is the call graph for this function:
|
inline |
Load the current Message with a stream.
| [out] | ds | : stream to be used |
Definition at line 200 of file Representation.h.
References DataStream< Stream, Mode, Data >::data_stream(), p_data, p_id, p_isConfirmationNeeded, p_sender, p_sendTime, p_type, and p_vecRecver.
Referenced by DataStream< Stream, Mode, Message >::data_stream().
Here is the call graph for this function:
Here is the caller graph for this function:| void Message::setData | ( | const Data & | data | ) |
Sets the data of the Message.
| data | : data of the Message |
Definition at line 412 of file Representation.cpp.
References p_data.
Referenced by Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setId | ( | size_t | id | ) |
Sets the id of the Message.
| id | : id of the Message |
Definition at line 377 of file Representation.cpp.
References p_id.
Referenced by Daemon< _TBackend >::processInputMessage(), and Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setIsConfirmationNeeded | ( | bool | isConfirmationNeeded | ) |
Sets the isConfirmationNeeded of the Message.
| isConfirmationNeeded | : isConfirmationNeeded of the Message |
Definition at line 384 of file Representation.cpp.
References p_isConfirmationNeeded.
Referenced by Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setSender | ( | const PString & | sender | ) |
Sets the sender of the Message.
| sender | : sender of the Message |
Definition at line 391 of file Representation.cpp.
References p_sender.
Referenced by Daemon< _TBackend >::processInputMessage(), and Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setSendTime | ( | const time_t & | sendTime | ) |
Sets the sendTime of the Message.
| sendTime | : sendTime of the Message |
Definition at line 370 of file Representation.cpp.
References p_sendTime.
Referenced by Daemon< _TBackend >::processInputMessage(), and Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setType | ( | const MessageType::MessageType & | type | ) |
Sets the type of the Message.
| type | : type of the Message |
Definition at line 405 of file Representation.cpp.
References p_type.
Referenced by Daemon< _TBackend >::processInputMessage(), and Daemon< _TBackend >::sendData().
Here is the caller graph for this function:| void Message::setVecRecver | ( | const std::vector< PString > & | vecRecver | ) |
Sets the vecRecver of the Message.
| vecRecver | : vecRecver of the Message |
Definition at line 398 of file Representation.cpp.
References p_vecRecver.
|
private |
Data in the message.
Definition at line 229 of file Representation.h.
Referenced by copyMessage(), getData(), getData(), readWriteStream(), and setData().
|
private |
Id of the message (will be usefull to trigger method when a transmission is confirmed)
Definition at line 219 of file Representation.h.
Referenced by copyMessage(), getId(), getId(), initialisationMessage(), readWriteStream(), and setId().
|
private |
True if the MESSAGE_CONFIRMATION is needed.
Definition at line 221 of file Representation.h.
Referenced by copyMessage(), getIsConfirmationNeeded(), getIsConfirmationNeeded(), initialisationMessage(), readWriteStream(), and setIsConfirmationNeeded().
|
private |
Address of the Daemon which sends the message.
Definition at line 223 of file Representation.h.
Referenced by copyMessage(), getSender(), getSender(), initialisationMessage(), readWriteStream(), and setSender().
|
private |
Time when the message was sent.
Definition at line 217 of file Representation.h.
Referenced by copyMessage(), getSendTime(), getSendTime(), readWriteStream(), and setSendTime().
|
private |
Type of the message.
Definition at line 227 of file Representation.h.
Referenced by copyMessage(), getType(), getType(), readWriteStream(), and setType().
|
private |
Addresses of Daemons which receive the message.
Definition at line 225 of file Representation.h.
Referenced by copyMessage(), getVecRecver(), getVecRecver(), readWriteStream(), and setVecRecver().