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.
70 lines
2.1 KiB
70 lines
2.1 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 01/01/2000
|
|
// Last modification: 08/10/2003
|
|
// PROJECT:
|
|
// SUBSYSTEM:
|
|
// FILE: LgNetMessageGPIO.h
|
|
// AUTHOR: Sergey Chizhevskiy
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of LgNetMessageGPIO.h
|
|
//----------------------------------------------------------------------------
|
|
#ifndef __LG__NET__MESSAGE__GPIO__H__INCLUDED__
|
|
#define __LG__NET__MESSAGE__GPIO__H__INCLUDED__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "LgNetMessage.h"
|
|
#include "..\Device\LgDeviceGPIO.h"
|
|
|
|
class CLgNetMessageGPIO :
|
|
public CLgNetMessage
|
|
{
|
|
public:
|
|
// commands
|
|
BOOL BuildCmdGetOutput( INT nOutput );
|
|
BOOL BuildCmdGetOutputAll();
|
|
BOOL BuildCmdSetOutput( INT nOutput, BOOL bOn );
|
|
BOOL BuildCmdGetInput( INT nInput );
|
|
BOOL BuildCmdGetInputAll();
|
|
|
|
// events
|
|
BOOL BuildEvtSetOutput( INT nOutput, BOOL bOn );
|
|
BOOL BuildEvtGetOutput( INT nOutput, BOOL bOn );
|
|
BOOL BuildEvtGetOutputAll( CLgDeviceGPIO::PGPIO_PINS pPins );
|
|
BOOL BuildEvtGetInput( INT nInput, BOOL bOn );
|
|
BOOL BuildEvtGetInputAll( CLgDeviceGPIO::PGPIO_PINS pPins );
|
|
|
|
BOOL BuildEvtInputChange( INT nInput, BOOL bOn );
|
|
|
|
public:
|
|
BOOL GetInput( CLgDeviceGPIO::PGPIO_PIN pInput ) { return CLgNetMessage::GetData( pInput, sizeof(CLgDeviceGPIO::GPIO_PIN) ); }
|
|
BOOL GetOutput( CLgDeviceGPIO::PGPIO_PIN pOutput ) { return GetInput( pOutput ); }
|
|
CLgDeviceGPIO::PGPIO_PINS GetInputPins();
|
|
CLgDeviceGPIO::PGPIO_PINS GetOutputPins() { return GetInputPins(); }
|
|
|
|
/*
|
|
public:
|
|
enum
|
|
{
|
|
CMD_SET_OUTPUT = CMD_DEVICE + 0x01,
|
|
CMD_GET_OUTPUT = CMD_DEVICE + 0x02,
|
|
CMD_GET_OUTPUT_ALL = CMD_DEVICE + 0x03,
|
|
CMD_GET_INPUT = CMD_DEVICE + 0x04,
|
|
CMD_GET_INPUT_ALL = CMD_DEVICE + 0x05,
|
|
|
|
EVT_SET_OUTPUT = EVT_DEVICE + 0x01,
|
|
EVT_GET_OUTPUT = EVT_DEVICE + 0x02,
|
|
EVT_GET_OUTPUT_ALL = EVT_DEVICE + 0x03,
|
|
EVT_GET_INPUT = EVT_DEVICE + 0x04,
|
|
EVT_GET_INPUT_ALL = EVT_DEVICE + 0x05,
|
|
EVT_INPUT_CHANGE = EVT_DEVICE + 0x06,
|
|
};
|
|
*/
|
|
};
|
|
|
|
#endif
|