geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
#include <EndpointImp.hpp>
Public Member Functions | |
EndpointImp ()=delete | |
EndpointImp (const EndpointImp &other)=delete | |
EndpointImp & | operator= (const EndpointImp &other)=delete |
EndpointImp (const std::string &data_path) | |
EndpointImp (const std::string &data_path, std::shared_ptr< SharedMemory > policy_shmem, std::shared_ptr< SharedMemory > sample_shmem, size_t num_policy, size_t num_sample) | |
virtual | ~EndpointImp () |
void | open (void) override |
Create the shared memory regions belonging to the Endpoint. More... | |
void | close (void) override |
Unlink the shared memory regions belonging to the Endpoint. More... | |
void | write_policy (const std::vector< double > &policy) override |
Write a set of policy values for the Agent. More... | |
double | read_sample (std::vector< double > &sample) override |
Read a set of samples from the Agent. More... | |
std::string | get_agent (void) override |
Returns the Agent name, or empty string if no Agent is attached. More... | |
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 with stop_wait_loop(). Throws an exception if the given timeout is reached before an agent attaches. The name of the attached agent can be read with get_agent(). More... | |
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, or the operation is canceled with stop_wait_loop(). The name of the attached agent can be read with get_agent(). More... | |
void | stop_wait_loop (void) override |
Cancels any current wait loops in this Endpoint. More... | |
void | reset_wait_loop (void) override |
Re-enables wait loops occurring after this call. More... | |
std::string | get_profile_name (void) override |
Returns the profile name associated with the attached application, or empty if no controller is attached. More... | |
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. More... | |
Public Member Functions inherited from geopm::Endpoint | |
virtual | ~Endpoint ()=default |
Static Public Member Functions | |
static std::string | shm_policy_postfix (void) |
static std::string | shm_sample_postfix (void) |
Static Public Member Functions inherited from geopm::Endpoint | |
static std::unique_ptr< Endpoint > | make_unique (const std::string &data_path) |
Factory method for the Endpoint used to set the policy. More... | |
|
delete |
|
delete |
geopm::EndpointImp::EndpointImp | ( | const std::string & | data_path | ) |
geopm::EndpointImp::EndpointImp | ( | const std::string & | data_path, |
std::shared_ptr< SharedMemory > | policy_shmem, | ||
std::shared_ptr< SharedMemory > | sample_shmem, | ||
size_t | num_policy, | ||
size_t | num_sample | ||
) |
|
virtual |
|
overridevirtual |
Unlink the shared memory regions belonging to the Endpoint.
Implements geopm::Endpoint.
|
overridevirtual |
Returns the Agent name, or empty string if no Agent is attached.
Implements geopm::Endpoint.
|
overridevirtual |
Returns the list of hostnames used by the attached application, or empty if no controller is attached.
Implements geopm::Endpoint.
|
overridevirtual |
Returns the profile name associated with the attached application, or empty if no controller is attached.
Implements geopm::Endpoint.
|
overridevirtual |
Create the shared memory regions belonging to the Endpoint.
Implements geopm::Endpoint.
|
delete |
|
overridevirtual |
Read a set of samples from the Agent.
[out] | sample | The sample values. The order is specified by the Agent. |
Implements geopm::Endpoint.
|
overridevirtual |
Re-enables wait loops occurring after this call.
Implements geopm::Endpoint.
|
static |
|
static |
|
overridevirtual |
Cancels any current wait loops in this Endpoint.
Implements geopm::Endpoint.
|
overridevirtual |
Blocks until an agent attaches to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). Throws an exception if the given timeout is reached before an agent attaches. The name of the attached agent can be read with get_agent().
Implements geopm::Endpoint.
|
overridevirtual |
Blocks as long as the same agent is still attached to the endpoint, a timeout is reached, or the operation is canceled with stop_wait_loop(). The name of the attached agent can be read with get_agent().
Implements geopm::Endpoint.
|
overridevirtual |
Write a set of policy values for the Agent.
[in] | policy | The policy values. The order is specified by the Agent. |
Implements geopm::Endpoint.