geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
#include <SSTSignal.hpp>
Public Types | |
enum | SignalType { M_MBOX , M_MMIO } |
Public Member Functions | |
SSTSignal (std::shared_ptr< geopm::SSTIO > sstio, SignalType signal_type, int cpu_idx, uint16_t command, uint16_t subcommand, uint32_t subcommand_arg, uint32_t interface_parameter) | |
Create an SSTIO Signal. More... | |
virtual | ~SSTSignal ()=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... | |
Public Member Functions inherited from geopm::Signal | |
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... | |
This is the abstraction layer that exposes GEOPM signals from the SSTIO object.
geopm::SSTSignal::SSTSignal | ( | std::shared_ptr< geopm::SSTIO > | sstio, |
SignalType | signal_type, | ||
int | cpu_idx, | ||
uint16_t | command, | ||
uint16_t | subcommand, | ||
uint32_t | subcommand_arg, | ||
uint32_t | interface_parameter | ||
) |
[in] | sstio | Interface through which SST interactions are handled. |
[in] | signal_type | Which SST interface to use. |
[in] | cpu_index | Index of the CPU to which the mailbox read is being issued. |
[in] | command | Which SST interface command to issue. |
[in] | subcommand | Which SST interface subcommand to issue |
[in] | subcommand_arg | Which SST interface subcommand argument to use. |
[in] | interface_parameter | Which SST interface parameter to use. |
|
virtualdefault |
|
overridevirtual |
Read directly the value of the signal without affecting any pushed batch signals.
Implements geopm::Signal.
|
overridevirtual |
Apply any conversions necessary to interpret the latest stored value as a double.
Implements geopm::Signal.
|
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.