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.
56 lines
1.4 KiB
56 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: LgNetSocketPTZPG3AD.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of LgNetSocketPTZPG3AD.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "LgNetSocketPTZPG3AD.h"
|
|
|
|
CLgNetSocketPTZPG3AD::CLgNetSocketPTZPG3AD()
|
|
{
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CLgNetSocketPTZPG3AD::CLgNetSocketPTZPG3AD") );
|
|
}
|
|
|
|
CLgNetSocketPTZPG3AD::~CLgNetSocketPTZPG3AD()
|
|
{
|
|
Destroy();
|
|
|
|
// unlink all linked devices
|
|
CLgLinkP<CLgNetSocket,CLgNetSocketDevice>::Unlink();
|
|
|
|
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CLgNetSocketPTZPG3AD::~CLgNetSocketPTZPG3AD") );
|
|
}
|
|
|
|
BOOL CLgNetSocketPTZPG3AD::Create( LPCTSTR pCommPort, BOOL bDemo )
|
|
{
|
|
Destroy();
|
|
|
|
if( !bDemo )
|
|
{
|
|
if( !m_Connection.Create( pCommPort, 9600, 8, NOPARITY, ONESTOPBIT, 1024, 1024 ) )
|
|
return FALSE;
|
|
|
|
if( !m_Protocol.Create( &m_Connection ) )
|
|
return FALSE;
|
|
}
|
|
|
|
if( !CLgNetSocket::Create( &m_Protocol ) )
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CLgNetSocketPTZPG3AD::Destroy()
|
|
{
|
|
CLgNetSocket::Destroy();
|
|
m_Protocol.Destroy();
|
|
m_Connection.Destroy();
|
|
}
|