29 reportingInterval(
senf::ClockService::milliseconds(1000)),
30 duration(
senf::ClockService::seconds(10)),
34 destination(
senf::MACAddress::Broadcast),
35 txPeriod(
senf::ClockService::microseconds(0)),
36 txDuration(
senf::ClockService::microseconds(0)),
39 sndBuf(txFrameLength * 8)
47 initDir.
add(
"verbose", fty::Variable(verbose));
48 initDir.
add(
"phy-name", fty::Variable(phyName));
49 initDir.
add(
"reporting-interval", fty::Variable( reportingInterval)
50 .
parser(senf::parseClockServiceInterval));
51 initDir.
add(
"duration", fty::Variable(duration)
52 .
parser(senf::parseClockServiceInterval));
54 initDir.
add(
"frequency", fty::Variable(frequency));
55 initDir.
add(
"ht40", fty::Variable(ht40));
56 initDir.
add(
"rateIdx", fty::Variable(rateIdx));
58 initDir.
add(
"destination", fty::Variable(destination));
60 initDir.
add(
"tx-period", fty::Variable(txPeriod)
61 .
parser(senf::parseClockServiceInterval));
62 initDir.
add(
"tx-duration", fty::Variable(txDuration)
63 .
parser(senf::parseClockServiceInterval));
64 initDir.
add(
"tx-power", fty::Variable(txPower));
65 initDir.
add(
"tx-frame-length", fty::Variable(txFrameLength));
67 initDir.
add(
"sndBuf", fty::Variable(sndBuf));
70 enableHighresTimers();
77 senf::console::DirectoryNode::ChildrenRange::iterator it;
78 for (it = range.begin(); it != range.end(); it++) {
79 std::cerr << it->first <<
": ";
80 it->second->help( std::cout);
88 std::cerr <<
"1.2" << std::endl;
95 if (senf::scheduler::haveScalableHiresTimers())
99 senf::scheduler::hiresTimers();
105 struct sched_param param;
106 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
107 if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) {
110 mlockall(MCL_FUTURE);
118 namespace kw = senf::console::kw;
125 cmdlineOptions.
parse( initDir);
127 std::cerr << e.message() << std::endl;
131 std::cerr <<
"Exception occurred during configuration parsing: "
unspecified_keyword_type parser
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()