20 Q_PROPERTY(
double MHz READ
MHz WRITE setMHz )
21 Q_PROPERTY(
double dBm READ
dBm WRITE setdBm )
29 if (gen_instance == 0) gen_instance =
new Generator();
43 bool isOn()
const {
return m_on; }
66 double MHz()
const {
return m_mhz; }
73 double dBm()
const {
return m_dbm; }
96 void setMHz(
double mhz) { m_mhz = mhz; }
97 void setdBm(
double dbm) { m_dbm = dbm; }
103 QString getResponse();
104 void sendCmd(
const QString &command);
105 void dumpBuffer(QByteArray ba)
const;
void powerOn(bool flag)
Enable/disable signal generation.
Definition: agilent.cpp:56
double MHz() const
Get current frequency setting.
Definition: agilent.h:66
double dBm() const
Get current level setting.
Definition: agilent.h:73
bool isOn() const
Check if signal generator is powered on.
Definition: agilent.h:43
void connectToServer()
Establish tcp/ip connection with the actual hardware.
Definition: agilent.cpp:19
~Generator()
Destructor.
Definition: agilent.cpp:15
A class to control the Agilent signal generator.
Definition: agilent.h:18
void setSignal(double mhz, double dbm)
Set frequency and level of the signal to be generated.
Definition: agilent.cpp:138
static Generator * instance()
Get a pointer to a class Generator instance.
Definition: agilent.h:27
bool isValid()
Check if connection is valid.
Definition: agilent.cpp:35