#ifndef OVENSTATICS_H #define OVENSTATICS_H #include #include #include "all_share.h" #include "udphandler.h" #include "oven.h" #include "servicedatas.h" #define SYS_ERR_FIRE_TRIGGER1 0x0001 #define SYS_ERR_FIRE_TRIGGER2 0x0002 #define SYS_ERR_FIRE_TRIGGER3 0x0004 #define SYS_ERR_OVNE_TEMP_ALARM 0x0008 #define SYS_ERR_QUN_TEMP_ALARM 0x0010 #define SYS_ERR_CENTER_TEMP_ALARM 0x0020 #define SYS_ERR_WALL_TEMP_ALARM 0x0040 #define SYS_ERR_WATER_SPLY_FAIL 0x0080 class OvenStatics : public QObject { Q_OBJECT public: static OvenStatics* getInstance(QObject* parent = 0,UdpHandler * udp=0, Oven* oven=0); static void destroy(); private: static OvenStatics* p_singtonInstance; UdpHandler *udp; Oven* oven; oven_control_t control; oven_state_t state; servicedatas* srvdatas; bool curdoorstate; uint16_t curSysErrorState; explicit OvenStatics(QObject* parent); ~OvenStatics(); void processSystemError(uint16_t errflag,time_t ltime); public slots: void onDataChanged(); }; #endif // OVENSTATICS_H