![]() |
SoDaRadio-12.2.0-cut_dependencies:6c82803
|
This is a list of all the commands that can "do something" to one or more components in the SoDa radio. More...
#include <Command.hxx>
Public Member Functions | |
| Command (CmdType _ct, CmdTarget _tgt) | |
| Constructor for commands with no parameters. | |
| Command (CmdType _ct, CmdTarget _tgt, int p0, int p1=0, int p2=0, int p3=0) | |
| Constructor for commands with integer parameters. | |
| Command (CmdType _ct, CmdTarget _tgt, double p0, double p1=0.0, double p2=0.0, double p3=0.0) | |
| Constructor for commands with double float parameters. | |
| Command (CmdType _ct, CmdTarget _tgt, const std::string &_str_arg, unsigned int _tag=0) | |
| Constructor for commands with a string parameter. | |
| Command (CmdType _ct, CmdTarget _tgt, const char *cp, unsigned int _tag=0) | |
| Constructor for commands with a string parameter. | |
| Command (const Command &cc) | |
| Copy Constructor. | |
| Command () | |
| Constructor – create an empty command. | |
| ~Command () | |
| Destructor. | |
| std::string | toString () const |
| return a string that displays the command | |
Static Public Member Functions | |
| static CommandPtr | make (CmdType _ct, CmdTarget _tgt) |
| static CommandPtr | make (CmdType _ct, CmdTarget _tgt, int p0, int p1=0, int p2=0, int p3=0) |
| static CommandPtr | make (CmdType _ct, CmdTarget _tgt, double p0, double p1=0.0, double p2=0.0, double p3=0.0) |
| static CommandPtr | make (CmdType _ct, CmdTarget _tgt, const std::string &_str_arg, unsigned int _tag=0) |
| static CommandPtr | make (CmdType _ct, CmdTarget _tgt, const char *cp, unsigned int _tag=0) |
| static CommandPtr | make () |
| static Command * | parseCommandString (std::string str) |
| convert a string to a command | |
| static int | getMaxStringLen () |
| how long can a string parameter to a command be? | |
| static void | initTables () |
| setup maps to support parseCommandString and toString | |
Public Attributes | |
| unsigned int | tag |
| used to pair an int with a string or other param. | |
| union { | |
| int iparms [4] | |
| integer parameters More... | |
| double dparms [4] | |
| double float parameters More... | |
| char sparm [64] | |
| a buffer holding the string More... | |
| }; | |
| CmdType | cmd |
| the command type (SET, GET, REP) | |
| CmdTarget | target |
| the thing we're touching | |
| int | id |
| a sequential ID for each command – used in debugging and sequencing | |
| char | parm_type |
| is this a double, int, string? | |
Static Public Attributes | |
| static int | command_sequence_number |
| sequential ID applied to each command | |
| static bool | table_needs_init |
| if true, we need to call initTables() | |
| static std::map< std::string, CmdTarget > | target_map_s2v |
| mapping for parseCommandString | |
| static std::map< CmdTarget, std::string > | target_map_v2s |
| mapping for toString | |
Static Private Member Functions | |
| static void | initTableEntry (const std::string &, CmdTarget tgt) |
This is a list of all the commands that can "do something" to one or more components in the SoDa radio.
The base class defines all the command types in an enum. Each command can take up to 4 double and 4 integer parameters. (This isn't very OO, but the intent is to keep the command packet format simple, stable, and universal.)
Definition at line 52 of file Command.hxx.
these are the possible audio filter bandwidths
| Enumerator | |
|---|---|
| BW_100 | |
| BW_500 | |
| BW_2000 | |
| BW_6000 | |
| BW_PASS | |
| BW_WSPR | |
| BW_NULL | |
Definition at line 545 of file Command.hxx.
some radios support two sources for the master oscillator reference.
(chosen by set/get ClockSource)
| Enumerator | |
|---|---|
| EXTERNAL | |
| INTERNAL | |
Definition at line 70 of file Command.hxx.
Each command has a "target" state that it is meant to modify, query, or report.
| Enumerator | |
|---|---|
| RX_TUNE_FREQ | Set the RX front end (1st LO, the 2nd IF LO), and the 3rd LO in a more-or-less optimal way to position the requested frequency at least 80 kHz above the target frequency. param is frequency as a double
|
| RX_LO_FREQ | Tune the RX hardware front end local oscillator. param is frequency as a double |
| RX_IF_FREQ | Tune the software NCO (final LO) frequency to shift to baseband. param is frequency as a double |
| RX_CENTER_FREQ | The center frequency for IF buffers from USRPRX. param is frequency as a double |
| TX_TUNE_FREQ | Set the TX front end (1st LO, the 2nd IF LO), and the 3rd LO in a more-or-less optimal way to position the requested frequency at least 80 kHz above the target frequency. param is frequency as a double
|
| TX_LO_FREQ | Tune the RX hardware front end local oscillator. param is frequency as a double |
| TX_IF_FREQ | Set/report the TX IF frequency. param is frequency as a double (normally 0) |
| RX_SAMP_RATE | Sample rate for RX is typically 600 KHz or better to allow a reasonable span for the waterfall and periodogram. It also gets us reasonably far away from the high noise region near the oscillators. param is a double |
| TX_SAMP_RATE | Sample rate for TX needs to be fast enough for reasonable FM We set it to 625000 just because there doesn't seem to be much utility to go any slower. param is a double |
| RX_ANT | RX ant choices are TX/RX, and RX2. param is a string |
| TX_ANT | Not many choices for TX ant, just TX. param is a string |
| RX_RF_GAIN | Set the RX front end attenuator/amp. gain param is a double less than 0 relative to max RX gain |
| TX_RF_GAIN | Set the TX final amplifier. gain param is a double less than 0 relative to max TX gain |
| RX_AF_GAIN | RX audio gain setting. gain param is a double actual gain factor is 10^(0.1*param - 50) |
| RX_AF_SIDETONE_GAIN | RX audio gain for sidetone (CW) monitor. gain param is a double actual gain factor is 10^(0.1*param - 50) |
| TX_AF_GAIN | TX mic gain. gain param is a double actual gain factor is 10^(0.1*param - 50) |
| TX_STATE | turn transmitter on and off. param 1 is integer from the RxTxState enum param 2 is integer 0 is half-duplex, 1 full-duplex (In full duplex mode, the state of the RX chain is unchanged when the transmitter is enabled.) |
| RX_STATE | Ignored for now. |
| TX_BEACON | TX Carrier Control – send a dead carrier. param is integer – nonzero enables beacon mode.
|
| TX_CW_TEXT | TX CW text control – a buffer of up to 8 characters. param is a string of 8 chars
|
| TX_CW_SPEED | Set speed of CW generator. param is integer in WPM
|
| TX_CW_FLUSHTEXT | Flush outstanding CW text strings from pending buffer. REP – iparam[0] is the character count for the last character dropped from the buffer. |
| TX_CW_MARKER | Put a marker in the CW text stream, report its "passing". parameter is integer tag that will be reported in a TX_CW_MARKER REP
|
| TX_CW_EMPTY | Report when CW TX envelope buffer was empty (cmd enables report) no parameter |
| RX_MODE | Set the modulation mode for the receive chain. param integer – (int) conversion of SoDa::Command::ModulationType
|
| TX_MODE | Set the modulation mode for the transmit chain. param integer – (int) conversion of SoDa::Command::ModulationType
|
| RX_BW | tweak the AF chain – filter settings |
| RBW | tweak the waterfall display parameters like resolution bandwidth |
| SPEC_CENTER_FREQ | the center frequency (command from GUI) |
| SPEC_RANGE_LOW | low spectrum frequency range |
| SPEC_RANGE_HI | high spectrum frequency range |
| SPEC_STEP | freqency step |
| SPEC_BUF_LEN | number of samples in the buffer. |
| SPEC_DIMS | all spec info in one call, cf, span, and buflen |
| SPEC_AVG_WINDOW | how many FFT samples contribute to a spectrum report |
| SPEC_UPDATE_RATE | how many FFT samples between spectrum reports |
| CLOCK_SOURCE | The master clock oscillator source Reference oscilator selector set to 1 for external, 0 for internal rep = 1 for internal lock, 0 for unlock 3 for external lock, 2 for external unlocked. |
| LO_CHECK | This is an LO check command - use it for finding the actual microwave LO frequency. if the parameter is > 0, set the rx_lo to the dparm arg, and remember that we're in LOcheck mode. |
| LO_OFFSET | this is a GET/REP command – BaseBandRX takes FFT centered around 0 and reports largest peak within 50KHz. |
| RX_AF_FILTER | Audio Filter. |
| RX_AF_FILTER_SHAPE | Audio Filter. |
| GPS_LATLON | Report LAT and LON from GPS receiver. params are double Latitude, Longitude forms: REP |
| GPS_UTC | Report UTC (time) from GPS receiver. params are int HH, MM, SS forms: REP |
| GPS_LOCK | Report when GPS is locked. param is int – 0 for unlocked, 1 for locked forms: REP |
| SDR_VERSION | Report the SDR (SoDa server program) version info. string param forms: REP |
| DBG_REP | Initiate a debug dump. param (int) ordinal of UnitSelector forms: GET |
| HWMB_REP | Report the motherboard name (the model name of the USRP) rep – string param forms: GET, REP |
| STOP | On receipt of a STOP command, all threads should exit their run loop. no param forms: SET |
| TVRT_LO_ENABLE | On receipt of a TVRT_LO_ENABLE command dump a perpetual constant IF stream of (1.0, 0.0) into the tx2 channel to get a steady output. Ignore this command unless the radio is a B210. forms: SET |
| TVRT_LO_DISABLE | On receipt of a TVRT_LO_DISABLE command, turn the LO output on TX2 off. Ignore this command unless the radio is a B210. no param forms: SET |
| TVRT_LO_CONFIG | On receipt of a TVRT_LO_CONFIG command , set the TX2 channel frequency to dparam[0] and the TX2 output gain to dparam[1]. Ignore this command unless the radio is a B210. param (double) output frequency param (double) output gain setting forms: SET, REP |
| STATUS_MESSAGE | The STATUS_MESSAGE carries a payload of up to 64 characters. These will be displayed in a log window for the GUI. param char[64] forms: REP |
| TX_AUDIO_IN | Select the transmit chain audio input (for SSB, AM, and FM) |
| TX_AUDIO_FILT_ENA | Enable the TX audio bandpass filter (limit to 2.5 kHz) for SSB/AM/FM. |
| RX_GAIN_RANGE | Report min max RX Gain setting (dparm[0,1] = min, max) |
| TX_GAIN_RANGE | Report min max TX Gain setting (dparm[0,1] = min, max) |
| RX_ANT_NAME | Report RX antenna choice (asciiz string, uint tag) |
| TX_ANT_NAME | Report TX antenna choice (asciiz string, uint tag) |
| MOD_SEL_ENTRY | Report a string/name pair for modulation mode. |
| AF_FILT_ENTRY | Report a string/name pair for AF filter bandwidth. |
| INIT_SETUP_COMPLETE | indicate to GUI that we've sent all the initial configuration information |
| CW_CHAR_SENT | send character count from start-of-time each time we send a character. sparm[0] is the sent character, tag is count from start |
| RF_RECORD_START | Start recording raw IF stream to file. |
| RF_RECORD_STOP | Stop recording raw IF stream to file. |
| NBFM_SQUELCH | Set/Get NBMF squelch level. |
| LIST_MODES | Get a report of supported modes from the baseband rx module. |
| LIST_AF_FILTERS | Get a report of supported filters from the baseband rx module. |
| NULL_CMD | No comment. |
Definition at line 90 of file Command.hxx.
Commands are of the form, SET, GET, or REPort some parameter.
| Enumerator | |
|---|---|
| SET | |
| GET | |
| REP | |
| NONE | |
Definition at line 58 of file Command.hxx.
modulation selector targets take one of these values
| Enumerator | |
|---|---|
| LSB | |
| USB | |
| CW_U | |
| CW_L | |
| AM | |
| WBFM | |
| NBFM | |
Definition at line 531 of file Command.hxx.
Transmit/Receive state changes go through stages.
See TX_STATE
| Enumerator | |
|---|---|
| TX_OFF_0 | |
| TX_OFF_1 | |
| TX_OFF_2 | |
| TX_ON_0 | |
| TX_ON_1 | |
| TX_ON_2 | |
Definition at line 78 of file Command.hxx.
a selector to identify the Audio TX input (MIC, NOISE...)
| Enumerator | |
|---|---|
| MIC | |
| NOISE | |
Definition at line 572 of file Command.hxx.
a selector to identify a particular unit for debug reports
| Enumerator | |
|---|---|
| BaseBandRX | |
| BaseBandTX | |
| RFRX | |
| RFTX | |
| CWTX | |
| CTRL | |
Definition at line 559 of file Command.hxx.
Constructor for commands with no parameters.
| _ct | the command type (SET, GET, REPort) |
| _tgt | the state that we're setting, getting, reporting |
Definition at line 588 of file Command.hxx.
References cmd, command_sequence_number, parm_type, and target.
Referenced by Command(), SoDa::DoubleCommand< Command::RX_TUNE_FREQ, 1 >::DoubleCommand(), SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand(), SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand(), SoDa::IntCommand< Command::TX_BEACON, 1 >::IntCommand(), SoDa::StringCommand< Command::RX_ANT >::StringCommand(), SoDa::StringCommand< Command::RX_ANT >::StringCommand(), and parseCommandString().
|
inline |
Constructor for commands with integer parameters.
| _ct | the command type (SET, GET, REPort) |
| _tgt | the state that we're setting, getting, reporting |
| p0 | first integer parameter |
| p1 | second integer parameter |
| p2 | third integer parameter |
| p3 | fourth integer parameter |
Definition at line 610 of file Command.hxx.
References cmd, command_sequence_number, iparms, parm_type, and target.
|
inline |
Constructor for commands with double float parameters.
| _ct | the command type (SET, GET, REPort) |
| _tgt | the state that we're setting, getting, reporting |
| p0 | first double float parameter |
| p1 | second double float parameter |
| p2 | third double float parameter |
| p3 | fourth double float parameter |
Definition at line 645 of file Command.hxx.
References cmd, command_sequence_number, dparms, parm_type, and target.
|
inline |
Constructor for commands with a string parameter.
| _ct | the command type (SET, GET, REPort) |
| _tgt | the state that we're setting, getting, reporting |
| _str_arg | the string we're passing |
| _tag | an integer tag to associate with the string. |
Definition at line 677 of file Command.hxx.
References cmd, command_sequence_number, parm_type, sparm, tag, and target.
|
inline |
Constructor for commands with a string parameter.
| _ct | the command type (SET, GET, REPort) |
| _tgt | the state that we're setting, getting, reporting |
| cp | the asciiz string we're passing |
| _tag | an integer tag to associate with the string. |
Definition at line 709 of file Command.hxx.
References cmd, command_sequence_number, parm_type, sparm, tag, and target.
|
inline |
Copy Constructor.
| cc | the command we're copying |
Definition at line 735 of file Command.hxx.
References Command(), cmd, command_sequence_number, dparms, iparms, parm_type, sparm, and target.
|
inline |
|
inline |
Destructor.
Definition at line 771 of file Command.hxx.
|
inlinestatic |
how long can a string parameter to a command be?
Definition at line 792 of file Command.hxx.
|
staticprivate |
|
static |
setup maps to support parseCommandString and toString
|
inlinestatic |
Definition at line 764 of file Command.hxx.
|
inlinestatic |
Definition at line 596 of file Command.hxx.
|
inlinestatic |
Definition at line 726 of file Command.hxx.
|
inlinestatic |
Definition at line 695 of file Command.hxx.
|
inlinestatic |
Definition at line 661 of file Command.hxx.
|
inlinestatic |
Definition at line 626 of file Command.hxx.
|
static |
convert a string to a command
| str | the string to be parsed |
References Command().
| std::string SoDa::Command::toString | ( | ) | const |
return a string that displays the command
| union { ... } SoDa::Command |
| CmdType SoDa::Command::cmd |
|
static |
| double SoDa::Command::dparms[4] |
double float parameters
Definition at line 797 of file Command.hxx.
Referenced by Command(), Command(), and SoDa::DoubleCommand< Command::RX_TUNE_FREQ, 1 >::DoubleCommand().
| int SoDa::Command::id |
a sequential ID for each command – used in debugging and sequencing
Definition at line 803 of file Command.hxx.
| int SoDa::Command::iparms[4] |
integer parameters
Definition at line 796 of file Command.hxx.
Referenced by Command(), Command(), Command(), SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand(), SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand(), SoDa::IntCommand< Command::TX_BEACON, 1 >::IntCommand(), and SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::getEnumStr().
| char SoDa::Command::parm_type |
is this a double, int, string?
Definition at line 804 of file Command.hxx.
Referenced by Command(), Command(), Command(), Command(), Command(), Command(), Command(), SoDa::DoubleCommand< Command::RX_TUNE_FREQ, 1 >::DoubleCommand(), SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand(), and SoDa::IntCommand< Command::TX_BEACON, 1 >::IntCommand().
| char SoDa::Command::sparm[64] |
a buffer holding the string
Definition at line 798 of file Command.hxx.
Referenced by Command(), Command(), Command(), and SoDa::EnumCommand< Command::RX_MODE, Command::ModulationType >::EnumCommand().
|
static |
if true, we need to call initTables()
Definition at line 808 of file Command.hxx.
| unsigned int SoDa::Command::tag |
used to pair an int with a string or other param.
Definition at line 794 of file Command.hxx.
Referenced by Command(), Command(), Command(), SoDa::StringCommand< Command::RX_ANT >::StringCommand(), and SoDa::StringCommand< Command::RX_ANT >::make().
| CmdTarget SoDa::Command::target |
|
static |
mapping for parseCommandString
Definition at line 809 of file Command.hxx.
|
static |
mapping for toString
Definition at line 810 of file Command.hxx.