42 while(!QFile::exists(cmd_socket_name)) {
46 qDebug() << QString(
"Waited %1 seconds for socket file [%2] to be created. Is the radio process dead?").arg(wcount * 5).arg(cmd_socket_name);
47 emit(
fatalError(QString(
"No socket file [%1] found after timeout of %2 seconds").arg(cmd_socket_name).arg(wcount * 5)));
54 qDebug() << QString(
"Waited connection on local socket [%1_cmd]. Is something wrong?").arg(
socket_basename);
61 connect(
cmd_socket, SIGNAL(error(QLocalSocket::LocalSocketError)),
68 qDebug() << QString(
"Waited 30 seconds for connection on local socket [%1_wfall]. Is something wrong?").arg(
socket_basename);
75 connect(
spect_socket, SIGNAL(error(QLocalSocket::LocalSocketError)),
93 unsigned int to_go = len;
95 const char * cp = buf;
112 int stat =
cmd_socket->read((
char*) & len,
sizeof(
int));
114 if(stat < 0)
return stat;
116 if(len > maxlen) len = maxlen;
118 unsigned int to_go = len;
156 while(
spect_socket->bytesAvailable() > (
sizeof(int) + rlen)) {
158 int stat =
spect_socket->read((
char*) & len,
sizeof(
int));
161 char * nbuf =
new char[len];
177 int len =
get(incmd);
194 perror(
"What happened here?");
201 perror(
"What happened here?");
209 perror(
"What happened here?");
216 perror(
"What happened here?");
223 dgain = 50.0 * (log10(dgain) / log10(100.0));
225 perror(
"What happened here?");
232 perror(
"What happened here?");
241 perror(
"What happened here?");
244 perror(
"What happened here?");
251 perror(
"What happened here?");
304 perror(
"What happened here?");
311 perror(
"What happened here?");
318 perror(
"What happened here?");
325 perror(
"What happened here?");
332 perror(
"What happened here?");
339 perror(
"What happened here?");
346 perror(
"What happened here?");
353 perror(
"What happened here?");
359 int tx_state = on ? 1 : 0;
361 perror(
"What happened here?");
368 perror(
"What happened here?");
376 for(i = 0, j = 0; i <= txt.size(); i++) {
377 if(i == txt.size()) {
381 char c = txt.at(i).toLatin1();
394 perror(
"What happened here?");
423 perror(
"What happened here -- listener closeRadio?");
Not many choices for TX ant, just TX.
void repMarkerOffset(double lo, double hi)
void addFilterName(QString filter_name, int filt_id)
turn transmitter on and off.
Set the TX final amplifier.
Set the RX front end attenuator/amp.
Set the modulation mode for the receive chain.
void sendCW(const QString &txt)
void addTXAntName(const QString &ant_name)
int iparms[4]
integer parameters
int put(const char *buf, int len)
void setTXAnt(const QString &antname)
void setSidetoneVolume(int vol)
void updateData(double cfreq, float *y)
Set the modulation mode for the transmit chain.
void setModulation(int mod_id)
Report the motherboard name (the model name of the USRP)
all spec info in one call, cf, span, and buflen
void setRXFreq(double freq)
CmdTarget target
the thing we're touching
Report UTC (time) from GPS receiver.
void setSpectrumAvgWindow(int window)
unsigned int tag
used to pair an int with a string or other param.
Report a string/name pair for modulation mode.
void setCWSpeed(int speed)
indicate to GUI that we've sent all the initial configuration information
void repSDRVersion(const QString &version)
static int getMaxStringLen()
how long can a string parameter to a command be?
Flush outstanding CW text strings from pending buffer.
void setAFSidetoneGain(int gain)
void setSpectrumUpdateRate(int rate)
On receipt of a STOP command, all threads should exit their run loop.
This is a list of all the commands that can "do something" to one or more components in the SoDa radi...
void repGPSTime(int hh, int mm, int ss)
how many FFT samples contribute to a spectrum report
void addModulation(QString modtype, int mod_id)
char sparm[64]
a buffer holding the string
QLocalSocket * spect_socket
Report LAT and LON from GPS receiver.
the center frequency (command from GUI)
bool init()
connect to radio server sockets and initialize listener state
Report TX antenna choice (asciiz string, uint tag)
TX CW text control – a buffer of up to 8 characters.
RX ant choices are TX/RX, and RX2.
CmdType cmd
the command type (SET, GET, REP)
double dparms[4]
double float parameters
bool handleREP(const SoDa::Command &cmd)
void repHWMBVersion(const QString &version)
void setSpectrumCenter(double freq)
how many FFT samples between spectrum reports
Tune the 3rd LO, if the current FE frequency is such that the desired frequency is between RX_FE_FREQ...
Set speed of CW generator.
Report the SDR (SoDa server program) version info.
bool handleSET(const SoDa::Command &cmd)
int get(char *buf, int maxlen)
void cmdErrorHandler(QLocalSocket::LocalSocketError err)
void setupSpectrumBuffer(double cfreq, double span, long buflen)
void start()
initiate transfers on the socket.
void configureSpectrum(double cfreq, double span, long buckets)
RX audio gain for sidetone (CW) monitor.
Listener(QObject *parent=0, const QString &socket_basename="tmp")
void setTXFreq(double freq)
Report a string/name pair for AF filter bandwidth.
void setRXAnt(const QString &antname)
Report RX antenna choice (asciiz string, uint tag)
QLocalSocket * cmd_socket
bool handleGET(const SoDa::Command &cmd)
void addRXAntName(const QString &ant_name)
Same effect as TX_TUNE_FREQ.
void fatalError(const QString &error_string)
void repGPSLatLon(double lat, double lon)