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.
65 lines
1.3 KiB
65 lines
1.3 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT: Laserguard libraries
|
|
// SUBSYSTEM: Devices support library
|
|
// FILE: LgDevice.h
|
|
// AUTHOR: Chizhevskiy Sergey
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of CLgDevice
|
|
//----------------------------------------------------------------------------
|
|
|
|
#ifndef __LG__DEVICE__H__INCLUDED__
|
|
#define __LG__DEVICE__H__INCLUDED__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
class CLgDevice
|
|
{
|
|
public:
|
|
CLgDevice();
|
|
virtual ~CLgDevice();
|
|
|
|
public:
|
|
typedef struct DEVICE_CMD_ERROR
|
|
{
|
|
INT nCommand;
|
|
TCHAR pErrorText[MAX_PATH];
|
|
}DEVICE_CMD_ERROR, *PDEVICE_CMD_ERROR;
|
|
|
|
protected:
|
|
virtual void OnEvtCommandError( INT nCommand, LPCTSTR pFormat, ... ) = 0;
|
|
|
|
public:
|
|
enum
|
|
{
|
|
CMD_NONE = 0x00,
|
|
CMD_DEVICE = 0x01,
|
|
|
|
EVT_NONE = 0x80,
|
|
EVT_COMMAND_ERROR = 0x81,
|
|
EVT_DEVICE = 0x82,
|
|
};
|
|
|
|
protected:
|
|
// commands processing
|
|
BOOL DoCmd( INT nCommand );
|
|
// called to get new message
|
|
INT GetCmd();
|
|
void ReleaseCmd();
|
|
// check availibility
|
|
BOOL IsReadyForCmd();
|
|
|
|
private:
|
|
// commands proce4ssing variables
|
|
BOOL m_bReadyForCmd;
|
|
INT m_nCmd;
|
|
BOOL m_bCmdExist;
|
|
};
|
|
|
|
#endif
|