134 unsigned int socket_read_count = 0;
135 unsigned int socket_empty_count = 0;
136 unsigned int iter_count = 0;
137 bool new_connection =
true; ;
140 bool didwork =
false;
141 bool got_new_netmsg =
false;
148 std::string vers= (boost::format(
"%s GIT %s") % SoDaRadio_VERSION % SoDaRadio_GIT_ID).str();
153 new_connection =
false;
156 if(net_cmd == NULL) {
161 socket_empty_count++;
165 got_new_netmsg =
true;
169 new_connection =
true;
178 debugMsg(
"got TX_CW_EMPTY command from socket.\n");
230 if(!didwork) usleep(5000);
278 debugMsg(boost::format(
"Updated SPEC_UPDATE_RATE = %d -> interval = %d\n")
354 if((idx < 0) || (idx > sbuck_target)) {
371 float mag = v.real() * v.real() + v.imag() * v.imag();
380 debugMsg(boost::format(
"offset = %g\n") % freq);
unsigned int spectrogram_buckets
The Thread baseclass for all SoDa thread objects.
low spectrum frequency range
void debugMsg(const std::string &msg, unsigned int threshold=1)
turn transmitter on and off.
T * get(unsigned int subscriber_id)
This is an LO check command - use it for finding the actual microwave LO frequency.
int get(void *ptr, unsigned int size)
void reportSpectrumCenterFreq()
double spectrum_center_freq
int iparms[4]
integer parameters
Report when CW TX envelope buffer was empty (cmd enables report)
This class handles command line parameters and built-ins.
SoDa::UD::ServerSocket * wfall_socket
all spec info in one call, cf, span, and buflen
Spectrogram * lo_spectrogram
CmdTarget target
the thing we're touching
static bool calc_max_first
double getRXRate() const
Sample rates and all that other stuff are fixed.
int required_spect_buckets
On receipt of a STOP command, all threads should exit their run loop.
void apply_acc(std::complex< float > *invec, unsigned int inveclen, float *outvec, float accumulation_gain=0.0)
Calculate the spectrogram from an input vector – add it to an accumulation buffer.
std::complex< float > * getComplexBuf()
Return a pointer to the storage buffer of complex floats.
This is a list of all the commands that can "do something" to one or more components in the SoDa radi...
how many FFT samples contribute to a spectrum report
Same effect as TX_TUNE_FREQ.
void run()
Each thread object must define its "run" loop.
the center frequency (command from GUI)
bool new_spectrum_setting
SoDa::UD::ServerSocket * server_socket
Set the RX front end 1st LO and the 2nd IF LO.
unsigned int fft_send_counter
CmdType cmd
the command type (SET, GET, REP)
void updateSpectrumState()
double dparms[4]
double float parameters
unsigned int getComplexLen()
Return the number of complex float values in this buffer.
UI(Params *params, CmdMBox *cwtxt_stream, DatMBox *rx_stream, DatMBox *if_stream, CmdMBox *cmd_stream, CmdMBox *gps_stream)
void sendFFT(SoDaBuf *buf)
how many FFT samples between spectrum reports
Report the SDR (SoDa server program) version info.
static const double spectrum_span
unsigned int fft_update_interval
Tune the 3rd LO (in SoDa::USRPRX).
Spectrogram * spectrogram
number of samples in the buffer.
static unsigned int dbgctrfft
void execRepCommand(Command *cmd)
optional method that reports status or the result of some action.
high spectrum frequency range
Spectrogram generates magnitude buffers from input sample stream.
unsigned int lo_spectrogram_buckets
void execGetCommand(Command *cmd)
optional method to handle "GET" commands – commands that request a response
int put(const void *ptr, unsigned int size)
std::string getServerSocketBasename() const
std::string toString() const
return a string that displays the command
void execCommand(Command *cmd)
Execute (dispatch) a message removed from the command stream to one of the basic Command handler func...
void execSetCommand(Command *cmd)
optional method to handle "SET" commands – commands that set internal state in the object...
this is a GET/REP command – BaseBandRX takes FFT centered around 0 and reports largest peak within 5...