27 : tsftHistogram(false),
33 reorderTimeout(
senf::ClockService::milliseconds(0)),
34 reportingInterval(
senf::ClockService::milliseconds(1000)),
35 duration(
senf::ClockService::milliseconds(0)),
36 maxWait(
senf::ClockService::milliseconds(0)),
46 initDir.
add(
"log-destination", fty::Variable( logDestination));
47 initDir.
add(
"tsft-histogram", fty::Variable( tsftHistogram));
48 initDir.
add(
"verbose", fty::Variable( verbose));
49 initDir.
add(
"csv-mode", fty::Variable( csvMode));
50 initDir.
add(
"clockDrift", fty::Variable( clockDrift)
51 .doc(
"Clock Drift between the nodes in ms/s (in MGEN mode). Defaults to 0."));
52 initDir.
add(
"reporting-interval", fty::Variable( reportingInterval)
53 .
parser(senf::parseClockServiceInterval) );
54 initDir.
add(
"duration", fty::Variable( duration)
55 .
parser(senf::parseClockServiceInterval) );
56 initDir.
add(
"max-wait", fty::Variable( maxWait)
57 .
parser(senf::parseClockServiceInterval) );
58 initDir.
add(
"num-packets", fty::Variable( numPackets));
60 initDir.
add(
"reorder-packets", fty::Variable( reorderPackets));
61 initDir.
add(
"reorder-timeout", fty::Variable( reorderTimeout)
62 .
parser(senf::parseClockServiceInterval) );
63 initDir.
add(
"promisc", fty::Variable( promisc));
66 enableHighresTimers();
73 senf::console::DirectoryNode::ChildrenRange::iterator it;
74 for (it = range.begin(); it != range.end(); it++) {
75 std::cerr << it->first <<
": ";
76 it->second->help( std::cout);
84 std::cerr <<
"2.0" << std::endl;
96 if (senf::scheduler::haveScalableHiresTimers())
100 senf::scheduler::hiresTimers();
106 struct sched_param param;
107 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
108 if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) {
111 mlockall(MCL_FUTURE);
119 namespace kw = senf::console::kw;
126 cmdlineOptions.
parse( initDir);
128 std::cerr << e.message() << std::endl;
132 std::cerr <<
"Exception occurred during configuration parsing: "
unspecified_keyword_type parser
void dev(std::string const &d)
std::string backtrace() const
boost::iterator_range< ChildMap::const_iterator > ChildrenRange
NodeType & add(std::string const &name, boost::shared_ptr< NodeType > node)
bool parse(int argc, char const *argv[])
void enableHighresTimers()
std::string message() const
void enableRealtimeScheduling()