geopm  3.1.1.dev272+gdfb40a8d
GEOPM - Global Extensible Open Power Manager
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
geopm::BatchStatus Class Referenceabstract

#include <BatchStatus.hpp>

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

Public Member Functions

 BatchStatus ()=default
 
virtual ~BatchStatus ()=default
 
virtual void send_message (char msg)=0
 Send an integer to the other process. More...
 
virtual char receive_message (void)=0
 Receive any integer from the other process. More...
 
virtual void receive_message (char expect)=0
 Receive specified integer from the other process. More...
 

Static Public Member Functions

static std::unique_ptr< BatchStatusmake_unique_server (int client_pid, const std::string &server_key)
 
static std::unique_ptr< BatchStatusmake_unique_client (const std::string &server_key)
 

Static Public Attributes

static constexpr char M_MESSAGE_READ = 'r'
 
static constexpr char M_MESSAGE_WRITE = 'w'
 
static constexpr char M_MESSAGE_CONTINUE = 'c'
 
static constexpr char M_MESSAGE_QUIT = 'q'
 
static constexpr char M_MESSAGE_TERMINATE = 't'
 

Constructor & Destructor Documentation

◆ BatchStatus()

geopm::BatchStatus::BatchStatus ( )
default

◆ ~BatchStatus()

virtual geopm::BatchStatus::~BatchStatus ( )
virtualdefault

Member Function Documentation

◆ make_unique_client()

std::unique_ptr< BatchStatus > geopm::BatchStatus::make_unique_client ( const std::string &  server_key)
static

◆ make_unique_server()

std::unique_ptr< BatchStatus > geopm::BatchStatus::make_unique_server ( int  client_pid,
const std::string &  server_key 
)
static

◆ receive_message() [1/2]

virtual void geopm::BatchStatus::receive_message ( char  expect)
pure virtual

Receive specified integer from the other process.

Parameters
expect[in] Value that is expected to be received from other process.
Exceptions
Exceptionif a message is received, but the message does not match the expected_message.

Implemented in geopm::BatchStatusImp.

◆ receive_message() [2/2]

virtual char geopm::BatchStatus::receive_message ( void  )
pure virtual

Receive any integer from the other process.

Returns
Message received

Implemented in geopm::BatchStatusImp.

◆ send_message()

virtual void geopm::BatchStatus::send_message ( char  msg)
pure virtual

Send an integer to the other process.

Parameters
msg[in] Message number to send.

Implemented in geopm::BatchStatusImp.

Member Data Documentation

◆ M_MESSAGE_CONTINUE

constexpr char geopm::BatchStatus::M_MESSAGE_CONTINUE = 'c'
staticconstexpr

◆ M_MESSAGE_QUIT

constexpr char geopm::BatchStatus::M_MESSAGE_QUIT = 'q'
staticconstexpr

◆ M_MESSAGE_READ

constexpr char geopm::BatchStatus::M_MESSAGE_READ = 'r'
staticconstexpr

◆ M_MESSAGE_TERMINATE

constexpr char geopm::BatchStatus::M_MESSAGE_TERMINATE = 't'
staticconstexpr

◆ M_MESSAGE_WRITE

constexpr char geopm::BatchStatus::M_MESSAGE_WRITE = 'w'
staticconstexpr

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