123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef _VARIANTMANAGER_H_
- #define _VARIANTMANAGER_H_
- //---------------------------------------------- VariantsManager ----
- class USCADADLLEXPORT CVariantsManager
- {
- public:
- CVariantsManager();
- ~CVariantsManager();
- void Load(char *pStrDirectroy);
- void Store(char *pStrDirectroy);
- BOOL SetAnalogValue(CString name, double value);
- void SaveHourData(int year, int month, int day, int hour);
- void InitDayStatistic(int day);
- void SaveDayStatistic(int year, int month, int day);
- float GetAnalogValue(CString name);
- CAnalog* FindAnalog(CString name);
- CAnalog* FindAnalogByUID(CString strUID);
- CAnalog* FindAnalog(int nVarID);
- //ͨ¹ý±äÁ¿IDµÃµ½±äÁ¿Ãû
- CString GetVarNameByID(int nVarID);
- BOOL DeleteAnalog(int nVarID);
- void Fresh(CString strUid);
- void FreshCurPic( CStringArray& saVarName );
- void GetAnalogNameArray(CStringArray& nameArray);
- void SetSysComunicationVar( float fData );
- void SetDBType(char *pDBType);
- private:
- void MakeDeviceRelate();
- BOOL FindDevIsUse(CString strUid);
- void AddSysCommunctionVar();
- CAnalog* FindAnalogByVarTypeID(int nVarTypeID);
- bool IsExistDatePlan(char *pDevUid, int nVarID);
-
- public:
- void AllocDatePlan(void);
- void FreshTime();
- CAnalogArray m_analog;
- bool m_bAnalogAlarm;
- int m_nMinutes;
- CString m_strLowerLimit;
- CString m_strUpperLimit;
- CString m_strCurrValue;
- CString m_strReturnNormal;
- private:
- CString m_strDBType;
- };
- #endif
|