![]() |
SoDaRadio-12.2.0-cut_dependencies:6c82803
|
The Receive RF Path. More...
#include <USRPRX.hxx>
Public Member Functions | |
| void | setNCOFreq (double freq) |
| Set the last LO (convert to baseband) frequency for the NCO. | |
| bool | downConvert () |
| A receiver must accept input data from the rx_stream and beat it against its NCO to produce output on its if_stream. | |
| void | startStream () |
| flush the input rx data stream and set the stream_processing flag to on. | |
| void | stopStream () |
| we never stop a USRP stream until the radio shuts down | |
| void | closeStream () |
| stop and close down the USRP input stream | |
| bool | streamEnabled () |
| test the processing stream flag | |
| void | enableIFStreamer (bool enable) |
| Enable IF streamer - This passes the incoming RF sample buffer onto the IF stream where it can be consumed by the periodogram widget or anybody else. | |
| Public Member Functions inherited from SoDa::RadioRX | |
| RadioRX (ParamsPtr params) | |
| Constructor Build a RadioRX thread. | |
| void | run () final |
| start the thread | |
| virtual void | init () |
| perform initialization. | |
| Public Member Functions inherited from SoDa::Thread | |
| void | registerThread (SoDa::ThreadPtr me) |
| void | operator() () |
| void | start () |
| Execute the thread's run loop. | |
| void | join () |
| more properly "Wait for this thread to exit its run loop". | |
| void | execCommand (CommandPtr cmd) |
| Execute (dispatch) a message removed from the command stream to one of the basic Command handler functions. | |
| virtual void | shutDown () |
| optional method that performs cleanup – may not delete. | |
| void | sleep_ms (unsigned int milliseconds) |
| void | sleep_us (unsigned int microseconds) |
| uint32_t | getID () |
| Get the process/thread ID for this thread – helps with figuring out who caused a segfault. | |
| Public Member Functions inherited from SoDa::Base | |
| Base (const std::string &oname) | |
| The constructor – pass a name for the object. | |
| void | registerSelf (BasePtr ptr) |
| std::string & | getObjName () |
| get the name of this object | |
| BasePtr | findSoDaObject (const std::string &oname) |
| find a SoDa Object by name. | |
| double | getTime () |
| Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS). | |
| BasePtr | getSelfPtr () |
| get a pointer to myself. | |
| 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 SoDa::Format &fmt, unsigned int threshold=1) |
| void | debugMsg (const char *msg, unsigned int threshold=1) |
| void | setDebugLevel (unsigned int v) |
| unsigned int | getDebugLevel () |
Static Public Member Functions | |
| static USRPRXPtr | make (ParamsPtr params, uhd::usrp::multi_usrp::sptr _usrp) |
| 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 () |
Protected Member Functions | |
| USRPRX (ParamsPtr params, uhd::usrp::multi_usrp::sptr usrp) | |
| The constructor. | |
| Protected Member Functions inherited from SoDa::RadioRX | |
| virtual void | execGetCommand (CommandPtr cmd) final |
| Parse an incoming GET command and dispatch. | |
| virtual void | execSetCommand (CommandPtr cmd) final |
| Parse an incoming SET command and dispatch. | |
| virtual void | execRepCommand (CommandPtr cmd) final |
| Parse an incoming REPort command and dispatch. | |
| double | getTime () |
| get the number of seconds since the "Epoch" | |
| virtual void | subscribeToMailBoxes (const std::vector< MailBoxBasePtr > &mailboxes) final |
| SoDa Threads must subscribe to at least the control mailbox. | |
| Protected Member Functions inherited from SoDa::Thread | |
| Thread (const std::string &oname, const std::string &version=std::string("12.2.0")) | |
| make the thread object. | |
| Protected Member Functions inherited from SoDa::Debug | |
| std::string | curDateTime () |
Private Member Functions | |
| void | doMixer (SoDa::CBufPtr inout) |
| implement a complex down converter with complex multiplication | |
| void | actualStartStream () |
| The USRP never stops the RX streamer once it starts. | |
Private Attributes | |
| 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 |
| std::weak_ptr< USRPRX > | self |
| bool | needs_resample |
| SoDa::ReSamplerPtr | hw_resampler |
| std::vector< std::complex< float > > | hw_cf |
| raw samples at hw rate | |
| std::vector< std::complex< float > > | rs_out |
| decimated output at 625 kS/s | |
| std::vector< std::complex< float > > | accu |
| accumulator → rf_buf_size chunks | |
| unsigned int | hw_buf_size |
| samples per recv at hw rate | |
| unsigned int | rs_out_size |
| resampler output block size | |
| unsigned int | rf_buf_size |
| publish chunk (30000 samples at 625 kS/s) | |
Additional Inherited Members | |
| Static Public Attributes inherited from SoDa::Debug | |
| static std::mutex | debug_msg_mutex |
| Protected Attributes inherited from SoDa::RadioRX | |
| ParamsPtr | params |
| CDatMBoxPtr | rx_stream |
| CDatMBoxPtr | if_stream |
| CmdMBoxPtr | cmd_stream |
| CmdMBox::Subscription | cmd_subs |
| double | current_IF_tuning |
| current IF NCO frequency | |
| Protected Attributes inherited from SoDa::Thread | |
| std::weak_ptr< Thread > | self |
| A pointer to ourself. | |
| Protected Attributes inherited from SoDa::Debug | |
| std::string | unit_name |
| the name of the unit reporting status | |
| unsigned int | debug_level |
| the debug level (threshold) for messages | |
| Static Protected Attributes inherited from SoDa::Debug | |
| static unsigned int | default_debug_level |
| static unsigned int | global_debug_level |
|
protected |
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. |
References SoDa::RadioRX::params, and usrp.
Referenced by make().
|
private |
The USRP never stops the RX streamer once it starts.
| void SoDa::USRPRX::closeStream | ( | ) |
stop and close down the USRP input stream
|
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 |
|
virtual |
A receiver must accept input data from the rx_stream and beat it against its NCO to produce output on its if_stream.
If the stream_processing flag is off, any rx_input data will be dumped.
Implements SoDa::RadioRX.
|
virtual |
Enable IF streamer - This passes the incoming RF sample buffer onto the IF stream where it can be consumed by the periodogram widget or anybody else.
| enable | if true, send RF sample buffer onto if_stream, otherwise, don't. |
Implements SoDa::RadioRX.
Definition at line 68 of file USRPRX.hxx.
References USRPRX(), and SoDa::RadioRX::params.
|
virtual |
Set the last LO (convert to baseband) frequency for the NCO.
This is called in response to a SET RX_IF_FREQ message from the RadioControl thread.
| freq | LO3 frequency |
Implements SoDa::RadioRX.
|
virtual |
flush the input rx data stream and set the stream_processing flag to on.
Implements SoDa::RadioRX.
|
virtual |
we never stop a USRP stream until the radio shuts down
Implements SoDa::RadioRX.
|
virtual |
test the processing stream flag
Implements SoDa::RadioRX.
|
private |
accumulator → rf_buf_size chunks
Definition at line 175 of file USRPRX.hxx.
|
private |
Definition at line 146 of file USRPRX.hxx.
|
private |
Definition at line 155 of file USRPRX.hxx.
|
private |
Definition at line 159 of file USRPRX.hxx.
|
private |
samples per recv at hw rate
Definition at line 176 of file USRPRX.hxx.
|
private |
raw samples at hw rate
Definition at line 173 of file USRPRX.hxx.
|
private |
Definition at line 172 of file USRPRX.hxx.
|
private |
Definition at line 166 of file USRPRX.hxx.
|
private |
Definition at line 154 of file USRPRX.hxx.
|
private |
Definition at line 171 of file USRPRX.hxx.
|
private |
Definition at line 162 of file USRPRX.hxx.
|
private |
publish chunk (30000 samples at 625 kS/s)
Definition at line 178 of file USRPRX.hxx.
|
private |
Definition at line 165 of file USRPRX.hxx.
|
private |
decimated output at 625 kS/s
Definition at line 174 of file USRPRX.hxx.
|
private |
resampler output block size
Definition at line 177 of file USRPRX.hxx.
|
private |
Definition at line 140 of file USRPRX.hxx.
|
private |
Definition at line 143 of file USRPRX.hxx.
|
private |
Definition at line 148 of file USRPRX.hxx.
|
private |
Definition at line 156 of file USRPRX.hxx.
|
private |
Definition at line 163 of file USRPRX.hxx.
|
private |
Definition at line 168 of file USRPRX.hxx.
|
private |
Definition at line 151 of file USRPRX.hxx.
|
private |
Definition at line 141 of file USRPRX.hxx.
Referenced by USRPRX().