SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
SoDa::Params Class Reference

#include <Params.hxx>

Public Member Functions

std::string getRadioArgs () const
 return args that point to a particular USRP unit
std::string getRadioType () const
 what radio are we trying to configure
int getClockSource () const
 where does the reference come from?
std::string getRXAnt () const
 which port is the RX channel?
std::string getTXAnt () const
 which port is the TX channel?
double getRXRate () const
 Sample rates and all that other stuff are fixed.
double getTXRate () const
 TX rate will always be 625K.
double getHWSampleRate () const
void setHWSampleRate (double r)
double getAudioSampleRate () const
unsigned int getRFBufferSize () const
unsigned int getAFBufferSize () const
std::string getServerSocketBasename () const
std::string getAudioPortName () const
bool forceFracN ()
bool forceIntN ()
const std::vector< std::string > & getLibs ()
unsigned int getDebugLevel () const
std::string getLockFileName () const
bool isRadioType (const std::string &rtype)

Static Public Member Functions

static ParamsPtr make (int argc, char *argv[])

Protected Member Functions

 Params (int argc, char *argv[])
 Constructor.

Private Attributes

SoDa::Options cmd
std::string radio_type
std::string radio_args
std::string config_filename
std::vector< std::string > load_list
bool load_list_env_appended
std::string lock_file_name
bool clock_source_internal
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
double hw_sample_rate
 actual hardware wire rate (may be 2.5 MS/s when 625 kS/s unsupported)

Detailed Description

Definition at line 45 of file Params.hxx.

Constructor & Destructor Documentation

◆ Params()

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

Constructor.

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

Referenced by make().

Member Function Documentation

◆ forceFracN()

bool SoDa::Params::forceFracN ( )
inline

Definition at line 121 of file Params.hxx.

References force_frac_N_mode, and force_integer_N_mode.

◆ forceIntN()

bool SoDa::Params::forceIntN ( )
inline

Definition at line 122 of file Params.hxx.

References force_frac_N_mode, and force_integer_N_mode.

◆ getAFBufferSize()

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

Definition at line 115 of file Params.hxx.

◆ getAudioPortName()

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

Definition at line 119 of file Params.hxx.

References audio_portname.

◆ getAudioSampleRate()

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

Definition at line 113 of file Params.hxx.

◆ getClockSource()

int SoDa::Params::getClockSource ( ) const
inline

where does the reference come from?

Returns
1 for external, 0 for internal

Definition at line 79 of file Params.hxx.

References clock_source_internal.

◆ getDebugLevel()

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

Definition at line 126 of file Params.hxx.

References debug_level.

◆ getHWSampleRate()

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

Definition at line 110 of file Params.hxx.

References hw_sample_rate.

◆ getLibs()

const std::vector< std::string > & SoDa::Params::getLibs ( )

◆ getLockFileName()

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

Definition at line 128 of file Params.hxx.

References lock_file_name.

◆ 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 65 of file Params.hxx.

References radio_args.

◆ getRadioType()

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

what radio are we trying to configure

Returns
string identifying which radio type (USRP, Pluto, RTLSDR, ...)

Definition at line 71 of file Params.hxx.

References radio_type.

◆ getRFBufferSize()

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

Definition at line 114 of file Params.hxx.

◆ getRXAnt()

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

which port is the RX channel?

Returns
string RX2 or TX/RX

Definition at line 86 of file Params.hxx.

References rx_ant.

◆ 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 104 of file Params.hxx.

◆ getServerSocketBasename()

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

Definition at line 117 of file Params.hxx.

References server_sock_basename.

◆ getTXAnt()

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

which port is the TX channel?

Returns
string TX

Definition at line 91 of file Params.hxx.

References tx_ant.

◆ getTXRate()

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

TX rate will always be 625K.

Definition at line 108 of file Params.hxx.

◆ isRadioType()

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

Definition at line 131 of file Params.hxx.

References radio_type.

◆ make()

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

Definition at line 56 of file Params.hxx.

References Params().

◆ setHWSampleRate()

void SoDa::Params::setHWSampleRate ( double r)
inline

Definition at line 111 of file Params.hxx.

References hw_sample_rate.

Member Data Documentation

◆ audio_portname

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

Definition at line 161 of file Params.hxx.

Referenced by getAudioPortName().

◆ clock_source_internal

bool SoDa::Params::clock_source_internal
private

Definition at line 153 of file Params.hxx.

Referenced by getClockSource().

◆ cmd

SoDa::Options SoDa::Params::cmd
private

Definition at line 143 of file Params.hxx.

◆ config_filename

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

Definition at line 147 of file Params.hxx.

◆ debug_level

unsigned int SoDa::Params::debug_level
private

Definition at line 167 of file Params.hxx.

Referenced by getDebugLevel().

◆ force_frac_N_mode

bool SoDa::Params::force_frac_N_mode
private

Definition at line 164 of file Params.hxx.

Referenced by forceFracN(), and forceIntN().

◆ force_integer_N_mode

bool SoDa::Params::force_integer_N_mode
private

Definition at line 165 of file Params.hxx.

Referenced by forceFracN(), and forceIntN().

◆ hw_sample_rate

double SoDa::Params::hw_sample_rate
private

actual hardware wire rate (may be 2.5 MS/s when 625 kS/s unsupported)

Definition at line 169 of file Params.hxx.

Referenced by getHWSampleRate(), and setHWSampleRate().

◆ load_list

std::vector<std::string> SoDa::Params::load_list
private

Definition at line 148 of file Params.hxx.

◆ load_list_env_appended

bool SoDa::Params::load_list_env_appended
private

Definition at line 149 of file Params.hxx.

◆ lock_file_name

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

Definition at line 151 of file Params.hxx.

Referenced by getLockFileName().

◆ radio_args

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

Definition at line 146 of file Params.hxx.

Referenced by getRadioArgs().

◆ radio_type

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

Definition at line 145 of file Params.hxx.

Referenced by getRadioType(), and isRadioType().

◆ rx_ant

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

Definition at line 155 of file Params.hxx.

Referenced by getRXAnt().

◆ rx_rate

double SoDa::Params::rx_rate
private

Definition at line 154 of file Params.hxx.

◆ server_sock_basename

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

Definition at line 158 of file Params.hxx.

Referenced by getServerSocketBasename().

◆ tx_ant

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

Definition at line 155 of file Params.hxx.

Referenced by getTXAnt().

◆ tx_rate

double SoDa::Params::tx_rate
private

Definition at line 154 of file Params.hxx.


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