📄 opc_ae.idl
字号:
[
uuid(65168855-5783-11D1-84A0-00608CB8A7E9),
pointer_default(unique)
]
interface IOPCEventSubscriptionMgt : IUnknown
{
HRESULT SetFilter(
[in] DWORD dwEventType,
[in] DWORD dwNumCategories,
[in, size_is(dwNumCategories)] DWORD* pdwEventCategories,
[in] DWORD dwLowSeverity,
[in] DWORD dwHighSeverity,
[in] DWORD dwNumAreas,
[in, size_is(dwNumAreas)] LPWSTR* pszAreaList,
[in] DWORD dwNumSources,
[in, size_is(dwNumSources)] LPWSTR* pszSourceList
);
HRESULT GetFilter(
[out] DWORD* pdwEventType,
[out] DWORD* pdwNumCategories,
[out, size_is(,*pdwNumCategories)] DWORD** ppdwEventCategories,
[out] DWORD* pdwLowSeverity,
[out] DWORD* pdwHighSeverity,
[out] DWORD* pdwNumAreas,
[out, size_is(,*pdwNumAreas)] LPWSTR** ppszAreaList,
[out] DWORD* pdwNumSources,
[out, size_is(,*pdwNumSources)] LPWSTR** ppszSourceList
);
HRESULT SelectReturnedAttributes(
[in] DWORD dwEventCategory,
[in] DWORD dwCount,
[in, size_is(dwCount)] DWORD* dwAttributeIDs
);
HRESULT GetReturnedAttributes(
[in] DWORD dwEventCategory,
[out] DWORD* pdwCount,
[out, size_is(,*pdwCount)] DWORD** ppdwAttributeIDs
);
HRESULT Refresh(
[in] DWORD dwConnection
);
HRESULT CancelRefresh(
[in] DWORD dwConnection
);
HRESULT GetState(
[out] BOOL* pbActive,
[out] DWORD* pdwBufferTime,
[out] DWORD* pdwMaxSize,
[out] OPCHANDLE* phClientSubscription
);
HRESULT SetState(
[unique, in] BOOL* pbActive,
[unique, in] DWORD* pdwBufferTime,
[unique, in] DWORD* pdwMaxSize,
[in] OPCHANDLE hClientSubscription,
[out] DWORD* pdwRevisedBufferTime,
[out] DWORD* pdwRevisedMaxSize
);
};
//==============================================================================
// IOPCEventAreaBrowser
[
uuid(65168857-5783-11D1-84A0-00608CB8A7E9),
pointer_default(unique)
]
interface IOPCEventAreaBrowser : IUnknown
{
HRESULT ChangeBrowsePosition(
[in] OPCAEBROWSEDIRECTION dwBrowseDirection,
[in, string] LPCWSTR szString
);
HRESULT BrowseOPCAreas(
[in] OPCAEBROWSETYPE dwBrowseFilterType,
[in, string] LPCWSTR szFilterCriteria,
[out] LPENUMSTRING* ppIEnumString
);
HRESULT GetQualifiedAreaName(
[in] LPCWSTR szAreaName,
[out, string] LPWSTR* pszQualifiedAreaName
);
HRESULT GetQualifiedSourceName(
[in] LPCWSTR szSourceName,
[out, string] LPWSTR* pszQualifiedSourceName
);
};
//==============================================================================
// IOPCEventSink
[
uuid(6516885F-5783-11D1-84A0-00608CB8A7E9),
pointer_default(unique)
]
interface IOPCEventSink : IUnknown
{
HRESULT OnEvent(
[in] OPCHANDLE hClientSubscription,
[in] BOOL bRefresh,
[in] BOOL bLastRefresh,
[in] DWORD dwCount,
[in, size_is(dwCount)] ONEVENTSTRUCT* pEvents
);
};
//==============================================================================
// IOPCEventServer2
[
uuid(71BBE88E-9564-4bcd-BCFC-71C558D94F2D),
pointer_default(unique)
]
interface IOPCEventServer2 : IOPCEventServer
{
HRESULT EnableConditionByArea2(
[in] DWORD dwNumAreas,
[in, string, size_is(dwNumAreas)] LPWSTR* pszAreas,
[out, size_is(,dwNumAreas)] HRESULT** ppErrors
);
HRESULT EnableConditionBySource2(
[in] DWORD dwNumSources,
[in, string, size_is(dwNumSources)] LPWSTR* pszSources,
[out, size_is(,dwNumSources)] HRESULT** ppErrors
);
HRESULT DisableConditionByArea2(
[in] DWORD dwNumAreas,
[in, string, size_is(dwNumAreas)] LPWSTR* pszAreas,
[out, size_is(,dwNumAreas)] HRESULT** ppErrors
);
HRESULT DisableConditionBySource2(
[in] DWORD dwNumSources,
[in, string, size_is(dwNumSources)] LPWSTR* pszSources,
[out, size_is(,dwNumSources)] HRESULT** ppErrors
);
HRESULT GetEnableStateByArea(
[in] DWORD dwNumAreas,
[in, string, size_is(dwNumAreas)] LPWSTR* pszAreas,
[out, size_is(,dwNumAreas)] BOOL** pbEnabled,
[out, size_is(,dwNumAreas)] BOOL** pbEffectivelyEnabled,
[out, size_is(,dwNumAreas)] HRESULT** ppErrors
);
HRESULT GetEnableStateBySource(
[in] DWORD dwNumSources,
[in, string, size_is(dwNumSources)] LPWSTR* pszSources,
[out, size_is(,dwNumSources)] BOOL** pbEnabled,
[out, size_is(,dwNumSources)] BOOL** pbEffectivelyEnabled,
[out, size_is(,dwNumSources)] HRESULT** ppErrors
);
};
//==============================================================================
// IOPCEventSubscriptionMgt2
[
uuid(94C955DC-3684-4ccb-AFAB-F898CE19AAC3),
pointer_default(unique)
]
interface IOPCEventSubscriptionMgt2 : IOPCEventSubscriptionMgt
{
HRESULT SetKeepAlive(
[in] DWORD dwKeepAliveTime,
[out] DWORD* pdwRevisedKeepAliveTime
);
HRESULT GetKeepAlive(
[out] DWORD* pdwKeepAliveTime
);
};
//==============================================================================
// Type Library
[
uuid(65168844-5783-11D1-84A0-00608CB8A7E9),
version(1.10),
helpstring("OPC Alarms & Events 1.10 Type Library")
]
library OPC_AE
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
//==========================================================================
// Category IDs
interface OPCEventServerCATID;
//==========================================================================
// Constants
module OPCAE_Constants
{
// category description string.
const LPCWSTR OPC_CATEGORY_DESCRIPTION_AE10 = L"OPC Alarm & Event Server Version 1.0";
// state bit masks.
const DWORD OPC_CONDITION_ENABLED = 0x0001;
const DWORD OPC_CONDITION_ACTIVE = 0x0002;
const DWORD OPC_CONDITION_ACKED = 0x0004;
// bit masks for change mask.
const DWORD OPC_CHANGE_ACTIVE_STATE = 0x0001;
const DWORD OPC_CHANGE_ACK_STATE = 0x0002;
const DWORD OPC_CHANGE_ENABLE_STATE = 0x0004;
const DWORD OPC_CHANGE_QUALITY = 0x0008;
const DWORD OPC_CHANGE_SEVERITY = 0x0010;
const DWORD OPC_CHANGE_SUBCONDITION = 0x0020;
const DWORD OPC_CHANGE_MESSAGE = 0x0040;
const DWORD OPC_CHANGE_ATTRIBUTE = 0x0080;
// event type.
const DWORD OPC_SIMPLE_EVENT = 0x0001;
const DWORD OPC_TRACKING_EVENT = 0x0002;
const DWORD OPC_CONDITION_EVENT = 0x0004;
const DWORD OPC_ALL_EVENTS = 0x0007;
// bit masks for QueryAvailableFilters().
const DWORD OPC_FILTER_BY_EVENT = 0x0001;
const DWORD OPC_FILTER_BY_CATEGORY = 0x0002;
const DWORD OPC_FILTER_BY_SEVERITY = 0x0004;
const DWORD OPC_FILTER_BY_AREA = 0x0008;
const DWORD OPC_FILTER_BY_SOURCE = 0x0010;
}
//==========================================================================
// Synchronous Interfaces
interface IOPCEventServer;
interface IOPCEventSubscriptionMgt;
interface IOPCEventAreaBrowser;
interface IOPCEventSink;
interface OPCEventServerCATID;
interface IOPCEventServer2;
interface IOPCEventSubscriptionMgt2;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -