#ifndef _UINT_H_ #define _UINT_H_ #include #include using namespace std; //频率偏移量 #define FRE_BASE 30.0 #define FRE_UNIT 0.0005 //EAU电压单位 #define EAU_VOL_UNIT 0.002 //EAU频率单位 //#define EAU_POW_UNIT 0.02 #define EAU_POW_UNIT 0.05 //FRE_BASE / FRE_UNIT #define FRE_OFFSET 60000.0 #define C_10KV 10000.0 #define C_KV 1000.0 #define C_KW 1000.0 class Unit { public: Unit(int pt, int ct); ~Unit(); float getVoltage(uint16_t v, float cof); float getFrequency(uint16_t v); // float getPower(int16_t v, float cof); float getPower(int16_t v, float cof, bool isPositive); private: int mpt; int mct; int mptct; }; #endif