6 #ifndef DEBUGIOGROUP_HPP_INCLUDE
7 #define DEBUGIOGROUP_HPP_INCLUDE
17 #include "geopm/IOGroup.hpp"
32 std::shared_ptr<std::vector<double> > value_cache);
40 int push_signal(
const std::string &signal_name,
int domain_type,
int domain_idx)
override;
41 int push_control(
const std::string &control_name,
int domain_type,
int domain_idx)
override;
44 double sample(
int batch_idx)
override;
45 void adjust(
int batch_idx,
double setting)
override;
46 double read_signal(
const std::string &signal_name,
int domain_type,
int domain_idx)
override;
47 void write_control(
const std::string &control_name,
int domain_type,
int domain_idx,
double setting)
override;
50 std::function<double(
const std::vector<double> &)>
agg_function(
const std::string &signal_name)
const override;
54 void save_control(
const std::string &save_path)
override;
56 std::string
name(
void)
const override;
66 struct m_signal_info_s {
71 const PlatformTopo &m_topo;
72 const std::shared_ptr<std::vector<double> > m_value_cache;
73 size_t m_num_reg_signals;
75 std::map<std::pair<std::string, int>,
int> m_signal_idx;
76 std::map<std::string, m_signal_info_s> m_signal_info;
77 std::set<std::string> m_signal_name;
IOGroup that Agents can use to expose internal values.
Definition: DebugIOGroup.hpp:25
virtual ~DebugIOGroup()=default
DebugIOGroup(const PlatformTopo &topo, std::shared_ptr< std::vector< double > > value_cache)
Constructor; should be called in the Agent's constructor. value_cache is created and updated by the A...
Definition: DebugIOGroup.cpp:14
void read_batch(void) override
Definition: DebugIOGroup.cpp:106
int signal_domain_type(const std::string &signal_name) const override
Definition: DebugIOGroup.cpp:66
std::string signal_description(const std::string &signal_name) const override
Definition: DebugIOGroup.cpp:193
int control_domain_type(const std::string &control_name) const override
Definition: DebugIOGroup.cpp:75
void restore_control(void) override
Definition: DebugIOGroup.cpp:161
int signal_behavior(const std::string &signal_name) const override
Definition: DebugIOGroup.cpp:213
bool is_valid_signal(const std::string &signal_name) const override
Definition: DebugIOGroup.cpp:56
void write_control(const std::string &control_name, int domain_type, int domain_idx, double setting) override
Definition: DebugIOGroup.cpp:151
static std::unique_ptr< IOGroup > make_plugin(void)
Definition: DebugIOGroup.cpp:176
double read_signal(const std::string &signal_name, int domain_type, int domain_idx) override
Definition: DebugIOGroup.cpp:131
std::set< std::string > control_names(void) const override
Definition: DebugIOGroup.cpp:51
int push_signal(const std::string &signal_name, int domain_type, int domain_idx) override
Definition: DebugIOGroup.cpp:80
int push_control(const std::string &control_name, int domain_type, int domain_idx) override
Definition: DebugIOGroup.cpp:100
bool is_valid_control(const std::string &control_name) const override
Definition: DebugIOGroup.cpp:61
void register_signal(const std::string &name, int domain_type, int signal_behavior)
Set up a signal name and base domain to map to one or more underlying values. One signal will be adde...
Definition: DebugIOGroup.cpp:26
static std::string plugin_name(void)
Definition: DebugIOGroup.cpp:171
void adjust(int batch_idx, double setting) override
Definition: DebugIOGroup.cpp:125
double sample(int batch_idx) override
Definition: DebugIOGroup.cpp:116
void save_control(void) override
Definition: DebugIOGroup.cpp:156
std::set< std::string > signal_names(void) const override
Definition: DebugIOGroup.cpp:46
std::string name(void) const override
Definition: DebugIOGroup.cpp:166
std::function< double(const std::vector< double > &)> agg_function(const std::string &signal_name) const override
Definition: DebugIOGroup.cpp:183
std::string control_description(const std::string &control_name) const override
Definition: DebugIOGroup.cpp:204
void write_batch(void) override
Definition: DebugIOGroup.cpp:111
Definition: Accumulator.cpp:12