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
66 lines
1.4 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: cpg3ad.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of cpg3ad.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "cptzad.h"
|
|
|
|
#ifdef EMBEDDED_CAMERA_AMERICAN_DYNAMICS
|
|
|
|
#include "..\lglib\comm\ptzad.cpp"
|
|
#include "..\lglib\device\dptzad.cpp"
|
|
|
|
CCameraAmericanDynamics::CCameraAmericanDynamics()
|
|
{
|
|
m_pComm = NULL;
|
|
m_pCamera = NULL;
|
|
}
|
|
|
|
CCameraAmericanDynamics::~CCameraAmericanDynamics()
|
|
{
|
|
Destroy();
|
|
}
|
|
|
|
BOOL CCameraAmericanDynamics::Create( CCamera *pCamera, CComm485* pComm, CComm485::PORTS nPort, LGS::PCAMERA_PARAMETERS pParameters )
|
|
{
|
|
// destroy old incarnation :)
|
|
Destroy();
|
|
|
|
m_pComm = pComm;
|
|
m_pCamera = pCamera;
|
|
|
|
if( !m_pComm->Create( nPort, 4800L, 8, CComm485::_NOPARITY ) )
|
|
return FALSE;
|
|
|
|
if( !m_Protocol.Create( m_pComm ) )
|
|
return FALSE;
|
|
|
|
SetProtocol( &m_Protocol );
|
|
|
|
SetAddress( 1 );
|
|
|
|
return CmdGetPTZ();
|
|
}
|
|
|
|
void CCameraAmericanDynamics::Destroy()
|
|
{
|
|
m_Protocol.Destroy();
|
|
|
|
if( m_pComm )
|
|
{
|
|
m_pComm->Destroy();
|
|
m_pComm = NULL;
|
|
}
|
|
}
|
|
|
|
#endif // EMBEDDED_CAMERA_AMERICAN_DYNAMICS
|
|
|