![]() |
|
PhoenixSwarm
3.5.0
Library to ease communication between daemons
|
Daemon which manages statistics of a full swarm. More...
#include <StatDaemonManager.h>
Inheritance diagram for StatDaemonManager< _TBackend >:
Collaboration diagram for StatDaemonManager< _TBackend >:Public Member Functions | |
| template<typename _Callable> | |
| bool | addCallableMethod (_Callable &&function, const PString &name) |
| Add a callable method of the Daemon. | |
| virtual void | addCallMethod () |
| Method from BaseDaemon to add call methods. | |
| template<typename _Class, typename _Data> | |
| bool | addDataCallableMethod (PUncastableBool(&function)(_Class &, const _Data &), _Class &persistentData, size_t nbBin, float histLowerBound, float histUpperBound) |
| Add a callable method of the Daemon. | |
| template<typename _Data> | |
| bool | addDataCallableMethod (PUncastableBool(&function)(const _Data &), size_t nbBin, float histLowerBound, float histUpperBound) |
| Add a callable method of the Daemon. | |
| void | addMessageToConfirm (const Message &message) |
| Add a message to confirm. | |
| bool | callMethod (Data &result, const PString &name, const Data ¶meter) |
| Call an added callable method by name. | |
| void | checkMessageTimeout (time_t currentTime) |
| Check if a message has reached the timeout. | |
| PRecvStatus::PRecvStatus | checkRecvStatus (PRecvStatus::PRecvStatus recvStatus) |
| Check the status of recv sockets. | |
| void | checkSendStatus (PSendStatus::PSendStatus sendStatus) |
| Check the status of recv sockets. | |
| void | clearCallableMethod () |
| Clear the map of callable methods. | |
| void | clearStat () |
| Clear all the statistics of the daemon. | |
| StatAccumulator | createNewStat (size_t nbBin, float histLowerBound, float histUpperBound) |
| Create a new clear computing statistic. | |
| virtual void | executeOnStop () |
| Method which is called on stop of the Daemon. | |
| virtual bool | extraLoad (const ConfigNode *config) |
| Extra call on load for the current Daemon. | |
| virtual void | extraLoopProcessing () |
| Computing Method for each event loop (when receiving message from other Daemon) | |
| PUncastableBool | fillStatInfo (const DaemonStat &stat) |
| Fill the StatInfo of the StatDaemonManager with the given DaemonStat. | |
| DaemonConfig & | getConfig () |
| Get the configuration of the current BaseDaemon. | |
| AbstractDataFunction * | getDataFunction (const Data &data) |
| Get the data function associated with the given data. | |
| PLog & | getLog () |
| Get the log of the current BaseDaemon. | |
| PLog & | getLogger () |
| Get the logger of the current BaseDaemon. | |
| DaemonMainConfig & | getMainConfig () |
| Get the main configuration of the swarm. | |
| MapDaemonConfig & | getMapDaemonConfig () |
| Get the map of all Daemon configurations. | |
| const MapDaemonStat & | getMapDaemonStat () const |
| Get the map of DaemonStat. | |
| const std::map< size_t, Message > & | getMapMessageToBeConfirmed () const |
| Get the map of message to be confirmed. | |
| size_t | getMessageId () |
| Get current message id. | |
| bool | getMessageToConfirm (Message &message, size_t id) const |
| Get a message to confirm by id if it exists. | |
| OptionParser & | getOptionParser () |
| Return the OptionParser of the current BaseDaemon. | |
| size_t | getStatsCount () const |
| Get the count of stats received. | |
| bool | hasReceivedStats () const |
| Check if stats have been received. | |
| bool | isDaemonExist (const PString &name) const |
| Say if a neighbour Daemon does exist. | |
| bool | load (const PPath &fileName, const PString &daemonName) |
| Load the Toml configuration which define all BaseDaemons of the Swarm. | |
| bool | load (const PString &configFileContent, const PString &daemonName, ConfigFormat::ConfigFormat format) |
| Load the Json configuration which define all BaseDaemons of the Swarm. | |
| void | loadConfigFromNode (const ConfigNode &dico, const PString &daemonName) |
| Load configuration form a node of ConfigNode. | |
| bool | parseArgument (int argc, char **argv) |
| Parse arguments given to the BaseDaemon with command line. | |
| void | processConfirmedMessage (size_t id, time_t currentTime) |
| Process confirmed message. | |
| bool | processData (const Data &data) |
| Process given data with the proper method. | |
| bool | processEvent () |
| Process event. | |
| bool | run () |
| Run the Daemon. | |
| bool | sendData (const PString &destinationName, const Data &data, bool isConfirmationNeeded) |
| Send data to other Daemon (specialization for Data) | |
| bool | sendMessage (const Message &message) |
| Send message to other Daemon. | |
| bool | sendMessage (const PString &destinationName, const Message &message) |
| Send message to other Daemon. | |
| template<typename T> | |
| bool | sendValue (const PString &destinationName, const T &data, bool isConfirmationNeeded=true) |
| Send data to other Daemon. | |
| void | setClockMode (PClockMode::PClockMode mode) |
| Set the mode of the clock. | |
| void | setSocketMode (PSocketMode::PSocketMode mode) |
| Set the mode of the sockets of the SocketManager. | |
| StatDaemonManager () | |
| Constructor of StatDaemonManager. | |
| void | stop () |
| Stops the BaseDaemon. | |
| void | updateStatAccumulator (StatAccumulator &stat, float value) |
| Update a computing statistic with a new value. | |
| virtual | ~StatDaemonManager () |
| Destructor of StatDaemonManager. | |
Protected Member Functions | |
| void | fillDaemonStat (DaemonStat &stat, time_t startTimestamp, time_t endTimestamp) |
| Fill the DaemonStat with the current statistics of the daemon. | |
| VecStat | fillVecStat (const StatAccumulator &accumulator, time_t startTimestamp, time_t endTimestamp) |
| Fill a VecStat from a StatAccumulator to send to the DamonStat. | |
| void | processInputMessage (Message &message) |
| Process an input message. | |
Protected Attributes | |
| _TBackend | p_backend |
| Full backend of the Daemon (for Socket and clock) | |
| DaemonConfig | p_config |
| Configuration of the curent Daemon. | |
| bool | p_isFullMock |
| True if the daemon has to be executed in mock mode for socket and clock. | |
| bool | p_isFullMockRecord |
| True if the daemon has to be executed in mock record mode for socket and clock. | |
| bool | p_isRun |
| True if the current BaseDaemon is running. | |
| PLog | p_log |
| Logger of the current Daemon. | |
| DaemonMainConfig | p_mainConfig |
| Main configuration of the Daemon. | |
| MapDaemonConfig | p_mapDaemon |
| Map of the other Daemon of the Swarm. | |
| time_t | p_startTimestamp |
| Start timestamp of the current accumulation of statistics. | |
| PTimer | p_statTimer |
| Timer to send statistics to the Stat Daemon. | |
Private Member Functions | |
| std::map< PString, StatAccumulator > | createNewCommunicationStatMap (const PString &dataType, size_t nbBin, float histLowerBound, float histUpperBound) |
| Create a new map of communication statistic. | |
| void | getCommunicationStat (const PString &destName, const PString &dataType, float latency, size_t nbBin, float histLowerBound, float histUpperBound) |
| Add a communication statistic. | |
| void | initialisationBaseDaemon () |
| Initialisation function of the class BaseDaemon. | |
| void | initialisationDaemon () |
| Initialisation function of the class Daemon. | |
| void | initialisationDaemonSocket () |
| Initialise the Daemon Sockets. | |
| void | initializeStatDaemonManager () |
| Initialize the StatDaemonManager. | |
| void | sendStatToStatDaemon (time_t currentTime) |
| Send the statistics of the Daemon to the Stat Daemon. | |
Private Attributes | |
| std::map< PString, AbstractFunction * > | p_mapCallableMethod |
| Map of callable method of the Daemon. | |
| MapDaemonStat | p_mapDaemonStat |
| Statistics about all Daemon in the swarm. | |
| std::map< PString, AbstractDataFunction * > | p_mapDataFunction |
| Map of methods which have to be called when receiving data. | |
| std::map< size_t, Message > | p_mapMessageToBeConfirmed |
| Map of messages which have to be confirmed by destination Daemon. | |
| size_t | p_messageId |
| Id counter of the message of the current Daemon. | |
| OptionParser | p_optionParser |
| Option parser of the Daemon. | |
Daemon which manages statistics of a full swarm.
Definition at line 18 of file StatDaemonManager.h.
| StatDaemonManager< _TBackend >::StatDaemonManager | ( | ) |
Constructor of StatDaemonManager.
Definition at line 14 of file StatDaemonManager_impl.h.
References Daemon< _TBackend >::Daemon(), and initializeStatDaemonManager().
Here is the call graph for this function:
|
virtual |
Destructor of StatDaemonManager.
Definition at line 22 of file StatDaemonManager_impl.h.
|
inlineinherited |
Add a callable method of the Daemon.
| function | : method to be added |
| name | : name of the method which can be called |
Definition at line 73 of file BaseDaemon.h.
References getLog(), and p_mapCallableMethod.
Here is the call graph for this function:
|
virtual |
Method from BaseDaemon to add call methods.
Reimplemented from BaseDaemon.
Definition at line 77 of file StatDaemonManager_impl.h.
References BaseDaemon::addDataCallableMethod(), BaseDaemon::getConfig(), BaseDaemon::getLog(), DaemonConfig::getStatHistLowerBound(), DaemonConfig::getStatHistUpperBound(), DaemonConfig::getStatNbBin(), and sortFillDaemonStat().
Here is the call graph for this function:
|
inlineinherited |
Add a callable method of the Daemon.
| function | : method to be added |
| persistentData | : data used each time the method is called |
| nbBin | : number of bin in the histogram |
| histLowerBound | : lower bound of the histogram |
| histUpperBound | : upper bound of the histogram |
Definition at line 128 of file BaseDaemon.h.
References createNewStat(), getLog(), p_config, and p_mapDataFunction.
Here is the call graph for this function:
|
inlineinherited |
Add a callable method of the Daemon.
| function | : method to be added |
| nbBin | : number of bin in the histogram |
| histLowerBound | : lower bound of the histogram |
| histUpperBound | : upper bound of the histogram |
Definition at line 105 of file BaseDaemon.h.
References createNewStat(), getLog(), p_config, and p_mapDataFunction.
Referenced by StatDaemonManager< _TBackend >::addCallMethod().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Add a message to confirm.
| message | : message to be added |
Definition at line 180 of file BaseDaemon.cpp.
References Message::getId(), and p_mapMessageToBeConfirmed.
Referenced by Daemon< _TBackend >::sendMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Call an added callable method by name.
| [out] | result | : result of the call |
| name | : name of the method | |
| parameter | : parameters of the call |
Definition at line 121 of file BaseDaemon.cpp.
References getLog(), p_log, and p_mapCallableMethod.
Here is the call graph for this function:
|
inherited |
Check if a message has reached the timeout.
| currentTime | : current time |
Definition at line 223 of file BaseDaemon.cpp.
References getLog(), Message::getSendTime(), Message::getVecRecver(), p_config, and p_mapMessageToBeConfirmed.
Referenced by Daemon< _TBackend >::run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Check the status of recv sockets.
| recvStatus | : status to be checked |
Definition at line 75 of file Daemon_impl.h.
References BaseDaemon::p_log.
Referenced by run().
Here is the caller graph for this function:
|
inherited |
Check the status of recv sockets.
| sendStatus | : status to be checked |
Definition at line 100 of file Daemon_impl.h.
References BaseDaemon::p_log.
Referenced by sendMessage().
Here is the caller graph for this function:
|
inherited |
Clear the map of callable methods.
Definition at line 131 of file BaseDaemon.cpp.
References p_mapCallableMethod.
Referenced by ~BaseDaemon().
Here is the caller graph for this function:
|
inherited |
Clear all the statistics of the daemon.
Definition at line 349 of file BaseDaemon.cpp.
References p_config.
Referenced by Daemon< _TBackend >::sendStatToStatDaemon().
Here is the caller graph for this function:
|
privateinherited |
Create a new map of communication statistic.
| dataType | : type of data which where pushed |
| nbBin | : number of bin of the histogram |
| histLowerBound | : lower bound of the histogram |
| histUpperBound | : upper bound of the histogram |
Definition at line 411 of file BaseDaemon.cpp.
References createNewStat().
Referenced by getCommunicationStat().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Create a new clear computing statistic.
| nbBin | : number of bin of the histogram |
| histLowerBound | : lower bound of the histogram |
| histUpperBound | : upper bound of the histogram |
Definition at line 326 of file BaseDaemon.cpp.
References StatAccumulator::setHistLowerBound(), StatAccumulator::setHistUpperBound(), StatAccumulator::setMax(), StatAccumulator::setMin(), StatAccumulator::setNbEvent(), StatAccumulator::setNbEventAboveUpperBound(), StatAccumulator::setNbEventBelowLowerBound(), StatAccumulator::setSum(), and StatAccumulator::setVecHistogram().
Referenced by addDataCallableMethod(), addDataCallableMethod(), createNewCommunicationStatMap(), and getCommunicationStat().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtualinherited |
Method which is called on stop of the Daemon.
Definition at line 206 of file Daemon_impl.h.
Referenced by run().
Here is the caller graph for this function:
|
virtualinherited |
Extra call on load for the current Daemon.
| config | : configuration for the current Daemon |
Definition at line 102 of file BaseDaemon.cpp.
|
virtualinherited |
Computing Method for each event loop (when receiving message from other Daemon)
Definition at line 202 of file Daemon_impl.h.
Referenced by run().
Here is the caller graph for this function:
|
protectedinherited |
Fill the DaemonStat with the current statistics of the daemon.
| stat | DaemonStat to be filled |
| startTimestamp | time at which the statistic started to be filled |
| endTimestamp | time at which the statistic stopped to be filled |
Definition at line 476 of file BaseDaemon.cpp.
References fillVecStat(), DaemonStat::getMapStatCommunication(), DaemonStat::getMapStatComputing(), and p_config.
Referenced by Daemon< _TBackend >::sendStatToStatDaemon().
Here is the call graph for this function:
Here is the caller graph for this function:| PUncastableBool StatDaemonManager< _TBackend >::fillStatInfo | ( | const DaemonStat & | stat | ) |
Fill the StatInfo of the StatDaemonManager with the given DaemonStat.
| stat | : DaemonStat to be filled |
Definition at line 55 of file StatDaemonManager_impl.h.
References DaemonStat::getName(), and p_mapDaemonStat.
Referenced by sortFillDaemonStat().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
Fill a VecStat from a StatAccumulator to send to the DamonStat.
| accumulator | StatAccumulator to be converted |
| startTimestamp | time at which the statistic started to be filled |
| endTimestamp | time at which the statistic stopped to be filled |
Definition at line 446 of file BaseDaemon.cpp.
References VecStat::getAverage(), VecStat::getEndTimestamp(), StatAccumulator::getMax(), VecStat::getMax(), StatAccumulator::getMin(), VecStat::getMin(), StatAccumulator::getNbEvent(), VecStat::getNbEvent(), StatAccumulator::getNbEventAboveUpperBound(), StatAccumulator::getNbEventBelowLowerBound(), VecStat::getRate(), VecStat::getRateEventAboveUpperBound(), VecStat::getRateEventBelowLowerBound(), VecStat::getStartTimestamp(), StatAccumulator::getSum(), StatAccumulator::getVecHistogram(), and VecStat::getVecRateQuantile().
Referenced by fillDaemonStat().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateinherited |
Add a communication statistic.
| destName | : name of the destination Daemon from which data where pushed |
| dataType | : type of data which where pushed |
| latency | : latency between the send of the data and the receiving of the confirmation by the daemon destName |
| nbBin | : number of bin of the histogram |
| histLowerBound | : lower bound of the histogram |
| histUpperBound | : upper bound of the histogram |
Definition at line 425 of file BaseDaemon.cpp.
References createNewCommunicationStatMap(), createNewStat(), p_config, and updateStatAccumulator().
Referenced by processConfirmedMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Get the configuration of the current BaseDaemon.
Definition at line 365 of file BaseDaemon.cpp.
References p_config.
Referenced by StatDaemonManager< _TBackend >::addCallMethod().
Here is the caller graph for this function:
|
inherited |
Get the data function associated with the given data.
| data | The data for which to retrieve the associated function |
Definition at line 262 of file BaseDaemon.cpp.
References getLog(), Data::getType(), and p_mapDataFunction.
Referenced by processData(), and Daemon< _TBackend >::processInputMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Get the log of the current BaseDaemon.
Definition at line 154 of file BaseDaemon.cpp.
References p_log.
Referenced by addCallableMethod(), StatDaemonManager< _TBackend >::addCallMethod(), addDataCallableMethod(), addDataCallableMethod(), callMethod(), checkMessageTimeout(), getDataFunction(), Daemon< _TBackend >::initialisationDaemonSocket(), processConfirmedMessage(), processData(), Daemon< _TBackend >::processInputMessage(), Daemon< _TBackend >::sendStatToStatDaemon(), and updateStatAccumulator().
Here is the caller graph for this function:
|
inherited |
Get the logger of the current BaseDaemon.
Definition at line 386 of file BaseDaemon.cpp.
References p_log.
|
inherited |
Get the main configuration of the swarm.
Definition at line 379 of file BaseDaemon.cpp.
References p_mainConfig.
|
inherited |
Get the map of all Daemon configurations.
Definition at line 372 of file BaseDaemon.cpp.
References p_mapDaemon.
| const MapDaemonStat & StatDaemonManager< _TBackend >::getMapDaemonStat | ( | ) | const |
Get the map of DaemonStat.
Definition at line 30 of file StatDaemonManager_impl.h.
References p_mapDaemonStat.
|
inherited |
Get the map of message to be confirmed.
Definition at line 343 of file BaseDaemon.cpp.
References p_mapMessageToBeConfirmed.
|
inherited |
Get current message id.
Definition at line 253 of file BaseDaemon.cpp.
References p_messageId.
Referenced by Daemon< _TBackend >::sendData().
Here is the caller graph for this function:
|
inherited |
Get a message to confirm by id if it exists.
| [out] | message | : message which has the id id |
| id | : id of the message to be searched |
Definition at line 189 of file BaseDaemon.cpp.
References p_mapMessageToBeConfirmed.
|
inherited |
Return the OptionParser of the current BaseDaemon.
Definition at line 147 of file BaseDaemon.cpp.
References p_optionParser.
| size_t StatDaemonManager< _TBackend >::getStatsCount | ( | ) | const |
Get the count of stats received.
Definition at line 46 of file StatDaemonManager_impl.h.
References p_mapDaemonStat.
| bool StatDaemonManager< _TBackend >::hasReceivedStats | ( | ) | const |
Check if stats have been received.
Definition at line 38 of file StatDaemonManager_impl.h.
References p_mapDaemonStat.
|
privateinherited |
Initialisation function of the class BaseDaemon.
Definition at line 391 of file BaseDaemon.cpp.
References p_isFullMock, p_isFullMockRecord, p_isRun, p_messageId, and p_optionParser.
Referenced by BaseDaemon().
Here is the caller graph for this function:
|
privateinherited |
Initialisation function of the class Daemon.
Definition at line 210 of file Daemon_impl.h.
Referenced by Daemon().
Here is the caller graph for this function:
|
privateinherited |
Initialise the Daemon Sockets.
Definition at line 216 of file Daemon_impl.h.
References BaseDaemon::getLog(), p_backend, BaseDaemon::p_config, BaseDaemon::p_isFullMock, BaseDaemon::p_isFullMockRecord, BaseDaemon::p_mapDaemon, setClockMode(), and setSocketMode().
Referenced by run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Initialize the StatDaemonManager.
Definition at line 62 of file StatDaemonManager_impl.h.
Referenced by StatDaemonManager().
Here is the caller graph for this function:
|
inherited |
Say if a neighbour Daemon does exist.
| name | : name of the Daemon to be searched |
Definition at line 162 of file BaseDaemon.cpp.
References p_config, and p_mapDaemon.
Referenced by loadConfigFromNode().
Here is the caller graph for this function:
|
inherited |
Load the Toml configuration which define all BaseDaemons of the Swarm.
| fileName | : name of the configuration file of all the BaseDaemons of the Swarm in toml format |
| daemonName | : name of the current BaseDaemon in the given file |
Definition at line 91 of file BaseDaemon.cpp.
References daemon_load_config(), loadConfigFromNode(), and p_log.
Here is the call graph for this function:
|
inherited |
Load the Json configuration which define all BaseDaemons of the Swarm.
| configFileContent | : name of the configuration file of all the BaseDaemons of the Swarm in json format |
| daemonName | : name of the current BaseDaemon in the given file |
| format | : format of the configuration file |
Definition at line 79 of file BaseDaemon.cpp.
References daemon_load_config(), loadConfigFromNode(), and p_log.
Referenced by parseArgument().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Load configuration form a node of ConfigNode.
| [out] | dico | : loaded configuration |
| daemonName | : name of the current Daemon in the configuration |
Definition at line 45 of file BaseDaemon.cpp.
References addCallMethod(), daemon_loadString(), daemon_read_configNode(), isDaemonExist(), p_config, p_log, p_mainConfig, and p_mapDaemon.
Referenced by load(), and load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Parse arguments given to the BaseDaemon with command line.
| argc | : number of arguments given to the program |
| argv | : list of arguments given to the program |
Definition at line 28 of file BaseDaemon.cpp.
References load(), p_isFullMock, p_isFullMockRecord, and p_optionParser.
Here is the call graph for this function:
|
inherited |
Process confirmed message.
| id | : id of the message to be removed |
| currentTime | : time when the confirmation was received |
Definition at line 202 of file BaseDaemon.cpp.
References getCommunicationStat(), Message::getData(), getLog(), Message::getSendTime(), Data::getType(), Message::getVecRecver(), p_config, and p_mapMessageToBeConfirmed.
Referenced by Daemon< _TBackend >::processInputMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Process given data with the proper method.
| data | : data to be processed |
Definition at line 276 of file BaseDaemon.cpp.
References AbstractDataFunction::call(), getDataFunction(), getLog(), Data::getType(), and p_log.
Here is the call graph for this function:| bool StatDaemonManager< _TBackend >::processEvent | ( | ) |
Process event.
Definition at line 70 of file StatDaemonManager_impl.h.
|
protectedinherited |
Process an input message.
| [out] | message | : received Message to be processed |
Definition at line 253 of file Daemon_impl.h.
References AbstractDataFunction::call(), Message::getData(), BaseDaemon::getDataFunction(), Message::getId(), Message::getIsConfirmationNeeded(), BaseDaemon::getLog(), Message::getSender(), Message::getSendTime(), Data::getType(), Message::getType(), Message::getVecRecver(), MessageType::MESSAGE_CONFIRMATION, p_backend, BaseDaemon::p_config, BaseDaemon::p_log, BaseDaemon::processConfirmedMessage(), MessageType::RESULT_DATA, sendMessage(), Message::setId(), Message::setSender(), Message::setSendTime(), Message::setType(), MessageType::STOP, BaseDaemon::stop(), and BaseDaemon::updateStatAccumulator().
Referenced by run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Run the Daemon.
Definition at line 125 of file Daemon_impl.h.
References BaseDaemon::checkMessageTimeout(), checkRecvStatus(), executeOnStop(), extraLoopProcessing(), initialisationDaemonSocket(), p_backend, BaseDaemon::p_config, BaseDaemon::p_isRun, BaseDaemon::p_mainConfig, p_startTimestamp, p_statTimer, processInputMessage(), and sendStatToStatDaemon().
Here is the call graph for this function:
|
inherited |
Send data to other Daemon (specialization for Data)
| destinationName | : name of the destination Daemon of the data |
| data | : data to be sent |
| isConfirmationNeeded | : true if a confirmation is needed |
Definition at line 188 of file Daemon_impl.h.
References BaseDaemon::getMessageId(), Message::getVecRecver(), p_backend, BaseDaemon::p_config, MessageType::RESULT_DATA, sendMessage(), Message::setData(), Message::setId(), Message::setIsConfirmationNeeded(), Message::setSender(), Message::setSendTime(), and Message::setType().
Referenced by sendValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Send message to other Daemon.
| message | : message to be sent |
Definition at line 158 of file Daemon_impl.h.
References Message::getVecRecver(), and sendMessage().
Referenced by processInputMessage(), sendData(), and sendMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Send message to other Daemon.
| destinationName | : name of the destination Daemon of the message |
| message | : message to be sent |
Definition at line 173 of file Daemon_impl.h.
References BaseDaemon::addMessageToConfirm(), checkSendStatus(), Message::getIsConfirmationNeeded(), p_backend, and BaseDaemon::p_mainConfig.
Here is the call graph for this function:
|
privateinherited |
Send the statistics of the Daemon to the Stat Daemon.
| [out] | currentTime | : current time to be used for the statistics |
Definition at line 292 of file Daemon_impl.h.
References BaseDaemon::clearStat(), BaseDaemon::fillDaemonStat(), BaseDaemon::getLog(), BaseDaemon::p_config, p_startTimestamp, sendValue(), and DaemonStat::setName().
Referenced by run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Send data to other Daemon.
| destinationName | : name of the destination Daemon of the data |
| data | : data to be sent |
| isConfirmationNeeded | : true if a confirmation is needed |
Definition at line 38 of file Daemon.h.
References phoenix_createData(), and sendData().
Referenced by sendStatToStatDaemon().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Set the mode of the clock.
| mode | : mode of the clock (NO_MOCK, MOCK, MOCK_RECORD) |
Definition at line 53 of file Daemon_impl.h.
References p_backend, BaseDaemon::p_isFullMock, and BaseDaemon::p_isFullMockRecord.
Referenced by initialisationDaemonSocket().
Here is the caller graph for this function:
|
inherited |
Set the mode of the sockets of the SocketManager.
| mode | : mode of the socket manager (NO_MOCK, MOCK, MOCK_RECORD) |
Definition at line 31 of file Daemon_impl.h.
References p_backend, BaseDaemon::p_isFullMock, and BaseDaemon::p_isFullMockRecord.
Referenced by initialisationDaemonSocket().
Here is the caller graph for this function:
|
inherited |
Stops the BaseDaemon.
Definition at line 139 of file BaseDaemon.cpp.
References p_config, p_isRun, and p_log.
Referenced by Daemon< _TBackend >::processInputMessage().
Here is the caller graph for this function:
|
inherited |
Update a computing statistic with a new value.
| stat | : statistic to be updated |
| value | : new value to be added to the statistic |
Definition at line 290 of file BaseDaemon.cpp.
References StatAccumulator::getHistLowerBound(), StatAccumulator::getHistUpperBound(), getLog(), StatAccumulator::getMax(), StatAccumulator::getMin(), StatAccumulator::getNbEvent(), StatAccumulator::getNbEventAboveUpperBound(), StatAccumulator::getNbEventBelowLowerBound(), StatAccumulator::getSum(), StatAccumulator::getVecHistogram(), StatAccumulator::setMax(), StatAccumulator::setMin(), StatAccumulator::setNbEvent(), StatAccumulator::setNbEventAboveUpperBound(), StatAccumulator::setNbEventBelowLowerBound(), and StatAccumulator::setSum().
Referenced by getCommunicationStat(), and Daemon< _TBackend >::processInputMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
Full backend of the Daemon (for Socket and clock)
Definition at line 49 of file Daemon.h.
Referenced by initialisationDaemonSocket(), processInputMessage(), run(), sendData(), sendMessage(), setClockMode(), and setSocketMode().
|
protectedinherited |
Configuration of the curent Daemon.
Definition at line 162 of file BaseDaemon.h.
Referenced by addDataCallableMethod(), addDataCallableMethod(), checkMessageTimeout(), clearStat(), fillDaemonStat(), getCommunicationStat(), getConfig(), Daemon< _TBackend >::initialisationDaemonSocket(), isDaemonExist(), loadConfigFromNode(), processConfirmedMessage(), Daemon< _TBackend >::processInputMessage(), Daemon< _TBackend >::run(), Daemon< _TBackend >::sendData(), Daemon< _TBackend >::sendStatToStatDaemon(), and stop().
|
protectedinherited |
True if the daemon has to be executed in mock mode for socket and clock.
Definition at line 170 of file BaseDaemon.h.
Referenced by initialisationBaseDaemon(), Daemon< _TBackend >::initialisationDaemonSocket(), parseArgument(), Daemon< _TBackend >::setClockMode(), and Daemon< _TBackend >::setSocketMode().
|
protectedinherited |
True if the daemon has to be executed in mock record mode for socket and clock.
Definition at line 172 of file BaseDaemon.h.
Referenced by initialisationBaseDaemon(), Daemon< _TBackend >::initialisationDaemonSocket(), parseArgument(), Daemon< _TBackend >::setClockMode(), and Daemon< _TBackend >::setSocketMode().
|
protectedinherited |
True if the current BaseDaemon is running.
Definition at line 168 of file BaseDaemon.h.
Referenced by initialisationBaseDaemon(), Daemon< _TBackend >::run(), and stop().
|
protectedinherited |
Logger of the current Daemon.
Definition at line 166 of file BaseDaemon.h.
Referenced by addCallMethod(), callMethod(), Daemon< _TBackend >::checkRecvStatus(), Daemon< _TBackend >::checkSendStatus(), getLog(), getLogger(), load(), load(), loadConfigFromNode(), processData(), Daemon< _TBackend >::processInputMessage(), and stop().
|
protectedinherited |
Main configuration of the Daemon.
Definition at line 160 of file BaseDaemon.h.
Referenced by getMainConfig(), loadConfigFromNode(), Daemon< _TBackend >::run(), and Daemon< _TBackend >::sendMessage().
|
privateinherited |
Map of callable method of the Daemon.
Definition at line 182 of file BaseDaemon.h.
Referenced by addCallableMethod(), callMethod(), and clearCallableMethod().
|
protectedinherited |
Map of the other Daemon of the Swarm.
Definition at line 164 of file BaseDaemon.h.
Referenced by getMapDaemonConfig(), Daemon< _TBackend >::initialisationDaemonSocket(), isDaemonExist(), and loadConfigFromNode().
|
private |
Statistics about all Daemon in the swarm.
Definition at line 32 of file StatDaemonManager.h.
Referenced by fillStatInfo(), getMapDaemonStat(), getStatsCount(), and hasReceivedStats().
|
privateinherited |
Map of methods which have to be called when receiving data.
Definition at line 189 of file BaseDaemon.h.
Referenced by addDataCallableMethod(), addDataCallableMethod(), and getDataFunction().
|
privateinherited |
Map of messages which have to be confirmed by destination Daemon.
Definition at line 184 of file BaseDaemon.h.
Referenced by addMessageToConfirm(), checkMessageTimeout(), getMapMessageToBeConfirmed(), getMessageToConfirm(), and processConfirmedMessage().
|
privateinherited |
Id counter of the message of the current Daemon.
Definition at line 186 of file BaseDaemon.h.
Referenced by getMessageId(), and initialisationBaseDaemon().
|
privateinherited |
Option parser of the Daemon.
Definition at line 180 of file BaseDaemon.h.
Referenced by BaseDaemon(), getOptionParser(), initialisationBaseDaemon(), and parseArgument().
|
protectedinherited |
Start timestamp of the current accumulation of statistics.
Definition at line 53 of file Daemon.h.
Referenced by run(), and sendStatToStatDaemon().
|
protectedinherited |