Auxiliary class for itemization of process list.
More...
#include <JRuncontrolToolkit.hh>
|
static const char | SEPARATOR = ':' |
| Separation character between hostname and port number.
|
|
Auxiliary class for itemization of process list.
Definition at line 341 of file JRuncontrolToolkit.hh.
◆ JDAQProcess() [1/2]
KM3NETDAQ::JDAQProcess::JDAQProcess |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 348 of file JRuncontrolToolkit.hh.
348 :
351 {}
std::string index
index in process list
JHostname()
Default constructor.
◆ JDAQProcess() [2/2]
KM3NETDAQ::JDAQProcess::JDAQProcess |
( |
const JHostname & | hostname, |
|
|
const std::string & | key = "" ) |
|
inline |
◆ getUniqueTag()
JTag KM3NETDAQ::JDAQProcess::getUniqueTag |
( |
| ) |
const |
|
inline |
Get unique tag.
- Returns
- tag
Definition at line 372 of file JRuncontrolToolkit.hh.
373 {
376
377 ostringstream os;
378
380
381 return JTag(os.str());
382 }
Auxiliary classes and methods for operating system calls.
int getIPnumber()
Get IP number.
unsigned short getSubaddress()
Get host identifier within network.
◆ equals() [1/3]
bool KM3NETDAQ::JDAQProcess::equals |
( |
const JTag & | tag | ) |
const |
|
inline |
Test whether given tag equals.
The comparison is based on the unique tag.
- Parameters
-
- Returns
- true if match; else false
Definition at line 392 of file JRuncontrolToolkit.hh.
393 {
395 }
JTag getUniqueTag() const
Get unique tag.
◆ equals() [2/3]
bool KM3NETDAQ::JDAQProcess::equals |
( |
int | port | ) |
const |
|
inline |
Test whether given port equals.
The comparison is based on the IP number and port number.
- Parameters
-
- Returns
- true if match; else false
Definition at line 405 of file JRuncontrolToolkit.hh.
◆ equals() [3/3]
bool KM3NETDAQ::JDAQProcess::equals |
( |
const JHostname & | hostname | ) |
const |
|
inline |
Test whether given host name equals.
The comparison is based on the IP number and port number.
- Parameters
-
- Returns
- true if match; else false
Definition at line 418 of file JRuncontrolToolkit.hh.
◆ set()
void JNET::JHostname::set |
( |
const std::string & | buffer | ) |
|
|
inlineinherited |
Set hostname and port number.
The argument correponds to the hostname and an optional port number of the server.
The syntax is hostname[:port]
. The default port number is DISPATCH_PORT.
If the complete buffer corresponds to an integer value, it is interpreted as the port number.
- Parameters
-
buffer | host name and optional port number |
Definition at line 104 of file JHostname.hh.
105 {
107
108 const string::size_type pos = buffer.find(
SEPARATOR);
109
110 if (pos != string::npos) {
111
112 this->
hostname = buffer.substr(0, pos);
113
114 istringstream(buffer.substr(pos + 1)) >> this->
port;
115
116 } else {
117
118 bool is_number = true;
119
120 for (string::const_iterator i = buffer.begin(); is_number && i != buffer.end(); ++i) {
121 is_number &= isdigit(*i);
122 }
123
124 if (is_number) {
125
127
128 istringstream(buffer) >> this->
port;
129
130 } else {
131
134 }
135 }
136 }
static const int DISPATCH_PORT
Default ControlHost port.
static const char SEPARATOR
Separation character between hostname and port number.
◆ operator>>
std::istream & operator>> |
( |
std::istream & | in, |
|
|
JDAQProcess & | object ) |
|
friend |
Read process from input stream.
- Parameters
-
in | input stream |
object | process |
- Returns
- input stream
Definition at line 431 of file JRuncontrolToolkit.hh.
432 {
433 in >> object.index;
435
436 return in;
437 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JDAQProcess & | object ) |
|
friend |
Write process to output stream.
- Parameters
-
out | output stream |
object | process |
- Returns
- output stream
Definition at line 447 of file JRuncontrolToolkit.hh.
448 {
449 out << object.index;
450 out << ' ';
451 out << static_cast<const JHostname&>(object);
452
453 return out;
454 }
◆ index
std::string KM3NETDAQ::JDAQProcess::index |
◆ SEPARATOR
const char JNET::JHostname::SEPARATOR = ':' |
|
staticinherited |
Separation character between hostname and port number.
Definition at line 39 of file JHostname.hh.
◆ hostname
std::string JNET::JHostname::hostname |
|
inherited |
◆ port
int JNET::JHostname::port |
|
inherited |
The documentation for this class was generated from the following file: