⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opc_ae.idl

📁 OPC客户程序所需要的头文件。 OPC基金会产品。 适用于opc1.0和opc2.0规范。
💻 IDL
📖 第 1 页 / 共 2 页
字号:
//==============================================================================
// TITLE: opc_ae.idl
//
// CONTENTS:
// 
// Interface declarations for the OPC Alarms & Event specifications.
//
// (c) Copyright 1997-2003 The OPC Foundation
// ALL RIGHTS RESERVED.
//
// DISCLAIMER:
//  This code is provided by the OPC Foundation solely to assist in 
//  understanding and use of the appropriate OPC Specification(s) and may be 
//  used as set forth in the License Grant section of the OPC Specification.
//  This code is provided as-is and without warranty or support of any sort
//  and is subject to the Warranty and Liability Disclaimers which appear
//  in the printed OPC Specification.
//
// MODIFICATION LOG:
//
// Date       By    Notes
// ---------- ---   -----
// 2002/10/02 JL    Updated for Version 1.1.
// 2003/01/06 RSA   Fixed formatting to comply with coding guidelines.
// 2004/09/01 RSA   Renamed modules in TYPELIB section to avoid name conflicts.
//

import "oaidl.idl";
import "ocidl.idl";

//==============================================================================
// Category ID declaration (defined as an interface to ensure they show up in the typelib).

[uuid(58E13251-AC87-11d1-84D5-00608CB8A7E9)] interface OPCEventServerCATID : IUnknown {}

cpp_quote("#define CATID_OPCAEServer10 IID_OPCEventServerCATID")

//==============================================================================
// Structures, Typedefs and Enumerations.

typedef DWORD OPCHANDLE;

typedef enum 
{ 
	OPCAE_BROWSE_UP = 1,
	OPCAE_BROWSE_DOWN, 
	OPCAE_BROWSE_TO
} 
OPCAEBROWSEDIRECTION;

typedef enum 
{ 
	OPC_AREA = 1,
	OPC_SOURCE
} 
OPCAEBROWSETYPE;

typedef enum 
{ 
	OPCAE_STATUS_RUNNING = 1,
	OPCAE_STATUS_FAILED,
	OPCAE_STATUS_NOCONFIG,
	OPCAE_STATUS_SUSPENDED,
	OPCAE_STATUS_TEST,
	OPCAE_STATUS_COMM_FAULT
} 
OPCEVENTSERVERSTATE;

typedef  struct 
{
				                WORD			wChangeMask;
				                WORD			wNewState;
	[string]	                LPWSTR 			szSource;
				                FILETIME		ftTime;
	[string]	                LPWSTR			szMessage;
				                DWORD			dwEventType;
				                DWORD			dwEventCategory;
				                DWORD			dwSeverity; 
	[string]	                LPWSTR			szConditionName;
	[string]	                LPWSTR			szSubconditionName;
				                WORD			wQuality;
				                WORD			wReserved;		
				                BOOL 			bAckRequired;
				                FILETIME		ftActiveTime;
				                DWORD			dwCookie;
				                DWORD			dwNumEventAttrs;
	[size_is(dwNumEventAttrs)]	VARIANT*		pEventAttributes;
	[string]	                LPWSTR			szActorID;
} 
ONEVENTSTRUCT;

typedef struct 
{
	         FILETIME 			 ftStartTime;
	         FILETIME 			 ftCurrentTime;
	         FILETIME 			 ftLastUpdateTime;
	         OPCEVENTSERVERSTATE dwServerState;
	         WORD				 wMajorVersion;
	         WORD				 wMinorVersion;
	         WORD				 wBuildNumber;
	         WORD				 wReserved;		
	[string] LPWSTR              szVendorInfo;
} 
OPCEVENTSERVERSTATUS;

typedef struct 
{
	                            WORD	 wState;
	                            WORD	 wReserved1;		
	                            LPWSTR 	 szActiveSubCondition;
	                            LPWSTR	 szASCDefinition;
	                            DWORD	 dwASCSeverity;
	                            LPWSTR	 szASCDescription;
	                            WORD	 wQuality;
	                            WORD	 wReserved2;		
	                            FILETIME ftLastAckTime;
	                            FILETIME ftSubCondLastActive;
	                            FILETIME ftCondLastActive;
	                            FILETIME ftCondLastInactive;
	                            LPWSTR	 szAcknowledgerID;
	                            LPWSTR   szComment;
	                            DWORD    dwNumSCs;
	[size_is (dwNumSCs)]        LPWSTR * pszSCNames;
	[size_is (dwNumSCs)]        LPWSTR * pszSCDefinitions;
	[size_is (dwNumSCs)]        DWORD  * pdwSCSeverities;
	[size_is (dwNumSCs)]        LPWSTR * pszSCDescriptions;
	                            DWORD	 dwNumEventAttrs;
	[size_is(dwNumEventAttrs)]	VARIANT* pEventAttributes;
	[size_is(dwNumEventAttrs)]	HRESULT* pErrors;
} 
OPCCONDITIONSTATE;

//==============================================================================
// IOPCEventServer

[
	uuid(65168851-5783-11D1-84A0-00608CB8A7E9),
	pointer_default(unique)
]
interface IOPCEventServer : IUnknown
{
	HRESULT GetStatus(
		[out] OPCEVENTSERVERSTATUS **ppEventServerStatus
	);

	HRESULT CreateEventSubscription(
		[in]                BOOL       bActive,
		[in]                DWORD      dwBufferTime, 
		[in]                DWORD      dwMaxSize,
		[in]                OPCHANDLE  hClientSubscription,
		[in]                REFIID     riid,
		[out, iid_is(riid)] LPUNKNOWN* ppUnk,
		[out]               DWORD*     pdwRevisedBufferTime,
		[out]               DWORD*     pdwRevisedMaxSize
	);

	HRESULT QueryAvailableFilters(
		[out] DWORD* pdwFilterMask
	);

	HRESULT QueryEventCategories(
		[in]                       DWORD    dwEventType,	
		[out]                      DWORD*   pdwCount, 
		[out, size_is(,*pdwCount)] DWORD**  ppdwEventCategories,
		[out, size_is(,*pdwCount)] LPWSTR** ppszEventCategoryDescs
	);

	HRESULT QueryConditionNames(
		[in]                       DWORD    dwEventCategory, 
		[out]                      DWORD*   pdwCount, 
		[out, size_is(,*pdwCount)] LPWSTR** ppszConditionNames
	);

	HRESULT QuerySubConditionNames(
		[in]                       LPWSTR   szConditionName, 
		[out]                      DWORD*   pdwCount, 
		[out, size_is(,*pdwCount)] LPWSTR** ppszSubConditionNames
	);

	HRESULT QuerySourceConditions(
		[in]                       LPWSTR   szSource, 
		[out]                      DWORD*   pdwCount, 
		[out, size_is(,*pdwCount)] LPWSTR** ppszConditionNames
	);

	HRESULT QueryEventAttributes(
		[in]                       DWORD     dwEventCategory, 
		[out]                      DWORD*    pdwCount, 
		[out, size_is(,*pdwCount)] DWORD**   ppdwAttrIDs,
		[out, size_is(,*pdwCount)] LPWSTR**  ppszAttrDescs,
		[out, size_is(,*pdwCount)] VARTYPE** ppvtAttrTypes
	);

	HRESULT TranslateToItemIDs(
		[in]                     LPWSTR   szSource,
		[in]                     DWORD    dwEventCategory,
		[in]                     LPWSTR   szConditionName,
		[in]                     LPWSTR   szSubconditionName,
		[in]                     DWORD    dwCount, 
		[in, size_is(dwCount)]   DWORD*   pdwAssocAttrIDs, 
		[out, size_is(,dwCount)] LPWSTR** ppszAttrItemIDs,
		[out, size_is(,dwCount)] LPWSTR** ppszNodeNames,
		[out, size_is(,dwCount)] CLSID**  ppCLSIDs
	);

	HRESULT GetConditionState (
		[in]                           LPWSTR              szSource,
		[in]                           LPWSTR              szConditionName,
		[in]                           DWORD               dwNumEventAttrs,
		[in, size_is(dwNumEventAttrs)] DWORD*              pdwAttributeIDs,
		[out]                          OPCCONDITIONSTATE** ppConditionState
	);

	HRESULT EnableConditionByArea(
		[in]                      DWORD   dwNumAreas, 
		[in, size_is(dwNumAreas)] LPWSTR* pszAreas
	);


	HRESULT EnableConditionBySource(
		[in]                        DWORD   dwNumSources, 
		[in, size_is(dwNumSources)] LPWSTR* pszSources
	);

	HRESULT DisableConditionByArea(
		[in]                      DWORD   dwNumAreas, 
		[in, size_is(dwNumAreas)] LPWSTR* pszAreas
	);

	HRESULT DisableConditionBySource(
		[in]                        DWORD   dwNumSources, 
		[in, size_is(dwNumSources)] LPWSTR* pszSources
	);

	HRESULT AckCondition(
		[in]                     DWORD     dwCount,
		[in, string]             LPWSTR    szAcknowledgerID,
		[in, string]             LPWSTR    szComment,
		[in, size_is(dwCount)]   LPWSTR*   pszSource,
		[in, size_is(dwCount)]   LPWSTR*   pszConditionName,
		[in, size_is(dwCount)]   FILETIME* pftActiveTime,
		[in, size_is(dwCount)]   DWORD*    pdwCookie,
		[out, size_is(,dwCount)] HRESULT** ppErrors 
	);

	HRESULT CreateAreaBrowser(
		[in]                REFIID     riid,
		[out, iid_is(riid)] LPUNKNOWN* ppUnk
	);
};

//==============================================================================
// IOPCEventSubscriptionMgt

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -