Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _QEPOWER_H
00017 #define _QEPOWER_H
00018
00019 #include "9302hw.h"
00020 #include "qeanalog.h"
00021 #include "property.h"
00022 #include "singleton.h"
00023
00024 #define QP_OBJECT 2
00025 #define QP_PROP_HARDWARE_VERSION PROP_ID(QP_OBJECT, 0)
00026 #define QP_PROP_BREAKER_STATE PROP_ID(QP_OBJECT, 1)
00027 #define QP_PROP_MAIN_BATT_VOLTAGE PROP_ID(QP_OBJECT, 2)
00028 #define QP_PROP_MAIN_BATT_STATE PROP_ID(QP_OBJECT, 3)
00029 #define QP_PROP_BACKUP_BATT_VOLTAGE PROP_ID(QP_OBJECT, 4)
00030 #define QP_PROP_BACKUP_BATT_STATE PROP_ID(QP_OBJECT, 5)
00031 #define QP_PROP_MAIN_5V_VOLTAGE PROP_ID(QP_OBJECT, 6)
00032 #define QP_PROP_IO_5V_VOLTAGE PROP_ID(QP_OBJECT, 7)
00033 #define QP_PROP_IO_5V_STATE PROP_ID(QP_OBJECT, 8)
00034
00051 class CQEPower : public IProperty
00052 {
00053 public:
00057 SINGLETON(CQEPower);
00058
00063 void PowerOff();
00064
00069 virtual int GetProperty(int property, long *value);
00070
00075 virtual int SetProperty(int property, long value);
00076
00077 private:
00078 CQEPower();
00079 ~CQEPower();
00080
00081 unsigned short GetBreakerState();
00082 unsigned int GetBattState();
00083
00084 CQEAnalog *m_pAnalog;
00085 C9302Hardware *m_p9302hw;
00086 unsigned int m_version;
00087 };
00088
00089
00090 #endif