You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.8 KiB
74 lines
1.8 KiB
//Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>, (C) 2012
|
|
//Copyright: See COPYING file that comes with this distribution
|
|
|
|
#ifndef REMOTELAB_COMMANALYZERPART_H
|
|
#define REMOTELAB_COMMANALYZERPART_H
|
|
|
|
#include <kparts/browserextension.h>
|
|
#include <kparts/statusbarextension.h>
|
|
#include <kparts/part.h>
|
|
#include <kurl.h>
|
|
|
|
class KAboutData;
|
|
using KParts::StatusBarExtension;
|
|
class TraceWidget;
|
|
class TQSocket;
|
|
class TQTimer;
|
|
class TQMutex;
|
|
class CommAnalyzerBase;
|
|
|
|
namespace RemoteLab
|
|
{
|
|
class CommAnalyzerPart : public KParts::ReadOnlyPart
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CommAnalyzerPart( QWidget *, const char *, TQObject *, const char *, const TQStringList&);
|
|
~CommAnalyzerPart();
|
|
|
|
virtual bool openFile() { return false; } // pure virtual in the base class
|
|
virtual bool closeURL();
|
|
static KAboutData *createAboutData();
|
|
int connectToServer(TQString server);
|
|
|
|
public slots:
|
|
virtual bool openURL(const KURL &url);
|
|
|
|
private slots:
|
|
void postInit();
|
|
void updateTrace();
|
|
void updateGraticule();
|
|
virtual void postProcessTrace();
|
|
void saRefLevelChanged(double);
|
|
void changeSaRefLevel();
|
|
|
|
private:
|
|
TQString callServerMethod(int command);
|
|
void sendServerCommand(int command);
|
|
int16_t callServerMethodInt16(int command);
|
|
double callServerMethodDouble(int command);
|
|
void callServerMethodDoubleArray(int command, double * array, int arrayLen);
|
|
void sendServerCommandWithParameter(int command, TQString param);
|
|
|
|
private:
|
|
TraceWidget* m_traceWidget;
|
|
TQSocket* m_socket;
|
|
int16_t m_samplesInTrace;
|
|
double m_leftFrequency;
|
|
double m_rightFrequency;
|
|
int16_t m_hdivs;
|
|
int16_t m_vdivs;
|
|
double m_centerfreq;
|
|
double m_spanfreq;
|
|
double m_rpower;
|
|
double m_vscale;
|
|
TQTimer* m_updateTimer;
|
|
CommAnalyzerBase* m_base;
|
|
TQMutex* m_instrumentMutex;
|
|
bool stopTraceUpdate;
|
|
};
|
|
}
|
|
|
|
#endif
|