28 if (pm_instance == 0) pm_instance =
new PowerMeter();
40 void connectionStatus(
bool ok);
41 void newReading(
float p);
47 void connectToServer();
48 void closeConnection();
49 int tcpSendReceive(QString command,
bool interactive);
50 void dumpBuffer(QByteArray ba,
bool in)
const;
52 void dumpBuffer(
bool out,
char* buf)
const;
55 QByteArray sendBuffer;
56 QByteArray recvBuffer;
61 #endif // POWERMETER_H A class to control the power meter.
Definition: powermeter.h:19
void init()
Initialize instrument for power readings.
Definition: powermeter.cpp:86
bool isConnected()
Return connection status.
Definition: powermeter.h:36
float reading()
Get one reading from the selected gauge.
Definition: powermeter.cpp:104
static PowerMeter * instance()
Get a pointer to a class PowerMeter instance.
Definition: powermeter.h:26