27 int main(
int argc,
const char *argv[])
40 JParser<> zap(
"Auxiliary program to receive messages from ControlHost server.");
42 zap[
'H'] =
make_field(hostname,
"host name of message srver") =
"localhost";
45 zap[
'D'] =
make_field(date,
"print date and time of message receipt");
50 catch(
const exception &error) {
51 FATAL(error.what() << endl);
55 if (tagList.empty() && TagList.empty()) {
56 FATAL(
"No tags specified.");
60 JControlHost::Throw(
true);
64 JControlHost
in(hostname);
67 JSubscriptionList buffer;
70 buffer.add(JSubscriptionAny(*
i));
74 buffer.add(JSubscriptionAll(*
i));
77 in.MyId(
"JGetMessage");
86 for (
const string stop(
"stop"); buffer.size() !=
stop.size() || string(buffer.data(),
stop.size()) !=
stop; ) {
90 buffer.resize(prefix.getSize());
92 in.GetFullData(buffer.data(), buffer.size());
98 cout << left << setw(8) << prefix.getTag() <<
' ' << right << setw(8) << prefix.getSize();
100 if (TagList.find(prefix) != TagList.end()) {
101 cout <<
' ' << string(buffer.data(), buffer.size());
107 catch(
const exception& error) {
108 FATAL(error.what() << endl);
Utility class to parse command line options.
int main(int argc, char *argv[])
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
then usage $script[port]< option > nPossible stop
static JDateAndTime getDateAndTime
Function object to get current date and time.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Utility class to parse command line options.