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.
|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: DirectInput.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of DirectInput.h
//----------------------------------------------------------------------------
#ifndef __DIRECT__INPUT__H__INCLUDED__
#define __DIRECT__INPUT__H__INCLUDED__
#if _MSC_VER > 1000
#pragma once
#endif
#include "..\..\LgLib\Templ.h"
class CDirectInput{public: CDirectInput(); virtual ~CDirectInput();
protected: friend class CDeviceDI;
public: BOOL CheckState(); BOOL CheckCommand( PBOOL pOn );
int GetSubIndex() { return m_nSubIndex; }
void CmdEnable( BOOL bEnable ); void CmdReset(); BOOL ConnectToDevice( CDeviceDI *pDeviceDI, int nDeviceBit, int nSensorBit ); int GetState(); // behaviour should be redefined
protected: enum{ DIC_SET_STATE, DIC_TIMEOUT }; struct DIEVENT { BYTE id; union { BOOL bOn; }; }; CLgQueueP<DIEVENT,100> m_Queue;
protected: void PostOn( BOOL bOn ); CDeviceDI *m_pDeviceDI; int m_nBit; enum{ DIS_UNKNOWN, DIS_TIMEOUT, DIS_ON, DIS_OFF }; int m_nState; bool m_bPostAlarm; int m_nSubIndex;};
#endif
|