Jpp
18.2.0
the software that should make you happy
|
Client data structure. More...
#include <JClient.hh>
Public Types | |
enum | JMode { UNKNOWN = -1, SLEEP = 0, ACTIVE, IGNORE = -2, ILLEGAL = -3 } |
Client modi. More... | |
Public Member Functions | |
JClient () | |
Default constructor. More... | |
JClient (const std::string &__name, const std::string &__hostname, const std::string &__start_command="") | |
Constructor. More... | |
void | start () |
Start process. More... | |
void | stop (const int signal=-9) |
Stop process. More... | |
const std::string & | getName () const |
Get name of run control client. More... | |
const std::string & | getHostname () const |
Get host name of run control client. More... | |
const std::string & | getFullName () const |
Get full name of run control client. More... | |
const std::string & | getStartCommand () const |
Get start command of run control client. More... | |
bool | isSleep () const |
Check sleep mode. More... | |
bool | isActive () const |
Check active mode. More... | |
bool | isIgnore () const |
Check ignore mode. More... | |
bool | isIllegal () const |
Check illegal mode. More... | |
bool | update (const JNET::JTag &tag, const std::string &buffer) |
Update client. More... | |
const std::string & | getStatename () const |
Get name of current state. More... | |
const std::string & | getEventname () const |
Get name of last event. More... | |
const std::string & | getEventInfo () const |
Get event information. More... | |
bool | getAlive () const |
Get alive status. More... | |
void | setAlive (const bool alive) |
Set alive status. More... | |
JMode | getMode () const |
Get mode. More... | |
void | setMode (const JMode mode) |
Set mode. More... | |
int | getBorn () const |
Get born count. More... | |
int | getDied () const |
Get died count. More... | |
Static Public Attributes | |
static std::string | SERVER |
host name of message server More... | |
static std::string | LOGGER |
host name of message logger More... | |
Protected Member Functions | |
void | configure () |
Configure client parameters. More... | |
Protected Attributes | |
std::string | name |
std::string | hostname |
JLANG::JString | start_command |
std::string | full_name |
JMode | mode |
int | born |
int | died |
bool | is_alive |
std::string | state_name |
std::string | event_name |
std::string | event_info |
Friends | |
std::istream & | operator>> (std::istream &in, JClient &client) |
Read client from input. More... | |
std::ostream & | operator<< (std::ostream &out, const JClient &client) |
Write client to output. More... | |
Client data structure.
Definition at line 28 of file JClient.hh.
Client modi.
Enumerator | |
---|---|
UNKNOWN | |
SLEEP | |
ACTIVE | |
IGNORE | |
ILLEGAL |
Definition at line 39 of file JClient.hh.
|
inline |
|
inline |
Constructor.
__name | name of client |
__hostname | host name |
__start_command | start command |
Definition at line 66 of file JClient.hh.
|
inline |
Start process.
The start command is issued on the (remote) host.
Definition at line 88 of file JClient.hh.
|
inline |
Stop process.
A kill command is issued on the (remote) host. To determine the PID for the kill command, the start command is compared to the output of a ps command on the (remote) host.
signal | signal |
Definition at line 111 of file JClient.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Check sleep mode.
Definition at line 218 of file JClient.hh.
|
inline |
Check active mode.
Definition at line 229 of file JClient.hh.
|
inline |
Check ignore mode.
Definition at line 240 of file JClient.hh.
|
inline |
Check illegal mode.
Definition at line 251 of file JClient.hh.
|
inline |
Update client.
The client parameters are updated according to the ControlHost tag and message.
tag | tag |
buffer | message |
Definition at line 265 of file JClient.hh.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
Configure client parameters.
In this, the following tokens in the start command are substituted: $HOST$ by <host name>; $NAME$ by <process name>; $SERVER$ by JClient::SERVER; $LOGGER$ by JClient::LOGGER; $ARGS$ by part following last '/' in <process name>;
Definition at line 465 of file JClient.hh.
|
friend |
Read client from input.
in | istream |
client | client |
Definition at line 418 of file JClient.hh.
|
friend |
Write client to output.
out | ostream |
client | client |
Definition at line 443 of file JClient.hh.
|
static |
host name of message server
Definition at line 32 of file JClient.hh.
|
static |
host name of message logger
Definition at line 33 of file JClient.hh.
|
protected |
Definition at line 487 of file JClient.hh.
|
protected |
Definition at line 488 of file JClient.hh.
|
protected |
Definition at line 489 of file JClient.hh.
|
protected |
Definition at line 490 of file JClient.hh.
|
protected |
Definition at line 491 of file JClient.hh.
|
protected |
Definition at line 492 of file JClient.hh.
|
protected |
Definition at line 493 of file JClient.hh.
|
protected |
Definition at line 494 of file JClient.hh.
|
protected |
Definition at line 495 of file JClient.hh.
|
protected |
Definition at line 496 of file JClient.hh.
|
protected |
Definition at line 497 of file JClient.hh.