geopm 3.2.1.dev535+ga96c120fc
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
geopm::DerivativeSignal Class Reference

#include <DerivativeSignal.hpp>

Inheritance diagram for geopm::DerivativeSignal:
Collaboration diagram for geopm::DerivativeSignal:

Public Member Functions

 DerivativeSignal (std::shared_ptr< Signal > time_sig, std::shared_ptr< Signal > y_sig, int read_loops, double sleep_time)
 DerivativeSignal (std::shared_ptr< Signal > time_sig, std::shared_ptr< Signal > y_sig, int read_loops, double sleep_time, double nan_replace)
 DerivativeSignal (const DerivativeSignal &other)=delete
DerivativeSignal & operator= (const DerivativeSignal &other)=delete
virtual ~DerivativeSignal ()=default
void setup_batch (void) override
 Prepare the signal for being updated through side effects by the owner's read_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call.
double sample (void) override
 Apply any conversions necessary to interpret the latest stored value as a double.
double read (void) const override
 Read directly the value of the signal without affecting any pushed batch signals.
void reset (void) override
 Discard any accumulated sampling history so that the next call to sample() starts a new window. Default is a no-op.
Public Member Functions inherited from geopm::Signal
virtual ~Signal ()=default
virtual void set_sample (double)
 Set the value to be returned by sample().
virtual bool is_sampled (void) const
 True if the signal has been sampled during this batch.

Constructor & Destructor Documentation

◆ DerivativeSignal() [1/3]

geopm::DerivativeSignal::DerivativeSignal ( std::shared_ptr< Signal > time_sig,
std::shared_ptr< Signal > y_sig,
int read_loops,
double sleep_time )

◆ DerivativeSignal() [2/3]

geopm::DerivativeSignal::DerivativeSignal ( std::shared_ptr< Signal > time_sig,
std::shared_ptr< Signal > y_sig,
int read_loops,
double sleep_time,
double nan_replace )

◆ DerivativeSignal() [3/3]

geopm::DerivativeSignal::DerivativeSignal ( const DerivativeSignal & other)
delete

◆ ~DerivativeSignal()

virtual geopm::DerivativeSignal::~DerivativeSignal ( )
virtualdefault

Member Function Documentation

◆ operator=()

DerivativeSignal & geopm::DerivativeSignal::operator= ( const DerivativeSignal & other)
delete

◆ read()

double geopm::DerivativeSignal::read ( void ) const
overridevirtual

Read directly the value of the signal without affecting any pushed batch signals.

Implements geopm::Signal.

◆ reset()

void geopm::DerivativeSignal::reset ( void )
overridevirtual

Discard any accumulated sampling history so that the next call to sample() starts a new window. Default is a no-op.

Reimplemented from geopm::Signal.

◆ sample()

double geopm::DerivativeSignal::sample ( void )
overridevirtual

Apply any conversions necessary to interpret the latest stored value as a double.

Implements geopm::Signal.

◆ setup_batch()

void geopm::DerivativeSignal::setup_batch ( void )
overridevirtual

Prepare the signal for being updated through side effects by the owner's read_batch step. This method should not fail if called multiple times, and ideally only apply the side effects on the first call.

Implements geopm::Signal.


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