6 #ifndef SERVICEPROXY_HPP_INCLUDE
7 #define SERVICEPROXY_HPP_INCLUDE
68 static std::unique_ptr<ServiceProxy>
make_unique(
void);
78 std::vector<std::string> &signal_names,
79 std::vector<std::string> &control_names) = 0;
87 const std::vector<std::string> &signal_names) = 0;
95 const std::vector<std::string> &control_names) = 0;
115 const std::vector<struct geopm_request_s> &signal_config,
116 const std::vector<struct geopm_request_s> &control_config,
118 std::string &server_key) = 0;
168 void platform_get_user_access(std::vector<std::string> &signal_names,
169 std::vector<std::string> &control_names)
override;
170 std::vector<signal_info_s> platform_get_signal_info(
const std::vector<std::string> &signal_names)
override;
171 std::vector<control_info_s> platform_get_control_info(
const std::vector<std::string> &control_names)
override;
172 void platform_open_session(
void)
override;
173 void platform_close_session(
void)
override;
174 void platform_start_batch(
const std::vector<struct geopm_request_s> &signal_config,
175 const std::vector<struct geopm_request_s> &control_config,
177 std::string &server_key)
override;
178 void platform_stop_batch(
int server_pid)
override;
179 double platform_read_signal(
const std::string &signal_name,
181 int domain_idx)
override;
182 void platform_write_control(
const std::string &control_name,
185 double setting)
override;
186 void platform_restore_control()
override;
187 std::string topo_get_cache(
void)
override;
188 void platform_start_profile(
const std::string &profile_name)
override;
189 void platform_stop_profile(
const std::vector<std::string> ®ion_names)
override;
190 std::vector<int> platform_get_profile_pids(
const std::string &profile_name)
override;
191 std::vector<std::string> platform_pop_profile_region_names(
const std::string &profile_name)
override;
194 read_string_array(std::shared_ptr<SDBusMessage> bus_message);
195 std::shared_ptr<SDBus> m_bus;
Proxy object for the io.github.geopm D-Bus interface used to implement the ServiceIOGroup.
Definition: ServiceProxy.hpp:60
virtual void platform_stop_profile(const std::vector< std::string > ®ion_names)=0
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.
ServiceProxy()=default
ServiceProxy constructor.
virtual std::string topo_get_cache(void)=0
Calls the TopoGetCache API defined in the io.github.geopm D-Bus namespace.
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.
virtual void platform_start_profile(const std::string &profile_name)=0
virtual void platform_restore_control()=0
Calls the PlatformRestoreControl API defined in the io.github.geopm D-Bus namespace.
virtual std::vector< signal_info_s > platform_get_signal_info(const std::vector< std::string > &signal_names)=0
Calls the PlatformGetSignalInfo API defined in the io.github.geopm D-Bus namespace.
virtual void platform_stop_batch(int server_pid)=0
Calls the PlatformStopBatch API defined in the io.github.geopm D-Bus namespace.
virtual ~ServiceProxy()=default
ServiceProxy destructor.
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.
virtual void platform_open_session(void)=0
Calls the PlatformOpenSession API defined in the io.github.geopm D-Bus namespace.
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.
virtual std::vector< std::string > platform_pop_profile_region_names(const std::string &profile_name)=0
virtual std::vector< int > platform_get_profile_pids(const std::string &profile_name)=0
virtual std::vector< control_info_s > platform_get_control_info(const std::vector< std::string > &control_names)=0
Calls the PlatformGetControlInfo API defined in the io.github.geopm D-Bus namespace.
virtual void platform_close_session(void)=0
Calls the PlatformCloseSession API defined in the io.github.geopm D-Bus namespace.
Definition: ServiceProxy.hpp:163
virtual ~ServiceProxyImp()=default
#define GEOPM_PUBLIC
Definition: geopm_public.h:10
#define GEOPM_PRIVATE
Definition: geopm_public.h:15
std::unique_ptr< Type > make_unique(Args &&...args)
Implementation of std::make_unique (C++14) for C++11. Note that this version will only work for non-a...
Definition: Helper.hpp:28
Information pertaining to a particular control supported by PlatformIO.
Definition: ServiceProxy.hpp:47
std::string name
Name of the control.
Definition: ServiceProxy.hpp:49
std::string description
Description of the control.
Definition: ServiceProxy.hpp:51
int domain
Topology domain that supports the signal. One of the geopm_domain_e values defined in geopm_topo....
Definition: ServiceProxy.hpp:54
Information pertaining to a particular signal supported by PlatformIO.
Definition: ServiceProxy.hpp:24
int domain
Topology domain that supports the signal. One of the geopm_domain_e values defined in geopm_topo....
Definition: ServiceProxy.hpp:31
int string_format
The format method to convert a signal to a string. One of the geopm::string_format_e values defined i...
Definition: ServiceProxy.hpp:38
std::string name
Name of the signal.
Definition: ServiceProxy.hpp:26
int behavior
The signal behavior type. One of the geopm::IOGroup::m_signal_behavior_e values defined in geopm/IOGr...
Definition: ServiceProxy.hpp:42
std::string description
Description of the signal.
Definition: ServiceProxy.hpp:28
int aggregation
The signal aggregation type. One of the the geopm::Agg::m_type_e values defined in geopm/Agg....
Definition: ServiceProxy.hpp:34
Definition: geopm_pio.h:387