geopm
3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
|
#include <ConstConfigIOGroup.hpp>
Public Member Functions | |
ConstConfigIOGroup () | |
ConstConfigIOGroup (const PlatformTopo &topo, const std::string &user_file_path, const std::string &default_file_path, const std::string &hostname) | |
std::set< std::string > | signal_names (void) const override |
Returns the names of all signals provided by the IOGroup. More... | |
std::set< std::string > | control_names (void) const override |
bool | is_valid_signal (const std::string &signal_name) const override |
Test if signal_name refers to a signal supported by the group. More... | |
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 |
Add a signal to the list of signals that is read by read_batch() and sampled by sample(). More... | |
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 |
this is essentially a no-op as 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 |
Retrieve signal value from data read by last call to read_batch() for a particular signal previously pushed with push_signal(). More... | |
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 |
Read from platform and interpret into SI units a signal given its name and domain. Does not modify the values stored by calling read_batch(). More... | |
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 |
Return a function that should be used when aggregating the given signal. More... | |
std::function< std::string(double)> | format_function (const std::string &signal_name) const override |
Returns a function that can be used to convert a signal of the given name into a printable string. May be one of the IOGroup::format_*() static methods, or another function. More... | |
std::string | signal_description (const std::string &signal_name) const override |
Returns a description of the signal. This string can be used by tools to generate help text for users of the IOGroup. More... | |
std::string | control_description (const std::string &control_name) const override |
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 |
Get the IOGroup name. More... | |
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_" |
geopm::ConstConfigIOGroup::ConstConfigIOGroup | ( | ) |
geopm::ConstConfigIOGroup::ConstConfigIOGroup | ( | const PlatformTopo & | topo, |
const std::string & | user_file_path, | ||
const std::string & | default_file_path, | ||
const std::string & | hostname | ||
) |
|
overridevirtual |
Should not be called; this IOGroup does not provide any controls.
geopm::Exception | there are no controls supported by the ConstConfigIOGroup |
Implements geopm::IOGroup.
|
overridevirtual |
Return a function that should be used when aggregating the given signal.
[in] | signal_name | Name of the signal. |
Implements geopm::IOGroup.
|
overridevirtual |
geopm::Exception | there are no controls supported by the ConstConfigIOGroup |
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Returns a function that can be used to convert a signal of the given name into a printable string. May be one of the IOGroup::format_*() static methods, or another function.
Reimplemented from geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Test if signal_name refers to a signal supported by the group.
[in] | signal_name | Name of signal to test. |
Implements geopm::IOGroup.
|
static |
|
overridevirtual |
Get the IOGroup name.
By convention this name is given in all capital letters. This string provides a namespace for the IOGroup since all IOGroups loaded by PlatformIO must have distinct names. This unique namespace may be used in any context to distinguish IOGroups.
One important use case is that the IOGroup name prefixes all low level signal and control names in conjunction with "::". This name prefix may be used to distinguish between the high level signals and controls (i.e. aliases like CPU_FREQUENCY_MAX_CONTROL) that do not contain the IOGroup prefix, and the low level signals and controls that do (e.g. "MSR::PERF_CTL:FREQ").
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 ConstConfigIOGroup |
Implements geopm::IOGroup.
|
overridevirtual |
Add a signal to the list of signals that is read by read_batch() and sampled by sample().
[in] | signal_name | Name of the signal requested. |
[in] | domain_type | One of the values from the PlatformTopo::m_domain_e enum described in PlatformTopo.hpp. |
[in] | domain_idx | The index of the domain within the set of domains of the same type on the platform. |
Implements geopm::IOGroup.
|
overridevirtual |
this is essentially a no-op as this IOGroup's signals are constant.
Implements geopm::IOGroup.
|
overridevirtual |
Read from platform and interpret into SI units a signal given its name and domain. Does not modify the values stored by calling read_batch().
[in] | signal_name | Name of the signal requested. |
[in] | domain_type | One of the values from the PlatformTopo::m_domain_e enum described in PlatformTopo.hpp. |
[in] | domain_idx | The index of the domain within the set of domains of the same type on the platform. |
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 |
Retrieve signal value from data read by last call to read_batch() for a particular signal previously pushed with push_signal().
[in] | sample_idx | The index returned by previous call to push_signal(). |
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 |
Implements geopm::IOGroup.
|
overridevirtual |
Returns a description of the signal. This string can be used by tools to generate help text for users of the IOGroup.
Implements geopm::IOGroup.
|
overridevirtual |
Implements geopm::IOGroup.
|
overridevirtual |
Returns the names of all signals provided by the IOGroup.
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 ConstConfigIOGroup |
Implements geopm::IOGroup.