Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.2 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: Socket.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of Socket.h
  13. //----------------------------------------------------------------------------
  14. // Socket.h: interface for the CSocket class.
  15. //
  16. //////////////////////////////////////////////////////////////////////
  17. #if !defined(AFX_SOCKET_H__5D5FABE8_775A_11D4_A1F0_0010B55CB330__INCLUDED_)
  18. #define AFX_SOCKET_H__5D5FABE8_775A_11D4_A1F0_0010B55CB330__INCLUDED_
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "Sensor.h"
  23. class CSensorArray;
  24. enum { SOCKET_UNDEFINED = 0,
  25. SOCKET_SPRU = 1,
  26. SOCKET_MMCLIENT = 2,
  27. SOCKET_MMSERVER = 3,
  28. SOCKET_SM = 4,
  29. SOCKET_BACKUP = 5,
  30. SOCKET_ECS = 6,
  31. SOCKET_LGS = 7,
  32. SOCKET_MD = 8,
  33. SOCKET_VM = 9,
  34. SOCKET_PTZ = 10,
  35. SOCKET_RS232DI = 11,
  36. SOCKET_MIC1300 = 12,
  37. SOCKET_TKS576 = 13,
  38. SOCKET_PHILIPS3GAD = 14,
  39. SOCKET_CCC = 15 };
  40. class CSocket
  41. {
  42. public:
  43. CSocket();
  44. virtual ~CSocket();
  45. public:
  46. virtual BOOL PostEvent( EVENT &event );
  47. INT GetNumber() { return m_nNumber; }
  48. INT GetPerformance() { return m_nPerformance; }
  49. virtual __int64 GetFailure() { return m_nCountFailure; }
  50. virtual __int64 GetSuccess() { return m_nCountSuccess; }
  51. virtual void CommandLoopStart() = 0;
  52. virtual void CommandLoopStop() = 0;
  53. CString& GetName() { return m_strName; }
  54. void SetName( LPCTSTR pName ) { m_strName = pName; }
  55. // void SetType( int nType ) { m_nType = nType; }
  56. virtual int GetType() { return m_nType; }
  57. CSensorArray *GetSensorArray() { return m_pSensorArray; }
  58. CEventQueue *GetEventQueue() { return &m_EventQueue; }
  59. protected:
  60. BOOL m_bInitiated;
  61. INT m_nNumber;
  62. CSensorArray *m_pSensorArray;
  63. // INT m_nCount;
  64. // CSensor **m_ppSensors;
  65. int m_nPerformance;
  66. __int64 m_nCountFailure;
  67. __int64 m_nCountSuccess;
  68. CString m_strName;
  69. int m_nType;
  70. CEventQueue m_EventQueue;
  71. };
  72. #endif // !defined(AFX_SOCKET_H__5D5FABE8_775A_11D4_A1F0_0010B55CB330__INCLUDED_)