xronos-sdk 0.5.0
Xronos C++ SDK
Loading...
Searching...
No Matches
xronos::sdk::BaseReaction::MetricEffect Class Reference

Allows a reaction to record telemetry data using a given Metric. More...

#include <xronos/sdk/reaction.hh>

Public Member Functions

 MetricEffect (Metric &metric, ReactionContext context)
 Constructor.
void record (double value) noexcept
 Record a value at the current timestamp.
void record (std::int64_t value) noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Detailed Description

Allows a reaction to record telemetry data using a given Metric.

Constructor & Destructor Documentation

◆ MetricEffect()

xronos::sdk::BaseReaction::MetricEffect::MetricEffect ( Metric & metric,
ReactionContext context )

Constructor.

Parameters
metricThe Metric for which the reaction should be able to record data.
contextThe context of the reaction the effect is declared for. Can be obtained using context().

Member Function Documentation

◆ record()

void xronos::sdk::BaseReaction::MetricEffect::record ( double value)
noexcept

Record a value at the current timestamp.

Parameters
valueThe value to record.

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