24 #include "cheetah/rcpt_low/Config.h" 33 : utils::Config(
"udp_low")
35 , _spectra_per_chunk(128U)
36 , _endpoint_config(
"listen")
38 _endpoint_config.address(ska::panda::IpAddress(34345,
"127.0.0.1"));
39 add(_endpoint_config);
46 void Config::add_options(OptionsDescriptionEasyInit& add_options)
49 (
"number_of_threads", boost::program_options::value<unsigned>()->default_value(1U)->notifier([&](
unsigned v) { _engine_config = v; }) ,
"the number of threads to run the engine")
50 (
"spectra_per_chunk", boost::program_options::value<unsigned>(&_spectra_per_chunk)->default_value(_spectra_per_chunk),
"the number of time slices in each chunk (time_slices x no_of_channels = total data samples)")
51 (
"number_of_channels", boost::program_options::value<unsigned>(&_number_of_channels)->default_value(8U),
"the number of frequency channels in each time sample")
52 (
"max_buffers", boost::program_options::value<std::size_t>(&_max_buffer_count)->default_value(10U),
"the max number of udp packet buffers to use");
55 Config::Engine& Config::engine()
const 58 _engine.reset(
new Engine(_engine_config));
65 return _endpoint_config.address().end_point<boost::asio::ip::udp::endpoint>();;
70 _endpoint_config.address(ska::panda::IpAddress(endpoint));
73 unsigned Config::spectra_per_chunk()
const 75 return _spectra_per_chunk;
78 void Config::spectra_per_chunk(
unsigned num)
80 _spectra_per_chunk = num;
85 return _number_of_channels;
90 _number_of_channels = num;
95 return _max_buffer_count;
unsigned number_of_channels() const
return the number of channels in a chunk
Some limits and constants for FLDO.
boost::asio::ip::udp::endpoint remote_end_point() const
geters and setters for the UDP connection (IP address and port or remote peer)
std::size_t max_buffers() const
return the maximum number of UDP packet buffers to use