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.
68 lines
1.6 KiB
68 lines
1.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: SocketPTZ.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of SocketPTZ.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __SOCKET__PTZ__H__INCLUDED__
|
|
#define __SOCKET__PTZ__H__INCLUDED__
|
|
|
|
#include "SocketRS232.h"
|
|
#include "DevicePTZs.h"
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
class CSocketPTZ : public CSocketRS232
|
|
{
|
|
public:
|
|
CSocketPTZ();
|
|
virtual ~CSocketPTZ();
|
|
|
|
public:
|
|
BOOL Create( CSensorArray* pStorage, LPCTSTR pPort );
|
|
BOOL DeviceAttach( CDevicePTZs *pDevice );
|
|
BOOL DeviceDetach( CDevicePTZs *pDevice );
|
|
|
|
protected:
|
|
friend class CDevicePTZs;
|
|
void Resume() { CSocketRS232::Start(); }
|
|
|
|
private:
|
|
enum{ MAX_DEVICE = 127 };
|
|
CDevicePTZs *m_ppDevice[MAX_DEVICE];
|
|
int m_nDeviceCount;
|
|
int m_nDeviceCurrent;
|
|
|
|
private:
|
|
DWORD m_pTime[MAX_DEVICE];
|
|
|
|
private:
|
|
virtual int OnCommand();
|
|
|
|
virtual void OnBeforeRead( DWORD& nCount, DWORD& dwTime );
|
|
virtual int OnAfterRead( LPBYTE pBuffer, DWORD nCount );
|
|
virtual void OnBeforeWrite( LPBYTE pBuffer, DWORD& nCount );
|
|
virtual int OnAfterWrite();
|
|
|
|
virtual int OnPause( DWORD &dwTime );
|
|
|
|
virtual void CommandLoopStart() {}
|
|
virtual void CommandLoopStop() {}
|
|
|
|
private:
|
|
enum{ MAX_LENGTH = 1000 };
|
|
BYTE m_pBuffer[ MAX_LENGTH ];
|
|
DWORD m_nRCount;
|
|
DWORD m_nWCount;
|
|
};
|
|
|
|
#endif
|