62 bool exitflag =
false;
66 bool workdone =
false;
101 if(!
tx_on)
return false;
104 bool sent_char =
false;
113 boost::mutex::scoped_lock mt_lock(
text_lock);
118 if(outchar !=
'\003') {
210 boost::mutex::scoped_lock lock(
text_lock);
212 const char * cp = buf;
215 if(*cp ==
'\000')
break;
226 boost::mutex::scoped_lock lock(
text_lock);
The Thread baseclass for all SoDa thread objects.
unsigned int cmd_subs
subscription for command stream
float * beacon_envelope
the currently generated envelope
turn transmitter on and off.
T * get(unsigned int subscriber_id)
CmdMBox * cmd_stream
stream of commands to modify radio state
int iparms[4]
integer parameters
void execSetCommand(Command *cmd)
handle SET commands from the command channel
Set the modulation mode for the transmit chain.
Report when CW TX envelope buffer was empty (cmd enables report)
This class handles command line parameters and built-ins.
void run()
CWTX run loop: translate text to CW envelopes, handle incoming commands.
CmdTarget target
the thing we're touching
TX Carrier Control – send a dead carrier.
void execGetCommand(Command *cmd)
execute GET commands from the command channel
std::queue< int > break_notification_id_queue
tags inserted into text stream – send tag when the CW envelope generator gets to this character...
static int getMaxStringLen()
how long can a string parameter to a command be?
bool sendAvailChar()
if a character is available, encode it into an envelope
CWTX(Params *params, CmdMBox *cwtxt_stream, DatMBox *cw_env_stream, CmdMBox *cmd_stream)
Constructor.
Flush outstanding CW text strings from pending buffer.
std::queue< char > text_queue
characters waiting to be sent
unsigned int getRFBufferSize() const
On receipt of a STOP command, all threads should exit their run loop.
This is a list of all the commands that can "do something" to one or more components in the SoDa radi...
double rf_sample_rate
samples/sec for generating the envelope
void setCWSpeed(unsigned int wpm)
set the speed of the cw stream in words per minute
char sparm[64]
a buffer holding the string
void clearTextQueue()
forget all enqueued text
ModulationType
modulation selector targets take one of these values
void execRepCommand(Command *cmd)
handle Report commands from the command channel
CmdMBox * cwtxt_stream
stream of characters to be encoded (from UI or elsewhere)
unsigned int cwtxt_subs
subscription for text stream
boost::mutex text_lock
lock for text_queue
boost::mutex break_id_lock
lock for break_notification queue
bool sendChar(char c)
encode a character into the envelope buffer
double getTXRate() const
TX rate will always be 625K.
TX CW text control – a buffer of up to 8 characters.
unsigned int rf_buffer_size
the size of the envelope buffer
send character count from start-of-time each time we send a character.
Set speed of CW generator.
bool txmode_is_cw
if true, we're transmitting a CW stream
CWGenerator * cwgen
Pointer to a text-to-morse translator.
bool tx_on
if true, we're transmitting a CW stream or a beacon
void enqueueText(const char *buf)
add text to the outbound text queue
bool readyForMore()
check envelope stream to see if we have less than 1 second's worth of stuff enqueued ...
DatMBox * cw_env_stream
stream carrying cw envelope buffers to USRPTX
A text to morse envelope converter.
void execCommand(Command *cmd)
Execute (dispatch) a message removed from the command stream to one of the basic Command handler func...
Put a marker in the CW text stream, report its "passing".
bool old_txmode_is_cw
remember the mode we were in