|
| | ~RTLSDRCtrl ()=default |
| RadioControlPtr | getSelfPtr () override |
| bool | isLOLocked (SoDa::RXTX rxtx) override |
| | Methods that ALL radios must implement.
|
| double | setLOFreq (double freq, SoDa::RXTX rxtx) override |
| double | getLOFreq (SoDa::RXTX rxtx) override |
| | Return the current LO (front end) oscillator setting for RX or TX chain.
|
| float | setRFGain (float gain, SoDa::RXTX rxtx) override |
| | set tain on the RX or TX side
|
| void | setSampleRate (float rate, SoDa::RXTX rxtx) override |
| | Set the RX or TX sample rate.
|
| float | getSampleRate (SoDa::RXTX rxtx) override |
| | Get the current setting for the sample rate.
|
| std::string | getHardwareDescription () override |
| | report the model number and any other interesting features (like freq range) to be displayed on the UI and such.
|
| std::vector< std::string > | listAntennas (SoDa::RXTX rxtx) override |
| | report the antennas that are available.
|
| void | setAntenna (const std::string &ant, SoDa::RXTX rxtx) override |
| | Set the antenna choice.
|
| std::string | getAntenna (SoDa::RXTX rxtx) override |
| | Get the current selected antenna.
|
| bool | getTXEna () override |
| | get the state of the TXEna bit
|
| bool | getTXRelayOn () override |
| | get the state of the TX relay confirm bit
|
| void | setTXEna (bool, bool) override |
| | Enable or disable the transmit hardware chain, including the antenna relay and PA enable.
|
| | RadioControl (ParamsPtr params, const std::string &name) |
| | Constructor Build a RadioControl thread.
|
| void | run () final |
| | start the thread
|
| virtual void | init () |
| | perform initialization.
|
| void | subscribeToMailBoxes (const std::vector< MailBoxBasePtr > &mailboxes) |
| | implement the subscription method
|
| 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.
|
| | 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.
|
| | 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 () |
|
| | RTLSDRCtrl (RTLSDRDevPtr dev_in, ParamsPtr params) |
| virtual void | execCommand (CommandPtr cmd) final |
| | Parse an incoming command and dispatch.
|
| virtual void | execGetCommand (CommandPtr cmd) final |
| | Parse an incoming GET command and dispatch.
|
| void | execSetCommand (CommandPtr cmd) final |
| | Parse an incoming SET command and dispatch.
|
| void | execRepCommand (CommandPtr cmd) final |
| | Parse an incoming REPort command and dispatch.
|
| double | getTime () |
| | get the number of seconds since the "Epoch"
|
| void | setFreq (double freq, SoDa::RXTX rxtx) |
| | Set the recieve or transmit frequency to 'freq' This includes setting the PLL front end synthesizer, the FPGA resident digital synthesizer (if it exists) and the RX baseband or TX baseband oscillator.
|
| void | setTXRXMode (Command::RxTxState rxtxst, bool full_duplex) |
| | Initiate the actions that will turn on the transmitter and (optionally) disable the receiver.
|
| virtual bool | setClockSource (Command::ClockSource src) |
| | Some radios support multiple choices for the main reference clock source.
|
| virtual Command::ClockSource | getClockSource () |
| | Some radios support multiple choices for the main reference clock source.
|
| double | findGoodRXLO (double freq, double cur_lo_freq) |
| | see setFreq - this is a helper to find a good LO frequency that puts the IF in a range that is convenient for the spectrum display.
|
| | Thread (const std::string &oname, const std::string &version=std::string("12.2.0")) |
| | make the thread object.
|
| std::string | curDateTime () |
Definition at line 57 of file RTLSDRCtrl.hxx.
| double SoDa::RTLSDRCtrl::setLOFreq |
( |
double | freq, |
|
|
SoDa::RXTX | rxtx ) |
|
overridevirtual |
@brief Set the front-end (LO + DDS) frequency to 'freq'
This includes setting the PLL front end synthesizer
as well as the FPGA resident digital synthesizer.
@param freq targeto frequency (analog LO and DDS in the FPGA)
@param rxtx select receiver or transmitter
@return The actual LO frequency.
The actual LO frequency may differ from the requested frequency by a small
margin. Some radios may have a tuning step that is more than a few Hz. In this
case we adjust the LO in the RX and TX objects. (This may be a bigger deal for the
TX object as we like to do all the modulation there at baseband and assume the
hardware takes care of the carrier frequency.
Typically, the call for a receive request would look like this:
actual_lo_freq = setLOFreq(144.215e6, SoDa::RX)
If the target LO can tune in 20 kHz intervals, the actual LO would be 144.100e6 and
the if_freq would be 115e3 Hz. This would allow a "clean" window from 144.115 Mhz to
g * 144.325 MHz in the spectrogram display. The LO would need to be changed if the next frequency was greater than 144.240 or less than 144.205 (I think)
On the transmit side, the offset may be dictated by the frequency stepping increment in the front-end LO.
To keep everything civilized, setLOFreq should never be called by any other agent than the RadioControl object. (Not even its sub-classes.)
Implements SoDa::RadioControl.
| float SoDa::RTLSDRCtrl::setRFGain |
( |
float | gain, |
|
|
SoDa::RXTX | rxtx ) |
|
overridevirtual |
set tain on the RX or TX side
The radio implementation is responsible for mapping the gain to the appropriate control settings.
The range for gain is -30 to 0 in dB. 0 is maximum power or maximum front end RX gain. The device may support a more limited range, say -15 to 0 dB. In this case, any gain value less than -15 is treated as -15. For devices that support a greater range, the supported range is still -30 to 0.
- Parameters
-
| gain | gain - if not in range, we'll pick something good |
| rxtx | receive or transmit? |
- Returns
- the actual gain setting
Implements SoDa::RadioControl.