geopm 3.2.1.dev535+ga96c120fc
GEOPM - Global Extensible Open Power Manager
Loading...
Searching...
No Matches
geopm::BatchStatus Class Referenceabstract

#include <BatchStatus.hpp>

Inheritance diagram for geopm::BatchStatus:

Public Member Functions

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

Static Public Member Functions

static std::unique_ptr< BatchStatus > make_unique_server (int client_pid, const std::string &server_key)
static std::unique_ptr< BatchStatus > make_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

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

◆ M_MESSAGE_QUIT

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

◆ M_MESSAGE_READ

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

◆ M_MESSAGE_TERMINATE

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

◆ M_MESSAGE_WRITE

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

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