DevicesManager.h 669 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _DEVICEMANAGER_H_
  2. #define _DEVICEMANAGER_H_
  3. #include "Device.h"
  4. //---------------------------------------------- CDevicesManager ----
  5. class CDevicesManager
  6. {
  7. public:
  8. CDevicesManager();
  9. ~CDevicesManager();
  10. public:
  11. BOOL Connection(LPCTSTR strAddr, LPCTSTR strPort);
  12. void DisConnection(void);
  13. BOOL FindDev(CString strName, int &nDeviceIndex);
  14. BOOL FindDev(CString strIP, int m_nPort, int &nDeviceIndex);
  15. BOOL FindDevByUid(CString strUid, int &nDeviceIndex);
  16. BOOL FindVar(int nDeviceIndex, int nVarID, int &nVarIndex);
  17. protected:
  18. public:
  19. void InitailizeData();
  20. public:
  21. CDeviceArray m_Devices;
  22. protected:
  23. private:
  24. private:
  25. void ClearUp();
  26. };
  27. #endif