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.

235 lines
6.7 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __LG__PERSIST__DEVICE__H__INCLUDED__
  2. #define __LG__PERSIST__DEVICE__H__INCLUDED__
  3. #pragma once
  4. #include "LgPersist.h"
  5. #include "LgPersistPin.h"
  6. class LGLIBPERSISTENT_API CLgPersistDevice :
  7. public CLgPersist
  8. {
  9. public:
  10. BOOL IsConnectable( CLgPersistDevice *pDevice );
  11. BOOL Connect( CLgPersistDevice *pDevice );
  12. public:
  13. virtual E_LG_PERSIST_CLASS GetClass() { return LG_PERSIST_CLASS_DEVICE; }
  14. public:
  15. virtual BOOL ShowPropertyDlg( HWND hWnd ) { return FALSE; }
  16. };
  17. ////////////////////////////////////////////////////////////////////////////////////////
  18. class LGLIBPERSISTENT_API CLgPersistDeviceUnknown : public CLgPersistDevice
  19. {
  20. public:
  21. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_UNKNOWN; }
  22. };
  23. ////////////////////////////////////////////////////////////////////////////////////////
  24. class LGLIBPERSISTENT_API CLgPersistDeviceCamera : public CLgPersistDevice
  25. {
  26. public:
  27. CLgPersistDeviceCamera()
  28. {
  29. ObjectToChildLinkP::Link( new CLgPersistPinVideoOutput );
  30. ObjectToChildLinkP::Link( new CLgPersistPinLogicalCameraSensor );
  31. }
  32. public:
  33. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAMERA; }
  34. };
  35. ////////////////////////////////////////////////////////////////////////////////////////
  36. class LGLIBPERSISTENT_API CLgPersistDeviceCapture : public CLgPersistDevice
  37. {
  38. public:
  39. CLgPersistDeviceCapture()
  40. {
  41. ObjectToChildLinkP::Link( new CLgPersistPinVideoInput );
  42. }
  43. public:
  44. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAPTURE; }
  45. };
  46. ////////////////////////////////////////////////////////////////////////////////////////
  47. class LGLIBPERSISTENT_API CLgPersistDeviceSensor : public CLgPersistDevice
  48. {
  49. public:
  50. CLgPersistDeviceSensor()
  51. {
  52. ObjectToChildLinkP::Link( new CLgPersistPinLogicalSensorCamera );
  53. }
  54. };
  55. ////////////////////////////////////////////////////////////////////////////////////////
  56. class LGLIBPERSISTENT_API CLgPersistDeviceLGS : public CLgPersistDeviceSensor
  57. {
  58. public:
  59. CLgPersistDeviceLGS()
  60. {
  61. ObjectToChildLinkP::Link( new CLgPersistPinSocket );
  62. ObjectToChildLinkP::Link( new CLgPersistPinLGSCamera );
  63. }
  64. public:
  65. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_LGS; }
  66. };
  67. ////////////////////////////////////////////////////////////////////////////////////////
  68. class LGLIBPERSISTENT_API CLgPersistDeviceRelay : public CLgPersistDevice
  69. {
  70. public:
  71. CLgPersistDeviceRelay()
  72. {
  73. ObjectToChildLinkP::Link( new CLgPersistPinLogicalRelayOutput );
  74. }
  75. public:
  76. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_RELAY; }
  77. };
  78. class LGLIBPERSISTENT_API CLgPersistDeviceOutput : public CLgPersistDevice
  79. {
  80. public:
  81. CLgPersistDeviceOutput()
  82. {
  83. ObjectToChildLinkP::Link( new CLgPersistPinLogicalOutputRelay );
  84. }
  85. public:
  86. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_OUTPUT; }
  87. };
  88. ////////////////////////////////////////////////////////////////////////////////////////
  89. class LGLIBPERSISTENT_API CLgPersistDeviceDC : public CLgPersistDevice
  90. {
  91. public:
  92. CLgPersistDeviceDC()
  93. {
  94. ObjectToChildLinkP::Link( new CLgPersistPinLogicalDCInput );
  95. }
  96. public:
  97. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_DC; }
  98. };
  99. class LGLIBPERSISTENT_API CLgPersistDeviceInput : public CLgPersistDeviceSensor
  100. {
  101. public:
  102. CLgPersistDeviceInput()
  103. {
  104. ObjectToChildLinkP::Link( new CLgPersistPinLogicalInputDC );
  105. }
  106. public:
  107. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_INPUT; }
  108. };
  109. ////////////////////////////////////////////////////////////////////////////////////////
  110. class LGLIBPERSISTENT_API CLgPersistDeviceRS232 : public CLgPersistDevice
  111. {
  112. public:
  113. CLgPersistDeviceRS232()
  114. {
  115. ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
  116. ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
  117. ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
  118. ObjectToChildLinkP::Link( new CLgPersistDeviceDC );
  119. ObjectToChildLinkP::Link( new CLgPersistDeviceRelay );
  120. ObjectToChildLinkP::Link( new CLgPersistDeviceRelay );
  121. }
  122. public:
  123. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_RS232; }
  124. };
  125. ////////////////////////////////////////////////////////////////////////////////////////
  126. class LGLIBPERSISTENT_API CLgPersistDeviceSocket : public CLgPersistDevice
  127. {
  128. public:
  129. CLgPersistDeviceSocket()
  130. {
  131. ObjectToChildLinkP::Link( new CLgPersistPinSocket );
  132. }
  133. public:
  134. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_SOCKET; }
  135. };
  136. ////////////////////////////////////////////////////////////////////////////////////////
  137. class LGLIBPERSISTENT_API CLgPersistDeviceSocketRS232 : public CLgPersistDeviceSocket
  138. {
  139. };
  140. ////////////////////////////////////////////////////////////////////////////////////////
  141. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ : public CLgPersistDeviceCamera
  142. {
  143. };
  144. ////////////////////////////////////////////////////////////////////////////////////////
  145. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232 : public CLgPersistDeviceCameraPTZ
  146. {
  147. public:
  148. CLgPersistDeviceCameraPTZ_RS232()
  149. {
  150. ObjectToChildLinkP::Link( new CLgPersistPinSocket );
  151. }
  152. };
  153. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Migvan : public CLgPersistDeviceCameraPTZ_RS232
  154. {
  155. };
  156. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Mic1300 : public CLgPersistDeviceCameraPTZ_RS232
  157. {
  158. };
  159. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Philips : public CLgPersistDeviceCameraPTZ_RS232
  160. {
  161. };
  162. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_JVC : public CLgPersistDeviceCameraPTZ_RS232
  163. {
  164. };
  165. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_RS232_Vicon : public CLgPersistDeviceCameraPTZ_RS232
  166. {
  167. };
  168. ////////////////////////////////////////////////////////////////////////////////////////
  169. class LGLIBPERSISTENT_API CLgPersistDeviceCameraPTZ_LGS : public CLgPersistDeviceCameraPTZ
  170. {
  171. public:
  172. CLgPersistDeviceCameraPTZ_LGS()
  173. {
  174. ObjectToChildLinkP::Link( new CLgPersistPinCameraLGS );
  175. }
  176. public:
  177. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_DEVICE_CAMERA_LGS; }
  178. };
  179. ////////////////////////////////////////////////////////////////////////////////////////
  180. class LGLIBPERSISTENT_API CLgPersistManager : public CLgPersistDevice
  181. {
  182. public:
  183. virtual E_LG_PERSIST_TYPE GetType() { return LG_PERSIST_TYPE_MANAGER; }
  184. public:
  185. virtual BOOL Serialize( CLgPersistArchive& ar );
  186. private:
  187. typedef struct LINK_DESCRIPTOR
  188. {
  189. DWORD dwID_1;
  190. DWORD dwID_2;
  191. }LINK_DESCRIPTOR;
  192. BOOL StoreLink( CLgPersistDevice *pDevice, CLgPersistArchive& ar );
  193. CLgPersistPin *FindPin( CLgPersistDevice *pDevice, DWORD dwID );
  194. };
  195. #endif