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.
61 lines
1.6 KiB
61 lines
1.6 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgNetDeviceGPIOCOM.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgNetDeviceGPIOCOM.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__NET__DEVICE__GPIO__COM__H__INCLUDED__
|
|
#define __LG__NET__DEVICE__GPIO__COM__H__INCLUDED__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "LgNetDevice.h"
|
|
#include "LgNetMessageGPIO.h"
|
|
#include "..\Thread.h"
|
|
#include "..\Device\LgDeviceGPIOCOM.h"
|
|
|
|
class CLgNetDeviceGPIOCOM :
|
|
public CLgNetDevice,
|
|
public CLgDeviceGPIOCOM,
|
|
private CLgThread
|
|
{
|
|
public:
|
|
CLgNetDeviceGPIOCOM();
|
|
virtual ~CLgNetDeviceGPIOCOM();
|
|
|
|
public:
|
|
BOOL Create( LPCTSTR pPort, BOOL bSelfTest, INT nSelfTestTimeout );
|
|
void Destroy();
|
|
|
|
protected:
|
|
// events
|
|
virtual void OnEvtGetOutput( INT nOutput, BOOL bOn );
|
|
virtual void OnEvtSetOutput( INT nOutput, BOOL bOn );
|
|
virtual void OnEvtGetOutputAll( PGPIO_PINS pPins );
|
|
|
|
virtual void OnEvtGetInput( INT nInput, BOOL bOn );
|
|
virtual void OnEvtGetInputAll( PGPIO_PINS pPins );
|
|
|
|
virtual void OnEvtInputChange( INT nInput, BOOL bOn );
|
|
|
|
virtual void OnEvtCommandError( INT nCommand, LPCTSTR pFormat, ... );
|
|
|
|
protected:
|
|
// inherit from thread
|
|
virtual DWORD ThreadProc();
|
|
|
|
protected:
|
|
CLgNetMessageGPIO m_InMsg;
|
|
CLgNetMessageGPIO m_OutMsg;
|
|
};
|
|
|
|
#endif
|