xronos-sdk 0.2.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::Metric Class Referencefinal

Allows recording values to an external data base from reaction handlers. More...

#include <xronos/sdk/metric.hh>

Inheritance diagram for xronos::sdk::Metric:
[legend]

Public Member Functions

 Metric (std::string_view name, ReactorContext context, std::string_view description, std::string_view unit="")
 Construct a new Metric.
 
auto description () const noexcept -> const std::string &
 Description of the Metric.
 
auto unit () const noexcept -> const std::string &
 Unit of the Metric.
 
- Public Member Functions inherited from xronos::sdk::Element
auto name () const noexcept -> const std::string &
 The name of the current element.
 
auto fqn () const noexcept -> const std::string &
 The fully qualified name of the current element.
 

Detailed Description

Allows recording values to an external data base from reaction handlers.

Constructor & Destructor Documentation

◆ Metric()

xronos::sdk::Metric::Metric ( std::string_view name,
ReactorContext context,
std::string_view description,
std::string_view unit = "" )

Construct a new Metric.

Parameters
nameThe name of the Metric.
contextThe context object obtained from the Metric's containing reactor.
descriptionA description of the Metric.
unitThe unit of the Metric.

Member Function Documentation

◆ description()

auto xronos::sdk::Metric::description ( ) const -> const std::string &
nodiscardnoexcept

Description of the Metric.

Returns
std::string_view The description of the Metric.

◆ unit()

auto xronos::sdk::Metric::unit ( ) const -> const std::string &
nodiscardnoexcept

Unit of the Metric.

Returns
const std::string& The unit of the Metric.

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