27 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Data::name", data.
getName(), reference.
getName(), out);
28 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Data::description", data.
getDescription(), reference.
getDescription(), out);
29 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Data::type", data.
getType(), reference.
getType(), out);
30 b &= CheckStream<DataStreamMsg>::check_stream(fieldDescription +
"\n- Data::value", data.
getValue(), reference.
getValue(), out);
179 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Function::name", data.
getName(), reference.
getName(), out);
180 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Function::description", data.
getDescription(), reference.
getDescription(), out);
330 b &= CheckStream<time_t>::check_stream(fieldDescription +
"\n- Message::sendTime", data.
getSendTime(), reference.
getSendTime(), out);
331 b &= CheckStream<size_t>::check_stream(fieldDescription +
"\n- Message::id", data.
getId(), reference.
getId(), out);
333 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- Message::sender", data.
getSender(), reference.
getSender(), out);
335 b &= CheckStream<MessageType::MessageType>::check_stream(fieldDescription +
"\n- Message::type", data.
getType(), reference.
getType(), out);
554 b &= CheckStream<std::vector<float>>
::check_stream(fieldDescription +
"\n- VecStat::min", data.
getMin(), reference.
getMin(), out);
555 b &= CheckStream<std::vector<float>>
::check_stream(fieldDescription +
"\n- VecStat::max", data.
getMax(), reference.
getMax(), out);
838 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- DaemonStat::name", data.
getName(), reference.
getName(), out);
953 return "StatAccumulator";
965 b &= CheckStream<size_t>::check_stream(fieldDescription +
"\n- StatAccumulator::nbEvent", data.
getNbEvent(), reference.
getNbEvent(), out);
966 b &= CheckStream<float>::check_stream(fieldDescription +
"\n- StatAccumulator::sum", data.
getSum(), reference.
getSum(), out);
967 b &= CheckStream<float>::check_stream(fieldDescription +
"\n- StatAccumulator::min", data.
getMin(), reference.
getMin(), out);
968 b &= CheckStream<float>::check_stream(fieldDescription +
"\n- StatAccumulator::max", data.
getMax(), reference.
getMax(), out);
1225 return "DaemonStatAccumulator";
1328 return "DaemonConfig";
1340 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- DaemonConfig::hostName", data.
getHostName(), reference.
getHostName(), out);
1342 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- DaemonConfig::name", data.
getName(), reference.
getName(), out);
1343 b &= CheckStream<PString>::check_stream(fieldDescription +
"\n- DaemonConfig::description", data.
getDescription(), reference.
getDescription(), out);
1345 b &= CheckStream<size_t>::check_stream(fieldDescription +
"\n- DaemonConfig::statNbBin", data.
getStatNbBin(), reference.
getStatNbBin(), out);
std::string phoenix_getTypeName< StatAccumulator >()
Get the name of the class StatAccumulator for PhoenixTypeStream.
std::string phoenix_getTypeName< VecStat >()
Get the name of the class VecStat for PhoenixTypeStream.
std::string phoenix_getTypeName< DaemonStatAccumulator >()
Get the name of the class DaemonStatAccumulator for PhoenixTypeStream.
std::string phoenix_getTypeName< Function >()
Get the name of the class Function for PhoenixTypeStream.
std::string phoenix_getTypeName< Data >()
Get the name of the class Data for PhoenixTypeStream.
std::string phoenix_getTypeName< Message >()
Get the name of the class Message for PhoenixTypeStream.
std::string phoenix_getTypeName< DaemonConfig >()
Get the name of the class DaemonConfig for PhoenixTypeStream.
std::string phoenix_getTypeName< DaemonStat >()
Get the name of the class DaemonStat for PhoenixTypeStream.
Describe a Daemon of the Swarm.
const PString & getName() const
Gets the name of the DaemonConfig.
float p_statHistLowerBound
Lower bound for the histogram of the communication statistics.
DaemonConfig()
Constructor of class DaemonConfig.
DaemonConfig & operator=(const DaemonConfig &other)
Operator = of class DaemonConfig.
size_t getStatNbBin() const
Gets the statNbBin of the DaemonConfig.
size_t p_statNbBin
Number of bin for the histogram of the communication statistics.
void setDescription(const PString &description)
Sets the description of the DaemonConfig.
const time_t & getStatTimerPeriodMs() const
Gets the statTimerPeriodMs of the DaemonConfig.
PString p_description
Description of the Daemon.
const DaemonStatAccumulator & getDaemonStatAccumulator() const
Gets the daemonStatAccumulator of the DaemonConfig.
size_t p_receivingPort
Port which is used by the Daemon to receive messages.
const PString & getStatDaemonName() const
Gets the statDaemonName of the DaemonConfig.
float p_statHistUpperBound
Upper bound for the histogram of the communication statistics.
PString p_hostName
Name of the host where the daemon is running.
const PString & getDescription() const
Gets the description of the DaemonConfig.
void setStatHistLowerBound(float statHistLowerBound)
Sets the statHistLowerBound of the DaemonConfig.
const std::map< PString, time_t > & getMapTimeout() const
Gets the mapTimeout of the DaemonConfig.
DaemonStatAccumulator p_daemonStatAccumulator
Accumulator used to create statistics of the current Daemon.
void setDaemonStatAccumulator(const DaemonStatAccumulator &daemonStatAccumulator)
Sets the daemonStatAccumulator of the DaemonConfig.
virtual ~DaemonConfig()
Destructor of class DaemonConfig.
void setStatHistUpperBound(float statHistUpperBound)
Sets the statHistUpperBound of the DaemonConfig.
std::map< PString, time_t > p_mapTimeout
Map of the timeout for each daemon in the configuration file.
float getStatHistLowerBound() const
Gets the statHistLowerBound of the DaemonConfig.
void setReceivingPort(size_t receivingPort)
Sets the receivingPort of the DaemonConfig.
void setName(const PString &name)
Sets the name of the DaemonConfig.
PString p_name
Name of the Daemon.
void setStatDaemonName(const PString &statDaemonName)
Sets the statDaemonName of the DaemonConfig.
float getStatHistUpperBound() const
Gets the statHistUpperBound of the DaemonConfig.
const PString & getHostName() const
Gets the hostName of the DaemonConfig.
void copyDaemonConfig(const DaemonConfig &other)
Copy Function of class DaemonConfig.
size_t getReceivingPort() const
Gets the receivingPort of the DaemonConfig.
void initialisationDaemonConfig()
Initialisation Function of class DaemonConfig.
time_t p_statTimerPeriodMs
Period (in ms) to send statistics to the stat daemon.
PString p_statDaemonName
Name of the Daemon which is used to gather statistics of the swarm (empty if no stat daemon is used)
void setHostName(const PString &hostName)
Sets the hostName of the DaemonConfig.
void setStatTimerPeriodMs(const time_t &statTimerPeriodMs)
Sets the statTimerPeriodMs of the DaemonConfig.
void setMapTimeout(const std::map< PString, time_t > &mapTimeout)
Sets the mapTimeout of the DaemonConfig.
void setStatNbBin(size_t statNbBin)
Sets the statNbBin of the DaemonConfig.
Accumulator of all events occurence on a Daemon (processing functions and communication latencies) to...
void initialisationDaemonStatAccumulator()
Initialisation Function of class DaemonStatAccumulator.
const std::map< PString, StatAccumulator > & getMapStatComputing() const
Gets the mapStatComputing of the DaemonStatAccumulator.
const std::map< PString, std::map< PString, StatAccumulator > > & getMapStatCommunication() const
Gets the mapStatCommunication of the DaemonStatAccumulator.
std::map< PString, StatAccumulator > p_mapStatComputing
Map of the computing statistics (key: stat name, value vector of stat)
std::map< PString, std::map< PString, StatAccumulator > > p_mapStatCommunication
Map of the communication statistics (key: destination daemon name, value: {key: data type,...
DaemonStatAccumulator & operator=(const DaemonStatAccumulator &other)
Operator = of class DaemonStatAccumulator.
void setMapStatComputing(const std::map< PString, StatAccumulator > &mapStatComputing)
Sets the mapStatComputing of the DaemonStatAccumulator.
DaemonStatAccumulator()
Constructor of class DaemonStatAccumulator.
void setMapStatCommunication(const std::map< PString, std::map< PString, StatAccumulator > > &mapStatCommunication)
Sets the mapStatCommunication of the DaemonStatAccumulator.
void copyDaemonStatAccumulator(const DaemonStatAccumulator &other)
Copy Function of class DaemonStatAccumulator.
virtual ~DaemonStatAccumulator()
Destructor of class DaemonStatAccumulator.
void setName(const PString &name)
Sets the name of the DaemonStat.
std::map< PString, VecStat > p_mapStatComputing
Map of the computing statistics (key: stat name, value vector of stat)
const std::map< PString, VecStat > & getMapStatComputing() const
Gets the mapStatComputing of the DaemonStat.
std::map< PString, std::map< PString, VecStat > > p_mapStatCommunication
Map of the communication statistics (key: destination daemon name, value: {key: data type,...
PString p_name
Name of the Daemon where the stats come from.
virtual ~DaemonStat()
Destructor of class DaemonStat.
const std::map< PString, std::map< PString, VecStat > > & getMapStatCommunication() const
Gets the mapStatCommunication of the DaemonStat.
void setMapStatCommunication(const std::map< PString, std::map< PString, VecStat > > &mapStatCommunication)
Sets the mapStatCommunication of the DaemonStat.
const PString & getName() const
Gets the name of the DaemonStat.
void setMapStatComputing(const std::map< PString, VecStat > &mapStatComputing)
Sets the mapStatComputing of the DaemonStat.
void initialisationDaemonStat()
Initialisation Function of class DaemonStat.
DaemonStat & operator=(const DaemonStat &other)
Operator = of class DaemonStat.
void copyDaemonStat(const DaemonStat &other)
Copy Function of class DaemonStat.
DaemonStat()
Constructor of class DaemonStat.
Basic Data exchanged in the swarm.
void initialisationData()
Initialisation Function of class Data.
void setValue(const DataStreamMsg &value)
Sets the value of the Data.
PString p_description
Description of the Data.
const PString & getDescription() const
Gets the description of the Data.
void setType(const PString &type)
Sets the type of the Data.
const PString & getType() const
Gets the type of the Data.
virtual ~Data()
Destructor of class Data.
const DataStreamMsg & getValue() const
Gets the value of the Data.
PString p_name
Name of the Data.
Data & operator=(const Data &other)
Operator = of class Data.
void setDescription(const PString &description)
Sets the description of the Data.
const PString & getName() const
Gets the name of the Data.
void copyData(const Data &other)
Copy Function of class Data.
PString p_type
Type of the Data.
DataStreamMsg p_value
Value of the Data.
void setName(const PString &name)
Sets the name of the Data.
Data()
Constructor of class Data.
Basic function which can be called from an other Daemon.
const std::vector< Data > & getVecParam() const
Gets the vecParam of the Function.
const PString & getName() const
Gets the name of the Function.
PString p_description
Description of the Function.
virtual ~Function()
Destructor of class Function.
void copyFunction(const Function &other)
Copy Function of class Function.
void setName(const PString &name)
Sets the name of the Function.
Data p_returnValue
Return value of the Function.
Function & operator=(const Function &other)
Operator = of class Function.
void setVecParam(const std::vector< Data > &vecParam)
Sets the vecParam of the Function.
std::vector< Data > p_vecParam
Vector of parameters of the Function.
void setReturnValue(const Data &returnValue)
Sets the returnValue of the Function.
const Data & getReturnValue() const
Gets the returnValue of the Function.
void setDescription(const PString &description)
Sets the description of the Function.
void initialisationFunction()
Initialisation Function of class Function.
const PString & getDescription() const
Gets the description of the Function.
Function()
Constructor of class Function.
PString p_name
Name of the Function.
Message exchanged by Daemons.
MessageType::MessageType p_type
Type of the message.
const PString & getSender() const
Gets the sender of the Message.
void setVecRecver(const std::vector< PString > &vecRecver)
Sets the vecRecver of the Message.
Data p_data
Data in the message.
bool p_isConfirmationNeeded
True if the MESSAGE_CONFIRMATION is needed.
virtual ~Message()
Destructor of class Message.
std::vector< PString > p_vecRecver
Addresses of Daemons which receive the message.
Message & operator=(const Message &other)
Operator = of class Message.
void copyMessage(const Message &other)
Copy Function of class Message.
Message()
Constructor of class Message.
PString p_sender
Address of the Daemon which sends the message.
void setType(const MessageType::MessageType &type)
Sets the type of the Message.
const std::vector< PString > & getVecRecver() const
Gets the vecRecver of the Message.
time_t p_sendTime
Time when the message was sent.
void setSendTime(const time_t &sendTime)
Sets the sendTime of the Message.
void initialisationMessage()
Initialisation Function of class Message.
void setSender(const PString &sender)
Sets the sender of the Message.
const Data & getData() const
Gets the data of the Message.
size_t getId() const
Gets the id of the Message.
bool getIsConfirmationNeeded() const
Gets the isConfirmationNeeded of the Message.
void setIsConfirmationNeeded(bool isConfirmationNeeded)
Sets the isConfirmationNeeded of the Message.
void setId(size_t id)
Sets the id of the Message.
const MessageType::MessageType & getType() const
Gets the type of the Message.
const time_t & getSendTime() const
Gets the sendTime of the Message.
void setData(const Data &data)
Sets the data of the Message.
size_t p_id
Id of the message (will be usefull to trigger method when a transmission is confirmed)
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.
float p_min
Minimum value of the stat.
void initialisationStatAccumulator()
Initialisation Function of class 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.
size_t p_nbEventBelowLowerBound
Number of events below the lower bound.
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.
StatAccumulator & operator=(const StatAccumulator &other)
Operator = of class StatAccumulator.
float p_histLowerBound
Minimum value in the histogram.
float p_max
Maximum value of the stat.
StatAccumulator()
Constructor of class StatAccumulator.
void copyStatAccumulator(const StatAccumulator &other)
Copy Function of class StatAccumulator.
void setNbEventAboveUpperBound(size_t nbEventAboveUpperBound)
Sets the nbEventAboveUpperBound of the StatAccumulator.
float p_histUpperBound
Maximum value in the histogram.
void setHistLowerBound(float histLowerBound)
Sets the histLowerBound of the StatAccumulator.
size_t p_nbEventAboveUpperBound
Number of events above the upper boundary.
size_t p_nbEvent
Number of events used to make this statistic.
virtual ~StatAccumulator()
Destructor of class StatAccumulator.
void setNbEventBelowLowerBound(size_t nbEventBelowLowerBound)
Sets the nbEventBelowLowerBound of the StatAccumulator.
float p_sum
Sum of all values.
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.
std::vector< size_t > p_vecHistogram
Histogram to acccumulate event counts per quantile.
void setNbEvent(size_t nbEvent)
Sets the nbEvent of the StatAccumulator.
General statistics in the swarm.
void setVecRateQuantile(const std::vector< std::vector< float > > &vecRateQuantile)
Sets the vecRateQuantile of the VecStat.
std::vector< time_t > p_endTimestamp
Timestamp where this stat was finished to be accumulated by the clock of the current daemon (TODO: ne...
std::vector< float > p_max
Maximum value of the stat.
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.
void setEndTimestamp(const std::vector< time_t > &endTimestamp)
Sets the endTimestamp of the VecStat.
void setMin(const std::vector< float > &min)
Sets the min of the VecStat.
const std::vector< float > & getRate() const
Gets the rate of the VecStat.
std::vector< float > p_rateEventAboveUpperBound
Number of events above the upper boundary per second.
void setNbEvent(const std::vector< size_t > &nbEvent)
Sets the nbEvent of the VecStat.
void setStartTimestamp(const std::vector< time_t > &startTimestamp)
Sets the startTimestamp of the VecStat.
void setRateEventAboveUpperBound(const std::vector< float > &rateEventAboveUpperBound)
Sets the rateEventAboveUpperBound of the VecStat.
void setRate(const std::vector< float > &rate)
Sets the rate of the VecStat.
VecStat & operator=(const VecStat &other)
Operator = of class VecStat.
const std::vector< time_t > & getStartTimestamp() const
Gets the startTimestamp of the VecStat.
std::vector< float > p_rateEventBelowLowerBound
Number of events below the lower boundary per second.
std::vector< float > p_min
Minimum value of the stat.
virtual ~VecStat()
Destructor of class VecStat.
std::vector< float > p_average
Mean of the stat.
const std::vector< float > & getAverage() const
Gets the average of the VecStat.
const std::vector< float > & getRateEventBelowLowerBound() const
Gets the rateEventBelowLowerBound of the VecStat.
std::vector< time_t > p_startTimestamp
Timestamp where this stat started to be accumulated by the clock of the current daemon (TODO: need un...
const std::vector< float > & getRateEventAboveUpperBound() const
Gets the rateEventAboveUpperBound of the VecStat.
std::vector< float > p_rate
Number of events per second.
std::vector< std::vector< float > > p_vecRateQuantile
Vector of binned event rate per quantile (quartile decile, etc)
std::vector< size_t > p_nbEvent
Number of events used to make this statistic.
const std::vector< float > & getMin() const
Gets the min of the VecStat.
void setRateEventBelowLowerBound(const std::vector< float > &rateEventBelowLowerBound)
Sets the rateEventBelowLowerBound of the VecStat.
void copyVecStat(const VecStat &other)
Copy Function of class VecStat.
VecStat()
Constructor of class VecStat.
void initialisationVecStat()
Initialisation Function of class 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.
void setMax(const std::vector< float > &max)
Sets the max of the VecStat.
void setAverage(const std::vector< float > &average)
Sets the average of the VecStat.
MessageType
Type of the Message which can be exchanged by Daemon.
static bool check_stream(const std::string &fieldDescription, const DaemonConfig &data, const DaemonConfig &reference, std::ostream &out)
Check Stream for a DaemonConfig.
static bool check_stream(const std::string &fieldDescription, const DaemonStatAccumulator &data, const DaemonStatAccumulator &reference, std::ostream &out)
Check Stream for a DaemonStatAccumulator.
static bool check_stream(const std::string &fieldDescription, const DaemonStat &data, const DaemonStat &reference, std::ostream &out)
Check Stream for a DaemonStat.
static bool check_stream(const std::string &fieldDescription, const Data &data, const Data &reference, std::ostream &out)
Check Stream for a Data.
static bool check_stream(const std::string &fieldDescription, const Function &data, const Function &reference, std::ostream &out)
Check Stream for a Function.
static bool check_stream(const std::string &fieldDescription, const Message &data, const Message &reference, std::ostream &out)
Check Stream for a Message.
static bool check_stream(const std::string &fieldDescription, const StatAccumulator &data, const StatAccumulator &reference, std::ostream &out)
Check Stream for a StatAccumulator.
static bool check_stream(const std::string &fieldDescription, const VecStat &data, const VecStat &reference, std::ostream &out)
Check Stream for a VecStat.