17 #include <sys/utsname.h> 38 namespace kw = senf::console::kw;
43 initDir.
add(
"verbose", fty::Variable( verbose));
44 initDir.
add(
"num-buffers", fty::Variable( numBuffers));
45 initDir.
add(
"interface", fty::Variable( interface));
46 initDir.
add(
"monitor-interface", fty::Variable( monitorInterface));
47 initDir.
add(
"output-interface", fty::Variable( outputInterface));
48 initDir.
add(
"log-seqno-errors", fty::Variable( logSeqNoErrors));
51 enableHighresTimers();
58 senf::console::DirectoryNode::ChildrenRange::iterator it;
59 for (it = range.begin(); it != range.end(); it++) {
60 std::cerr << it->first <<
": ";
61 it->second->help( std::cout);
69 std::cerr <<
"0.1" << std::endl;
76 if (senf::scheduler::haveScalableHiresTimers())
80 senf::scheduler::hiresTimers();
86 struct sched_param param;
87 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
88 if (sched_setscheduler(0, SCHED_FIFO, ¶m) !=0 ) {
99 namespace kw = senf::console::kw;
106 cmdlineOptions.
parse( initDir);
108 std::cerr << e.message() << std::endl;
112 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()