![]() |
|
PhoenixSwarm
5.1.1
Library to ease communication between daemons
|
Message exchanged by Daemons. More...
#include <Representation.h>
Collaboration diagram for Swarm::Message:Public Member Functions | |
| Swarm::Data & | getData () |
| Gets the data of the Message. | |
| const Swarm::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 Swarm::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 | |
| Swarm::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 168 of file Representation.h.
| Message::Message | ( | ) |
Constructor of class Message.
Definition at line 344 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 356 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 519 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:| Swarm::Data & Message::getData | ( | ) |
| const Swarm::Data & Message::getData | ( | ) | const |
Gets the data of the Message.
Definition at line 505 of file Representation.cpp.
References p_data.
Referenced by CheckStream< Swarm::Message >::check_stream(), Swarm::BaseDaemon::processConfirmedMessage(), and Swarm::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 435 of file Representation.cpp.
References p_id.
Referenced by Swarm::BaseDaemon::addMessageToConfirm(), CheckStream< Swarm::Message >::check_stream(), Swarm::Daemon< _TBackend >::processInputMessage(), and testBaseDaemonGetMessageToConfirm().
Here is the caller graph for this function:| bool & Message::getIsConfirmationNeeded | ( | ) |
Gets the isConfirmationNeeded of the Message.
Definition at line 456 of file Representation.cpp.
References p_isConfirmationNeeded.
| bool Message::getIsConfirmationNeeded | ( | ) | const |
Gets the isConfirmationNeeded of the Message.
Definition at line 449 of file Representation.cpp.
References p_isConfirmationNeeded.
Referenced by CheckStream< Swarm::Message >::check_stream(), Swarm::Daemon< _TBackend >::processInputMessage(), and Swarm::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 463 of file Representation.cpp.
References p_sender.
Referenced by CheckStream< Swarm::Message >::check_stream(), and Swarm::Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:| time_t & Message::getSendTime | ( | ) |
Gets the sendTime of the Message.
Definition at line 428 of file Representation.cpp.
References p_sendTime.
| const time_t & Message::getSendTime | ( | ) | const |
Gets the sendTime of the Message.
Definition at line 421 of file Representation.cpp.
References p_sendTime.
Referenced by CheckStream< Swarm::Message >::check_stream(), Swarm::BaseDaemon::checkMessageTimeout(), Swarm::BaseDaemon::processConfirmedMessage(), and Swarm::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 491 of file Representation.cpp.
References p_type.
Referenced by CheckStream< Swarm::Message >::check_stream(), and Swarm::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 484 of file Representation.cpp.
References p_vecRecver.
| const std::vector< PString > & Message::getVecRecver | ( | ) | const |
Gets the vecRecver of the Message.
Definition at line 477 of file Representation.cpp.
References p_vecRecver.
Referenced by CheckStream< Swarm::Message >::check_stream(), Swarm::BaseDaemon::checkMessageTimeout(), Swarm::BaseDaemon::processConfirmedMessage(), Swarm::Daemon< _TBackend >::processInputMessage(), Swarm::Daemon< _TBackend >::sendData(), Swarm::Daemon< _TBackend >::sendMessage(), testBaseDaemonGetMessageToConfirm(), and testBaseDaemonProcessConfirmedMessage().
Here is the caller graph for this function:
|
private |
Initialisation Function of class Message.
Definition at line 530 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 364 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 201 of file Representation.h.
References DataStream< Stream, Mode, Swarm::Data >::data_stream(), p_data, p_id, p_isConfirmationNeeded, p_sender, p_sendTime, p_type, and p_vecRecver.
Referenced by DataStream< Stream, Mode, Swarm::Message >::data_stream().
Here is the call graph for this function:
Here is the caller graph for this function:| void Message::setData | ( | const Swarm::Data & | data | ) |
Sets the data of the Message.
| data | : data of the Message |
Definition at line 414 of file Representation.cpp.
References p_data.
Referenced by Swarm::Daemon< _TBackend >::sendData(), and testBaseDaemonProcessConfirmedMessage().
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 379 of file Representation.cpp.
References p_id.
Referenced by Swarm::Daemon< _TBackend >::processInputMessage(), Swarm::Daemon< _TBackend >::sendData(), testBaseDaemonGetMessageToConfirm(), and testBaseDaemonProcessConfirmedMessage().
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 386 of file Representation.cpp.
References p_isConfirmationNeeded.
Referenced by Swarm::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 393 of file Representation.cpp.
References p_sender.
Referenced by Swarm::Daemon< _TBackend >::processInputMessage(), and Swarm::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 372 of file Representation.cpp.
References p_sendTime.
Referenced by Swarm::Daemon< _TBackend >::processInputMessage(), Swarm::Daemon< _TBackend >::sendData(), testBaseDaemonGetMessageToConfirm(), and testBaseDaemonProcessConfirmedMessage().
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 407 of file Representation.cpp.
References p_type.
Referenced by Swarm::Daemon< _TBackend >::processInputMessage(), and Swarm::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 400 of file Representation.cpp.
References p_vecRecver.
|
private |
Data in the message.
Definition at line 230 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 220 of file Representation.h.
Referenced by copyMessage(), getId(), getId(), initialisationMessage(), readWriteStream(), and setId().
|
private |
True if the MESSAGE_CONFIRMATION is needed.
Definition at line 222 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 224 of file Representation.h.
Referenced by copyMessage(), getSender(), getSender(), initialisationMessage(), readWriteStream(), and setSender().
|
private |
Time when the message was sent.
Definition at line 218 of file Representation.h.
Referenced by copyMessage(), getSendTime(), getSendTime(), readWriteStream(), and setSendTime().
|
private |
Type of the message.
Definition at line 228 of file Representation.h.
Referenced by copyMessage(), getType(), getType(), readWriteStream(), and setType().
|
private |
Addresses of Daemons which receive the message.
Definition at line 226 of file Representation.h.
Referenced by copyMessage(), getVecRecver(), getVecRecver(), readWriteStream(), and setVecRecver().