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.
 
 
 
 
 

165 lines
3.6 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: DevicePTZ.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of DevicePTZ.cpp
//----------------------------------------------------------------------------
// DevicePTZ.cpp: implementation of the CDevicePTZ class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DevicePTZ.h"
#include "CameraPTZ.h"
#include "..\..\LgLib\Version.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDevicePTZ::CDevicePTZ()
{
m_pCamera = NULL;
// m_pName = NULL;
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDevicePTZ::CDevicePTZ") );
}
CDevicePTZ::~CDevicePTZ()
{
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CDevicePTZ::~CDevicePTZ") );
}
void CDevicePTZ::PTZ_PostInit()
{
PTZEVENT event;
event.id = PTZC_INIT;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostReset()
{
PTZEVENT event;
event.id = PTZC_RESET;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostSetPTZ( double pan, double tilt, double zoom )
{
PTZEVENT event;
event.id = PTZC_SET_PTZ;
event.ptz.pan = pan;
event.ptz.tilt = tilt;
event.ptz.zoom = zoom;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostGetPTZ()
{
PTZEVENT event;
event.id = PTZC_GET_PTZ;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostPan( double speed, int nDir )
{
PTZEVENT event;
event.id = PTZC_PAN;
event.move.nDir = nDir;
event.move.speed = speed;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostIris( double value )
{
PTZEVENT event;
event.id = PTZC_IRIS;
event.iris.value = value;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostWiper( BOOL bOn )
{
PTZEVENT event;
event.id = PTZC_WIPER;
event.wiper.on = bOn;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostTilt( double speed, int nDir )
{
PTZEVENT event;
event.id = PTZC_TILT;
event.move.nDir = nDir;
event.move.speed = speed;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostZoom( double speed, int nDir )
{
PTZEVENT event;
event.id = PTZC_ZOOM;
event.move.nDir = nDir;
event.move.speed = speed;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostGetDoplerMask()
{
PTZEVENT event;
event.id = PTZC_GET_DOPLER_MASK;
m_Queue.Push( event );
}
void CDevicePTZ::PTZ_PostSetDopler( BOOL bOn, double angle, DWORD dwTimeout )
{
PTZEVENT event;
event.id = PTZC_SET_DOPLER;
event.dopler.bOn = bOn;
event.dopler.angle = angle;
event.dopler.dwTimeout = dwTimeout;
m_Queue.Push( event );
}
void CDevicePTZ::SetPTZ( double pan, double tilt, double zoom )
{
if( m_pCamera )
m_pCamera->PostPTZReady( pan, tilt, zoom );
}
void CDevicePTZ::SetDoplerMask( CLgDeviceDopler::DOPLER_MASK_ARRAY* pMask )
{
if( m_pCamera )
m_pCamera->PostDoplerMask( pMask );
}
void CDevicePTZ::SetDoplerAlarm( CLgDeviceDopler::DOPLER_ALARM* pAlarm )
{
if( m_pCamera )
m_pCamera->PostDoplerAlarm( pAlarm );
}
void CDevicePTZ::SetDopler( CLgDeviceDopler::DOPLER* pDopler )
{
if( m_pCamera )
m_pCamera->PostDopler( pDopler );
}
void CDevicePTZ::SetReady()
{
if( m_pCamera )
m_pCamera->PostReady();
}