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: DeviceDO.h
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Header file of DeviceDO.h
//----------------------------------------------------------------------------
// DeviceOUT.h: interface for the CDeviceOUT class.
//
//////////////////////////////////////////////////////////////////////
#ifndef __DEVICE__OUT__H__INCLUDED__
#define __DEVICE__OUT__H__INCLUDED__
#include "..\..\LgLib\Templ.h"
#include "DirectOutput.h"
// Device direct output
class CDeviceDO {public: CDeviceDO(); virtual ~CDeviceDO();
protected: enum{ DDOC_GET_STATE = 0, DDOC_SET_SWITCH = 1, DDOC_COUNT = 2 }; struct DDOEVENT { BYTE id; BOOL bOn; int nBit; }; CLgQueueP<DDOEVENT,100> m_Queue;
protected: friend class CDirectOutput; BOOL SetDirectOutput( CDirectOutput *pDirectOutput, int nBit );
public: void SetCount( int nCount ); int GetCount() { return m_arrOutput.GetCount(); } BOOL GetBit( int nBit ); void SetBit( int nBit, BOOL bOn );
friend class CSocketRS232DI;
protected: void PostSetSwitch( BOOL bOn, int nBit ); void PostGetState();
protected: typedef CLgArray<CDirectOutput*> CDirectOutputArray;
typedef struct OUTPUT_INFO { BOOL bOn; BOOL bFirstTime; CDirectOutputArray arrDirectOutput; }OUTPUT_INFO;
CLgArray<OUTPUT_INFO> m_arrOutput;};
#endif
|