6 #ifndef ENDPOINTIMP_HPP_INCLUDE
7 #define ENDPOINTIMP_HPP_INCLUDE
13 #include "geopm_time.h"
26 char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX];
46 char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX];
73 std::shared_ptr<SharedMemory> policy_shmem,
74 std::shared_ptr<SharedMemory> sample_shmem,
79 void open(
void)
override;
80 void close(
void)
override;
81 void write_policy(
const std::vector<double> &policy)
override;
82 double read_sample(std::vector<double> &sample)
override;
94 std::shared_ptr<SharedMemory> m_policy_shmem;
95 std::shared_ptr<SharedMemory> m_sample_shmem;
99 volatile bool m_continue_loop;
Definition: Endpoint.hpp:20
Definition: EndpointImp.hpp:65
void write_policy(const std::vector< double > &policy) override
Write a set of policy values for the Agent.
Definition: Endpoint.cpp:103
void reset_wait_loop(void) override
Re-enables wait loops occurring after this call.
Definition: Endpoint.cpp:199
virtual ~EndpointImp()
Definition: Endpoint.cpp:65
std::string get_agent(void) override
Returns the Agent name, or empty string if no Agent is attached.
Definition: Endpoint.cpp:143
std::string get_profile_name(void) override
Returns the profile name associated with the attached application, or empty if no controller is attac...
Definition: Endpoint.cpp:204
EndpointImp & operator=(const EndpointImp &other)=delete
void close(void) override
Unlink the shared memory regions belonging to the Endpoint.
Definition: Endpoint.cpp:90
EndpointImp(const EndpointImp &other)=delete
void stop_wait_loop(void) override
Cancels any current wait loops in this Endpoint.
Definition: Endpoint.cpp:194
static std::string shm_sample_postfix(void)
Definition: Endpoint.cpp:38
void wait_for_agent_detach(double timeout) override
Blocks as long as the same agent is still attached to the endpoint, a timeout is reached,...
Definition: Endpoint.cpp:178
double read_sample(std::vector< double > &sample) override
Read a set of samples from the Agent.
Definition: Endpoint.cpp:120
void wait_for_agent_attach(double timeout) override
Blocks until an agent attaches to the endpoint, a timeout is reached, or the operation is canceled wi...
Definition: Endpoint.cpp:162
static std::string shm_policy_postfix(void)
Definition: Endpoint.cpp:33
std::set< std::string > get_hostnames(void) override
Returns the list of hostnames used by the attached application, or empty if no controller is attached...
Definition: Endpoint.cpp:219
void open(void) override
Create the shared memory regions belonging to the Endpoint.
Definition: Endpoint.cpp:70
Definition: Accumulator.cpp:11
Definition: EndpointImp.hpp:33
double values[(4096 - offsetof(struct geopm_endpoint_policy_shmem_header, values))/sizeof(double)]
Holds resource manager data.
Definition: EndpointImp.hpp:39
geopm_time_s timestamp
Time that the memory was last updated.
Definition: EndpointImp.hpp:35
size_t count
Specifies the size of the following array.
Definition: EndpointImp.hpp:37
Definition: EndpointImp.hpp:42
char profile_name[GEOPM_ENDPOINT_PROFILE_NAME_MAX]
Holds the profile name associated with the attached job.
Definition: EndpointImp.hpp:49
double values[(4096 - offsetof(struct geopm_endpoint_sample_shmem_header, values))/sizeof(double)]
Holds resource manager data.
Definition: EndpointImp.hpp:56
size_t count
Specifies the size of the following array.
Definition: EndpointImp.hpp:54
char agent[GEOPM_ENDPOINT_AGENT_NAME_MAX]
Holds the name of the Agent attached, if any.
Definition: EndpointImp.hpp:46
char hostlist_path[GEOPM_ENDPOINT_HOSTLIST_PATH_MAX]
Path to a file containing the list of hostnames in the attached job.
Definition: EndpointImp.hpp:52
geopm_time_s timestamp
Time that the memory was last updated.
Definition: EndpointImp.hpp:44