![]() |
SoDaRadio-12.2.0-cut_dependencies:6c82803
|
#include <PlutoRX.hxx>
Public Member Functions | |
| ~PlutoRX () | |
| void | setNCOFreq (double freq) override |
| Update the IF NCO frequency used by the complex mixer. | |
| bool | downConvert () override |
| Refill the IIO buffer (2.5 MSPS), resample to 625 kSPS, mix, and publish 30000-sample CBufs to rx_stream. | |
| void | startStream () override |
| Arm the streaming flag so downConvert() publishes samples. | |
| void | stopStream () override |
| Disarm the streaming flag; IIO DMA continues draining silently. | |
| bool | streamEnabled () override |
| test the processing stream flag | |
| void | enableIFStreamer (bool enable) override |
| Control whether raw RF samples are forwarded to the IF stream. | |
| 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 PlutoRXPtr | make (ParamsPtr params) |
| 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 | |
| PlutoRX (ParamsPtr params) | |
| 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 (std::vector< std::complex< float > > &buf) |
Private Attributes | |
| iio_context * | ctx |
| iio_device * | dev |
| cf-ad9361-lpc | |
| iio_channel * | rx_i_chan |
| voltage0 (input) — I component | |
| iio_channel * | rx_q_chan |
| voltage1 (input) — Q component | |
| iio_buffer * | rxbuf |
| unsigned int | hw_buf_size |
| IIO buffer size in samples (at 2.5 MSPS) | |
| unsigned int | rs_out_size |
| hw_resampler output size (at 625 kSPS) | |
| unsigned int | rf_buf_size |
| publish chunk size for BaseBandRX (30000) | |
| double | rx_sample_rate |
| 625 kSPS — used for IF NCO phase increment | |
| bool | streaming |
| true after startStream(); samples published | |
| bool | if_streaming_enabled |
| true → push raw RF copies to if_stream | |
| SoDa::ReSamplerPtr | hw_resampler |
| 2.5 MSPS → 625 kSPS | |
| std::vector< std::complex< float > > | hw_cf |
| SC16→float conversion (hw_buf_size) | |
| std::vector< std::complex< float > > | rs_out |
| resampler output (rs_out_size) | |
| std::vector< std::complex< float > > | accu |
| accumulator for 30000-sample publish | |
| QuadratureOscillator | IF_osc |
| std::weak_ptr< PlutoRX > | self |
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 |
Definition at line 66 of file PlutoRX.hxx.
|
protected |
References SoDa::RadioRX::params.
Referenced by make().
| SoDa::PlutoRX::~PlutoRX | ( | ) |
|
private |
|
overridevirtual |
Refill the IIO buffer (2.5 MSPS), resample to 625 kSPS, mix, and publish 30000-sample CBufs to rx_stream.
Blocks for approximately one hardware buffer period (~48 ms).
Implements SoDa::RadioRX.
|
overridevirtual |
Control whether raw RF samples are forwarded to the IF stream.
Implements SoDa::RadioRX.
|
inlinestatic |
Definition at line 73 of file PlutoRX.hxx.
References PlutoRX(), and SoDa::RadioRX::params.
|
overridevirtual |
Update the IF NCO frequency used by the complex mixer.
Called in response to SET RX_IF_FREQ from RadioControl.
Implements SoDa::RadioRX.
|
overridevirtual |
Arm the streaming flag so downConvert() publishes samples.
Implements SoDa::RadioRX.
|
overridevirtual |
Disarm the streaming flag; IIO DMA continues draining silently.
Implements SoDa::RadioRX.
|
overridevirtual |
test the processing stream flag
Implements SoDa::RadioRX.
|
private |
accumulator for 30000-sample publish
Definition at line 127 of file PlutoRX.hxx.
|
private |
Definition at line 108 of file PlutoRX.hxx.
|
private |
cf-ad9361-lpc
Definition at line 109 of file PlutoRX.hxx.
|
private |
IIO buffer size in samples (at 2.5 MSPS)
Definition at line 114 of file PlutoRX.hxx.
|
private |
SC16→float conversion (hw_buf_size)
Definition at line 125 of file PlutoRX.hxx.
|
private |
2.5 MSPS → 625 kSPS
Definition at line 123 of file PlutoRX.hxx.
|
private |
Definition at line 129 of file PlutoRX.hxx.
|
private |
true → push raw RF copies to if_stream
Definition at line 121 of file PlutoRX.hxx.
|
private |
publish chunk size for BaseBandRX (30000)
Definition at line 116 of file PlutoRX.hxx.
|
private |
resampler output (rs_out_size)
Definition at line 126 of file PlutoRX.hxx.
|
private |
hw_resampler output size (at 625 kSPS)
Definition at line 115 of file PlutoRX.hxx.
|
private |
voltage0 (input) — I component
Definition at line 110 of file PlutoRX.hxx.
|
private |
voltage1 (input) — Q component
Definition at line 111 of file PlutoRX.hxx.
|
private |
625 kSPS — used for IF NCO phase increment
Definition at line 118 of file PlutoRX.hxx.
|
private |
Definition at line 112 of file PlutoRX.hxx.
|
private |
Definition at line 131 of file PlutoRX.hxx.
|
private |
true after startStream(); samples published
Definition at line 120 of file PlutoRX.hxx.