Jpp
18.2.1-ARCA-DF-PATCH
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JNet
JShowStat.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
Jeep/JParser.hh
"
6
#include "
JNet/JControlHost.hh
"
7
8
9
/**
10
* \file
11
*
12
* Auxiliary program to send show status message to JLigier.cc - ControlHost server.\n
13
* The status will then be printed by the server.
14
*
15
* The option <tt>-H <hostname>[:port]</tt> correponds to the hostname and the port of the server, respectively.
16
* \author mdejong
17
*/
18
int
main
(
int
argc,
const
char
*argv[])
19
{
20
using namespace
std;
21
using namespace
JPP;
22
23
string
hostname;
24
int
debug
;
25
26
try
{
27
28
JParser<>
zap(
"Auxiliary program to send show status messages to JLigier - ControlHost server."
);
29
30
zap[
'H'
] =
make_field
(hostname) =
"localhost"
;
31
zap[
'd'
] =
make_field
(
debug
) = 3;
32
33
zap(argc, argv);
34
}
35
catch
(
const
exception &error) {
36
FATAL
(error.what() << endl);
37
}
38
39
40
JControlHost::Throw(
true
);
41
42
try
{
43
44
JControlHost out(hostname);
45
46
out.PutFullString(
DISPTAG_ShowStat
,
""
);
47
}
48
catch
(
const
JControlHostException& error) {
49
ERROR
(error << endl);
50
}
51
}
52
53
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1514
JControlHost.hh
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:1989
ERROR
#define ERROR(A)
Definition:
JMessage.hh:66
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JNET::DISPTAG_ShowStat
static const JTag DISPTAG_ShowStat("_ShowSta")
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
Generated by
1.8.5