25 lines
642 B
C++
25 lines
642 B
C++
#ifndef POWERMETER_H
|
|
#define POWERMETER_H
|
|
#include "SerialPort.h"
|
|
|
|
|
|
#define POWERMETERMACH PowerMeter::MachInstance()
|
|
#define POWERMETERLIGHT PowerMeter::LightInstance()
|
|
class PowerMeter:public Comm
|
|
{
|
|
private:
|
|
char revData[4096];
|
|
int revDataLen;
|
|
static PowerMeter* uniqueInstanceMach;
|
|
static PowerMeter* uniqueInstanceLight;
|
|
public:
|
|
static PowerMeter* MachInstance();
|
|
static PowerMeter* LightInstance();
|
|
PowerMeter();
|
|
~PowerMeter();
|
|
int GetValue(float * Value);
|
|
float convert(char *num);
|
|
// int SendCmd(char *data, unsigned short data_len ,unsigned char * revData, int * revData_len);
|
|
};
|
|
#endif
|