29 debugFS(
"/sys/kernel/debug"),
30 reportingInterval(
senf::ClockService::milliseconds(1000)),
31 duration(
senf::ClockService::seconds(10)),
35 spectralFFTPeriod(0x02),
38 spectralEndless(false),
39 spectralShortRepeat(true)
47 initDir.
add(
"verbose", fty::Variable(verbose));
48 initDir.
add(
"phy-name", fty::Variable(phyName));
49 initDir.
add(
"debug-fs", fty::Variable(debugFS));
50 initDir.
add(
"reporting-interval", fty::Variable( reportingInterval)
51 .
parser(senf::parseClockServiceInterval));
52 initDir.
add(
"duration", fty::Variable(duration)
53 .
parser(senf::parseClockServiceInterval));
55 initDir.
add(
"frequency", fty::Variable(frequency));
56 initDir.
add(
"ht40", fty::Variable(ht40));
58 initDir.
add(
"spectral-period", fty::Variable(spectralPeriod));
59 initDir.
add(
"spectral-fft-period", fty::Variable(spectralFFTPeriod));
60 initDir.
add(
"spectral-bins", fty::Variable(spectralBins));
61 initDir.
add(
"spectral-count", fty::Variable(spectralCount));
62 initDir.
add(
"spectral-endless", fty::Variable(spectralEndless));
63 initDir.
add(
"spectral-short-repeat", fty::Variable(spectralShortRepeat));
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 <<
"1.2" << std::endl;
91 if (senf::scheduler::haveScalableHiresTimers())
95 senf::scheduler::hiresTimers();
101 struct sched_param param;
102 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
103 if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) {
106 mlockall(MCL_FUTURE);
114 namespace kw = senf::console::kw;
121 cmdlineOptions.
parse( initDir);
123 std::cerr << e.message() << std::endl;
127 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()