phaser-server  0.0.4
Public Member Functions | List of all members
Commander Class Reference

A command session to the server. More...

#include <commander.h>

Public Member Functions

 Commander (const std::string &, int)
 Create a server command session. More...
 
void Command (const std::vector< std::string > &)
 Command the server. More...
 
void Interactive (void)
 Accept commands from stdin. More...
 
void SimplePlan (void)
 Send a simple Cavity phasing plan to the server.
 
void Apply (const std::vector< std::string > &)
 Apply phase corrections. More...
 

Detailed Description

A command session to the server.

Server commands are issued and server response is received. The user can pass a set of commands or start an interactive session.

Constructor & Destructor Documentation

◆ Commander()

Commander::Commander ( const std::string &  host,
int  port 
)

Create a server command session.

Note
The session is created with asynchronous server notifications disabled.
Parameters
host- The server's host.
port- The server's port number.

Member Function Documentation

◆ Apply()

void Commander::Apply ( const std::vector< std::string > &  ids)

Apply phase corrections.

Parameters
ids- list of database RESULT row identifiers.

◆ Command()

void Commander::Command ( const std::vector< std::string > &  commands)

Command the server.

Each of the passed commands is submitted individually to the server.

Note
The connection will be properly closed even if the passed commands so not include a 'bye'; since the server detects the closing of the socket that occurs when the class instance goes out of scope.
Parameters
commands- Collection of server commands.

◆ Interactive()

void Commander::Interactive ( void  )

Accept commands from stdin.

The command session is terminated when an empty command is entered.


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