geopm  3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | List of all members
geopm::Endpoint Class Referenceabstract

#include <Endpoint.hpp>

Inheritance diagram for geopm::Endpoint:
Inheritance graph
[legend]

Public Member Functions

virtual ~Endpoint ()=default
 
virtual void open (void)=0
 Create the shared memory regions belonging to the Endpoint. More...
 
virtual void close (void)=0
 Unlink the shared memory regions belonging to the Endpoint. More...
 
virtual void write_policy (const std::vector< double > &policy)=0
 Write a set of policy values for the Agent. More...
 
virtual double read_sample (std::vector< double > &sample)=0
 Read a set of samples from the Agent. More...
 
virtual std::string get_agent (void)=0
 Returns the Agent name, or empty string if no Agent is attached. More...
 
virtual void wait_for_agent_attach (double timeout)=0
 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...
 
virtual void wait_for_agent_detach (double timeout)=0
 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...
 
virtual void stop_wait_loop (void)=0
 Cancels any current wait loops in this Endpoint. More...
 
virtual void reset_wait_loop (void)=0
 Re-enables wait loops occurring after this call. More...
 
virtual std::string get_profile_name (void)=0
 Returns the profile name associated with the attached application, or empty if no controller is attached. More...
 
virtual std::set< std::string > get_hostnames (void)=0
 Returns the list of hostnames used by the attached application, or empty if no controller is attached. More...
 

Static Public Member Functions

static std::unique_ptr< Endpointmake_unique (const std::string &data_path)
 Factory method for the Endpoint used to set the policy. More...
 

Constructor & Destructor Documentation

◆ ~Endpoint()

virtual geopm::Endpoint::~Endpoint ( )
virtualdefault

Member Function Documentation

◆ close()

virtual void geopm::Endpoint::close ( void  )
pure virtual

Unlink the shared memory regions belonging to the Endpoint.

Implemented in geopm::EndpointImp.

◆ get_agent()

virtual std::string geopm::Endpoint::get_agent ( void  )
pure virtual

Returns the Agent name, or empty string if no Agent is attached.

Implemented in geopm::EndpointImp.

◆ get_hostnames()

virtual std::set<std::string> geopm::Endpoint::get_hostnames ( void  )
pure virtual

Returns the list of hostnames used by the attached application, or empty if no controller is attached.

Implemented in geopm::EndpointImp.

◆ get_profile_name()

virtual std::string geopm::Endpoint::get_profile_name ( void  )
pure virtual

Returns the profile name associated with the attached application, or empty if no controller is attached.

Implemented in geopm::EndpointImp.

◆ make_unique()

std::unique_ptr< Endpoint > geopm::Endpoint::make_unique ( const std::string &  data_path)
static

Factory method for the Endpoint used to set the policy.

◆ open()

virtual void geopm::Endpoint::open ( void  )
pure virtual

Create the shared memory regions belonging to the Endpoint.

Implemented in geopm::EndpointImp.

◆ read_sample()

virtual double geopm::Endpoint::read_sample ( std::vector< double > &  sample)
pure virtual

Read a set of samples from the Agent.

Parameters
[out]sampleThe sample values. The order is specified by the Agent.
Returns
The age of the sample in seconds.

Implemented in geopm::EndpointImp.

◆ reset_wait_loop()

virtual void geopm::Endpoint::reset_wait_loop ( void  )
pure virtual

Re-enables wait loops occurring after this call.

Implemented in geopm::EndpointImp.

◆ stop_wait_loop()

virtual void geopm::Endpoint::stop_wait_loop ( void  )
pure virtual

Cancels any current wait loops in this Endpoint.

Implemented in geopm::EndpointImp.

◆ wait_for_agent_attach()

virtual void geopm::Endpoint::wait_for_agent_attach ( double  timeout)
pure virtual

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().

Implemented in geopm::EndpointImp.

◆ wait_for_agent_detach()

virtual void geopm::Endpoint::wait_for_agent_detach ( double  timeout)
pure virtual

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().

Implemented in geopm::EndpointImp.

◆ write_policy()

virtual void geopm::Endpoint::write_policy ( const std::vector< double > &  policy)
pure virtual

Write a set of policy values for the Agent.

Parameters
[in]policyThe policy values. The order is specified by the Agent.

Implemented in geopm::EndpointImp.


The documentation for this class was generated from the following files: