#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