PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
DaemonStat Class Reference

Statistics of a Daemon. More...

#include <Representation.h>

Public Member Functions

 DaemonStat ()
 Constructor of class DaemonStat.
 
 DaemonStat (const DaemonStat &other)
 Copy Constructor of class DaemonStat.
 
std::map< PString, std::map< PString, VecStat > > & getMapStatCommunication ()
 Gets the mapStatCommunication of the DaemonStat.
 
const std::map< PString, std::map< PString, VecStat > > & getMapStatCommunication () const
 Gets the mapStatCommunication of the DaemonStat.
 
std::map< PString, VecStat > & getMapStatComputing ()
 Gets the mapStatComputing of the DaemonStat.
 
const std::map< PString, VecStat > & getMapStatComputing () const
 Gets the mapStatComputing of the DaemonStat.
 
PString & getName ()
 Gets the name of the DaemonStat.
 
const PString & getName () const
 Gets the name of the DaemonStat.
 
DaemonStatoperator= (const DaemonStat &other)
 Operator = of class DaemonStat.
 
template<typename Stream, DataStreamMode::DataStreamMode Mode>
bool readWriteStream (Stream &ds)
 Load the current DaemonStat with a stream.
 
void setMapStatCommunication (const std::map< PString, std::map< PString, VecStat > > &mapStatCommunication)
 Sets the mapStatCommunication of the DaemonStat.
 
void setMapStatComputing (const std::map< PString, VecStat > &mapStatComputing)
 Sets the mapStatComputing of the DaemonStat.
 
void setName (const PString &name)
 Sets the name of the DaemonStat.
 
virtual ~DaemonStat ()
 Destructor of class DaemonStat.
 

Protected Member Functions

void copyDaemonStat (const DaemonStat &other)
 Copy Function of class DaemonStat.
 

Private Member Functions

void initialisationDaemonStat ()
 Initialisation Function of class DaemonStat.
 

Private Attributes

std::map< PString, std::map< PString, VecStat > > p_mapStatCommunication
 Map of the communication statistics (key: destination daemon name, value: {key: data type, value: vector of associated stats }.
 
std::map< PString, VecStatp_mapStatComputing
 Map of the computing statistics (key: stat name, value vector of stat)
 
PString p_name
 Name of the Daemon where the stats come from.
 

Detailed Description

Statistics of a Daemon.

Definition at line 367 of file Representation.h.

Constructor & Destructor Documentation

◆ DaemonStat() [1/2]

DaemonStat::DaemonStat ( )

Constructor of class DaemonStat.

Definition at line 846 of file Representation.cpp.

846 {
848}
void initialisationDaemonStat()
Initialisation Function of class DaemonStat.

References initialisationDaemonStat().

Referenced by copyDaemonStat(), DaemonStat(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~DaemonStat()

DaemonStat::~DaemonStat ( )
virtual

Destructor of class DaemonStat.

Definition at line 851 of file Representation.cpp.

851 {
852
853}

◆ DaemonStat() [2/2]

DaemonStat::DaemonStat ( const DaemonStat & other)

Copy Constructor of class DaemonStat.

Parameters
other: DaemonStat we want ot copy

Definition at line 858 of file Representation.cpp.

858 {
859 copyDaemonStat(other);
860}
void copyDaemonStat(const DaemonStat &other)
Copy Function of class DaemonStat.

References copyDaemonStat(), and DaemonStat().

+ Here is the call graph for this function:

Member Function Documentation

◆ copyDaemonStat()

void DaemonStat::copyDaemonStat ( const DaemonStat & other)
protected

Copy Function of class DaemonStat.

Parameters
other: DaemonStat we want ot copy

Definition at line 937 of file Representation.cpp.

937 {
938 p_name = other.p_name;
941}
std::map< PString, VecStat > p_mapStatComputing
Map of the computing statistics (key: stat name, value vector of stat)
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.

References DaemonStat(), p_mapStatCommunication, p_mapStatComputing, and p_name.

Referenced by DaemonStat(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMapStatCommunication() [1/2]

std::map< PString, std::map< PString, VecStat > > & DaemonStat::getMapStatCommunication ( )

Gets the mapStatCommunication of the DaemonStat.

Returns
mapStatCommunication of the DaemonStat

Definition at line 930 of file Representation.cpp.

930 {
932}

References p_mapStatCommunication.

◆ getMapStatCommunication() [2/2]

const std::map< PString, std::map< PString, VecStat > > & DaemonStat::getMapStatCommunication ( ) const

Gets the mapStatCommunication of the DaemonStat.

Returns
mapStatCommunication of the DaemonStat

Definition at line 923 of file Representation.cpp.

923 {
925}

References p_mapStatCommunication.

Referenced by CheckStream< DaemonStat >::check_stream(), and BaseDaemon::fillDaemonStat().

+ Here is the caller graph for this function:

◆ getMapStatComputing() [1/2]

std::map< PString, VecStat > & DaemonStat::getMapStatComputing ( )

Gets the mapStatComputing of the DaemonStat.

Returns
mapStatComputing of the DaemonStat

Definition at line 916 of file Representation.cpp.

916 {
917 return p_mapStatComputing;
918}

References p_mapStatComputing.

◆ getMapStatComputing() [2/2]

const std::map< PString, VecStat > & DaemonStat::getMapStatComputing ( ) const

Gets the mapStatComputing of the DaemonStat.

Returns
mapStatComputing of the DaemonStat

Definition at line 909 of file Representation.cpp.

909 {
910 return p_mapStatComputing;
911}

References p_mapStatComputing.

Referenced by CheckStream< DaemonStat >::check_stream(), and BaseDaemon::fillDaemonStat().

+ Here is the caller graph for this function:

◆ getName() [1/2]

PString & DaemonStat::getName ( )

Gets the name of the DaemonStat.

Returns
name of the DaemonStat

Definition at line 902 of file Representation.cpp.

902 {
903 return p_name;
904}

References p_name.

◆ getName() [2/2]

const PString & DaemonStat::getName ( ) const

Gets the name of the DaemonStat.

Returns
name of the DaemonStat

Definition at line 895 of file Representation.cpp.

895 {
896 return p_name;
897}

References p_name.

Referenced by CheckStream< DaemonStat >::check_stream(), and StatDaemonManager< _TBackend >::fillStatInfo().

+ Here is the caller graph for this function:

◆ initialisationDaemonStat()

void DaemonStat::initialisationDaemonStat ( )
private

Initialisation Function of class DaemonStat.

Definition at line 944 of file Representation.cpp.

944 {
945 p_name = "";
946}

References p_name.

Referenced by DaemonStat().

+ Here is the caller graph for this function:

◆ operator=()

DaemonStat & DaemonStat::operator= ( const DaemonStat & other)

Operator = of class DaemonStat.

Parameters
other: DaemonStat we want ot copy
Returns
copied class DaemonStat

Definition at line 866 of file Representation.cpp.

866 {
867 copyDaemonStat(other);
868 return *this;
869}

References copyDaemonStat(), and DaemonStat().

+ Here is the call graph for this function:

◆ readWriteStream()

template<typename Stream, DataStreamMode::DataStreamMode Mode>
bool DaemonStat::readWriteStream ( Stream & ds)
inline

Load the current DaemonStat with a stream.

Parameters
[out]ds: stream to be used
Returns
true on success, false otherwise

Definition at line 388 of file Representation.h.

388 {
389 bool b(true);
390 b &= DataStream<Stream, Mode, PString >::data_stream(ds, p_name);
391 b &= DataStream<Stream, Mode, std::map<PString, VecStat > >::data_stream(ds, p_mapStatComputing);
392 b &= DataStream<Stream, Mode, std::map<PString, std::map<PString, VecStat > > >::data_stream(ds, p_mapStatCommunication);
393 return b;
394 }

References p_mapStatCommunication, p_mapStatComputing, and p_name.

Referenced by DataStream< Stream, Mode, DaemonStat >::data_stream().

+ Here is the caller graph for this function:

◆ setMapStatCommunication()

void DaemonStat::setMapStatCommunication ( const std::map< PString, std::map< PString, VecStat > > & mapStatCommunication)

Sets the mapStatCommunication of the DaemonStat.

Parameters
mapStatCommunication: mapStatCommunication of the DaemonStat

Definition at line 888 of file Representation.cpp.

888 {
889 p_mapStatCommunication = mapStatCommunication;
890}

References p_mapStatCommunication.

◆ setMapStatComputing()

void DaemonStat::setMapStatComputing ( const std::map< PString, VecStat > & mapStatComputing)

Sets the mapStatComputing of the DaemonStat.

Parameters
mapStatComputing: mapStatComputing of the DaemonStat

Definition at line 881 of file Representation.cpp.

881 {
882 p_mapStatComputing = mapStatComputing;
883}

References p_mapStatComputing.

◆ setName()

void DaemonStat::setName ( const PString & name)

Sets the name of the DaemonStat.

Parameters
name: name of the DaemonStat

Definition at line 874 of file Representation.cpp.

874 {
875 p_name = name;
876}

References p_name.

Referenced by Daemon< _TBackend >::sendStatToStatDaemon().

+ Here is the caller graph for this function:

Member Data Documentation

◆ p_mapStatCommunication

std::map<PString, std::map<PString, VecStat > > DaemonStat::p_mapStatCommunication
private

Map of the communication statistics (key: destination daemon name, value: {key: data type, value: vector of associated stats }.

Definition at line 405 of file Representation.h.

Referenced by copyDaemonStat(), getMapStatCommunication(), getMapStatCommunication(), readWriteStream(), and setMapStatCommunication().

◆ p_mapStatComputing

std::map<PString, VecStat > DaemonStat::p_mapStatComputing
private

Map of the computing statistics (key: stat name, value vector of stat)

Definition at line 403 of file Representation.h.

Referenced by copyDaemonStat(), getMapStatComputing(), getMapStatComputing(), readWriteStream(), and setMapStatComputing().

◆ p_name

PString DaemonStat::p_name
private

Name of the Daemon where the stats come from.

Definition at line 401 of file Representation.h.

Referenced by copyDaemonStat(), getName(), getName(), initialisationDaemonStat(), readWriteStream(), and setName().


The documentation for this class was generated from the following files: