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.

66 lines
1.4 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: cpg3ad.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of cpg3ad.cpp
  13. //----------------------------------------------------------------------------
  14. #include "stdafx.h"
  15. #include "cptzad.h"
  16. #ifdef EMBEDDED_CAMERA_AMERICAN_DYNAMICS
  17. #include "..\lglib\comm\ptzad.cpp"
  18. #include "..\lglib\device\dptzad.cpp"
  19. CCameraAmericanDynamics::CCameraAmericanDynamics()
  20. {
  21. m_pComm = NULL;
  22. m_pCamera = NULL;
  23. }
  24. CCameraAmericanDynamics::~CCameraAmericanDynamics()
  25. {
  26. Destroy();
  27. }
  28. BOOL CCameraAmericanDynamics::Create( CCamera *pCamera, CComm485* pComm, CComm485::PORTS nPort, LGS::PCAMERA_PARAMETERS pParameters )
  29. {
  30. // destroy old incarnation :)
  31. Destroy();
  32. m_pComm = pComm;
  33. m_pCamera = pCamera;
  34. if( !m_pComm->Create( nPort, 4800L, 8, CComm485::_NOPARITY ) )
  35. return FALSE;
  36. if( !m_Protocol.Create( m_pComm ) )
  37. return FALSE;
  38. SetProtocol( &m_Protocol );
  39. SetAddress( 1 );
  40. return CmdGetPTZ();
  41. }
  42. void CCameraAmericanDynamics::Destroy()
  43. {
  44. m_Protocol.Destroy();
  45. if( m_pComm )
  46. {
  47. m_pComm->Destroy();
  48. m_pComm = NULL;
  49. }
  50. }
  51. #endif // EMBEDDED_CAMERA_AMERICAN_DYNAMICS