![]() |
SoDaRadio-12.2.0-cut_dependencies:6c82803
|
#include <RadioTX.hxx>
Public Member Functions | |
| RadioTX (ParamsPtr params, const std::string &name) | |
| Constructor for RF Transmit/modulator process. | |
| 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 () |
Protected Member Functions | |
| virtual bool | transmitSwitch (bool tx_on)=0 |
| most transmit chains will require multiple stages to enable the transmitter. | |
| virtual bool | put (CBufPtr buf)=0 |
| The TX hardware unit doesn't do much at all. | |
| virtual void | subExecCommand (CommandPtr cmd) |
| Some hardware radio modules might want to watch or publish to the command mailbox. | |
| virtual void | subExecGetCommand (CommandPtr cmd) |
| virtual void | subExecSetCommand (CommandPtr cmd) |
| virtual void | subExecRepCommand (CommandPtr cmd) |
| virtual RadioTXPtr | getSelfPtr ()=0 |
| 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 () |
Protected Attributes | |
| bool | tx_enabled |
| if true, we're transmitting. | |
| CBufPtr | zero_buf |
| envelope for dead silence. | |
| 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 | |
Private Member Functions | |
| void | run () |
| RadioTX run loop: handle commands, and modulate the tx carrier. | |
| virtual void | subscribeToMailBoxes (const std::vector< MailBoxBasePtr > &mailboxes) final |
| SoDa Threads must subscribe to at least the control mailbox. | |
| virtual void | init () |
| Some initialization must occurr after all the components are created. | |
| void | execGetCommand (CommandPtr cmd) |
| execute GET commands from the command channel | |
| void | execSetCommand (CommandPtr cmd) |
| handle SET commands from the command channel | |
| void | execRepCommand (CommandPtr cmd) |
| handle Report commands from the command channel | |
| void | setCWFreq (bool usb, double freq) |
| set the CW tone frequency to generate an IQ stream | |
| void | doCW (CBufPtr out, FBufPtr envelope) |
| given a keying envelope, impose it on the CW tone | |
Private Attributes | |
| CDatMBox::Subscription | tx_subs |
| subscription handle for transmit audio stream (from BaseBandTX) | |
| CmdMBox::Subscription | cmd_subs |
| subscription handle for command stream | |
| FDatMBox::Subscription | cw_subs |
| subscription handle for cw envelope stream (from CW unit) | |
| CDatMBoxPtr | tx_stream |
| transmit audio stream | |
| FDatMBoxPtr | cw_env_stream |
| envelope stream from text-to-CW converter (CW unit) | |
| CmdMBoxPtr | cmd_stream |
| command stream | |
| double | CW_tone_freq |
| QuadratureOscillator | CW_osc |
| CW tone IQ oscillator. | |
| FBufPtr | beacon_env |
| steady constant amplitude envelope | |
| FBufPtr | zero_env |
| zero amplitude envelope | |
| CBufPtr | cw_buf |
| working buffer for CW output | |
| bool | beacon_mode |
| if true, we're transmitting a steady carrier | |
| Command::ModulationType | tx_modulation |
| current modulation mode | |
| double | tx_sample_rate |
| sample rate for buffer going to USRP (UHD) | |
| unsigned int | tx_buffer_size |
| size of buffer going to USRP | |
| float | cw_env_amplitude |
| used to set CW output envelope, constant at 0.7 | |
| bool | waiting_to_run_dry |
| When set, we should send out a report when we run out of CW buffer. | |
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 std::mutex | debug_msg_mutex |
| Static Protected Attributes inherited from SoDa::Debug | |
| static unsigned int | default_debug_level |
| static unsigned int | global_debug_level |
Definition at line 59 of file RadioTX.hxx.
| SoDa::RadioTX::RadioTX | ( | ParamsPtr | params, |
| const std::string & | name ) |
Constructor for RF Transmit/modulator process.
| params | block describing intial setup of the radio |
| name | the name of this TX block (typcally indicates radio type) |
Referenced by SoDa::RTLSDRTX::RTLSDRTX().
given a keying envelope, impose it on the CW tone
| out | the output IQ buffer, CW_osc amplitude modulated by the envelope parameter |
| envelope | float array of keyed waveform amplitudes |
|
privatevirtual |
execute GET commands from the command channel
| cmd | the incoming command |
Reimplemented from SoDa::Thread.
|
privatevirtual |
handle Report commands from the command channel
| cmd | the incoming command |
Reimplemented from SoDa::Thread.
|
privatevirtual |
handle SET commands from the command channel
| cmd | the incoming command |
Reimplemented from SoDa::Thread.
|
protectedpure virtual |
Implemented in SoDa::PlutoTX, SoDa::RTLSDRTX, and SoDa::USRPTX.
|
inlineprivatevirtual |
Some initialization must occurr after all the components are created.
Units may optionally implement this method to do that.
Reimplemented in SoDa::PlutoTX, SoDa::RTLSDRTX, and SoDa::USRPTX.
Definition at line 89 of file RadioTX.hxx.
|
protectedpure virtual |
The TX hardware unit doesn't do much at all.
Get bits, Put bits. This is (or may be) a blocking call.
| buf | a shared pointer to a buffer of complex samples. These may be enqueued or sent directly to the hardware. |
Implemented in SoDa::PlutoTX, SoDa::RTLSDRTX, and SoDa::USRPTX.
|
privatevirtual |
RadioTX run loop: handle commands, and modulate the tx carrier.
Reimplemented from SoDa::Thread.
|
private |
set the CW tone frequency to generate an IQ stream
| usb | if true, put the tone above the nominal carrier |
| freq | frequency of the CW tone (offset from zero beat) |
|
inlineprotectedvirtual |
Some hardware radio modules might want to watch or publish to the command mailbox.
They may, but shouldn't;
Definition at line 123 of file RadioTX.hxx.
|
inlineprotectedvirtual |
Definition at line 124 of file RadioTX.hxx.
|
inlineprotectedvirtual |
Definition at line 126 of file RadioTX.hxx.
|
inlineprotectedvirtual |
Definition at line 125 of file RadioTX.hxx.
|
finalprivatevirtual |
SoDa Threads must subscribe to at least the control mailbox.
| mailboxes | a list of all defined mailboxes. Choose your subscriptions. |
Implements SoDa::Thread.
|
protectedpure virtual |
most transmit chains will require multiple stages to enable the transmitter.
– switch the antenna, turn on the power amplifier, start the modulator. Actual control of the antenna is left to the control unit. The transmitter need only provide a "transmitEnable" function that will be called after the antenna switch has flipped.
| tx_on | if true, enable the transmit chain. Disable the transmitter if false. |
Implemented in SoDa::PlutoTX, SoDa::RTLSDRTX, and SoDa::USRPTX.
|
private |
steady constant amplitude envelope
Definition at line 182 of file RadioTX.hxx.
|
private |
if true, we're transmitting a steady carrier
Definition at line 185 of file RadioTX.hxx.
|
private |
command stream
Definition at line 176 of file RadioTX.hxx.
|
private |
subscription handle for command stream
Definition at line 171 of file RadioTX.hxx.
|
private |
working buffer for CW output
Definition at line 184 of file RadioTX.hxx.
|
private |
used to set CW output envelope, constant at 0.7
Definition at line 191 of file RadioTX.hxx.
|
private |
envelope stream from text-to-CW converter (CW unit)
Definition at line 175 of file RadioTX.hxx.
|
private |
CW tone IQ oscillator.
Definition at line 180 of file RadioTX.hxx.
|
private |
subscription handle for cw envelope stream (from CW unit)
Definition at line 172 of file RadioTX.hxx.
|
private |
Definition at line 179 of file RadioTX.hxx.
|
private |
size of buffer going to USRP
Definition at line 190 of file RadioTX.hxx.
|
protected |
if true, we're transmitting.
Definition at line 130 of file RadioTX.hxx.
|
private |
current modulation mode
Definition at line 187 of file RadioTX.hxx.
|
private |
sample rate for buffer going to USRP (UHD)
Definition at line 189 of file RadioTX.hxx.
|
private |
transmit audio stream
Definition at line 174 of file RadioTX.hxx.
|
private |
subscription handle for transmit audio stream (from BaseBandTX)
Definition at line 170 of file RadioTX.hxx.
|
private |
When set, we should send out a report when we run out of CW buffer.
Definition at line 193 of file RadioTX.hxx.
|
protected |
envelope for dead silence.
Definition at line 132 of file RadioTX.hxx.
|
private |
zero amplitude envelope
Definition at line 183 of file RadioTX.hxx.