6 #ifndef PLATFORMIOIMP_HPP_INCLUDE
7 #define PLATFORMIOIMP_HPP_INCLUDE
20 class CombinedControl;
28 PlatformIOImp(std::list<std::shared_ptr<IOGroup> > iogroup_list,
40 int domain_idx)
override;
43 int domain_idx)
override;
44 double sample(
int signal_idx)
override;
45 void adjust(
int control_idx,
double setting)
override;
50 int domain_idx)
override;
54 double setting)
override;
57 std::function<double(
const std::vector<double> &)>
agg_function(
const std::string &signal_name)
const override;
58 std::function<std::string(
double)>
format_function(
const std::string &signal_name)
const override;
65 const std::vector<geopm_request_s> &signal_config,
66 const std::vector<geopm_request_s> &control_config,
68 std::string &server_key)
override;
90 int push_combined_signal(
const std::string &signal_name,
93 const std::vector<int> &sub_signal_idx);
94 int push_combined_control(
const std::string &control_name,
97 const std::vector<int> &sub_control_idx);
104 void register_combined_signal(
int signal_idx,
105 std::vector<int> operands,
106 std::unique_ptr<CombinedSignal> signal);
107 void register_combined_control(
int control_idx,
108 std::vector<int> operands,
109 std::unique_ptr<CombinedControl> control);
110 int push_signal_convert_domain(
const std::string &signal_name,
113 int push_control_convert_domain(
const std::string &control_name,
116 double read_signal_convert_domain(
const std::string &signal_name,
119 void write_control_convert_domain(
const std::string &control_name,
124 double sample_combined(
int signal_idx);
125 void adjust_combined(
int control_idx,
double setting);
127 std::vector<std::shared_ptr<IOGroup> > find_signal_iogroup(
const std::string &signal_name)
const;
129 std::vector<std::shared_ptr<IOGroup> > find_control_iogroup(
const std::string &control_name)
const;
134 bool is_control_adjust_same(
const std::string &control_name)
const;
135 bool m_is_signal_active;
136 bool m_is_control_active;
138 std::list<std::shared_ptr<IOGroup> > m_iogroup_list;
139 std::vector<std::pair<std::shared_ptr<IOGroup>,
int> > m_active_signal;
140 std::vector<std::pair<std::shared_ptr<IOGroup>,
int> > m_active_control;
141 std::map<std::tuple<std::string, int, int>,
int> m_existing_signal;
142 std::map<std::tuple<std::string, int, int>,
int> m_existing_control;
143 std::map<int, std::pair<std::vector<int>,
144 std::unique_ptr<CombinedSignal> > > m_combined_signal;
145 std::map<int, std::pair<std::vector<int>,
146 std::unique_ptr<CombinedControl> > > m_combined_control;
148 std::map<int, std::shared_ptr<BatchServer> > m_batch_server;
149 std::set<std::string> m_pushed_signal_names;
150 static const std::map<const std::string, const std::string> m_signal_descriptions;
151 static const std::map<const std::string, const std::string> m_control_descriptions;