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.
70 lines
1.7 KiB
70 lines
1.7 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: Patrol.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of Patrol.h
|
|
//----------------------------------------------------------------------------
|
|
// Patrol.h: interface for the CPatrol class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_)
|
|
#define AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "FileStructs.h"
|
|
|
|
class CSensor;
|
|
class CSensorArray;
|
|
|
|
class CPatrol
|
|
{
|
|
public:
|
|
BYTE CheckSensor( CSensor *pSensor, LPBYTE byte );
|
|
void CheckTime();
|
|
void LinkSensor( CSensor* pSensor );
|
|
BOOL IsActive( int nIndex );
|
|
void Activate( int nIndex, BOOL bActive );
|
|
BOOL Load( CFile& file );
|
|
CPatrol();
|
|
virtual ~CPatrol();
|
|
int GetCount() { return m_nPatrolsCount; }
|
|
LPSTR GetName( int nIndex ) { return m_pPatrols[nIndex].pName; }
|
|
void SetSensorArray( CSensorArray *pSensorArray );
|
|
private:
|
|
struct PATROL
|
|
{
|
|
CHAR pName[STRING_MAX];
|
|
int nCount;
|
|
struct POINT
|
|
{
|
|
CSensor *pSensor;
|
|
int nAddress;
|
|
int nBitMask;
|
|
int nTime;
|
|
int nTolerance;
|
|
}*pPoints;
|
|
BOOL bActive;
|
|
DWORD minTime;
|
|
DWORD maxTime;
|
|
int nActive;
|
|
};
|
|
|
|
PATROL *m_pPatrols;
|
|
int m_nPatrolsCount;
|
|
CSensorArray *m_pSensorArray;
|
|
|
|
HANDLE m_hMutex;
|
|
};
|
|
|
|
#endif // !defined(AFX_PATROL_H__582EB1C1_B0A3_11D4_A1FA_0010B55CB330__INCLUDED_)
|