#include <MSRFieldSignal.hpp>
|
| MSRFieldSignal (std::shared_ptr< Signal > raw_msr, int begin_bit, int end_bit, int function, double scalar) |
|
| MSRFieldSignal (const MSRFieldSignal &other)=delete |
|
MSRFieldSignal & | operator= (const MSRFieldSignal &other)=delete |
|
virtual | ~MSRFieldSignal ()=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. More...
|
|
double | sample (void) override |
| Apply any conversions necessary to interpret the latest stored value as a double. More...
|
|
double | read (void) const override |
| Read directly the value of the signal without affecting any pushed batch signals. More...
|
|
virtual | ~Signal ()=default |
|
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...
|
|
Encapsulates conversion of MSR bitfields to double signal values in SI units.
- Todo:
- : most implementation is the same as MSREncode class. The hope is that this class can eventually replace the use of MSREncode. The enum for the function comes from the MSR class.
◆ MSRFieldSignal() [1/2]
geopm::MSRFieldSignal::MSRFieldSignal |
( |
std::shared_ptr< Signal > |
raw_msr, |
|
|
int |
begin_bit, |
|
|
int |
end_bit, |
|
|
int |
function, |
|
|
double |
scalar |
|
) |
| |
- Todo:
- : some of these are not logic errors if MSR data comes from user input files or if this interface is public. Alternatively, checks for these at the json parsing step would make these correctly logic errors.
◆ MSRFieldSignal() [2/2]
◆ ~MSRFieldSignal()
virtual geopm::MSRFieldSignal::~MSRFieldSignal |
( |
| ) |
|
|
virtualdefault |
◆ operator=()
◆ read()
double geopm::MSRFieldSignal::read |
( |
void |
| ) |
const |
|
overridevirtual |
Read directly the value of the signal without affecting any pushed batch signals.
Implements geopm::Signal.
◆ sample()
double geopm::MSRFieldSignal::sample |
( |
void |
| ) |
|
|
overridevirtual |
Apply any conversions necessary to interpret the latest stored value as a double.
Implements geopm::Signal.
◆ setup_batch()
void geopm::MSRFieldSignal::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: