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

A reaction's effect on a Metric. More...

#include <xronos/sdk/reaction.hh>

Public Member Functions

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

Detailed Description

A reaction's effect on a Metric.

Through it the handler records values.

Constructor & Destructor Documentation

◆ MetricEffect()

xronos::sdk::BaseReaction::MetricEffect::MetricEffect ( Metric & metric,
const 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)

Record a value at the current timestamp.

Parameters
valueThe value to record.
Exceptions
ValidationErrorIf called before execution has started.

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