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.
 
 
 
 
 

83 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: DeviceDI.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of DeviceDI.h
//----------------------------------------------------------------------------
// DeviceIN.h: interface for the CDeviceIN class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __DEVICE__IN__H__INCLUDED__
#define __DEVICE__IN__H__INCLUDED__
#include "DirectInput.h"
#include "..\..\LgLib\Templ.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Device direct input
class CDeviceDI
{
public:
CDeviceDI();
virtual ~CDeviceDI();
public:
void SetNC( int nBit, BOOL bNC );
protected:
void PostEnable( BOOL bEnable, int nBit = -1 );
void PostGetState();
public:
enum{ DDIC_GET_STATE = 0,
DDIC_ENABLE = 1,
DDIC_COUNT = 2 };
struct DDIEVENT
{
BYTE id;
union
{
BOOL bEnable;
int nBit;
};
};
CLgQueueP<DDIEVENT,100> m_Queue;
protected:
void SetCount( int nCount );
int GetCount() { return m_arrInput.GetCount(); }
BOOL GetBit( int nBit );
friend class CSocketRS232DI;
void SetBit( int nBit, BOOL bOn );
protected:
friend class CDirectInput;
BOOL SetDirectInput( CDirectInput *pDirectInput, int nBit );
protected:
typedef CLgArray<CDirectInput*> CDirectInputArray;
typedef struct INPUT_INFO
{
BOOL bOn;
BOOL bNC;
BOOL bFirstTime;
CDirectInputArray arrDirectInput;
}INPUT_INFO;
CLgArray<INPUT_INFO> m_arrInput;
};
#endif