SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SoDa::UI Class Reference

#include <UI.hxx>

Inheritance diagram for SoDa::UI:
SoDa::SoDaThread SoDa::SoDaBase SoDa::Debug

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...
 
SoDaBasefindSoDaObject (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

CmdMBoxcwtxt_stream
 
CmdMBoxcmd_stream
 
CmdMBoxgps_stream
 
DatMBoxrx_stream
 
DatMBoxif_stream
 
unsigned int if_subs
 
unsigned int cmd_subs
 
unsigned int gps_subs
 
SoDa::UD::ServerSocketserver_socket
 
SoDa::UD::ServerSocketwfall_socket
 
Spectrogramspectrogram
 
unsigned int spectrogram_buckets
 
Spectrogramlo_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
 

Detailed Description

Definition at line 40 of file UI.hxx.

Constructor & Destructor Documentation

◆ UI()

SoDa::UI::UI ( Params params,
CmdMBox cwtxt_stream,
DatMBox rx_stream,
DatMBox if_stream,
CmdMBox cmd_stream,
CmdMBox gps_stream 
)

◆ ~UI()

SoDa::UI::~UI ( )

Definition at line 112 of file UI.cxx.

References server_socket, and wfall_socket.

Member Function Documentation

◆ execGetCommand()

void SoDa::UI::execGetCommand ( Command cmd)
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.

◆ execRepCommand()

void SoDa::UI::execRepCommand ( Command cmd)
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.

◆ execSetCommand()

void SoDa::UI::execSetCommand ( Command cmd)
privatevirtual

◆ reportSpectrumCenterFreq()

void SoDa::UI::reportSpectrumCenterFreq ( )
private

◆ run()

void SoDa::UI::run ( )
virtual

◆ sendFFT()

void SoDa::UI::sendFFT ( SoDa::SoDaBuf buf)
private

◆ updateSpectrumState()

void SoDa::UI::updateSpectrumState ( )
private

Member Data Documentation

◆ baseband_rx_freq

double SoDa::UI::baseband_rx_freq
private

Definition at line 76 of file UI.hxx.

Referenced by execRepCommand(), sendFFT(), and UI().

◆ cmd_stream

CmdMBox * SoDa::UI::cmd_stream
private

Definition at line 55 of file UI.hxx.

Referenced by run(), sendFFT(), UI(), and updateSpectrumState().

◆ cmd_subs

unsigned int SoDa::UI::cmd_subs
private

Definition at line 58 of file UI.hxx.

Referenced by run(), and UI().

◆ cwtxt_stream

CmdMBox* SoDa::UI::cwtxt_stream
private

Definition at line 55 of file UI.hxx.

Referenced by UI().

◆ fft_acc_gain

float SoDa::UI::fft_acc_gain
private

Definition at line 84 of file UI.hxx.

Referenced by execSetCommand(), sendFFT(), and UI().

◆ fft_send_counter

unsigned int SoDa::UI::fft_send_counter
private

Definition at line 87 of file UI.hxx.

Referenced by execGetCommand(), sendFFT(), and UI().

◆ fft_update_interval

unsigned int SoDa::UI::fft_update_interval
private

Definition at line 85 of file UI.hxx.

Referenced by execSetCommand(), sendFFT(), and UI().

◆ gps_stream

CmdMBox * SoDa::UI::gps_stream
private

Definition at line 55 of file UI.hxx.

Referenced by run(), and UI().

◆ gps_subs

unsigned int SoDa::UI::gps_subs
private

Definition at line 58 of file UI.hxx.

Referenced by run(), and UI().

◆ hz_per_bucket

double SoDa::UI::hz_per_bucket
private

Definition at line 78 of file UI.hxx.

Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().

◆ if_stream

DatMBox* SoDa::UI::if_stream
private

Definition at line 57 of file UI.hxx.

Referenced by run(), and UI().

◆ if_subs

unsigned int SoDa::UI::if_subs
private

Definition at line 58 of file UI.hxx.

Referenced by run(), and UI().

◆ lo_check_mode

bool SoDa::UI::lo_check_mode
private

Definition at line 90 of file UI.hxx.

Referenced by execGetCommand(), sendFFT(), and UI().

◆ lo_hz_per_bucket

double SoDa::UI::lo_hz_per_bucket
private

Definition at line 70 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ lo_spectrogram

Spectrogram* SoDa::UI::lo_spectrogram
private

Definition at line 68 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ lo_spectrogram_buckets

unsigned int SoDa::UI::lo_spectrogram_buckets
private

Definition at line 69 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ lo_spectrum

float* SoDa::UI::lo_spectrum
private

Definition at line 71 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ log_spectrum

float * SoDa::UI::log_spectrum
private

Definition at line 81 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ new_spectrum_setting

bool SoDa::UI::new_spectrum_setting
private

Definition at line 82 of file UI.hxx.

Referenced by execSetCommand(), sendFFT(), and UI().

◆ required_spect_buckets

int SoDa::UI::required_spect_buckets
private

Definition at line 79 of file UI.hxx.

Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().

◆ rx_stream

DatMBox* SoDa::UI::rx_stream
private

Definition at line 56 of file UI.hxx.

Referenced by UI().

◆ server_socket

SoDa::UD::ServerSocket* SoDa::UI::server_socket
private

Definition at line 62 of file UI.hxx.

Referenced by reportSpectrumCenterFreq(), run(), UI(), and ~UI().

◆ spectrogram

Spectrogram* SoDa::UI::spectrogram
private

Definition at line 65 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ spectrogram_buckets

unsigned int SoDa::UI::spectrogram_buckets
private

Definition at line 66 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ spectrum

float* SoDa::UI::spectrum
private

Definition at line 81 of file UI.hxx.

Referenced by sendFFT(), and UI().

◆ spectrum_center_freq

double SoDa::UI::spectrum_center_freq
private

Definition at line 77 of file UI.hxx.

Referenced by execSetCommand(), reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().

◆ spectrum_span

const double SoDa::UI::spectrum_span = 200e3
staticprivate

Definition at line 74 of file UI.hxx.

Referenced by reportSpectrumCenterFreq(), sendFFT(), UI(), and updateSpectrumState().

◆ wfall_socket

SoDa::UD::ServerSocket * SoDa::UI::wfall_socket
private

Definition at line 62 of file UI.hxx.

Referenced by sendFFT(), UI(), and ~UI().


The documentation for this class was generated from the following files: