6 #ifndef ENDPOINTUSER_HPP_INCLUDE
7 #define ENDPOINTUSER_HPP_INCLUDE
35 static std::unique_ptr<EndpointUser>
make_unique(
const std::string &policy_path,
36 const std::set<std::string> &hosts);
48 const std::set<std::string> &hosts);
50 std::unique_ptr<SharedMemory> policy_shmem,
51 std::unique_ptr<SharedMemory> sample_shmem,
52 const std::string &agent_name,
54 const std::string &profile_name,
55 const std::string &hostlist_path,
56 const std::set<std::string> &hosts);
58 double read_policy(std::vector<double> &policy)
override;
59 void write_sample(
const std::vector<double> &sample)
override;
62 std::unique_ptr<SharedMemory> m_policy_shmem;
63 std::unique_ptr<SharedMemory> m_sample_shmem;
64 std::string m_hostlist_path;
Definition: EndpointUser.hpp:19
virtual double read_policy(std::vector< double > &policy)=0
Read the latest policy values. All NAN indicates that a policy has not been written yet.
virtual ~EndpointUser()=default
virtual void write_sample(const std::vector< double > &sample)=0
Write sample values and update the sample age.
static std::unique_ptr< EndpointUser > make_unique(const std::string &policy_path, const std::set< std::string > &hosts)
Factory method for the EndpointUser receiving the policy.
Definition: EndpointUser.cpp:24
Definition: EndpointUser.hpp:42
double read_policy(std::vector< double > &policy) override
Read the latest policy values. All NAN indicates that a policy has not been written yet.
Definition: EndpointUser.cpp:113
EndpointUserImp & operator=(const EndpointUserImp &other)=delete
void write_sample(const std::vector< double > &sample) override
Write sample values and update the sample age.
Definition: EndpointUser.cpp:130
EndpointUserImp(const EndpointUserImp &other)=delete
virtual ~EndpointUserImp()
Definition: EndpointUser.cpp:102
Definition: Accumulator.cpp:12