1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #ifndef _DEVICEMANAGER_H_
- #define _DEVICEMANAGER_H_
- //-------------------------------------- CDevicesManager --------------------------------------
- class USCADADLLEXPORT CDevicesManager
- {
- public:
- CDevicesManager();
- ~CDevicesManager();
- public:
- void Load(char *pStrDirectroy);
- void Store(char *pStrDirectroy);
- int FindCommPort(CString strName);
- BOOL FindDev(CString strName, int &nChannlIndex, int &nDeviceIndex);
- BOOL FindDev(CString strIP, int m_nPort, int &nChannlIndex, int &nDeviceIndex);
- BOOL FindCommPort(CString strName, int nAddr, int &nChannlIndex, int &nDeviceIndex);
- int GetVarstatus(double iParaValue, int iUpperLimit, int iLowerLimit, int iNormalState);
- BOOL Connection(LPCTSTR strAddr, LPCTSTR strPort);
- void DisConnection( LPCTSTR strPort);
- BOOL GetOpenStatus(LPCTSTR strPort);
- BOOL GetSocketStatus(LPCTSTR strPort);
- void SetSocketStatus(BOOL bSocket,LPCTSTR strPort);
- BOOL SendNoticeToServer( int iCmd,int iOperateType,CString sUserName,CString sUID,int iVarID,LPCTSTR strPort );
- BOOL GetDogInfo(LPCTSTR strPort);
- BOOL TestAlarm(LPCTSTR strPort);
- BOOL ConfigAlarm( CString sUID,int iVarID,int iStatus,int iAlarmIndex );
- void Release(LPCTSTR strPort);//ÊÍ·ÅCTCPClient£º£ºm_pTcpClient
- bool m_bIsPastDue;//ÊÇ·ñ¹ýÆÚ
- public:
- void InitailizeData();
- void FreshData(void);
- public:
- CChannelArray m_channels;
- protected:
- unsigned int CalcCheckSum( void *pData, unsigned int nSize );
- private:
- void ClearUp();
- };
- #endif
|