16template<
class _TBackend>
24 PRecvStatus::PRecvStatus
checkRecvStatus(PRecvStatus::PRecvStatus recvStatus);
38 bool sendValue(
const PString & destinationName,
const T & data,
bool isConfirmationNeeded =
true){
42 bool sendData(
const PString & destinationName,
const Swarm::Data & data,
bool isConfirmationNeeded);
Daemon which help communication between processes and thread.
Class which describes a Daemon with connections to other daemons.
virtual void extraLoopProcessing()
Computing Method for each event loop (when receiving message from other Daemon)
bool sendMessage(const Swarm::Message &message)
Send message to other Daemon.
void initialisationDaemonSocket()
Initialise the Daemon Sockets.
Daemon()
Default constructor of Daemon.
virtual void executeOnStop()
Method which is called on stop of the Daemon.
bool sendData(const PString &destinationName, const Swarm::Data &data, bool isConfirmationNeeded)
Send data to other Daemon (specialization for Data)
void setClockMode(PClockMode::PClockMode mode)
Set the mode of the clock.
void initialisationDaemon()
Initialisation function of the class Daemon.
void setSocketMode(PSocketMode::PSocketMode mode)
Set the mode of the sockets of the SocketManager.
void checkSendStatus(PSendStatus::PSendStatus sendStatus)
Check the status of recv sockets.
PTimer p_statTimer
Timer to send statistics to the Stat Daemon.
void processInputMessage(Swarm::Message &message)
Process an input message.
PRecvStatus::PRecvStatus checkRecvStatus(PRecvStatus::PRecvStatus recvStatus)
Check the status of recv sockets.
bool sendValue(const PString &destinationName, const T &data, bool isConfirmationNeeded=true)
Send data to other Daemon.
_TBackend p_backend
Full backend of the Daemon (for Socket and clock)
time_t p_startTimestamp
Start timestamp of the current accumulation of statistics.
bool run()
Run the Daemon.
virtual ~Daemon()
Destructor of Daemon.
void sendStatToStatDaemon(time_t currentTime)
Send the statistics of the Daemon to the Stat Daemon.
Basic Data exchanged in the swarm.
Message exchanged by Daemons.
Swarm::Data phoenix_createData(const T &value)
Create a Data from a value.