SoDaRadio-5.0.3-master:8901fb5
|
#include <UI.hxx>
Public Member Functions | |
UI (Params *params, CmdMBox *cwtxt_stream, DatMBox *rx_stream, DatMBox *if_stream, CmdMBox *cmd_stream, CmdMBox *gps_stream) | |
~UI () | |
void | run () |
Each thread object must define its "run" loop. More... | |
Public Member Functions inherited from SoDa::SoDaThread | |
SoDaThread (const std::string &oname) | |
void | start () |
Execute the threads run loop. More... | |
void | join () |
more properly "Wait for this thread to exit its run loop". More... | |
bool | waitForJoin (unsigned int m) |
wait for the thread to stop running, or the specified time to pass. More... | |
void | execCommand (Command *cmd) |
Execute (dispatch) a message removed from the command stream to one of the basic Command handler functions. More... | |
Public Member Functions inherited from SoDa::SoDaBase | |
SoDaBase (const std::string &oname) | |
The constructor – pass a name for the object. More... | |
std::string & | getObjName () |
get the name of this object More... | |
SoDaBase * | findSoDaObject (const std::string &oname) |
find a SoDa Object by name. More... | |
double | getTime () |
Get a time stamp in nS resolution that monotonically increases and that is very inexpensive (typically < 100nS). More... | |
Public Member Functions inherited from SoDa::Debug | |
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 boost::format &fmt, unsigned int threshold=1) |
void | debugMsg (const char *msg, unsigned int threshold=1) |
void | setDebugLevel (unsigned int v) |
unsigned int | getDebugLevel () |
Private Member Functions | |
void | sendFFT (SoDaBuf *buf) |
void | updateSpectrumState () |
void | execSetCommand (Command *cmd) |
optional method to handle "SET" commands – commands that set internal state in the object. More... | |
void | execGetCommand (Command *cmd) |
optional method to handle "GET" commands – commands that request a response More... | |
void | execRepCommand (Command *cmd) |
optional method that reports status or the result of some action. More... | |
void | reportSpectrumCenterFreq () |
Private Attributes | |
CmdMBox * | cwtxt_stream |
CmdMBox * | cmd_stream |
CmdMBox * | gps_stream |
DatMBox * | rx_stream |
DatMBox * | if_stream |
unsigned int | if_subs |
unsigned int | cmd_subs |
unsigned int | gps_subs |
SoDa::UD::ServerSocket * | server_socket |
SoDa::UD::ServerSocket * | wfall_socket |
Spectrogram * | spectrogram |
unsigned int | spectrogram_buckets |
Spectrogram * | lo_spectrogram |
unsigned int | lo_spectrogram_buckets |
double | lo_hz_per_bucket |
float * | lo_spectrum |
double | baseband_rx_freq |
double | spectrum_center_freq |
double | hz_per_bucket |
int | required_spect_buckets |
float * | spectrum |
float * | log_spectrum |
bool | new_spectrum_setting |
float | fft_acc_gain |
unsigned int | fft_update_interval |
unsigned int | fft_send_counter |
bool | lo_check_mode |
Static Private Attributes | |
static const double | spectrum_span = 200e3 |
Additional Inherited Members | |
Static Public Member Functions inherited from SoDa::Debug | |
static void | setDefaultLevel (unsigned int v) |
static unsigned int | getDefaultLevel () |
static void | setGlobalLevel (unsigned int v) |
static unsigned int | getGlobalLevel () |
Static Public Attributes inherited from SoDa::Debug | |
static boost::mutex | debug_msg_mutex |
Protected Member Functions inherited from SoDa::Debug | |
std::string | curDateTime () |
Protected Attributes inherited from SoDa::Debug | |
std::string | unit_name |
the name of the unit reporting status More... | |
unsigned int | debug_level |
the debug level (threshold) for messages More... | |
Static Protected Attributes inherited from SoDa::Debug | |
static unsigned int | default_debug_level = 0 |
static unsigned int | global_debug_level = 0 |
SoDa::UI::UI | ( | Params * | params, |
CmdMBox * | cwtxt_stream, | ||
DatMBox * | rx_stream, | ||
DatMBox * | if_stream, | ||
CmdMBox * | cmd_stream, | ||
CmdMBox * | gps_stream | ||
) |
Definition at line 34 of file UI.cxx.
References baseband_rx_freq, cmd_stream, cmd_subs, cwtxt_stream, fft_acc_gain, fft_send_counter, fft_update_interval, SoDa::Params::getRXRate(), SoDa::Params::getServerSocketBasename(), gps_stream, gps_subs, hz_per_bucket, if_stream, if_subs, lo_check_mode, lo_hz_per_bucket, lo_spectrogram, lo_spectrogram_buckets, lo_spectrum, log_spectrum, new_spectrum_setting, required_spect_buckets, rx_stream, server_socket, spectrogram, spectrogram_buckets, spectrum, spectrum_center_freq, spectrum_span, SoDa::MultiMBox< T >::subscribe(), and wfall_socket.
SoDa::UI::~UI | ( | ) |
Definition at line 112 of file UI.cxx.
References server_socket, and wfall_socket.
|
privatevirtual |
optional method to handle "GET" commands – commands that request a response
Reimplemented from SoDa::SoDaThread.
Definition at line 286 of file UI.cxx.
References fft_send_counter, lo_check_mode, SoDa::Command::LO_OFFSET, and SoDa::Command::target.
|
privatevirtual |
optional method that reports status or the result of some action.
Reimplemented from SoDa::SoDaThread.
Definition at line 299 of file UI.cxx.
References baseband_rx_freq, SoDa::Command::dparms, SoDa::Command::RX_FE_FREQ, and SoDa::Command::target.
|
privatevirtual |
optional method to handle "SET" commands – commands that set internal state in the object.
Reimplemented from SoDa::SoDaThread.
Definition at line 260 of file UI.cxx.
References SoDa::Debug::debugMsg(), SoDa::Command::dparms, fft_acc_gain, fft_update_interval, SoDa::Command::iparms, new_spectrum_setting, reportSpectrumCenterFreq(), SoDa::Command::SPEC_AVG_WINDOW, SoDa::Command::SPEC_CENTER_FREQ, SoDa::Command::SPEC_UPDATE_RATE, spectrum_center_freq, and SoDa::Command::target.
|
private |
Definition at line 237 of file UI.cxx.
References hz_per_bucket, SoDa::UD::ServerSocket::put(), SoDa::Command::REP, required_spect_buckets, server_socket, SoDa::Command::SPEC_BUF_LEN, SoDa::Command::SPEC_DIMS, SoDa::Command::SPEC_RANGE_HI, SoDa::Command::SPEC_RANGE_LOW, SoDa::Command::SPEC_STEP, spectrum_center_freq, and spectrum_span.
Referenced by execSetCommand().
|
virtual |
Each thread object must define its "run" loop.
This loop exits only when the thread has received a STOP command on one of its command mailboxes.
Implements SoDa::SoDaThread.
Definition at line 118 of file UI.cxx.
References SoDa::Command::cmd, cmd_stream, cmd_subs, SoDa::Debug::debugMsg(), SoDa::SoDaThread::execCommand(), SoDa::MultiMBox< T >::free(), SoDa::UD::ServerSocket::get(), SoDa::MultiMBox< T >::get(), gps_stream, gps_subs, if_stream, if_subs, SoDa::UD::ServerSocket::isReady(), SoDa::UD::ServerSocket::put(), SoDa::MultiMBox< T >::put(), SoDa::Command::REP, SoDa::Command::RX_AF_FILTER, SoDa::Command::RX_FE_FREQ, SoDa::Command::RX_LO3_FREQ, SoDa::Command::SDR_VERSION, sendFFT(), server_socket, SoDa::Command::SET, SoDa::Command::STOP, SoDa::Command::target, SoDa::Command::toString(), SoDa::Command::TX_CW_EMPTY, SoDa::Command::TX_FE_FREQ, SoDa::Command::TX_STATE, and updateSpectrumState().
|
private |
Definition at line 316 of file UI.cxx.
References SoDa::Spectrogram::apply_acc(), baseband_rx_freq, calc_max_first, cmd_stream, dbgctrfft, SoDa::Debug::debugMsg(), fft_acc_gain, fft_send_counter, fft_update_interval, first_ready, SoDa::SoDaBuf::getComplexBuf(), SoDa::SoDaBuf::getComplexLen(), hz_per_bucket, SoDa::UD::ServerSocket::isReady(), SoDa::Command::LO_CHECK, lo_check_mode, lo_hz_per_bucket, SoDa::Command::LO_OFFSET, lo_spectrogram, lo_spectrogram_buckets, lo_spectrum, log_spectrum, new_spectrum_setting, SoDa::UD::ServerSocket::put(), SoDa::MultiMBox< T >::put(), SoDa::Command::REP, required_spect_buckets, SoDa::Command::SET, SoDa::Command::SPEC_DIMS, SoDa::Command::SPEC_RANGE_HI, SoDa::Command::SPEC_RANGE_LOW, spectrogram, spectrogram_buckets, spectrum, spectrum_center_freq, spectrum_span, and wfall_socket.
Referenced by run().
|
private |
Definition at line 96 of file UI.cxx.
References cmd_stream, hz_per_bucket, SoDa::MultiMBox< T >::put(), SoDa::Command::REP, required_spect_buckets, SoDa::Command::SPEC_BUF_LEN, SoDa::Command::SPEC_DIMS, SoDa::Command::SPEC_RANGE_HI, SoDa::Command::SPEC_RANGE_LOW, SoDa::Command::SPEC_STEP, spectrum_center_freq, and spectrum_span.
Referenced by run().
|
private |
Definition at line 76 of file UI.hxx.
Referenced by execRepCommand(), sendFFT(), and UI().
|
private |
|
private |
|
private |
Definition at line 84 of file UI.hxx.
Referenced by execSetCommand(), sendFFT(), and UI().
|
private |
Definition at line 87 of file UI.hxx.
Referenced by execGetCommand(), sendFFT(), and UI().
|
private |
Definition at line 85 of file UI.hxx.
Referenced by execSetCommand(), sendFFT(), and UI().
|
private |
|
private |
|
private |
Definition at line 78 of file UI.hxx.
Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().
|
private |
|
private |
|
private |
Definition at line 90 of file UI.hxx.
Referenced by execGetCommand(), sendFFT(), and UI().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 82 of file UI.hxx.
Referenced by execSetCommand(), sendFFT(), and UI().
|
private |
Definition at line 79 of file UI.hxx.
Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().
|
private |
|
private |
|
private |
|
private |
|
private |
Definition at line 77 of file UI.hxx.
Referenced by execSetCommand(), reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().
|
staticprivate |
Definition at line 74 of file UI.hxx.
Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().
|
private |