SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Attributes | List of all members
SoDa::Params Class Reference

This class handles command line parameters and built-ins. More...

#include <Params.hxx>

Public Member Functions

 Params (int argc, char *argv[])
 Constructor. More...
 
std::string getRadioArgs () const
 return args that point to a particular USRP unit More...
 
std::string getClockSource () const
 where does the reference come from? More...
 
std::string getRXAnt () const
 which port is the RX channel? More...
 
std::string getTXAnt () const
 which port is the TX channel? More...
 
void readConfigFile (std::string &cf_name)
 read a configuration file (for now, just setup the default config.) More...
 
void saveConfigFile (std::string &cf_name)
 save config data to a configuration file (for now, do nothing.) More...
 
double getRXRate () const
 Sample rates and all that other stuff are fixed. More...
 
double getTXRate () const
 TX rate will always be 625K. More...
 
double getAudioSampleRate () const
 
unsigned int getRFBufferSize () const
 
unsigned int getAFBufferSize () const
 
std::string getServerSocketBasename () const
 
std::string getAudioPortName () const
 
bool forceFracN ()
 
bool forceIntN ()
 
unsigned int getDebugLevel () const
 
std::string getRadioType () const
 
std::string getGPSHostName () const
 
std::string getGPSPortName () const
 
std::string getLockFileName () const
 
bool reportMemInfo () const
 
std::string getReportFileName () const
 
bool isRadioType (const std::string &rtype)
 

Private Attributes

boost::program_options::variables_map pmap
 
bool report_mem_info
 
std::string report_file_name
 
std::string gps_hostname
 
std::string gps_portname
 
std::string radio_type
 
std::string radio_args
 
std::string config_filename
 
std::string lock_file_name
 
std::string clock_source
 
double rx_rate
 
double tx_rate
 
std::string rx_ant
 
std::string tx_ant
 
std::string server_sock_basename
 
std::string audio_portname
 
bool force_frac_N_mode
 
bool force_integer_N_mode
 
unsigned int debug_level
 

Detailed Description

This class handles command line parameters and built-ins.

Definition at line 42 of file Params.hxx.

Constructor & Destructor Documentation

◆ Params()

SoDa::Params::Params ( int  argc,
char *  argv[] 
)

Constructor.

Parameters
argccount of command line arguments
argvpointer to list of parameter strings

Definition at line 32 of file Params.cxx.

References audio_portname, config_filename, debug_level, force_frac_N_mode, force_integer_N_mode, gps_hostname, gps_portname, lock_file_name, pmap, radio_args, radio_type, readConfigFile(), report_file_name, report_mem_info, and server_sock_basename.

Member Function Documentation

◆ forceFracN()

bool SoDa::Params::forceFracN ( )
inline

Definition at line 112 of file Params.hxx.

References force_frac_N_mode, and force_integer_N_mode.

Referenced by SoDa::USRPCtrl::USRPCtrl().

◆ forceIntN()

bool SoDa::Params::forceIntN ( )
inline

Definition at line 113 of file Params.hxx.

References force_frac_N_mode, and force_integer_N_mode.

Referenced by SoDa::USRPCtrl::USRPCtrl().

◆ getAFBufferSize()

unsigned int SoDa::Params::getAFBufferSize ( ) const
inline

Definition at line 106 of file Params.hxx.

Referenced by SoDa::BaseBandRX::BaseBandRX(), SoDa::BaseBandTX::BaseBandTX(), and doWork().

◆ getAudioPortName()

std::string SoDa::Params::getAudioPortName ( ) const
inline

Definition at line 110 of file Params.hxx.

References audio_portname.

Referenced by doWork().

◆ getAudioSampleRate()

double SoDa::Params::getAudioSampleRate ( ) const
inline

Definition at line 104 of file Params.hxx.

Referenced by SoDa::BaseBandRX::BaseBandRX(), SoDa::BaseBandTX::BaseBandTX(), and doWork().

◆ getClockSource()

std::string SoDa::Params::getClockSource ( ) const
inline

where does the reference come from?

Returns
"EXTERNAL" or "INTERNAL"

Definition at line 64 of file Params.hxx.

References clock_source.

Referenced by SoDa::USRPCtrl::run().

◆ getDebugLevel()

unsigned int SoDa::Params::getDebugLevel ( ) const
inline

Definition at line 115 of file Params.hxx.

References debug_level.

Referenced by doWork().

◆ getGPSHostName()

std::string SoDa::Params::getGPSHostName ( ) const
inline

Definition at line 119 of file Params.hxx.

References gps_hostname.

Referenced by SoDa::GPSmon::GPSmon().

◆ getGPSPortName()

std::string SoDa::Params::getGPSPortName ( ) const
inline

Definition at line 121 of file Params.hxx.

References gps_portname.

Referenced by SoDa::GPSmon::GPSmon().

◆ getLockFileName()

std::string SoDa::Params::getLockFileName ( ) const
inline

Definition at line 123 of file Params.hxx.

References lock_file_name.

Referenced by main().

◆ getRadioArgs()

std::string SoDa::Params::getRadioArgs ( ) const
inline

return args that point to a particular USRP unit

Returns
string identifying which USRP we are selecting

Definition at line 56 of file Params.hxx.

References radio_args.

Referenced by SoDa::USRPCtrl::USRPCtrl().

◆ getRadioType()

std::string SoDa::Params::getRadioType ( ) const
inline

Definition at line 117 of file Params.hxx.

References radio_type.

Referenced by doWork().

◆ getReportFileName()

std::string SoDa::Params::getReportFileName ( ) const
inline

Definition at line 126 of file Params.hxx.

References report_file_name.

Referenced by doWork().

◆ getRFBufferSize()

unsigned int SoDa::Params::getRFBufferSize ( ) const
inline

◆ getRXAnt()

std::string SoDa::Params::getRXAnt ( ) const
inline

which port is the RX channel?

Returns
string RX2 or TX/RX

Definition at line 71 of file Params.hxx.

References rx_ant.

Referenced by SoDa::USRPCtrl::run().

◆ getRXRate()

double SoDa::Params::getRXRate ( ) const
inline

Sample rates and all that other stuff are fixed.

we do this because downsampling the RX can take a lot of time (in general) unless we focus on the simple common case. Here we're going to use a 625000 S/s IF rate from the USRP and down sample with an FFT based decimator to 48KS/s . This 625/48 ratio is easiest to achieve with an IF buffer size of 30000 samples 30,000 * 48 / 625 = 2304 – the size of the RX buffer

Definition at line 98 of file Params.hxx.

Referenced by SoDa::BaseBandRX::BaseBandRX(), SoDa::USRPCtrl::run(), SoDa::UI::UI(), SoDa::USRPCtrl::USRPCtrl(), and SoDa::USRPRX::USRPRX().

◆ getServerSocketBasename()

std::string SoDa::Params::getServerSocketBasename ( ) const
inline

Definition at line 108 of file Params.hxx.

References server_sock_basename.

Referenced by SoDa::UI::UI().

◆ getTXAnt()

std::string SoDa::Params::getTXAnt ( ) const
inline

which port is the TX channel?

Returns
string TX

Definition at line 76 of file Params.hxx.

References readConfigFile(), saveConfigFile(), and tx_ant.

Referenced by SoDa::USRPCtrl::run().

◆ getTXRate()

double SoDa::Params::getTXRate ( ) const
inline

TX rate will always be 625K.

Definition at line 102 of file Params.hxx.

Referenced by SoDa::CWTX::CWTX(), SoDa::USRPCtrl::run(), SoDa::USRPCtrl::USRPCtrl(), and SoDa::USRPTX::USRPTX().

◆ isRadioType()

bool SoDa::Params::isRadioType ( const std::string &  rtype)
inline

Definition at line 128 of file Params.hxx.

References radio_type.

Referenced by doWork().

◆ readConfigFile()

void SoDa::Params::readConfigFile ( std::string &  cf_name)

read a configuration file (for now, just setup the default config.)

Definition at line 79 of file Params.cxx.

References clock_source, rx_ant, rx_rate, tx_ant, and tx_rate.

Referenced by getTXAnt(), and Params().

◆ reportMemInfo()

bool SoDa::Params::reportMemInfo ( ) const
inline

Definition at line 125 of file Params.hxx.

References report_mem_info.

Referenced by doWork().

◆ saveConfigFile()

void SoDa::Params::saveConfigFile ( std::string &  cf_name)

save config data to a configuration file (for now, do nothing.)

Definition at line 90 of file Params.cxx.

Referenced by getTXAnt().

Member Data Documentation

◆ audio_portname

std::string SoDa::Params::audio_portname
private

Definition at line 160 of file Params.hxx.

Referenced by getAudioPortName(), and Params().

◆ clock_source

std::string SoDa::Params::clock_source
private

Definition at line 152 of file Params.hxx.

Referenced by getClockSource(), and readConfigFile().

◆ config_filename

std::string SoDa::Params::config_filename
private

Definition at line 148 of file Params.hxx.

Referenced by Params().

◆ debug_level

unsigned int SoDa::Params::debug_level
private

Definition at line 166 of file Params.hxx.

Referenced by getDebugLevel(), and Params().

◆ force_frac_N_mode

bool SoDa::Params::force_frac_N_mode
private

Definition at line 163 of file Params.hxx.

Referenced by forceFracN(), forceIntN(), and Params().

◆ force_integer_N_mode

bool SoDa::Params::force_integer_N_mode
private

Definition at line 164 of file Params.hxx.

Referenced by forceFracN(), forceIntN(), and Params().

◆ gps_hostname

std::string SoDa::Params::gps_hostname
private

Definition at line 144 of file Params.hxx.

Referenced by getGPSHostName(), and Params().

◆ gps_portname

std::string SoDa::Params::gps_portname
private

Definition at line 145 of file Params.hxx.

Referenced by getGPSPortName(), and Params().

◆ lock_file_name

std::string SoDa::Params::lock_file_name
private

Definition at line 150 of file Params.hxx.

Referenced by getLockFileName(), and Params().

◆ pmap

boost::program_options::variables_map SoDa::Params::pmap
private

Definition at line 139 of file Params.hxx.

Referenced by Params().

◆ radio_args

std::string SoDa::Params::radio_args
private

Definition at line 147 of file Params.hxx.

Referenced by getRadioArgs(), and Params().

◆ radio_type

std::string SoDa::Params::radio_type
private

Definition at line 146 of file Params.hxx.

Referenced by getRadioType(), isRadioType(), and Params().

◆ report_file_name

std::string SoDa::Params::report_file_name
private

Definition at line 142 of file Params.hxx.

Referenced by getReportFileName(), and Params().

◆ report_mem_info

bool SoDa::Params::report_mem_info
private

Definition at line 141 of file Params.hxx.

Referenced by Params(), and reportMemInfo().

◆ rx_ant

std::string SoDa::Params::rx_ant
private

Definition at line 154 of file Params.hxx.

Referenced by getRXAnt(), and readConfigFile().

◆ rx_rate

double SoDa::Params::rx_rate
private

Definition at line 153 of file Params.hxx.

Referenced by readConfigFile().

◆ server_sock_basename

std::string SoDa::Params::server_sock_basename
private

Definition at line 157 of file Params.hxx.

Referenced by getServerSocketBasename(), and Params().

◆ tx_ant

std::string SoDa::Params::tx_ant
private

Definition at line 154 of file Params.hxx.

Referenced by getTXAnt(), and readConfigFile().

◆ tx_rate

double SoDa::Params::tx_rate
private

Definition at line 153 of file Params.hxx.

Referenced by readConfigFile().


The documentation for this class was generated from the following files: