19int main(
int argc,
char* argv[])
32 JParser<> zap(
"Example program to test communication with JControlHost server.");
42 catch(
const exception &error) {
47 const string pid =
argv[0];
66 DEBUG(
"Send message: "
67 <<
"tag <" << tag <<
"> "
68 <<
"string <" << message <<
">" <<
endl);
70 socket.PutFullString(tag, message);
80 if (
socket.CheckHead(prefix) > 0) {
83 <<
"time " << i <<
" us "
84 <<
"tag <" << prefix.
getTag() <<
"> "
88 socket.GetFullString(buffer);
112 ControlHost::WhereIs(hostname, pid,
answer);
116 for (
string buffer; is >> buffer; ) {
120 ASSERT(buffer == getHostname(getIPnumber()));
133 ControlHost::Throw(
true);
135 socket.PutFullString(tag[0], message);
149 ControlHost::Throw(
false);
int main(int argc, char *argv[])
General purpose messaging.
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
Hostname and IP address functions.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
virtual const char * what() const override
Get error message.
int getSize() const
Get size.
std::string toString() const
Convert tag to string.
const JTag & getTag() const
Get tag.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for all subscription.
Auxiliary class for any subscription.