For DOS Protected Mode version of sensor core software
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.
 
 
 
 

91 lines
2.1 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: Shadow.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of SHADOW.H
//----------------------------------------------------------------------------
#ifndef __SHADOW__H__INCLUDED__
#define __SHADOW__H__INCLUDED__
#include "StdAfx.h"
#include "..\lglib\comm\lgsm.h"
#include "..\lglib\comm\ProtLGSm.h"
class CShadow
{
public:
#ifdef ALS_300
CShadow( bool isSlave = false );
#else
CShadow();
#endif
~CShadow();
public:
bool Create();
void Destroy();
public:
bool Load();
bool Save();
public:
bool IsOutside( int16_t nAngle, int16_t wRange );
public:
void OnCmdGetHzData( PBYTE& pReadBufferPtr, int16_t& nReadCount, PBYTE& pSendBufferPtr, int16_t& nSendCount );
bool OnCmdSetHzData( PBYTE& pReadBufferPtr, int16_t& nReadCount, PBYTE& pSendBufferPtr, int16_t& nSendCount );
void OnCmdGetHzEnable( PBYTE& pReadBufferPtr, int16_t& nReadCount, PBYTE& pSendBufferPtr, int16_t& nSendCount );
bool OnCmdSetHzEnable( PBYTE& pReadBufferPtr, int16_t& nReadCount, PBYTE& pSendBufferPtr, int16_t& nSendCount );
private:
bool AddShadow( int16_t nAngle, uint8_t bType, int16_t wMin, int16_t wMax );
bool LoadRays( PCHAR pFileName );
bool SaveRays( PCHAR pFileName );
bool LoadPolygons( PCHAR pFileName );
bool SavePolygons( PCHAR pFileName );
#ifdef ALS_300
bool m_bIsSlave;
#endif
#ifndef INCLUDE_WINDOWS_DEFINITIONS
public:
#else
private:
#endif
typedef struct RAY
{
uint8_t bType;
int16_t nMin;
int16_t nMax;
}RAY, far* LPRAY;
typedef struct RAY_LINE
{
int16_t nCount;
LPRAY lpShadow;
}RAY_LINE, far* LPRAY_LINE;
typedef struct HZ_POLYGON
{
uint8_t bType;
uint16_t wCount;
LGS::LPHZ_POINT lpPoint;
}HZ_POLYGON, far* LPHZ_POLYGON;
RAY_LINE m_pShadowLine[LGS_MAX_SHADOW_ANGLES];
LPHZ_POLYGON m_lpPolygon;
int16_t m_nPolygon;
DWORD m_dwTypeOn;
bool m_pTypeOn[LGS_MAX_SHADOW_TYPES];
};
#endif