geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
IOGroup that provides constants for CPU frequency limits as signals for PlatformIO. More...
#include <CpuinfoIOGroup.hpp>
Public Member Functions | |
CpuinfoIOGroup () | |
CpuinfoIOGroup (const std::string &cpu_freq_min_path, const std::string &cpu_freq_max_path, double cpu_freq_sticker) | |
virtual | ~CpuinfoIOGroup ()=default |
std::set< std::string > | signal_names (void) const override |
std::set< std::string > | control_names (void) const override |
bool | is_valid_signal (const std::string &signal_name) const override |
bool | is_valid_control (const std::string &control_name) const override |
int | signal_domain_type (const std::string &signal_name) const override |
int | control_domain_type (const std::string &control_name) const override |
int | push_signal (const std::string &signal_name, int domain_type, int domain_idx) override |
int | push_control (const std::string &control_name, int domain_type, int domain_idx) override |
Should not be called; this IOGroup does not provide any controls. More... | |
void | read_batch (void) override |
Does nothing; this IOGroup's signals are constant. More... | |
void | write_batch (void) override |
Does nothing; this IOGroup does not provide any controls. More... | |
double | sample (int batch_idx) override |
void | adjust (int batch_idx, double setting) override |
Should not be called; this IOGroup does not provide any controls. More... | |
double | read_signal (const std::string &signal_name, int domain_type, int domain_idx) override |
void | write_control (const std::string &control_name, int domain_type, int domain_idx, double setting) override |
Should not be called; this IOGroup does not provide any controls. More... | |
void | save_control (void) override |
Does nothing; this IOGroup does not provide any controls. More... | |
void | restore_control (void) override |
Does nothing; this IOGroup does not provide any controls. More... | |
std::function< double(const std::vector< double > &)> | agg_function (const std::string &signal_name) const override |
For all valid signals in this IOGroup, the aggregation function is expect_same() More... | |
std::function< std::string(double)> | format_function (const std::string &signal_name) const override |
std::string | signal_description (const std::string &signal_name) const override |
std::string | control_description (const std::string &control_name) const override |
Does nothing; this IOGroup does not provide any controls. More... | |
int | signal_behavior (const std::string &signal_name) const override |
void | save_control (const std::string &save_path) override |
Does nothing; this IOGroup does not provide any controls. More... | |
void | restore_control (const std::string &save_path) override |
Does nothing; this IOGroup does not provide any controls. More... | |
std::string | name (void) const override |
Public Member Functions inherited from geopm::IOGroup | |
IOGroup ()=default | |
virtual | ~IOGroup ()=default |
Static Public Member Functions | |
static std::string | plugin_name (void) |
static std::unique_ptr< IOGroup > | make_plugin (void) |
Static Public Member Functions inherited from geopm::IOGroup | |
static std::vector< std::string > | iogroup_names (void) |
static std::unique_ptr< IOGroup > | make_unique (const std::string &iogroup_name) |
static m_units_e | string_to_units (const std::string &str) |
Convert a string to the corresponding m_units_e value. More... | |
static std::string | units_to_string (int) |
Convert the m_units_e value to the corresponding string. More... | |
static m_signal_behavior_e | string_to_behavior (const std::string &str) |
Convert a string to the corresponding m_signal_behavior_e value. More... | |
Additional Inherited Members | |
Public Types inherited from geopm::IOGroup | |
enum | m_units_e { M_UNITS_NONE , M_UNITS_SECONDS , M_UNITS_HERTZ , M_UNITS_WATTS , M_UNITS_JOULES , M_UNITS_CELSIUS , M_UNITS_AMPERES , M_UNITS_VOLTS , M_NUM_UNITS } |
enum | m_signal_behavior_e { M_SIGNAL_BEHAVIOR_CONSTANT , M_SIGNAL_BEHAVIOR_MONOTONE , M_SIGNAL_BEHAVIOR_VARIABLE , M_SIGNAL_BEHAVIOR_LABEL , M_NUM_SIGNAL_BEHAVIOR } |
Description of the runtime behavior of a signal. More... | |
Static Public Attributes inherited from geopm::IOGroup | |
static const std::string | M_PLUGIN_PREFIX = "libgeopmiogroup_" |
IOGroup that provides constants for CPU frequency limits as signals for PlatformIO.
geopm::CpuinfoIOGroup::CpuinfoIOGroup | ( | ) |
geopm::CpuinfoIOGroup::CpuinfoIOGroup | ( | const std::string & | cpu_freq_min_path, |
const std::string & | cpu_freq_max_path, | ||
double | cpu_freq_sticker | ||
) |
|
virtualdefault |
|
overridevirtual |
Should not be called; this IOGroup does not provide any controls.
geopm::Exception | there are no controls supported by the CpuinfoIOGroup |
Implements geopm::IOGroup.
|
overridevirtual |
For all valid signals in this IOGroup, the aggregation function is expect_same()
If any frequency range constants are compared between nodes, they should be the same or the runtime may behave unpredictably.
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Reimplemented from geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
static |
|
overridevirtual |
Implements geopm::IOGroup.
|
static |
|
overridevirtual |
Should not be called; this IOGroup does not provide any controls.
geopm::Exception | there are no controls supported by the CpuinfoIOGroup |
Implements geopm::IOGroup.
|
overridevirtual |
signal_name | Adds the signal specified to the list of signals to be read during read_batch() |
domain_type | This must be == GEOPM_DOMAIN_BOARD |
domain_idx | is ignored |
geopm::Exception | if signal_name is not valid if domain_type is not GEOPM_DOMAIN_BOARD |
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup's signals are constant.
Implements geopm::IOGroup.
|
overridevirtual |
signal_name | Specifies the name of the signal whose value you want to get. |
domain_type | This must be == GEOPM_DOMAIN_BOARD |
domain_idx | is ignored |
geopm::Exception | if signal_name is not valid if domain_type is not GEOPM_DOMAIN_BOARD |
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
save_path | this argument is ignored |
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
Implements geopm::IOGroup.
|
overridevirtual |
batch_idx | Specifies a signal_idx returned from push_signal() |
The value will have been updated by the most recent call to read_batch().
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
save_path | this argument is ignored |
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
Implements geopm::IOGroup.
|
overridevirtual |
This can be used when generating reports to decide how to summarize a signal's value for the entire application run.
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
All constants provided by the CpuinfoIOGroup are assumed to be the same for the whole board.
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Does nothing; this IOGroup does not provide any controls.
Implements geopm::IOGroup.
|
overridevirtual |
Should not be called; this IOGroup does not provide any controls.
geopm::Exception | there are no controls supported by the CpuinfoIOGroup |
Implements geopm::IOGroup.