The StatisticRegistrar allows NEM layers to register statistics and statistic tables. Statistics and Statistic tables are owned by the emulator framework and a borrowed reference is returned to the registering NEM layer.
More...
#include <statisticregistrar.h>
|
| virtual | ~StatisticRegistrar () |
| |
| template<typename T > |
| StatisticNumeric< T > * | registerNumeric (const std::string &sName, const StatisticProperties &properties=StatisticProperties::NONE, const std::string &sDescription="") |
| |
| template<typename T > |
| StatisticNonNumeric< T > * | registerNonNumeric (const std::string &sName, const StatisticProperties &properties=StatisticProperties::NONE, const std::string &sDescription="") |
| |
| template<typename Key , typename Compare = std::less<EMANE::Any>, std::size_t scolumn = 0> |
| StatisticTable< Key, Compare, scolumn > * | registerTable (const std::string &sName, const StatisticTableLabels &labels, const StatisticProperties &properties=StatisticProperties::NONE, const std::string &sDescription="") |
| |
| template<typename Key , typename Function , typename Compare = std::less<EMANE::Any>, std::size_t scolumn = 0> |
| StatisticTable< Key, Compare, scolumn > * | registerTable (const std::string &sName, const StatisticTableLabels &labels, Function clearFunc, const std::string &sDescription="") |
| |
| template<typename T > |
| EMANE::StatisticNumeric< T > * | registerNumeric (const std::string &sName, const StatisticProperties &properties, const std::string &sDescription) |
| |
| template<typename T > |
| EMANE::StatisticNonNumeric< T > * | registerNonNumeric (const std::string &sName, const StatisticProperties &properties, const std::string &sDescription) |
| |
| template<typename Key , typename Compare , std::size_t scolumn> |
| EMANE::StatisticTable< Key, Compare, scolumn > * | registerTable (const std::string &sName, const StatisticTableLabels &labels, const StatisticProperties &properties, const std::string &sDescription) |
| |
| template<typename Key , typename Function , typename Compare , std::size_t scolumn> |
| EMANE::StatisticTable< Key, Compare, scolumn > * | registerTable (const std::string &sName, const StatisticTableLabels &labels, Function clearFunc, const std::string &sDescription) |
| |
The StatisticRegistrar allows NEM layers to register statistics and statistic tables. Statistics and Statistic tables are owned by the emulator framework and a borrowed reference is returned to the registering NEM layer.
- Note
- Registration may only occur during Component::initialize()
Definition at line 59 of file statisticregistrar.h.
◆ ~StatisticRegistrar()
| virtual EMANE::StatisticRegistrar::~StatisticRegistrar |
( |
| ) |
|
|
inlinevirtual |
◆ registerNonNumeric() [1/2]
◆ registerNonNumeric() [2/2]
Register a non-numeric statistic. The registered statistic is owned by the StatisticRegistrar.
- Parameters
-
| sName | Name of the statistic |
| properties | Statistic properties |
| sDescription | Statistic description |
- Returns
- A borrowed reference to the statistic that may be used during the lifetime of the registered component.
- Exceptions
-
◆ registerNumeric() [1/2]
◆ registerNumeric() [2/2]
Register a numeric statistic. The registered statistic is owned by the StatisticRegistrar.
- Parameters
-
| sName | Name of the statistic |
| properties | Statistic properties |
| sDescription | Statistic description |
- Returns
- A borrowed reference to the statistic that may be used during the lifetime of the registered component.
- Exceptions
-
◆ registerStatistic()
| virtual void EMANE::StatisticRegistrar::registerStatistic |
( |
const std::string & |
sName, |
|
|
Any::Type |
type, |
|
|
const StatisticProperties & |
properties, |
|
|
const std::string & |
sDescription, |
|
|
Statistic * |
pStatistic |
|
) |
| |
|
protectedpure virtual |
Register a statistic and take ownership
- Parameters
-
| sName | Name of the statistic |
| type | Any type of the statistic |
| properties | Statistic propertied |
| sDescription | Statistic description |
| pStatistic | Pointer to the statistic |
- Exceptions
-
◆ registerTable() [1/4]
template<typename Key , typename Compare , std::size_t scolumn>
◆ registerTable() [2/4]
template<typename Key , typename Function , typename Compare , std::size_t scolumn>
| EMANE::StatisticTable<Key,Compare,scolumn>* EMANE::StatisticRegistrar::registerTable |
( |
const std::string & |
sName, |
|
|
const StatisticTableLabels & |
labels, |
|
|
Function |
clearFunc, |
|
|
const std::string & |
sDescription |
|
) |
| |
◆ registerTable() [3/4]
template<typename Key , typename Compare = std::less<EMANE::Any>, std::size_t scolumn = 0>
Register a statistic table. The registered statistic table is owned by the StatisticRegistrar.
- Template Parameters
-
| Key | Type of the keys. Each row in the table is uniquely identified by its key value |
| Compare | A binary predicate that takes two element keys as arguments and returns a bool |
| scolumn | The column used when sorting the table using Compare |
- Parameters
-
| sName | Name of the statistic table |
| labels | Table column labels |
| properties | Table properties |
| sDescription | Statistic table description |
- Returns
- A borrowed reference to the statistic table that may be used during the lifetime of the registered component.
- Exceptions
-
◆ registerTable() [4/4]
template<typename Key , typename Function , typename Compare = std::less<EMANE::Any>, std::size_t scolumn = 0>
| StatisticTable<Key,Compare,scolumn>* EMANE::StatisticRegistrar::registerTable |
( |
const std::string & |
sName, |
|
|
const StatisticTableLabels & |
labels, |
|
|
Function |
clearFunc, |
|
|
const std::string & |
sDescription = "" |
|
) |
| |
Register a statistic table. The registered statistic table is owned by the StatisticRegistrar.
- Template Parameters
-
| Key | Type of the keys. Each row in the table is uniquely identified by its key value |
| Function | A function that takes a pointer to the statistic table and that is called when the table is cleared |
| Compare | A binary predicate that takes two element keys as arguments and returns a bool |
| scolumn | The column used when sorting the table using Compare |
- Parameters
-
| sName | Name of the statistic table |
| labels | Table column labels |
| clearFunc | Function called when table clear is requested |
| sDescription | Statistic table description |
- Returns
- A borrowed reference to the statistic table that may be used during the lifetime of the registered component.
- Exceptions
-
- Note
- The specified clear function is called on an internal emulator framework thread a synchronization object will most likely me needed to avoid race conditions. The function is responsible for clearing the statistic table.
◆ registerTablePublisher()
Register a statistic table publisher and take ownership
- Parameters
-
| sName | Name of the statistic table |
| properties | Table properties |
| sDescription | Statistic table description |
| pStatiticTablePublisher | Pointer to the statistic table publisher |
| clearFunc | Function called when table clear is requested |
- Exceptions
-
The documentation for this class was generated from the following files: