34 namespace po = boost::program_options;
35 po::options_description desc(
"Allowed options");
37 (
"help",
"help message")
38 (
"uhdargs", po::value<std::string>(&
radio_args)->default_value(
""),
39 "extra parameters to pass to device creator (e.g. device id, address, type)")
40 (
"config", po::value<std::string>(&
config_filename)->default_value(
"~/.soda/config.xml"),
41 "configuration file for initial settings")
43 "unix domain socket name for server to UI client message channels")
44 (
"audio", po::value<std::string>(&
audio_portname)->default_value(
"default"),
45 "Audio device name for ALSA audio.")
47 "Force Integer-N synthesis for front-end local oscillators")
48 (
"fracN", po::value<bool>(&
force_frac_N_mode)->default_value(
false)->implicit_value(
true),
49 "Force Fractional-N synthesis for front-end local oscillators")
50 (
"debug", po::value<unsigned int>(&
debug_level)->default_value(0)->implicit_value(1),
51 "Enable debug messages for value > 0. Higher values may produce more detail.")
52 (
"radio", po::value<std::string>(&
radio_type)->default_value(
"USRP"),
53 "the radio type (USRP, Lime)")
54 (
"gps_host", po::value<std::string>(&
gps_hostname)->default_value(
"localhost"),
55 "hostname for gpsd server")
56 (
"gps_port", po::value<std::string>(&
gps_portname)->default_value(
"2947"),
57 "port number for gpsd server")
58 (
"lockfile", po::value<std::string>(&
lock_file_name)->default_value(
"SoDa.lock"),
59 "lock file to signal that a sodaradio server is active")
61 "report file for memory statistics. Report only if a file name is supplied.")
64 po::store(po::parse_command_line(argc, argv, desc),
pmap);
68 if(
pmap.count(
"help")) {
69 std::cout <<
"SoDa -- The 'SoD' stands for Software Defined. The 'a' doesn't stand for anything. " << desc << std::endl;
std::string report_file_name
std::string server_sock_basename
void saveConfigFile(std::string &cf_name)
save config data to a configuration file (for now, do nothing.)
std::string config_filename
boost::program_options::variables_map pmap
Params(int argc, char *argv[])
Constructor.
std::string lock_file_name
std::string audio_portname
void readConfigFile(std::string &cf_name)
read a configuration file (for now, just setup the default config.)
bool force_integer_N_mode