38#include <SoDa/ReSampler.hxx>
39#include <SoDa/OSFilter.hxx>
40#include <SoDa/MailBox.hxx>
106 ret->registerThread(ret);
278 std::map<SoDa::Command::AudioFilterBW, SoDa::OSFilterPtr>
filter_map;
The Baseclass for all SoDa objects, and useful commonly used classes.
The Baseclass for all SoDa thread objects.
SoDa::OSFilterPtr nbfm_pre_filter
Before NBFM demod, we do some (15KHz) prefilter – rf rate.
SoDa::OSFilterPtr cur_audio_filter
currently selected audio filter
void execSetCommand(CommandPtr cmd)
handle SET commands from the command channel
void demodulateNBFM(SoDa::CBufPtr drxbuf, SoDa::Command::ModulationType mod, float af_gain)
demodulate the input stream as a narrowband frequency modulated signal place the resulting audio buff...
float nbfm_squelch_level
average amplitude must be greater to trigger demod.
void demodulate(SoDa::CBufPtr rxbuf)
apply the currently selected demodulation scheme to the input RX buffer place the resulting audio buf...
unsigned int audio_buffer_size
size of output audio buffer chunk
BaseBandRX(ParamsPtr params, AudioIfcPtr audio_ifc)
the constructor
SoDa::OSFilterPtr am_pre_filter
Before AM demod, we do some (6KHz) prefilter.
float last_phase_samp
history value used to calculate dPhase/dt in FM atan based discriminator.
int nbfm_squelch_hang_time
continue FM audio demod for this many frames after threshold drops
void demodulateWBFM(SoDa::CBufPtr rxbuf, SoDa::Command::ModulationType mod, float af_gain)
demodulate the input stream as a wideband frequency modulated signal place the resulting audio buffer...
unsigned int dbg_ctr
debug counter, used to support one-time or infrequent bulletins
void execRepCommand(CommandPtr cmd)
handle Report commands from the command channel
SoDa::Command::AudioFilterBW af_filter_selection
currently audio filter selector
SoDa::OSFilterPtr am_audio_filter
After AM demod, we do a second filter.
void demodulateAM(SoDa::CBufPtr drxbuf)
demodulate the input stream as an amplitude modulated signal place the resulting audio buffer on the ...
float * getNextAudioBuffer()
return the next queued audio buffer to pass to the audio output device
double audio_sample_rate
sample rate of audio output – assumed 48KHz
static BaseBandRXPtr make(ParamsPtr params, AudioIfcPtr audio_ifc)
the maker – produces a shared pointer p
bool in_catchup
when true, the audio server has fallen behind...
void demodulateSSB(SoDa::CBufPtr drxbuf, SoDa::Command::ModulationType mod)
demodulate the input stream as an SSB signal place the resulting audio buffer on the audio output que...
bool audio_rx_stream_enabled
if true, send pending audio buffers to output
SoDa::FBufPtr sidetone_silence
a sequence of zero samples to stuff silence into the audio
float af_sidetone_gain
audio gain setting for TX/CW mode
SoDa::ReSamplerPtr wbfm_resampler
downsample the RF input to 48KS/s for WBFM unit
int nbfm_squelch_hang_count
if > 0 then send audio.
unsigned int rf_buffer_size
size of input RF buffer chunk
void pendNullBuffer(int count=1)
put an empty (zero signal) audio buffer on the pending for output list
float * cur_af_gain
pointer to the gain setting for this mode
float log_audio_buffer_size
double rf_sample_rate
sample rate of RF input from USRP – assumed 625KHz
void flushAudioBuffers()
empty the queue of pending audio buffers, we're going into TX mode.
bool in_fallback
when true, the audio server has gotten ahead...
void run()
the run method – does the work of the audio receiver process
float af_gain
audio gain setting for RX mode
AudioIfcPtr audio_ifc
pointer to the audio interface (output) object
MedianFilter3< float > fmMedianFilter
simple 3 point median filter for FM units
bool sidetone_stream_enabled
if true, send CW sidetone to audio output
bool audio_rx_stream_needs_start
if true, the audio output device needs a wakeup
SoDa::OSFilterPtr fm_audio_filter
audio filter for FM (wider passband)
void subscribeToMailBoxes(const std::vector< MailBoxBasePtr > &mailboxes)
implement the subscription method
CDatMBoxPtr rx_stream
mailbox producing rx sample stream from USRP
void repAFFilterShape()
send a report of the lower and upper edges of the IF passband based on the current filter and modulat...
SoDa::Command::ModulationType rx_modulation
current receive modulation mode (USB,LSB,CW_U,CW_L,NBFM,WBFM,AM,...)
unsigned int catchup_rand_mask
a mask to use for fast selection of a random index into an audio buffer.
SoDa::ReSamplerPtr rf_resampler
downsample the RF input to 48KS/s
void pendAudioBuffer(SoDa::FBufPtr b)
put an audio buffer on the "pending for output" list
CDatMBox::Subscription rx_subs
mailbox subscription ID for rx data stream
void buildFilterMap()
build the audio filter map for selected bandwidths
std::map< SoDa::Command::AudioFilterBW, SoDa::OSFilterPtr > filter_map
map filter selectors to the filter objects
std::ofstream audio_file2
CmdMBoxPtr cmd_stream
mailbox producing command stream from user
void reportAFFilters()
report all filters supported.
void execGetCommand(CommandPtr cmd)
execute GET commands from the command channel
SoDa::HilbertTransformerPtr hilbert
hilbert transform object for SSB/CW widgets
CmdMBox::Subscription cmd_subs
mailbox subscription ID for command stream
void reportModes()
report all demod modes supported.
ModulationType
modulation selector targets take one of these values
AudioFilterBW
these are the possible audio filter bandwidths
The Thread baseclass for all SoDa thread objects.
std::shared_ptr< HilbertTransformer > HilbertTransformerPtr
std::shared_ptr< FBuf > FBufPtr
std::shared_ptr< BaseBandRX > BaseBandRXPtr
std::shared_ptr< Params > ParamsPtr
std::shared_ptr< Command > CommandPtr
std::shared_ptr< AudioIfc > AudioIfcPtr
std::shared_ptr< CmdMBox > CmdMBoxPtr
std::shared_ptr< CDatMBox > CDatMBoxPtr
std::shared_ptr< CBuf > CBufPtr
std::weak_ptr< BaseBandRX > BaseBandRXWeakPtr