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.
52 lines
1.2 KiB
52 lines
1.2 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgNetSocketPTZPelco.cpp
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Source file of LgNetSocketPTZPelco.cpp
|
|
//----------------------------------------------------------------------------
|
|
#include "stdafx.h"
|
|
#include "LgNetSocketPTZPelco.h"
|
|
|
|
CLgNetSocketPTZPelco::CLgNetSocketPTZPelco()
|
|
{
|
|
|
|
}
|
|
|
|
CLgNetSocketPTZPelco::~CLgNetSocketPTZPelco()
|
|
{
|
|
Destroy();
|
|
// unlink all linked devices
|
|
CLgLinkP<CLgNetSocket,CLgNetSocketDevice>::Unlink();
|
|
}
|
|
|
|
BOOL CLgNetSocketPTZPelco::Create( LPCTSTR pCommPort, BOOL bDemo )
|
|
{
|
|
Destroy();
|
|
if( !bDemo )
|
|
{
|
|
if( !m_Connection.Create( pCommPort, 2400, 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 CLgNetSocketPTZPelco::Destroy()
|
|
{
|
|
CLgNetSocket::Destroy();
|
|
m_Protocol.Destroy();
|
|
m_Connection.Destroy();
|
|
}
|