SoDaRadio-12.2.0-cut_dependencies:6c82803
Loading...
Searching...
No Matches
SoDa::UI Class Reference

#include <UI.hxx>

Inheritance diagram for SoDa::UI:
SoDa::Thread SoDa::Base SoDa::Debug

Public Member Functions

 ~UI ()
void subscribeToMailBoxes (const std::vector< MailBoxBasePtr > &mailboxes)
 connect to useful mailboxes.
void run ()
 Each thread object must define its "run" loop.
Public Member Functions inherited from SoDa::Thread
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.
Public Member Functions inherited from SoDa::Base
 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.
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 SoDa::Format &fmt, unsigned int threshold=1)
void debugMsg (const char *msg, unsigned int threshold=1)
void setDebugLevel (unsigned int v)
unsigned int getDebugLevel ()

Static Public Member Functions

static UIPtr make (ParamsPtr params)
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 ()

Private Member Functions

 UI (ParamsPtr params)
void sendCommandSocket (CommandPtr ptr)
void sendFFT (SoDa::CBufPtr buf)
void updateSpectrumState ()
void execSetCommand (CommandPtr cmd)
 optional method to handle "SET" commands – commands that set internal state in the object.
void execGetCommand (CommandPtr cmd)
 optional method to handle "GET" commands – commands that request a response
void execRepCommand (CommandPtr cmd)
 optional method that reports status or the result of some action.
void reportSpectrumCenterFreq ()

Private Attributes

CmdMBoxPtr cwtxt_stream
CmdMBoxPtr cmd_stream
CDatMBoxPtr if_stream
CmdMBox::Subscription cmd_subs
CDatMBox::Subscription if_subs
SoDa::UD::ServerSocketserver_socket
SoDa::UD::ServerSocketwfall_socket
SpectrogramPtr spectrogram
unsigned int spectrogram_buckets
SpectrogramPtr lo_spectrogram
unsigned int lo_spectrogram_buckets
double lo_hz_per_bucket
std::vector< float > lo_spectrum
double baseband_rx_freq
double spectrum_center_freq
double hz_per_bucket
int required_spect_buckets
std::vector< float > spectrum
std::vector< 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

Additional Inherited Members

Static Public Attributes inherited from SoDa::Debug
static std::mutex debug_msg_mutex
Protected Member Functions inherited from SoDa::Thread
 Thread (const std::string &oname, const std::string &version=std::string("12.2.0"))
 make the thread object.
Protected Member Functions inherited from SoDa::Debug
std::string curDateTime ()
Protected Attributes inherited from SoDa::Thread
std::weak_ptr< Threadself
 A pointer to ourself.
Protected Attributes inherited from SoDa::Debug
std::string unit_name
 the name of the unit reporting status
unsigned int debug_level
 the debug level (threshold) for messages
Static Protected Attributes inherited from SoDa::Debug
static unsigned int default_debug_level
static unsigned int global_debug_level

Detailed Description

Definition at line 48 of file UI.hxx.

Constructor & Destructor Documentation

◆ UI()

SoDa::UI::UI ( ParamsPtr params)
private

Referenced by make().

◆ ~UI()

SoDa::UI::~UI ( )

Member Function Documentation

◆ execGetCommand()

void SoDa::UI::execGetCommand ( CommandPtr cmd)
privatevirtual

optional method to handle "GET" commands – commands that request a response

Reimplemented from SoDa::Thread.

◆ execRepCommand()

void SoDa::UI::execRepCommand ( CommandPtr cmd)
privatevirtual

optional method that reports status or the result of some action.

Reimplemented from SoDa::Thread.

◆ execSetCommand()

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

optional method to handle "SET" commands – commands that set internal state in the object.

Reimplemented from SoDa::Thread.

◆ make()

UIPtr SoDa::UI::make ( ParamsPtr params)
inlinestatic

Definition at line 53 of file UI.hxx.

References UI().

◆ reportSpectrumCenterFreq()

void SoDa::UI::reportSpectrumCenterFreq ( )
private

◆ run()

void SoDa::UI::run ( )
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.

Reimplemented from SoDa::Thread.

◆ sendCommandSocket()

void SoDa::UI::sendCommandSocket ( CommandPtr ptr)
private

◆ sendFFT()

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

◆ subscribeToMailBoxes()

void SoDa::UI::subscribeToMailBoxes ( const std::vector< MailBoxBasePtr > & mailboxes)
virtual

connect to useful mailboxes.

Parameters
mailboxeslist of mailboxes to which we might subscribe.

Implements SoDa::Thread.

◆ updateSpectrumState()

void SoDa::UI::updateSpectrumState ( )
private

Member Data Documentation

◆ baseband_rx_freq

double SoDa::UI::baseband_rx_freq
private

Definition at line 100 of file UI.hxx.

◆ cmd_stream

CmdMBoxPtr SoDa::UI::cmd_stream
private

Definition at line 79 of file UI.hxx.

◆ cmd_subs

CmdMBox::Subscription SoDa::UI::cmd_subs
private

Definition at line 81 of file UI.hxx.

◆ cwtxt_stream

CmdMBoxPtr SoDa::UI::cwtxt_stream
private

Definition at line 79 of file UI.hxx.

◆ fft_acc_gain

float SoDa::UI::fft_acc_gain
private

Definition at line 108 of file UI.hxx.

◆ fft_send_counter

unsigned int SoDa::UI::fft_send_counter
private

Definition at line 111 of file UI.hxx.

◆ fft_update_interval

unsigned int SoDa::UI::fft_update_interval
private

Definition at line 109 of file UI.hxx.

◆ hz_per_bucket

double SoDa::UI::hz_per_bucket
private

Definition at line 102 of file UI.hxx.

◆ if_stream

CDatMBoxPtr SoDa::UI::if_stream
private

Definition at line 80 of file UI.hxx.

◆ if_subs

CDatMBox::Subscription SoDa::UI::if_subs
private

Definition at line 82 of file UI.hxx.

◆ lo_check_mode

bool SoDa::UI::lo_check_mode
private

Definition at line 114 of file UI.hxx.

◆ lo_hz_per_bucket

double SoDa::UI::lo_hz_per_bucket
private

Definition at line 94 of file UI.hxx.

◆ lo_spectrogram

SpectrogramPtr SoDa::UI::lo_spectrogram
private

Definition at line 92 of file UI.hxx.

◆ lo_spectrogram_buckets

unsigned int SoDa::UI::lo_spectrogram_buckets
private

Definition at line 93 of file UI.hxx.

◆ lo_spectrum

std::vector<float> SoDa::UI::lo_spectrum
private

Definition at line 95 of file UI.hxx.

◆ log_spectrum

std::vector<float> SoDa::UI::log_spectrum
private

Definition at line 105 of file UI.hxx.

◆ new_spectrum_setting

bool SoDa::UI::new_spectrum_setting
private

Definition at line 106 of file UI.hxx.

◆ required_spect_buckets

int SoDa::UI::required_spect_buckets
private

Definition at line 103 of file UI.hxx.

◆ server_socket

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

Definition at line 86 of file UI.hxx.

◆ spectrogram

SpectrogramPtr SoDa::UI::spectrogram
private

Definition at line 89 of file UI.hxx.

◆ spectrogram_buckets

unsigned int SoDa::UI::spectrogram_buckets
private

Definition at line 90 of file UI.hxx.

◆ spectrum

std::vector<float> SoDa::UI::spectrum
private

Definition at line 105 of file UI.hxx.

◆ spectrum_center_freq

double SoDa::UI::spectrum_center_freq
private

Definition at line 101 of file UI.hxx.

◆ spectrum_span

const double SoDa::UI::spectrum_span
staticprivate

Definition at line 98 of file UI.hxx.

◆ wfall_socket

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

Definition at line 86 of file UI.hxx.


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