23 int main(
int argc,
const char *argv[])
38 JParser<> zap(
"Auxiliary program to send messages to ControlHost server.");
44 zap[
'n'] =
make_field(numberOfEvents) = numeric_limits<int>::max();
50 catch(
const exception &error) {
51 FATAL(error.what() << endl);
56 FATAL(
"No tags specified.");
59 JControlHost::Throw(
true);
65 JTimekeeper timer((
long long int) (1.0e6 / rate_Hz));
69 for (
int i = 0; i != size; ++i) {
70 buffer[i] =
'a' + (i%26);
80 for (
int i = 1; i <= numberOfEvents; ++i) {
89 DEBUG(
"Time [us] " << setw(10) << t1 - t0 << endl);
90 DEBUG(
"<delay> [us] " << setw(10) << timer.
getDelay() / i << endl);
91 DEBUG(
"Count all " << setw(10) << all << endl);
92 DEBUG(
"Count few " << setw(10) << few << endl);
General purpose messaging.
#define DEBUG(A)
Message macros.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int main(int argc, const char *argv[])
Scheduling of actions via fixed latency intervals.
long long int getDelay() const
Get total delay time.
void wait() const
Wait until the number of time intervals has elapsed since the last call to the reset method.
void reset(const long long int t0)
Reset time.
Exception for ControlHost.
int PutFullData(const JTag &tag, const void *buffer, const long long int length)
Send data.
Utility class to parse command line options.
static const JTag DISPTAG_UNDEFINED(0)
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const JLocalTime getLocalTime
Function object to get local time in micro seconds.