39#include <SoDa/MailBox.hxx>
68 auto ret = std::shared_ptr<CWTX>(
new CWTX(params));
69 ret->registerThread(ret);
The Baseclass for all SoDa objects, and useful commonly used classes.
The Baseclass for all SoDa thread objects.
FDatMBoxPtr cw_env_stream
stream carrying cw envelope buffers to USRPTX
CmdMBox::Subscription cmd_subs
subscription for command stream
bool old_txmode_is_cw
remember the mode we were in
void clearTextQueue()
forget all enqueued text
CmdMBoxPtr cmd_stream
stream of commands to modify radio state
std::mutex break_id_mutex
mutex for break_notification queue
void execGetCommand(CommandPtr cmd)
execute GET commands from the command channel
static CWTXPtr make(ParamsPtr params)
CmdMBoxPtr cwtxt_stream
stream of characters to be encoded (from UI or elsewhere)
bool tx_on
if true, we're transmitting a CW stream or a beacon
void subscribeToMailBoxes(const std::vector< MailBoxBasePtr > &mailboxes)
implement the subscription method
void execRepCommand(CommandPtr cmd)
handle Report commands from the command channel
unsigned int rf_buffer_size
the size of the envelope buffer
double rf_sample_rate
samples/sec for generating the envelope
std::mutex text_mutex
mutex for text_queue
void enqueueText(const char *buf)
add text to the outbound text queue
std::queue< char > text_queue
characters waiting to be sent
CWTX(ParamsPtr params)
Constructor.
bool sendAvailChar()
if a character is available, encode it into an envelope
void run()
CWTX run loop: translate text to CW envelopes, handle incoming commands.
std::queue< int > break_notification_id_queue
tags inserted into text stream – send tag when the CW envelope generator gets to this character.
bool txmode_is_cw
if true, we're transmitting a CW stream
CmdMBox::Subscription cwtxt_subs
subscription for text stream
void execSetCommand(CommandPtr cmd)
handle SET commands from the command channel
std::shared_ptr< CWGenerator > cwgen
Pointer to a text-to-morse translator.
The Thread baseclass for all SoDa thread objects.
std::shared_ptr< CWTX > CWTXPtr
std::shared_ptr< Params > ParamsPtr
std::shared_ptr< Command > CommandPtr
std::shared_ptr< CmdMBox > CmdMBoxPtr
std::shared_ptr< FDatMBox > FDatMBoxPtr