Class used to implement the SysfsIOGroup base class.
More...
#include <SysfsDriver.hpp>
|
| | SysfsDriver ()=default |
| |
| virtual | ~SysfsDriver ()=default |
| |
| virtual int | domain_type (const std::string &name) const =0 |
| | Get the PlatformTopo domain type for an named attribute.
|
| |
| virtual std::string | attribute_path (const std::string &name, int domain_idx)=0 |
| | Get the path to the sysfs entry for signal.
|
| |
| virtual std::function< double(const std::string &)> | signal_parse (const std::string &signal_name) const =0 |
| | Get function to convert contents of sysfs file into signal.
|
| |
| virtual std::function< std::string(double)> | control_gen (const std::string &control_name) const =0 |
| | Get a function to convert a control into a sysfs string.
|
| |
| virtual std::string | driver (void) const =0 |
| |
| virtual std::map< std::string, SysfsDriver::properties_s > | properties (void) const =0 |
| | Query the meta data about a signal or control.
|
| |
| virtual std::map< std::string, derived_signal_info_s > | derived_signals (void) const |
| | Query mapping of derived signal aliases to their metadata and sources.
|
| |
Class used to implement the SysfsIOGroup base class.
This virtual interface can be adapted for each Linux device driver. A concrete implementation can be used to construct a SysfsIOGroup object.
◆ SysfsDriver()
| geopm::SysfsDriver::SysfsDriver |
( |
| ) |
|
|
default |
◆ ~SysfsDriver()
| virtual geopm::SysfsDriver::~SysfsDriver |
( |
| ) |
|
|
virtualdefault |
◆ attribute_path()
| virtual std::string geopm::SysfsDriver::attribute_path |
( |
const std::string & |
name, |
|
|
int |
domain_idx |
|
) |
| |
|
pure virtual |
◆ control_gen()
| virtual std::function< std::string(double)> geopm::SysfsDriver::control_gen |
( |
const std::string & |
control_name | ) |
const |
|
pure virtual |
◆ derived_signals()
Query mapping of derived signal aliases to their metadata and sources.
Reimplemented in geopm::DrmSysfsDriver.
◆ domain_type()
| virtual int geopm::SysfsDriver::domain_type |
( |
const std::string & |
name | ) |
const |
|
pure virtual |
◆ driver()
| virtual std::string geopm::SysfsDriver::driver |
( |
void |
| ) |
const |
|
pure virtual |
◆ parse_properties_json()
| std::map< std::string, SysfsDriver::properties_s > geopm::SysfsDriver::parse_properties_json |
( |
const std::string & |
iogroup_name, |
|
|
const std::string & |
properties_json |
|
) |
| |
|
static |
◆ properties()
◆ signal_parse()
| virtual std::function< double(const std::string &)> geopm::SysfsDriver::signal_parse |
( |
const std::string & |
signal_name | ) |
const |
|
pure virtual |
◆ M_IO_BUFFER_SIZE
| constexpr size_t geopm::SysfsDriver::M_IO_BUFFER_SIZE = 128 |
|
staticconstexpr |
Arbitrary buffer size.
We're generally looking at integer values much shorter than 100 digits in length. The IOGroup performs string truncation checks in case that ever changes.
The documentation for this class was generated from the following files: