SoDaRadio-5.0.3-master:8901fb5
|
The Receive RF Path. More...
#include <USRPRX.hxx>
Public Member Functions | |
USRPRX (Params *params, uhd::usrp::multi_usrp::sptr usrp, DatMBox *_rx_stream, DatMBox *_if_stream, CmdMBox *_cmd_stream) | |
The constructor. More... | |
void | run () |
USRPRX is a thread – this is its run loop. More... | |
Public Member Functions inherited from SoDa::SoDaThread | |
SoDaThread (const std::string &oname) | |
void | start () |
Execute the threads run loop. More... | |
void | join () |
more properly "Wait for this thread to exit its run loop". More... | |
bool | waitForJoin (unsigned int m) |
wait for the thread to stop running, or the specified time to pass. More... | |
void | execCommand (Command *cmd) |
Execute (dispatch) a message removed from the command stream to one of the basic Command handler functions. More... | |
Public Member Functions inherited from SoDa::SoDaBase | |
SoDaBase (const std::string &oname) | |
The constructor – pass a name for the object. More... | |
std::string & | getObjName () |
get the name of this object More... | |
SoDaBase * | findSoDaObject (const std::string &oname) |
find a SoDa Object by name. More... | |
double | getTime () |
Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS). More... | |
Public Member Functions inherited from SoDa::Debug | |
Debug (std::string _unit_name=std::string("UNKNOWN")) | |
Debug (const char *_unit_name_cstr) | |
Debug (unsigned int _debug_level, std::string _unit_name=std::string("UNKNOWN")) | |
Debug (unsigned int _debug_level, const char *_unit_name_cstr) | |
void | debugMsg (const std::string &msg, unsigned int threshold=1) |
void | debugMsg (const boost::format &fmt, unsigned int threshold=1) |
void | debugMsg (const char *msg, unsigned int threshold=1) |
void | setDebugLevel (unsigned int v) |
unsigned int | getDebugLevel () |
Private Member Functions | |
void | execCommand (Command *cmd) |
void | execGetCommand (Command *cmd) |
optional method to handle "GET" commands – commands that request a response More... | |
void | execSetCommand (Command *cmd) |
optional method to handle "SET" commands – commands that set internal state in the object. More... | |
void | execRepCommand (Command *cmd) |
optional method that reports status or the result of some action. More... | |
void | startStream () |
void | stopStream () |
void | doMixer (SoDaBuf *inout) |
implement a complex down converter with complex multiplication More... | |
void | set3rdLOFreq (double IF_tuning) |
Private Attributes | |
DatMBox * | rx_stream |
DatMBox * | if_stream |
CmdMBox * | cmd_stream |
unsigned int | cmd_subs |
uhd::rx_streamer::sptr | rx_bits |
uhd::usrp::multi_usrp::sptr | usrp |
unsigned int | rx_buffer_size |
bool | audio_rx_stream_enabled |
SoDa::Command::ModulationType | rx_modulation |
UI * | ui |
QuadratureOscillator | IF_osc |
double | current_IF_tuning |
double | rx_sample_rate |
bool | enable_spectrum_report |
int | outf [2] |
int | scount |
std::ofstream | rf_dumpfile |
std::ofstream | if_dumpfile |
Additional Inherited Members | |
Static Public Member Functions inherited from SoDa::Debug | |
static void | setDefaultLevel (unsigned int v) |
static unsigned int | getDefaultLevel () |
static void | setGlobalLevel (unsigned int v) |
static unsigned int | getGlobalLevel () |
Static Public Attributes inherited from SoDa::Debug | |
static boost::mutex | debug_msg_mutex |
Protected Member Functions inherited from SoDa::Debug | |
std::string | curDateTime () |
Protected Attributes inherited from SoDa::Debug | |
std::string | unit_name |
the name of the unit reporting status More... | |
unsigned int | debug_level |
the debug level (threshold) for messages More... | |
Static Protected Attributes inherited from SoDa::Debug | |
static unsigned int | default_debug_level = 0 |
static unsigned int | global_debug_level = 0 |
SoDa::USRPRX::USRPRX | ( | Params * | params, |
uhd::usrp::multi_usrp::sptr | usrp, | ||
DatMBox * | _rx_stream, | ||
DatMBox * | _if_stream, | ||
CmdMBox * | _cmd_stream | ||
) |
The constructor.
params | a pointer to a params object that will tell us about sample rates and other configuration details. |
usrp | a pointer to the UHD USRP object that we are streaming data from. |
_rx_stream | data mailbox used to pass the baseband (IF3) shifted incoming RF samples to other units |
_if_stream | data mailbox used to pass the IF2 data to the spectrum units |
_cmd_stream | data mailbox used to carry command, query, and report messages |
Definition at line 42 of file USRPRX.cxx.
References audio_rx_stream_enabled, cmd_stream, cmd_subs, doFFTandDump(), enable_spectrum_report, SoDa::Params::getRFBufferSize(), SoDa::Params::getRXRate(), if_dumpfile, if_stream, rf_dumpfile, rx_bits, rx_buffer_size, rx_modulation, rx_sample_rate, rx_stream, scount, SoDa::MultiMBox< T >::subscribe(), ui, SoDa::Command::USB, and usrp.
|
private |
implement a complex down converter with complex multiplication
This is a complex downconverter in the manner presented in Lyons pp 457-458
inout | the input/output RF buffer |
Definition at line 187 of file USRPRX.cxx.
References SoDa::SoDaBuf::getComplexBuf(), SoDa::SoDaBuf::getComplexMaxLen(), IF_osc, and SoDa::QuadratureOscillator::stepOscCF().
Referenced by run().
|
private |
Definition at line 206 of file USRPRX.cxx.
References SoDa::Command::cmd, execGetCommand(), execRepCommand(), execSetCommand(), SoDa::Command::GET, SoDa::Command::REP, and SoDa::Command::SET.
Referenced by run().
|
privatevirtual |
optional method to handle "GET" commands – commands that request a response
Reimplemented from SoDa::SoDaThread.
Definition at line 280 of file USRPRX.cxx.
Referenced by execCommand().
|
privatevirtual |
optional method that reports status or the result of some action.
Reimplemented from SoDa::SoDaThread.
Definition at line 285 of file USRPRX.cxx.
Referenced by execCommand().
|
privatevirtual |
optional method to handle "SET" commands – commands that set internal state in the object.
Reimplemented from SoDa::SoDaThread.
Definition at line 240 of file USRPRX.cxx.
References current_IF_tuning, SoDa::Command::CW_L, SoDa::Command::CW_U, SoDa::Debug::debugMsg(), SoDa::Command::dparms, enable_spectrum_report, SoDa::Command::iparms, SoDa::Command::RX_LO3_FREQ, SoDa::Command::RX_MODE, rx_modulation, set3rdLOFreq(), startStream(), stopStream(), SoDa::Command::target, and SoDa::Command::TX_STATE.
Referenced by execCommand().
|
virtual |
USRPRX is a thread – this is its run loop.
Implements SoDa::SoDaThread.
Definition at line 104 of file USRPRX.cxx.
References SoDa::MultiMBox< T >::alloc(), audio_rx_stream_enabled, cmd_stream, cmd_subs, SoDa::SoDaBuf::copy(), SoDa::Debug::debugMsg(), doMixer(), enable_spectrum_report, execCommand(), SoDa::MultiMBox< T >::free(), SoDa::MultiMBox< T >::get(), SoDa::SoDaBuf::getComplexBuf(), SoDa::MultiMBox< T >::getSubscriberCount(), if_stream, SoDa::MultiMBox< T >::put(), rx_bits, rx_buffer_size, rx_stream, scount, SoDa::Command::STOP, stopStream(), and SoDa::Command::target.
|
private |
Definition at line 198 of file USRPRX.cxx.
References SoDa::Debug::debugMsg(), IF_osc, rx_sample_rate, and SoDa::QuadratureOscillator::setPhaseIncr().
Referenced by execSetCommand().
|
private |
Definition at line 224 of file USRPRX.cxx.
References audio_rx_stream_enabled, and usrp.
Referenced by execSetCommand().
|
private |
Definition at line 233 of file USRPRX.cxx.
References audio_rx_stream_enabled, and usrp.
Referenced by execSetCommand(), and run().
|
private |
Definition at line 99 of file USRPRX.hxx.
Referenced by run(), startStream(), stopStream(), and USRPRX().
|
private |
Definition at line 89 of file USRPRX.hxx.
|
private |
Definition at line 90 of file USRPRX.hxx.
|
private |
Definition at line 108 of file USRPRX.hxx.
Referenced by execSetCommand().
|
private |
Definition at line 112 of file USRPRX.hxx.
Referenced by execSetCommand(), run(), and USRPRX().
|
private |
Definition at line 119 of file USRPRX.hxx.
Referenced by USRPRX().
|
private |
Definition at line 107 of file USRPRX.hxx.
Referenced by doMixer(), and set3rdLOFreq().
|
private |
Definition at line 88 of file USRPRX.hxx.
|
private |
Definition at line 115 of file USRPRX.hxx.
|
private |
Definition at line 118 of file USRPRX.hxx.
Referenced by USRPRX().
|
private |
Definition at line 93 of file USRPRX.hxx.
|
private |
Definition at line 96 of file USRPRX.hxx.
|
private |
Definition at line 101 of file USRPRX.hxx.
Referenced by execSetCommand(), and USRPRX().
|
private |
Definition at line 109 of file USRPRX.hxx.
Referenced by set3rdLOFreq(), and USRPRX().
|
private |
Definition at line 87 of file USRPRX.hxx.
|
private |
Definition at line 116 of file USRPRX.hxx.
|
private |
Definition at line 104 of file USRPRX.hxx.
Referenced by USRPRX().
|
private |
Definition at line 94 of file USRPRX.hxx.
Referenced by startStream(), stopStream(), and USRPRX().