Defines auxiliary information associated with each counter registered with ComponentMetricsIf.
More...
#include <rtctk/componentFramework/componentMetricsIf.hpp>
|
| | CounterMetricInfo (std::string id, std::string description) noexcept |
| | Construct instance.
|
| |
| | CounterMetricInfo (std::string id, std::string description, std::string field_name, std::string unit="") noexcept |
| | Construct instance.
|
| |
| | CounterMetricInfo (std::string id, std::string description, InfluxTagMap tag_map) noexcept |
| | Construct instance.
|
| |
| | CounterMetricInfo (std::string id, std::string description, InfluxTagMap tag_map, std::string field_name, std::string unit="") noexcept |
| | Construct instance.
|
| |
| const std::string & | GetId () const noexcept |
| |
| const std::string & | GetDescription () const noexcept |
| |
| const InfluxTagMap & | GetTagMap () const noexcept |
| |
| const std::string & | GetFieldName () const noexcept |
| |
| const std::string & | GetUnit () const noexcept |
| |
Defines auxiliary information associated with each counter registered with ComponentMetricsIf.
Properties:
- Id: String in the character class
[0-9a-z] associates uniquely a logical counter instance.
- Description: String describing what the counter value represents.
- InfluxTagMap: map of strings for defition of tags (InfluxDB)
- FieldName: name for the field where the value will be saved (InfluxDB)
◆ CounterMetricInfo() [1/4]
| rtctk::componentFramework::CounterMetricInfo::CounterMetricInfo |
( |
std::string | id, |
|
|
std::string | description ) |
|
explicitnoexcept |
Construct instance.
This overload is intended for the simplest case where the metric has no associated InfluxDB tags and no explicitly defined field name. The field name is automatically set to the metric ID.
- Parameters
-
| id | counter identifier. |
| description | counter description. |
◆ CounterMetricInfo() [2/4]
| rtctk::componentFramework::CounterMetricInfo::CounterMetricInfo |
( |
std::string | id, |
|
|
std::string | description, |
|
|
std::string | field_name, |
|
|
std::string | unit = "" ) |
|
explicitnoexcept |
Construct instance.
Use this overload when the metric should be written under a different InfluxDB field name than its ID. No tags are provided in this variant.
- Parameters
-
| id | counter identifier. |
| description | counter description. |
| field_name | name of the field used when writing data to InfluxDB. |
| unit | abbreviated physical unit e.g. hz for hertz. |
◆ CounterMetricInfo() [3/4]
| rtctk::componentFramework::CounterMetricInfo::CounterMetricInfo |
( |
std::string | id, |
|
|
std::string | description, |
|
|
InfluxTagMap | tag_map ) |
|
explicitnoexcept |
Construct instance.
This overload allows user to add a tags (InfluxDB tags). Since the user does not provide a field name, it is automatically set to id.
- Parameters
-
| id | counter identifier. |
| description | counter description. |
| tag_map | map of tags: string–string pairs for InfluxDB. |
◆ CounterMetricInfo() [4/4]
| rtctk::componentFramework::CounterMetricInfo::CounterMetricInfo |
( |
std::string | id, |
|
|
std::string | description, |
|
|
InfluxTagMap | tag_map, |
|
|
std::string | field_name, |
|
|
std::string | unit = "" ) |
|
explicitnoexcept |
Construct instance.
Use this overload when both tags and a custom InfluxDB field name are required.
- Parameters
-
| id | counter identifier. |
| description | counter description. |
| tag_map | map of tags: string–string pairs for InfluxDB. |
| field_name | name of the field used when writing data to InfluxDB. |
| unit | abbreviated physical unit e.g. hz for hertz. |
◆ GetDescription()
| const std::string & rtctk::componentFramework::CounterMetricInfo::GetDescription |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- counter description.
◆ GetFieldName()
| const std::string & rtctk::componentFramework::CounterMetricInfo::GetFieldName |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- name of field for InfluxDB.
◆ GetId()
| const std::string & rtctk::componentFramework::CounterMetricInfo::GetId |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- counter identifier.
◆ GetTagMap()
| const InfluxTagMap & rtctk::componentFramework::CounterMetricInfo::GetTagMap |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- tags for InfluxDB.
◆ GetUnit()
| const std::string & rtctk::componentFramework::CounterMetricInfo::GetUnit |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- unit for InfluxDB and OLDB metadata.
The documentation for this class was generated from the following files: