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.

54 lines
1.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: LgNetSocketPTZTKS576.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of LgNetSocketPTZTKS576.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "LgNetSocketPTZTKS576.h"
  16. CLgNetSocketPTZTKS576::CLgNetSocketPTZTKS576()
  17. {
  18. }
  19. CLgNetSocketPTZTKS576::~CLgNetSocketPTZTKS576()
  20. {
  21. Destroy();
  22. // unlink all linked devices
  23. CLgLinkP<CLgNetSocket,CLgNetSocketDevice>::Unlink();
  24. }
  25. BOOL CLgNetSocketPTZTKS576::Create( LPCTSTR pCommPort, BOOL bDemo )
  26. {
  27. Destroy();
  28. if( !bDemo )
  29. {
  30. if( !m_Connection.Create( pCommPort, 9600, 8, EVENPARITY, ONESTOPBIT, 1024, 1024 ) )
  31. return FALSE;
  32. if( !m_Protocol.Create( &m_Connection ) )
  33. return FALSE;
  34. }
  35. if( !CLgNetSocket::Create( &m_Protocol ) )
  36. return FALSE;
  37. return TRUE;
  38. }
  39. void CLgNetSocketPTZTKS576::Destroy()
  40. {
  41. CLgNetSocket::Destroy();
  42. m_Protocol.Destroy();
  43. m_Connection.Destroy();
  44. }