#include <PowercapSysfsDriver.hpp>
|
| | PowercapSysfsDriver () |
| |
| | PowercapSysfsDriver (const std::string &powercap_directory) |
| |
| virtual | ~PowercapSysfsDriver ()=default |
| |
| int | domain_type (const std::string &name) const override |
| | Get the PlatformTopo domain type for an named attribute.
|
| |
| std::string | attribute_path (const std::string &name, int domain_idx) override |
| | Get the path to the sysfs entry for signal.
|
| |
| std::function< double(const std::string &)> | signal_parse (const std::string &signal_name) const override |
| | Get function to convert contents of sysfs file into signal.
|
| |
| std::function< std::string(double)> | control_gen (const std::string &control_name) const override |
| | Get a function to convert a control into a sysfs string.
|
| |
| std::string | driver (void) const override |
| |
| std::map< std::string, properties_s > | properties (void) const override |
| | Query the meta data about a signal or control.
|
| |
| | SysfsDriver ()=default |
| |
| virtual | ~SysfsDriver ()=default |
| |
◆ PowercapSysfsDriver() [1/2]
| geopm::PowercapSysfsDriver::PowercapSysfsDriver |
( |
| ) |
|
◆ PowercapSysfsDriver() [2/2]
| geopm::PowercapSysfsDriver::PowercapSysfsDriver |
( |
const std::string & |
powercap_directory | ) |
|
◆ ~PowercapSysfsDriver()
| virtual geopm::PowercapSysfsDriver::~PowercapSysfsDriver |
( |
| ) |
|
|
virtualdefault |
◆ attribute_path()
| std::string geopm::PowercapSysfsDriver::attribute_path |
( |
const std::string & |
name, |
|
|
int |
domain_idx |
|
) |
| |
|
overridevirtual |
Get the path to the sysfs entry for signal.
- Parameters
-
| [in] | name | The name of the signal or control |
| [in] | domain_idx | The index of the domain within the set of domains of the same type on the platform. |
- Returns
- File path to the sysfs entry to be read.
Implements geopm::SysfsDriver.
◆ control_gen()
| std::function< std::string(double)> geopm::PowercapSysfsDriver::control_gen |
( |
const std::string & |
control_name | ) |
const |
|
overridevirtual |
Get a function to convert a control into a sysfs string.
Converts from the SI unit control into the text representation required by the device driver.
- Parameters
-
| [in] | signal_name | The name of the signal. |
- Returns
- Function returning string content to be written to sysfs file.
Implements geopm::SysfsDriver.
◆ domain_type()
| int geopm::PowercapSysfsDriver::domain_type |
( |
const std::string & |
name | ) |
const |
|
overridevirtual |
Get the PlatformTopo domain type for an named attribute.
- Parameters
-
| [in] | name | The name of the signal or control |
- Returns
- geopm_domain_e domain type
Implements geopm::SysfsDriver.
◆ driver()
| std::string geopm::PowercapSysfsDriver::driver |
( |
void |
| ) |
const |
|
overridevirtual |
Name of the Linux kernel device driver
- Returns
- Name of device driver
Implements geopm::SysfsDriver.
◆ make_plugin()
| std::unique_ptr< IOGroup > geopm::PowercapSysfsDriver::make_plugin |
( |
void |
| ) |
|
|
static |
◆ plugin_name()
| std::string geopm::PowercapSysfsDriver::plugin_name |
( |
void |
| ) |
|
|
static |
◆ properties()
◆ signal_parse()
| std::function< double(const std::string &)> geopm::PowercapSysfsDriver::signal_parse |
( |
const std::string & |
signal_name | ) |
const |
|
overridevirtual |
Get function to convert contents of sysfs file into signal.
This parsing includes the conversion of the numerical data into SI units.
- Parameters
-
| [in] | properties_id | The unique identifier of the signal. |
| [in] | content | The string content read from the sysfs file. |
- Returns
- The parsed signal value in SI units.
Implements geopm::SysfsDriver.
The documentation for this class was generated from the following files: