17 #include <sys/utsname.h> 37 destination(
senf::MACAddress::None),
41 namespace kw = senf::console::kw;
46 initDir.
add(
"verbose", fty::Variable( verbose));
47 initDir.
add(
"num-packets", fty::Variable( numPackets));
48 initDir.
add(
"packet-size", fty::Variable( pktSize));
49 initDir.
add(
"send-buffer", fty::Variable( sendBuffer));
50 initDir.
add(
"interface", fty::Variable( interface));
51 initDir.
add(
"destination", fty::Variable( destination));
52 initDir.
add(
"sessionId", fty::Variable( sessionId));
55 enableHighresTimers();
56 enableRealtimeScheduling();
63 senf::console::DirectoryNode::ChildrenRange::iterator it;
64 for (it = range.begin(); it != range.end(); it++) {
65 std::cerr << it->first <<
": ";
66 it->second->help( std::cout);
74 std::cerr <<
"0.1" << std::endl;
81 if (senf::scheduler::haveScalableHiresTimers())
85 senf::scheduler::hiresTimers();
91 struct sched_param param;
92 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
93 if (sched_setscheduler(0, SCHED_FIFO, ¶m) !=0 ) {
104 namespace kw = senf::console::kw;
111 cmdlineOptions.
parse( initDir);
113 std::cerr << e.message() << std::endl;
117 std::cerr <<
"Exception occurred during configuration parsing: "
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()