VariantManager.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _VARIANTMANAGER_H_
  2. #define _VARIANTMANAGER_H_
  3. //---------------------------------------------- VariantsManager ----
  4. class USCADADLLEXPORT CVariantsManager
  5. {
  6. public:
  7. CVariantsManager();
  8. ~CVariantsManager();
  9. void Load(char *pStrDirectroy);
  10. void Store(char *pStrDirectroy);
  11. BOOL SetAnalogValue(CString name, double value);
  12. void SaveHourData(int year, int month, int day, int hour);
  13. void InitDayStatistic(int day);
  14. void SaveDayStatistic(int year, int month, int day);
  15. float GetAnalogValue(CString name);
  16. CAnalog* FindAnalog(CString name);
  17. CAnalog* FindAnalogByUID(CString strUID);
  18. CAnalog* FindAnalog(int nVarID);
  19. //ͨ¹ý±äÁ¿IDµÃµ½±äÁ¿Ãû
  20. CString GetVarNameByID(int nVarID);
  21. BOOL DeleteAnalog(int nVarID);
  22. void Fresh(CString strUid);
  23. void FreshCurPic( CStringArray& saVarName );
  24. void GetAnalogNameArray(CStringArray& nameArray);
  25. void SetSysComunicationVar( float fData );
  26. void SetDBType(char *pDBType);
  27. private:
  28. void MakeDeviceRelate();
  29. BOOL FindDevIsUse(CString strUid);
  30. void AddSysCommunctionVar();
  31. CAnalog* FindAnalogByVarTypeID(int nVarTypeID);
  32. bool IsExistDatePlan(char *pDevUid, int nVarID);
  33. public:
  34. void AllocDatePlan(void);
  35. void FreshTime();
  36. CAnalogArray m_analog;
  37. bool m_bAnalogAlarm;
  38. int m_nMinutes;
  39. CString m_strLowerLimit;
  40. CString m_strUpperLimit;
  41. CString m_strCurrValue;
  42. CString m_strReturnNormal;
  43. private:
  44. CString m_strDBType;
  45. };
  46. #endif