You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.3 KiB
C++
66 lines
2.3 KiB
C++
// InputControllerBase.h: interface for the CInputControllerBase class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_INPUTCONTROLLERBASE_H__4788ABC5_CF6C_4489_BFBE_9BEA820B592E__INCLUDED_)
|
|
#define AFX_INPUTCONTROLLERBASE_H__4788ABC5_CF6C_4489_BFBE_9BEA820B592E__INCLUDED_
|
|
|
|
#include "hardwareini.h"
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
class CInputSetting;
|
|
|
|
class CInputControllerBase : public CCard
|
|
{
|
|
public:
|
|
CInputControllerBase(CString csMutexName);
|
|
virtual ~CInputControllerBase();
|
|
|
|
// virtual method to initialise the input controller card
|
|
virtual BOOL Init(int nCardType, CArray<stCard, stCard> &astCard);
|
|
|
|
// virtual method to close the input controller card
|
|
virtual void Close(int nCardType);
|
|
|
|
// virtual method to query if the input is OFF
|
|
virtual BOOL IsOff(const CInputSetting &InputSetting);
|
|
|
|
// virtual method to query if the input is ON
|
|
virtual BOOL IsOn(const CInputSetting &InputSetting);
|
|
|
|
// virtual method to query for current analog voltage of analog output
|
|
virtual BOOL GetVoltage(const CInputSetting &InputSetting, double &dVoltage, int nRange);
|
|
|
|
/***********************************************************************/
|
|
/*********************currently for 9222 ONLY***************************/
|
|
|
|
// virtual method to setup general counter
|
|
virtual BOOL SetupCounter(const CInputSetting &InputSetting, int nMode);
|
|
|
|
// Gary 5Mar12, V1.29.05,
|
|
// new virtual method to cater for auto reset counter using Org Signal
|
|
virtual BOOL SetupCounter(const CInputSetting &InputSetting, int nMode, unsigned int LReg1_Val, unsigned int LReg2_Val);
|
|
|
|
// virtual method to clear counter
|
|
virtual BOOL ClearCounter(const CInputSetting &InputSetting);
|
|
|
|
// virtual method to enable counter counting
|
|
virtual BOOL EnableCounter(const CInputSetting &InputSetting);
|
|
|
|
// virtual method to disable counter counting
|
|
virtual BOOL DisableCounter(const CInputSetting &InputSetting);
|
|
|
|
// virtual method read the counter
|
|
virtual unsigned long ReadCounter(const CInputSetting &InputSetting);
|
|
|
|
protected:
|
|
CMutex m_mutexInput;
|
|
|
|
CHardwareIni m_iniHardware;
|
|
};
|
|
|
|
#endif // !defined(AFX_INPUTCONTROLLERBASE_H__4788ABC5_CF6C_4489_BFBE_9BEA820B592E__INCLUDED_)
|