PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
BaseDaemon.cpp
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#include <cmath> //for std::nan
8#include "BaseDaemon.h"
9#include "PTimer.h"
10
13 :p_optionParser(true, __PROGRAM_VERSION__)
14{
16}
17
22
24
28bool BaseDaemon::parseArgument(int argc, char** argv){
29 p_optionParser.parseArgument(argc, argv);
30 const OptionMode & defaultMode = p_optionParser.getDefaultMode();
31 PPath configurationFile;
32 defaultMode.getValue(configurationFile, "daemonconfig");
33 PString daemonName;
34 defaultMode.getValue(daemonName, "daemonname");
35 p_isFullMock = defaultMode.isOptionExist("mock");
36 p_isFullMockRecord = defaultMode.isOptionExist("mockrecord");
37 return load(configurationFile, daemonName);
38}
39
41
45void BaseDaemon::loadConfigFromNode(const ConfigNode & dico, const PString & daemonName) {
46 const ConfigNode * mapMainConfig = dico.getChild("swarm");
47 if(mapMainConfig != nullptr){
48 p_mainConfig.recvTimeoutMs = phoenix_get_value<int>(*mapMainConfig, "recv_timeout_ms", -1);
49 p_mainConfig.sendTimeoutMs = phoenix_get_value<int>(*mapMainConfig, "send_timeout_ms", -1);
50 p_mainConfig.recvFlag = daemonRecvFlagFromString(phoenix_get_string(*mapMainConfig, "recv_flag", "NON_BLOCK"));
51 p_mainConfig.sendFlag = daemonSendFlagFromString(phoenix_get_string(*mapMainConfig, "send_flag", "NON_BLOCK"));
52 }
53 std::map<PString, time_t> mapTimeout;
54 const ConfigNode * extraConfigParam = nullptr;
55 daemon_read_configNode(p_config, p_mapDaemon, p_log, mapTimeout, extraConfigParam, dico, daemonName);
56
57 const ConfigNode * mapStatDaemon = dico.getChild("statistics");
58 if(mapStatDaemon != nullptr){
59 p_config.setStatDaemonName(daemon_loadString(*mapStatDaemon, "stat_daemon_name"));
60 }
61 p_config.setMapTimeout(mapTimeout);
62 if(p_config.getStatDaemonName() != ""){
63 if(!isDaemonExist(p_config.getStatDaemonName())){
64 p_log.getLogError() << "BaseDaemon::loadConfigFromNode : stat daemon '"<<p_config.getStatDaemonName()<<"' not found in configuration" << std::endl;
65 }
66 }
67
68 p_log.getLogInfo() << "BaseDaemon::loadConfigFromNode : loading configuration successful" << std::endl;
69 p_log.getLogInfo() << "BaseDaemon::loadConfigFromNode : ready to call addCallMethod to subscribe on received data" << std::endl;
71}
72
74
79bool BaseDaemon::load(const PString & configFileContent, const PString & daemonName, ConfigFormat::ConfigFormat format){
80 ConfigNode dico;
81 daemon_load_config(p_log, dico, configFileContent, format);
82 loadConfigFromNode(dico, daemonName);
83 return true;
84}
85
87
91bool BaseDaemon::load(const PPath & fileName, const PString & daemonName){
92 ConfigNode dico;
93 daemon_load_config(p_log, dico, fileName);
94 loadConfigFromNode(dico, daemonName);
95 return true;
96}
97
99
102bool BaseDaemon::extraLoad(const ConfigNode * config){
103 return true;
104}
105
108 if(p_log.isOpen()){
109 p_log.getLogWarning() << "BaseDaemon::addCallMethod : no redefined addCallMethod " << std::endl;
110 }else{
111 std::cerr << "BaseDaemon::addCallMethod : no redefined addCallMethod (and no log file so we use std::cerr)" << std::endl;
112 }
113}
114
116
121bool BaseDaemon::callMethod(Data & result, const PString & name, const Data & parameter){
122 std::map<PString, AbstractFunction*>::iterator it(p_mapCallableMethod.find(name));
123 if(it == p_mapCallableMethod.end()){
124 getLog().getLogError() << "BaseDaemon::callMethod : function '"<<name<<"' not found" << std::endl;
125 return false;
126 }
127 return p_mapCallableMethod[name]->call(p_log, result, parameter);
128}
129
132 for(std::map<PString, AbstractFunction*>::iterator it(p_mapCallableMethod.begin()); it != p_mapCallableMethod.end(); ++it){
133 delete it->second;
134 }
135 p_mapCallableMethod.clear();
136}
137
140 p_log.getLogInfo() << "Stopping Daemon '"<<p_config.getName()<<"' at '"<<p_config.getHostName()<<"'" << std::endl;
141 p_isRun = false;
142}
143
145
148 return p_optionParser;
149}
150
152
155 return p_log;
156}
157
159
162bool BaseDaemon::isDaemonExist(const PString & name) const{
163 MapDaemonConfig::const_iterator it(p_mapDaemon.find(name));
164 if(it == p_mapDaemon.end()){
165 //Then if the stat daemon does not exist in the map, it may be the current daemon
166 if(p_config.getName() == name){
167 return true;
168 }
169 }
170 if(it != p_mapDaemon.end()){
171 return true;
172 }
173
174 return false;
175}
176
178
181 p_mapMessageToBeConfirmed[message.getId()] = message;
182}
183
185
189bool BaseDaemon::getMessageToConfirm(Message & message, size_t id) const{
190 std::map<size_t, Message>::const_iterator it(p_mapMessageToBeConfirmed.find(id));
191 if(it != p_mapMessageToBeConfirmed.end()){
192 message = it->second;
193 return true;
194 }
195 return false;
196}
197
199
202void BaseDaemon::processConfirmedMessage(size_t id, time_t currentTime){
203 std::map<size_t, Message>::const_iterator it(p_mapMessageToBeConfirmed.find(id));
204 if(it != p_mapMessageToBeConfirmed.end()){
205 getLog().getLogInfo() << "BaseDaemon::processConfirmedMessage : adding statistics for processed transaction " << id << std::endl;
206 const Message & message = it->second;
207 time_t ellapsedTime = currentTime - message.getSendTime();
208 for(const PString & receiver : message.getVecRecver()){
209 getLog().getLogDebug() << "BaseDaemon::processConfirmedMessage : add statistic for receiver : " << receiver << std::endl;
210 getCommunicationStat(receiver, message.getData().getType(), ellapsedTime, p_config.getStatNbBin(), p_config.getStatHistLowerBound(), p_config.getStatHistUpperBound());
211 }
212 // Remove the confirmed message
213 getLog().getLogInfo() << "BaseDaemon::removeConfirmedMessage : remove confirmed transaction " << id << std::endl;
215 }else{
216 getLog().getLogError() << "BaseDaemon::processConfirmedMessage : transaction " << id << " not found in p_mapMessageToBeConfirmed" << std::endl;
217 }
218}
219
221
223void BaseDaemon::checkMessageTimeout(time_t currentTime){
224 std::vector<size_t> messagesToRemove;
225 for(auto it = p_mapMessageToBeConfirmed.begin(); it != p_mapMessageToBeConfirmed.end(); ++it){
226 const size_t & messageId = it->first;
227 const Message & message = it->second;
228 time_t elapsedTime = currentTime - message.getSendTime();
229 if(message.getVecRecver().size() == 0lu){
230 getLog().getLogError() << "BaseDaemon::checkMessageTimeout() : message " << messageId << " has no receiver." << std::endl;
231 continue;
232 }
233 std::map<PString, time_t>::const_iterator timeoutIt = p_config.getMapTimeout().find(message.getVecRecver().front());
234 if(timeoutIt == p_config.getMapTimeout().end()){
235 getLog().getLogError() << "BaseDaemon::checkMessageTimeout() : no timeout found for receiver '" << message.getVecRecver().front() << "' of message " << messageId << "." << std::endl;
236 continue;
237 }
238 time_t timeout = timeoutIt->second;
239 phoenix_assert(message.getVecRecver().size() != 0lu);
240 if (elapsedTime > timeout) {
241 messagesToRemove.push_back(messageId);
242 getLog().getLogWarning() << "BaseDaemon::checkMessageTimeout() : Timeout Reached for message " << messageId << " sent to '" << message.getVecRecver().front() << "'. Removing unconfirmed transaction" << std::endl;
243 }
244 }
245 for(const size_t & messageId : messagesToRemove){
246 p_mapMessageToBeConfirmed.erase(messageId);
247 }
248}
249
251
254 ++p_messageId;
255 return p_messageId;
256}
257
259
263 PString prototype(data.getType());
264 std::map<PString, AbstractDataFunction*>::iterator it(p_mapDataFunction.find(prototype));
265 if(it == p_mapDataFunction.end()){
266 getLog().getLogError() << "BaseDaemon::getDataFunction : function to process data '"<<prototype<<"' not found" << std::endl;
267 return nullptr;
268 }
269 return it->second;
270}
271
273
276bool BaseDaemon::processData(const Data & data){
277 AbstractDataFunction* function = getDataFunction(data);
278 if(function == nullptr){
279 return false;
280 }
281 getLog().getLogDebug() << "BaseDaemon::processData : process data '"<<data.getType()<<"'" << std::endl;
282 bool b = function->call(p_log, data);
283 return b;
284}
285
287
291 stat.setNbEvent(stat.getNbEvent() + 1lu);
292 getLog().getLogDebug() << "BaseDaemon::updateStatAccumulator : event nb is " << stat.getNbEvent() << std::endl;
293 if(stat.getNbEvent() == 1lu){
294 stat.setMin(value);
295 stat.setMax(value);
296 stat.setSum(value);
297 }else{
298 if(value < stat.getMin()){
299 stat.setMin(value);
300 }
301 if(value > stat.getMax()){
302 stat.setMax(value);
303 }
304 stat.setSum(stat.getSum() + value);
305 }
306 if(value > stat.getHistUpperBound()){
308 }
309 if(value < stat.getHistLowerBound()){
311 }
312 float binSize = (stat.getHistUpperBound() - stat.getHistLowerBound()) / stat.getVecHistogram().size();
313 size_t bin = (value - stat.getHistLowerBound()) / binSize;
314 if(bin < stat.getVecHistogram().size()){
315 std::vector<size_t> & vecHistogram = stat.getVecHistogram();
316 vecHistogram[bin] = vecHistogram[bin] + 1lu;
317 }
318}
319
321
326StatAccumulator BaseDaemon::createNewStat(size_t nbBin, float histLowerBound, float histUpperBound){
327 StatAccumulator newStat;
328 newStat.setNbEvent(0lu);
329 newStat.setMin(std::nan(""));
330 newStat.setMax(std::nan(""));
331 newStat.setSum(std::nan(""));
332 newStat.setNbEventAboveUpperBound(0lu);
333 newStat.setNbEventBelowLowerBound(0lu);
334 newStat.setHistUpperBound(histUpperBound);
335 newStat.setHistLowerBound(histLowerBound);
336 newStat.setVecHistogram(std::vector<size_t>(nbBin, 0lu));
337 return newStat;
338}
339
341
343const std::map<size_t, Message> & BaseDaemon::getMapMessageToBeConfirmed() const {
345}
346
347
350 for(MapStatAccumulator::iterator it = p_config.getDaemonStatAccumulator().getMapStatComputing().begin(); it != p_config.getDaemonStatAccumulator().getMapStatComputing().end(); ++it){
351 it->second.setNbEvent(0lu);
352 std::fill(it->second.getVecHistogram().begin(), it->second.getVecHistogram().end(), 0lu);
353 }
354 for(MapDaemonStatAccumulator::iterator itMap = p_config.getDaemonStatAccumulator().getMapStatCommunication().begin(); itMap != p_config.getDaemonStatAccumulator().getMapStatCommunication().end(); ++itMap){
355 for(MapStatAccumulator::iterator it = itMap->second.begin(); it != itMap->second.end(); ++it){
356 it->second.setNbEvent(0lu);
357 std::fill(it->second.getVecHistogram().begin(), it->second.getVecHistogram().end(), 0lu);
358 }
359 }
360}
361
363
368
370
375
377
382
384
387 return p_log;
388}
389
392 p_optionParser.setExampleLongOption("phoenix_daemon --daemonconfig=daemon_config.toml --daemonname=main");
393 p_optionParser.setExampleShortOption("phoenix_daemon -c daemon_config.toml -n main");
394 p_optionParser.addOption("daemonconfig", "c", OptionType::FILENAME, true, "Toml configuration file which define all Daemons of the swarm");
395 p_optionParser.addOption("daemonname", "n", OptionType::STRING, true, "Name of the current Daemon of the swarm configuration defined with --daemonconfig");
396 p_optionParser.addOption("mock", "m", OptionType::NONE, false, "Activate the Daemon in mock mode for the sockets and the clock");
397 p_optionParser.addOption("mockrecord", "r", OptionType::NONE, false, "Activate the Daemon in mock record mode for the sockets and the clock");
398 p_isRun = false;
399 p_messageId = 0lu;
400 p_isFullMock = false;
401 p_isFullMockRecord = false;
402}
403
405
411std::map<PString, StatAccumulator> BaseDaemon::createNewCommunicationStatMap(const PString & dataType, size_t nbBin, float histLowerBound, float histUpperBound){
412 std::map<PString, StatAccumulator> newStatMap;
413 newStatMap[dataType] = createNewStat(nbBin, histLowerBound, histUpperBound);
414 return newStatMap;
415}
416
418
425void BaseDaemon::getCommunicationStat(const PString & destName, const PString & dataType, float latency, size_t nbBin, float histLowerBound, float histUpperBound){
426 std::map<PString, std::map<PString, StatAccumulator> > & mapCommunication = p_config.getDaemonStatAccumulator().getMapStatCommunication();
427 MapDaemonStatAccumulator::iterator it = mapCommunication.find(destName);
428 if(it == mapCommunication.end()){
429 mapCommunication[destName] = createNewCommunicationStatMap(dataType, nbBin, histLowerBound, histUpperBound);
430 }
431 else{
432 std::map<PString, StatAccumulator>::iterator itDataType = it->second.find(dataType);
433 if(itDataType == it->second.end()){
434 it->second[dataType] = createNewStat(nbBin, histLowerBound, histUpperBound);
435 }
436 }
437 updateStatAccumulator(p_config.getDaemonStatAccumulator().getMapStatCommunication().find(destName)->second[dataType], latency);
438}
439
441
446VecStat BaseDaemon::fillVecStat(const StatAccumulator & accumulator, time_t startTimestamp, time_t endTimestamp){
447 VecStat vecStat;
448
449 // Compute event values
450 vecStat.getNbEvent().push_back(accumulator.getNbEvent());
451 vecStat.getMin().push_back(accumulator.getMin());
452 vecStat.getMax().push_back(accumulator.getMax());
453 vecStat.getAverage().push_back(accumulator.getSum() / accumulator.getNbEvent());
454
455 // Compute time values
456 vecStat.getStartTimestamp().push_back(startTimestamp);
457 vecStat.getEndTimestamp().push_back(endTimestamp);
458 time_t rate = endTimestamp - startTimestamp;
459 vecStat.getRate().push_back(accumulator.getNbEvent()*1e9 / rate);
460 vecStat.getRateEventAboveUpperBound().push_back(accumulator.getNbEventAboveUpperBound()*1e9 / rate);
461 vecStat.getRateEventBelowLowerBound().push_back(accumulator.getNbEventBelowLowerBound()*1e9 / rate);
462
463 vecStat.getVecRateQuantile().resize(accumulator.getVecHistogram().size());
464 for(size_t i = 0; i < accumulator.getVecHistogram().size(); ++i){
465 vecStat.getVecRateQuantile()[i].push_back(accumulator.getVecHistogram()[i]*1e9 / rate);
466 }
467 return vecStat;
468}
469
471
476void BaseDaemon::fillDaemonStat(DaemonStat & stat, time_t startTimestamp, time_t endTimestamp){
477 // Fill the computing statistics
478 MapStatAccumulator & mapStatComputing = p_config.getDaemonStatAccumulator().getMapStatComputing();
479 for(MapStatAccumulator::iterator it = mapStatComputing.begin(); it != mapStatComputing.end(); ++it){
480 StatAccumulator & accumulator = it->second;
481 VecStat vecStat = fillVecStat(accumulator, startTimestamp, endTimestamp);
482 stat.getMapStatComputing()[it->first] = vecStat;
483 }
484
485 // Fill the communication statistics
486 MapDaemonStatAccumulator & mapStatCommunication = p_config.getDaemonStatAccumulator().getMapStatCommunication();
487 for(MapDaemonStatAccumulator::iterator itMap = mapStatCommunication.begin(); itMap != mapStatCommunication.end(); ++itMap){
488 const PString & destName = itMap->first;
489 std::map<PString, VecStat> & mapVecStat = stat.getMapStatCommunication()[destName];
490 for(MapStatAccumulator::iterator it = itMap->second.begin(); it != itMap->second.end(); ++it){
491 StatAccumulator & accumulator = it->second;
492 VecStat vecStat = fillVecStat(accumulator, startTimestamp, endTimestamp);
493 mapVecStat[it->first] = vecStat;
494 }
495 }
496}
497
std::map< PString, std::map< PString, StatAccumulator > > MapDaemonStatAccumulator
Definition BaseDaemon.h:38
std::map< PString, StatAccumulator > MapStatAccumulator
Definition BaseDaemon.h:39
Abstract function definition which will be callable in Daemon.
virtual bool call(PLog &log, const Data &data)=0
PLog p_log
Logger of the current Daemon.
Definition BaseDaemon.h:166
void clearCallableMethod()
Clear the map of callable methods.
bool p_isRun
True if the current BaseDaemon is running.
Definition BaseDaemon.h:168
void loadConfigFromNode(const ConfigNode &dico, const PString &daemonName)
Load configuration form a node of ConfigNode.
bool isDaemonExist(const PString &name) const
Say if a neighbour Daemon does exist.
OptionParser p_optionParser
Option parser of the Daemon.
Definition BaseDaemon.h:180
void updateStatAccumulator(StatAccumulator &stat, float value)
Update a computing statistic with a new value.
size_t p_messageId
Id counter of the message of the current Daemon.
Definition BaseDaemon.h:186
OptionParser & getOptionParser()
Return the OptionParser of the current BaseDaemon.
std::map< PString, StatAccumulator > createNewCommunicationStatMap(const PString &dataType, size_t nbBin, float histLowerBound, float histUpperBound)
Create a new map of communication statistic.
bool p_isFullMockRecord
True if the daemon has to be executed in mock record mode for socket and clock.
Definition BaseDaemon.h:172
bool getMessageToConfirm(Message &message, size_t id) const
Get a message to confirm by id if it exists.
VecStat fillVecStat(const StatAccumulator &accumulator, time_t startTimestamp, time_t endTimestamp)
Fill a VecStat from a StatAccumulator to send to the DamonStat.
bool processData(const Data &data)
Process given data with the proper method.
PLog & getLogger()
Get the logger of the current BaseDaemon.
bool load(const PString &configFileContent, const PString &daemonName, ConfigFormat::ConfigFormat format)
Load the Json configuration which define all BaseDaemons of the Swarm.
DaemonMainConfig p_mainConfig
Main configuration of the Daemon.
Definition BaseDaemon.h:160
bool p_isFullMock
True if the daemon has to be executed in mock mode for socket and clock.
Definition BaseDaemon.h:170
void initialisationBaseDaemon()
Initialisation function of the class BaseDaemon.
MapDaemonConfig & getMapDaemonConfig()
Get the map of all Daemon configurations.
DaemonConfig & getConfig()
Get the configuration of the current BaseDaemon.
bool callMethod(Data &result, const PString &name, const Data &parameter)
Call an added callable method by name.
std::map< PString, AbstractFunction * > p_mapCallableMethod
Map of callable method of the Daemon.
Definition BaseDaemon.h:182
DaemonMainConfig & getMainConfig()
Get the main configuration of the swarm.
void addMessageToConfirm(const Message &message)
Add a message to confirm.
virtual void addCallMethod()
Do the addCallableMethod here.
virtual bool extraLoad(const ConfigNode *config)
Extra call on load for the current Daemon.
AbstractDataFunction * getDataFunction(const Data &data)
Get the data function associated with the given data.
void fillDaemonStat(DaemonStat &stat, time_t startTimestamp, time_t endTimestamp)
Fill the DaemonStat with the current statistics of the daemon.
PLog & getLog()
Get the log of the current BaseDaemon.
void clearStat()
Clear all the statistics of the daemon.
void stop()
Stops the BaseDaemon.
std::map< PString, AbstractDataFunction * > p_mapDataFunction
Map of methods which have to be called when receiving data.
Definition BaseDaemon.h:189
void checkMessageTimeout(time_t currentTime)
Check if a message has reached the timeout.
DaemonConfig p_config
Configuration of the curent Daemon.
Definition BaseDaemon.h:162
MapDaemonConfig p_mapDaemon
Map of the other Daemon of the Swarm.
Definition BaseDaemon.h:164
size_t getMessageId()
Get current message id.
void getCommunicationStat(const PString &destName, const PString &dataType, float latency, size_t nbBin, float histLowerBound, float histUpperBound)
Add a communication statistic.
BaseDaemon()
Default constructor of BaseDaemon.
StatAccumulator createNewStat(size_t nbBin, float histLowerBound, float histUpperBound)
Create a new clear computing statistic.
std::map< size_t, Message > p_mapMessageToBeConfirmed
Map of messages which have to be confirmed by destination Daemon.
Definition BaseDaemon.h:184
const std::map< size_t, Message > & getMapMessageToBeConfirmed() const
Get the map of message to be confirmed.
void processConfirmedMessage(size_t id, time_t currentTime)
Process confirmed message.
virtual ~BaseDaemon()
Destructor of BaseDaemon.
bool parseArgument(int argc, char **argv)
Parse arguments given to the BaseDaemon with command line.
Describe a Daemon of the Swarm.
Statistics of a Daemon.
const std::map< PString, VecStat > & getMapStatComputing() const
Gets the mapStatComputing of the DaemonStat.
const std::map< PString, std::map< PString, VecStat > > & getMapStatCommunication() const
Gets the mapStatCommunication of the DaemonStat.
Basic Data exchanged in the swarm.
const PString & getType() const
Gets the type of the Data.
Message exchanged by Daemons.
const std::vector< PString > & getVecRecver() const
Gets the vecRecver of the Message.
const Data & getData() const
Gets the data of the Message.
size_t getId() const
Gets the id of the Message.
const time_t & getSendTime() const
Gets the sendTime of the Message.
Accumulator of event occurence to build swarm statistics over a time period.
float getHistUpperBound() const
Gets the histUpperBound of the StatAccumulator.
void setMin(float min)
Sets the min of the StatAccumulator.
float getSum() const
Gets the sum of the StatAccumulator.
void setVecHistogram(const std::vector< size_t > &vecHistogram)
Sets the vecHistogram of the StatAccumulator.
size_t getNbEvent() const
Gets the nbEvent of the StatAccumulator.
float getMax() const
Gets the max of the StatAccumulator.
size_t getNbEventAboveUpperBound() const
Gets the nbEventAboveUpperBound of the StatAccumulator.
float getMin() const
Gets the min of the StatAccumulator.
float getHistLowerBound() const
Gets the histLowerBound of the StatAccumulator.
void setHistUpperBound(float histUpperBound)
Sets the histUpperBound of the StatAccumulator.
void setMax(float max)
Sets the max of the StatAccumulator.
void setNbEventAboveUpperBound(size_t nbEventAboveUpperBound)
Sets the nbEventAboveUpperBound of the StatAccumulator.
void setHistLowerBound(float histLowerBound)
Sets the histLowerBound of the StatAccumulator.
void setNbEventBelowLowerBound(size_t nbEventBelowLowerBound)
Sets the nbEventBelowLowerBound of the StatAccumulator.
void setSum(float sum)
Sets the sum of the StatAccumulator.
size_t getNbEventBelowLowerBound() const
Gets the nbEventBelowLowerBound of the StatAccumulator.
const std::vector< size_t > & getVecHistogram() const
Gets the vecHistogram of the StatAccumulator.
void setNbEvent(size_t nbEvent)
Sets the nbEvent of the StatAccumulator.
General statistics in the swarm.
const std::vector< float > & getMax() const
Gets the max of the VecStat.
const std::vector< time_t > & getEndTimestamp() const
Gets the endTimestamp of the VecStat.
const std::vector< float > & getRate() const
Gets the rate of the VecStat.
const std::vector< time_t > & getStartTimestamp() const
Gets the startTimestamp of the VecStat.
const std::vector< float > & getAverage() const
Gets the average of the VecStat.
const std::vector< float > & getRateEventBelowLowerBound() const
Gets the rateEventBelowLowerBound of the VecStat.
const std::vector< float > & getRateEventAboveUpperBound() const
Gets the rateEventAboveUpperBound of the VecStat.
const std::vector< float > & getMin() const
Gets the min of the VecStat.
const std::vector< size_t > & getNbEvent() const
Gets the nbEvent of the VecStat.
const std::vector< std::vector< float > > & getVecRateQuantile() const
Gets the vecRateQuantile of the VecStat.
PString daemon_loadString(const ConfigNode &dico, const PString &attributeName)
Load a string value.
void daemon_load_config(PLog &log, ConfigNode &dico, const PString &inputConfig, ConfigFormat::ConfigFormat format)
Load the daemon config into a ConfigNode from a json string.
void daemon_read_configNode(DaemonConfig &daemonConfig, MapDaemonConfig &mapDaemon, PLog &log, MapTimeout &mapTimeout, const ConfigNode *&extraConfigParam, const ConfigNode &dico, const PString &daemonName)
Read the ConfigNode to initialise current Daemon.
ConfigFormat
Type of the Message which can be exchanged by Daemon.
std::map< PString, DaemonConfig > MapDaemonConfig
Main Daemon configuration which drives timeouts and flags of send and recv calls.
Definition BaseDaemon.h:42