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

#include <BatchClient.hpp>

Inheritance diagram for geopm::BatchClientImp:
Collaboration diagram for geopm::BatchClientImp:

Public Member Functions

 BatchClientImp (const std::string &server_key, double timeout, int num_signal, int num_control)
 BatchClientImp (int num_signal, int num_control, std::shared_ptr< BatchStatus > batch_status, std::shared_ptr< SharedMemory > signal_shmem, std::shared_ptr< SharedMemory > control_shmem)
virtual ~BatchClientImp ()=default
std::vector< double > read_batch (void) override
 Ask batch server to read all signal values and return result.
void write_batch (std::vector< double > settings) override
 Ask batch server to write all of the control values.
void stop_batch (void) override
 Send message to batch server asking it to quit.
Public Member Functions inherited from geopm::BatchClient
 BatchClient ()=default
virtual ~BatchClient ()=default

Additional Inherited Members

Static Public Member Functions inherited from geopm::BatchClient
static std::unique_ptr< BatchClient > make_unique (const std::string &server_key, double timeout, int num_signal, int num_control)
 Factory method to create a pointer to a BatchClient object.

Constructor & Destructor Documentation

◆ BatchClientImp() [1/2]

geopm::BatchClientImp::BatchClientImp ( const std::string & server_key,
double timeout,
int num_signal,
int num_control )

◆ BatchClientImp() [2/2]

geopm::BatchClientImp::BatchClientImp ( int num_signal,
int num_control,
std::shared_ptr< BatchStatus > batch_status,
std::shared_ptr< SharedMemory > signal_shmem,
std::shared_ptr< SharedMemory > control_shmem )

◆ ~BatchClientImp()

virtual geopm::BatchClientImp::~BatchClientImp ( )
virtualdefault

Member Function Documentation

◆ read_batch()

std::vector< double > geopm::BatchClientImp::read_batch ( void )
overridevirtual

Ask batch server to read all signal values and return result.

Command is issued to batch server to read all pushed signal values. All of the values read by the batch server are returned.

Returns
A vector containing all values read by batch server

Implements geopm::BatchClient.

◆ stop_batch()

void geopm::BatchClientImp::stop_batch ( void )
overridevirtual

Send message to batch server asking it to quit.

Implements geopm::BatchClient.

◆ write_batch()

void geopm::BatchClientImp::write_batch ( std::vector< double > settings)
overridevirtual

Ask batch server to write all of the control values.

Sends the vector of settings to the batch server. This function blocks until the batch server has written all values.

Parameters
settings[in] Control settings to be written: one for each control requests made when batch server was created.

Implements geopm::BatchClient.


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