geopm  3.1.1.dev214+gba4f9f6d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::ServiceProxy Class Referenceabstract

Proxy object for the io.github.geopm D-Bus interface used to implement the ServiceIOGroup. More...

#include <ServiceProxy.hpp>

Inheritance diagram for geopm::ServiceProxy:
Inheritance graph
[legend]

Public Member Functions

 ServiceProxy ()=default
 ServiceProxy constructor. More...
 
virtual ~ServiceProxy ()=default
 ServiceProxy destructor. More...
 
virtual void platform_get_user_access (std::vector< std::string > &signal_names, std::vector< std::string > &control_names)=0
 Calls the PlatformGetUserAccess API defined in the io.github.geopm D-Bus namespace. More...
 
virtual std::vector< signal_info_splatform_get_signal_info (const std::vector< std::string > &signal_names)=0
 Calls the PlatformGetSignalInfo API defined in the io.github.geopm D-Bus namespace. More...
 
virtual std::vector< control_info_splatform_get_control_info (const std::vector< std::string > &control_names)=0
 Calls the PlatformGetControlInfo API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_open_session (void)=0
 Calls the PlatformOpenSession API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_close_session (void)=0
 Calls the PlatformCloseSession API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_start_batch (const std::vector< struct geopm_request_s > &signal_config, const std::vector< struct geopm_request_s > &control_config, int &server_pid, std::string &server_key)=0
 Calls the PlatformStartBatch API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_stop_batch (int server_pid)=0
 Calls the PlatformStopBatch API defined in the io.github.geopm D-Bus namespace. More...
 
virtual double platform_read_signal (const std::string &signal_name, int domain, int domain_idx)=0
 Calls the PlatformReadSignal API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_write_control (const std::string &control_name, int domain, int domain_idx, double setting)=0
 Calls the PlatformWriteControl API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_restore_control ()=0
 Calls the PlatformRestoreControl API defined in the io.github.geopm D-Bus namespace. More...
 
virtual std::string topo_get_cache (void)=0
 Calls the TopoGetCache API defined in the io.github.geopm D-Bus namespace. More...
 
virtual void platform_start_profile (const std::string &profile_name)=0
 
virtual void platform_stop_profile (const std::vector< std::string > &region_names)=0
 
virtual std::vector< int > platform_get_profile_pids (const std::string &profile_name)=0
 
virtual std::vector< std::string > platform_pop_profile_region_names (const std::string &profile_name)=0
 

Static Public Member Functions

static std::unique_ptr< ServiceProxymake_unique (void)
 Create a unique pointer to a ServiceProxy object. More...
 

Detailed Description

Proxy object for the io.github.geopm D-Bus interface used to implement the ServiceIOGroup.

Constructor & Destructor Documentation

◆ ServiceProxy()

geopm::ServiceProxy::ServiceProxy ( )
default

ServiceProxy constructor.

◆ ~ServiceProxy()

virtual geopm::ServiceProxy::~ServiceProxy ( )
virtualdefault

ServiceProxy destructor.

Member Function Documentation

◆ make_unique()

std::unique_ptr< ServiceProxy > geopm::ServiceProxy::make_unique ( void  )
static

Create a unique pointer to a ServiceProxy object.

Returns
A unique_ptr to a newly created ServiceProxy object

◆ platform_close_session()

virtual void geopm::ServiceProxy::platform_close_session ( void  )
pure virtual

Calls the PlatformCloseSession API defined in the io.github.geopm D-Bus namespace.

Implemented in geopm::ServiceProxyImp.

◆ platform_get_control_info()

virtual std::vector<control_info_s> geopm::ServiceProxy::platform_get_control_info ( const std::vector< std::string > &  control_names)
pure virtual

Calls the PlatformGetControlInfo API defined in the io.github.geopm D-Bus namespace.

Parameters
control_names[in] Vector of strings containing all control names to query.
Returns
Vector of structures describing the queried controls

Implemented in geopm::ServiceProxyImp.

◆ platform_get_profile_pids()

virtual std::vector<int> geopm::ServiceProxy::platform_get_profile_pids ( const std::string &  profile_name)
pure virtual

Implemented in geopm::ServiceProxyImp.

◆ platform_get_signal_info()

virtual std::vector<signal_info_s> geopm::ServiceProxy::platform_get_signal_info ( const std::vector< std::string > &  signal_names)
pure virtual

Calls the PlatformGetSignalInfo API defined in the io.github.geopm D-Bus namespace.

Parameters
signal_names[in] Vector of strings containing all signal names to query.
Returns
Vector of structures describing the queried signals

Implemented in geopm::ServiceProxyImp.

◆ platform_get_user_access()

virtual void geopm::ServiceProxy::platform_get_user_access ( std::vector< std::string > &  signal_names,
std::vector< std::string > &  control_names 
)
pure virtual

Calls the PlatformGetUserAccess API defined in the io.github.geopm D-Bus namespace.

Parameters
signal_names[out] Vector of strings containing all signals that the calling process has access to.
control_names[out] Vector of strings containing all controls that the calling process has access to.

Implemented in geopm::ServiceProxyImp.

◆ platform_open_session()

virtual void geopm::ServiceProxy::platform_open_session ( void  )
pure virtual

Calls the PlatformOpenSession API defined in the io.github.geopm D-Bus namespace.

Implemented in geopm::ServiceProxyImp.

◆ platform_pop_profile_region_names()

virtual std::vector<std::string> geopm::ServiceProxy::platform_pop_profile_region_names ( const std::string &  profile_name)
pure virtual

Implemented in geopm::ServiceProxyImp.

◆ platform_read_signal()

virtual double geopm::ServiceProxy::platform_read_signal ( const std::string &  signal_name,
int  domain,
int  domain_idx 
)
pure virtual

Calls the PlatformReadSignal API defined in the io.github.geopm D-Bus namespace.

Parameters
signal_name[in] Name of the signal to read
domain[in] Topology domain to read the signal from. One of the geopm_domain_e values defined in geopm_topo.h.
domain_idx[in] Index of the domain to read the signal from.
Returns
The value of the signal read

Implemented in geopm::ServiceProxyImp.

◆ platform_restore_control()

virtual void geopm::ServiceProxy::platform_restore_control ( )
pure virtual

Calls the PlatformRestoreControl API defined in the io.github.geopm D-Bus namespace.

Implemented in geopm::ServiceProxyImp.

◆ platform_start_batch()

virtual void geopm::ServiceProxy::platform_start_batch ( const std::vector< struct geopm_request_s > &  signal_config,
const std::vector< struct geopm_request_s > &  control_config,
int &  server_pid,
std::string &  server_key 
)
pure virtual

Calls the PlatformStartBatch API defined in the io.github.geopm D-Bus namespace.

Parameters
signal_config[in] Vector of signal requests that will be supported by the batch server that is created.
control_config[in] Vector of control requests that will be supported by the batch server that is created.
server_pid[out] Linux PID of the server process created.
server_key[out] Unique key used to connect to the created server.

Implemented in geopm::ServiceProxyImp.

◆ platform_start_profile()

virtual void geopm::ServiceProxy::platform_start_profile ( const std::string &  profile_name)
pure virtual

Implemented in geopm::ServiceProxyImp.

◆ platform_stop_batch()

virtual void geopm::ServiceProxy::platform_stop_batch ( int  server_pid)
pure virtual

Calls the PlatformStopBatch API defined in the io.github.geopm D-Bus namespace.

Parameters
server_pid[in] The Linux PID of the batch server to stop.

Implemented in geopm::ServiceProxyImp.

◆ platform_stop_profile()

virtual void geopm::ServiceProxy::platform_stop_profile ( const std::vector< std::string > &  region_names)
pure virtual

Implemented in geopm::ServiceProxyImp.

◆ platform_write_control()

virtual void geopm::ServiceProxy::platform_write_control ( const std::string &  control_name,
int  domain,
int  domain_idx,
double  setting 
)
pure virtual

Calls the PlatformWriteControl API defined in the io.github.geopm D-Bus namespace.

Parameters
control_name[in] Name of the control to write
domain[in] Topology domain to write to. One of the geopm_domain_e values defined in geopm_topo.h.
domain_idx[in] Index of the domain to write to.
setting[in] Value of the control to write.

Implemented in geopm::ServiceProxyImp.

◆ topo_get_cache()

virtual std::string geopm::ServiceProxy::topo_get_cache ( void  )
pure virtual

Calls the TopoGetCache API defined in the io.github.geopm D-Bus namespace.

Returns
The string buffer defining the system topology

Implemented in geopm::ServiceProxyImp.


The documentation for this class was generated from the following files: