geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
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. More...
 
virtual double sample (void)=0
 Apply any conversions necessary to interpret the latest stored value as a double. More...
 
virtual double read (void) const =0
 Read directly the value of the signal without affecting any pushed batch signals. More...
 
virtual void set_sample (double)
 Set the value to be returned by sample() More...
 
virtual bool is_sampled (void) const
 True if the signal has been sampled during this batch. More...
 

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

◆ 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::TimeSignal, geopm::SSTSignal, geopm::RawMSRSignal, geopm::RatioSignal, geopm::MultiplicationSignal, geopm::MSRFieldSignal, geopm::LevelZeroSignal, geopm::DifferenceSignal, and geopm::DerivativeSignal.


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