geopm 3.2.1.dev529+g9f1c3b01c
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
Public Member Functions | List of all members
geopm::Signal Class Referenceabstract

#include <Signal.hpp>

Inheritance diagram for geopm::Signal:
Inheritance graph
[legend]

Public Member Functions

virtual ~Signal ()=default
 
virtual void setup_batch (void)=0
 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.
 
virtual double sample (void)=0
 Apply any conversions necessary to interpret the latest stored value as a double.
 
virtual double read (void) const =0
 Read directly the value of the signal without affecting any pushed batch signals.
 
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.
 
virtual void reset (void)
 Discard any accumulated sampling history so that the next call to sample() starts a new window. Default is a no-op.
 

Detailed Description

An abstract interface for all types of signals supported by an IOGroup. Any implementation specific data should be injected in the derived class constructor and used in setup_batch() if necessary.

Constructor & Destructor Documentation

◆ ~Signal()

virtual geopm::Signal::~Signal ( )
virtualdefault

Member Function Documentation

◆ is_sampled()

virtual bool geopm::Signal::is_sampled ( void  ) const
inlinevirtual

True if the signal has been sampled during this batch.

Reimplemented in geopm::LevelZeroSignal.

◆ read()

virtual double geopm::Signal::read ( void  ) const
pure virtual

◆ reset()

virtual void geopm::Signal::reset ( void  )
inlinevirtual

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

Reimplemented in geopm::DerivativeSignal.

◆ sample()

virtual double geopm::Signal::sample ( void  )
pure virtual

◆ set_sample()

virtual void geopm::Signal::set_sample ( double  )
inlinevirtual

Set the value to be returned by sample()

Reimplemented in geopm::LevelZeroSignal.

◆ setup_batch()

virtual void geopm::Signal::setup_batch ( void  )
pure virtual

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.

Implemented in geopm::DerivativeSignal, geopm::DifferenceSignal, geopm::LevelZeroSignal, geopm::MSRFieldSignal, geopm::MultiplicationSignal, geopm::RatioSignal, geopm::RawMSRSignal, geopm::SSTSignal, geopm::LambdaSignal, and geopm::TimeSignal.


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