![]() |
SoDaRadio-12.2.0-cut_dependencies:6c82803
|
#include <BaseBandTX.hxx>
Public Member Functions | |
| void | subscribeToMailBoxes (const std::vector< MailBoxBasePtr > &mailboxes) |
| implement the subscription method | |
| void | run () |
| the run method – does the work of the audio transmitter 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 () |
Static Public Member Functions | |
| static BaseBandTXPtr | make (ParamsPtr params, AudioIfcPtr audio_ifc) |
| 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 | |
| BaseBandTX (ParamsPtr params, AudioIfcPtr audio_ifc) | |
| constructor | |
| 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 | 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 | |
| SoDa::CBufPtr | modulateAM (std::vector< float > &audio_buf, bool is_usb, bool is_lsb) |
| create an AM/SSB modulation envelope | |
| SoDa::CBufPtr | modulateFM (std::vector< float > &audio_buf, double deviation) |
| create a narrowband/wideband FM modulation envelope | |
Private Attributes | |
| double | fm_phase |
| double | nbfm_deviation |
| phase advance for 2.5kHz deviation. | |
| double | wbfm_deviation |
| phase advance for 75kHz deviation | |
| double | fm_mic_gain |
| separate gain control for FM deviation.... | |
| CDatMBoxPtr | tx_stream |
| outbound RF stream to USRPTX transmit chain | |
| CmdMBoxPtr | cmd_stream |
| command stream from UI and other units | |
| CmdMBox::Subscription | cmd_subs |
| subscription ID for command stream | |
| SoDa::ReSamplerPtr | interpolator |
| Upsample from 48KHz to 625KHz. | |
| unsigned int | audio_buffer_size |
| length (in samples) of an input audio buffer | |
| double | audio_sample_rate |
| wired in lots of places as 48KHz | |
| unsigned int | tx_buffer_size |
| how long is the outbound RF buffer | |
| SoDa::Command::ModulationType | tx_mode |
| what modulation scheme? USB? LSB? CW_U?... | |
| bool | cw_tx_mode |
| if true, tx_mode is CW_L or CW_U | |
| bool | tx_on |
| set by Command::TX_STATE to on or off | |
| float | af_gain |
| local microphone gain. | |
| AudioIfcPtr | audio_ifc |
| pointer to an AudioIfc object for the microphone input | |
| bool | tx_stream_on |
| if true, we are transmitting. | |
| std::vector< std::complex< float > > | audio_IQ_buf |
| temporary storage for outbound modulation envelope | |
| std::vector< float > | noise_buffer |
| This is a buffer that holds a set of "noise" samples (uniform random) for testing the TX audio chain. | |
| bool | tx_noise_source_ena |
| When this is TRUE, audio modes (USB,LSB,AM,NBFM,WBFM) use a noise source for input. | |
| bool | tx_audio_filter_ena |
| There is an audio filter in the chain, by default. | |
| SoDa::OSFilterPtr | tx_audio_filter |
| TX audio filter. | |
| SoDa::HilbertTransformerPtr | hilbert |
| The hilbert transformer to create an analytic (I/Q) signal. | |
| float | mic_gain |
| mic gain is adjustable, to make sure we aren't noxious. | |
| bool | debug_mode |
| if true, print extra debug info | |
| int | debug_ctr |
Additional Inherited Members | |
| Static Public Attributes inherited from SoDa::Debug | |
| static std::mutex | debug_msg_mutex |
| 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 60 of file BaseBandTX.hxx.
|
protected |
|
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.
|
inlinestatic |
Definition at line 73 of file BaseBandTX.hxx.
References BaseBandTX(), and audio_ifc.
|
private |
create an AM/SSB modulation envelope
| audio_buf | the buffer of modulating audio info |
| is_usb | if true, generate upper sideband |
| is_lsb | if true, generate lower sideband if both is_usb and is_lsb are false, the modulator creates an IQ stream that is amplitude modulated |
|
private |
create a narrowband/wideband FM modulation envelope
| audio_buf | the buffer of modulating audio info |
| deviation | the phase shift per audio sample for a maximum amplitude (1.0) input. |
Note that this modulator varies the mic gain to prevent over-deviation.
|
virtual |
the run method – does the work of the audio transmitter process
Reimplemented from SoDa::Thread.
|
virtual |
implement the subscription method
Implements SoDa::Thread.
|
private |
local microphone gain.
Definition at line 152 of file BaseBandTX.hxx.
|
private |
length (in samples) of an input audio buffer
Definition at line 143 of file BaseBandTX.hxx.
|
private |
pointer to an AudioIfc object for the microphone input
Definition at line 155 of file BaseBandTX.hxx.
Referenced by BaseBandTX(), and make().
|
private |
temporary storage for outbound modulation envelope
Definition at line 161 of file BaseBandTX.hxx.
|
private |
wired in lots of places as 48KHz
Definition at line 144 of file BaseBandTX.hxx.
|
private |
command stream from UI and other units
Definition at line 136 of file BaseBandTX.hxx.
|
private |
subscription ID for command stream
Definition at line 137 of file BaseBandTX.hxx.
|
private |
if true, tx_mode is CW_L or CW_U
Definition at line 148 of file BaseBandTX.hxx.
|
private |
Definition at line 196 of file BaseBandTX.hxx.
|
private |
if true, print extra debug info
Definition at line 195 of file BaseBandTX.hxx.
|
private |
separate gain control for FM deviation....
Definition at line 132 of file BaseBandTX.hxx.
|
private |
Definition at line 129 of file BaseBandTX.hxx.
|
private |
The hilbert transformer to create an analytic (I/Q) signal.
Definition at line 188 of file BaseBandTX.hxx.
|
private |
Upsample from 48KHz to 625KHz.
Definition at line 140 of file BaseBandTX.hxx.
|
private |
mic gain is adjustable, to make sure we aren't noxious.
Definition at line 193 of file BaseBandTX.hxx.
|
private |
phase advance for 2.5kHz deviation.
Definition at line 130 of file BaseBandTX.hxx.
|
private |
This is a buffer that holds a set of "noise" samples (uniform random) for testing the TX audio chain.
Definition at line 167 of file BaseBandTX.hxx.
|
private |
TX audio filter.
Definition at line 183 of file BaseBandTX.hxx.
|
private |
There is an audio filter in the chain, by default.
This is the enable.
Definition at line 178 of file BaseBandTX.hxx.
|
private |
how long is the outbound RF buffer
Definition at line 145 of file BaseBandTX.hxx.
|
private |
what modulation scheme? USB? LSB? CW_U?...
Definition at line 147 of file BaseBandTX.hxx.
|
private |
When this is TRUE, audio modes (USB,LSB,AM,NBFM,WBFM) use a noise source for input.
Definition at line 173 of file BaseBandTX.hxx.
|
private |
set by Command::TX_STATE to on or off
Definition at line 149 of file BaseBandTX.hxx.
|
private |
outbound RF stream to USRPTX transmit chain
Definition at line 135 of file BaseBandTX.hxx.
|
private |
if true, we are transmitting.
Definition at line 157 of file BaseBandTX.hxx.
|
private |
phase advance for 75kHz deviation
Definition at line 131 of file BaseBandTX.hxx.