📄 opchda.idl
字号:
[in, size_is(dwNumItems)] OPCHANDLE* phServer,
[in, size_is(dwNumItems)] FILETIME* ftTimeStamps,
[out] DWORD* pdwCancelID,
[out, size_is(,dwNumItems)] HRESULT** ppErrors
);
HRESULT Cancel(
[in] DWORD dwCancelID
);
}
//==============================================================================
// IOPCHDA_AsyncAnnotations
[
object,
uuid(1F1217B7-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_AsyncAnnotations: IUnknown
{
HRESULT QueryCapabilities(
[out] OPCHDA_ANNOTATIONCAPABILITIES* pCapabilities
);
HRESULT Read(
[in] DWORD dwTransactionID,
[in, out] OPCHDA_TIME* htStartTime,
[in, out] OPCHDA_TIME* htEndTime,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHANDLE* phServer,
[out] DWORD* pdwCancelID,
[out, size_is(,dwNumItems)] HRESULT** ppErrors
);
HRESULT Insert(
[in] DWORD dwTransactionID,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHANDLE* phServer,
[in, size_is(dwNumItems)] FILETIME* ftTimeStamps,
[in, size_is(dwNumItems)] OPCHDA_ANNOTATION* pAnnotationValues,
[out] DWORD* pdwCancelID,
[out, size_is(,dwNumItems)] HRESULT** ppErrors
);
HRESULT Cancel(
[in] DWORD dwCancelID
);
}
//==============================================================================
// IOPCHDA_Playback
[
object,
uuid(1F1217B8-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_Playback : IUnknown
{
HRESULT ReadRawWithUpdate(
[in] DWORD dwTransactionID,
[in, out] OPCHDA_TIME* htStartTime,
[in, out] OPCHDA_TIME* htEndTime,
[in] DWORD dwNumValues,
[in] FILETIME ftUpdateDuration,
[in] FILETIME ftUpdateInterval,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHANDLE* phServer,
[out] DWORD* pdwCancelID,
[out, size_is(,dwNumItems)] HRESULT** ppErrors
);
HRESULT ReadProcessedWithUpdate(
[in] DWORD dwTransactionID,
[in, out] OPCHDA_TIME* htStartTime,
[in, out] OPCHDA_TIME* htEndTime,
[in] FILETIME ftResampleInterval,
[in] DWORD dwNumIntervals,
[in] FILETIME ftUpdateInterval,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHANDLE* phServer,
[in, size_is(dwNumItems)] DWORD* haAggregate,
[out] DWORD* pdwCancelID,
[out, size_is(,dwNumItems)] HRESULT** ppErrors
);
HRESULT Cancel(
[in] DWORD dwCancelID
);
}
//==============================================================================
// IOPCHDA_DataCallback
[
object,
uuid(1F1217B9-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_DataCallback : IUnknown
{
HRESULT OnDataChange(
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_ITEM* pItemValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnReadComplete(
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_ITEM* pItemValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnReadModifiedComplete(
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_MODIFIEDITEM* pItemValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnReadAttributeComplete(
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] OPCHANDLE hClient,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_ATTRIBUTE* pAttributeValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnReadAnnotations(
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_ANNOTATION* pAnnotationValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnInsertAnnotations (
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE* phClients,
[in, size_is(dwCount)] HRESULT* phrErrors
);
HRESULT OnPlayback (
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwNumItems,
[in, size_is(dwNumItems)] OPCHDA_ITEM** ppItemValues,
[in, size_is(dwNumItems)] HRESULT* phrErrors
);
HRESULT OnUpdateComplete (
[in] DWORD dwTransactionID,
[in] HRESULT hrStatus,
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE* phClients,
[in, size_is(dwCount)] HRESULT* phrErrors
);
HRESULT OnCancelComplete(
[in] DWORD dwCancelID
);
}
//==============================================================================
// Type Library
[
uuid(1F1217BA-DEE0-11d2-A5E5-000086339399),
version(1.10),
helpstring("OPC Historial Data Access 1.10 Type Library")
]
library OPCHDA
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
//==========================================================================
// Category IDs
interface CATID_OPCHDAServer10;
//==========================================================================
// Constants
module OPCHDA_Constants
{
// category description.
const LPCWSTR OPC_CATEGORY_DESCRIPTION_HDA10 = L"OPC History Data Access Servers Version 1.0";
// attribute ids.
const DWORD OPCHDA_DATA_TYPE = 0x01;
const DWORD OPCHDA_DESCRIPTION = 0x02;
const DWORD OPCHDA_ENG_UNITS = 0x03;
const DWORD OPCHDA_STEPPED = 0x04;
const DWORD OPCHDA_ARCHIVING = 0x05;
const DWORD OPCHDA_DERIVE_EQUATION = 0x06;
const DWORD OPCHDA_NODE_NAME = 0x07;
const DWORD OPCHDA_PROCESS_NAME = 0x08;
const DWORD OPCHDA_SOURCE_NAME = 0x09;
const DWORD OPCHDA_SOURCE_TYPE = 0x0a;
const DWORD OPCHDA_NORMAL_MAXIMUM = 0x0b;
const DWORD OPCHDA_NORMAL_MINIMUM = 0x0c;
const DWORD OPCHDA_ITEMID = 0x0d;
const DWORD OPCHDA_MAX_TIME_INT = 0x0e;
const DWORD OPCHDA_MIN_TIME_INT = 0x0f;
const DWORD OPCHDA_EXCEPTION_DEV = 0x10;
const DWORD OPCHDA_EXCEPTION_DEV_TYPE = 0x11;
const DWORD OPCHDA_HIGH_ENTRY_LIMIT = 0x12;
const DWORD OPCHDA_LOW_ENTRY_LIMIT = 0x13;
// attribute names.
const LPCWSTR OPCHDA_ATTRNAME_DATA_TYPE = L"Data Type";
const LPCWSTR OPCHDA_ATTRNAME_DESCRIPTION = L"Description";
const LPCWSTR OPCHDA_ATTRNAME_ENG_UNITS = L"Eng Units";
const LPCWSTR OPCHDA_ATTRNAME_STEPPED = L"Stepped";
const LPCWSTR OPCHDA_ATTRNAME_ARCHIVING = L"Archiving";
const LPCWSTR OPCHDA_ATTRNAME_DERIVE_EQUATION = L"Derive Equation";
const LPCWSTR OPCHDA_ATTRNAME_NODE_NAME = L"Node Name";
const LPCWSTR OPCHDA_ATTRNAME_PROCESS_NAME = L"Process Name";
const LPCWSTR OPCHDA_ATTRNAME_SOURCE_NAME = L"Source Name";
const LPCWSTR OPCHDA_ATTRNAME_SOURCE_TYPE = L"Source Type";
const LPCWSTR OPCHDA_ATTRNAME_NORMAL_MAXIMUM = L"Normal Maximum";
const LPCWSTR OPCHDA_ATTRNAME_NORMAL_MINIMUM = L"Normal Minimum";
const LPCWSTR OPCHDA_ATTRNAME_ITEMID = L"ItemID";
const LPCWSTR OPCHDA_ATTRNAME_MAX_TIME_INT = L"Max Time Interval";
const LPCWSTR OPCHDA_ATTRNAME_MIN_TIME_INT = L"Min Time Interval";
const LPCWSTR OPCHDA_ATTRNAME_EXCEPTION_DEV = L"Exception Deviation";
const LPCWSTR OPCHDA_ATTRNAME_EXCEPTION_DEV_TYPE = L"Exception Dev Type";
const LPCWSTR OPCHDA_ATTRNAME_HIGH_ENTRY_LIMIT = L"High Entry Limit";
const LPCWSTR OPCHDA_ATTRNAME_LOW_ENTRY_LIMIT = L"Low Entry Limit";
// aggregate names.
const LPCWSTR OPCHDA_AGGRNAME_INTERPOLATIVE = L"Interpolative";
const LPCWSTR OPCHDA_AGGRNAME_TOTAL = L"Total";
const LPCWSTR OPCHDA_AGGRNAME_AVERAGE = L"Average";
const LPCWSTR OPCHDA_AGGRNAME_TIMEAVERAGE = L"Time Average";
const LPCWSTR OPCHDA_AGGRNAME_COUNT = L"Count";
const LPCWSTR OPCHDA_AGGRNAME_STDEV = L"Standard Deviation";
const LPCWSTR OPCHDA_AGGRNAME_MINIMUMACTUALTIME = L"Minimum Actual Time";
const LPCWSTR OPCHDA_AGGRNAME_MINIMUM = L"Minimum";
const LPCWSTR OPCHDA_AGGRNAME_MAXIMUMACTUALTIME = L"Maximum Actual Time";
const LPCWSTR OPCHDA_AGGRNAME_MAXIMUM = L"Maximum";
const LPCWSTR OPCHDA_AGGRNAME_START = L"Start";
const LPCWSTR OPCHDA_AGGRNAME_END = L"End";
const LPCWSTR OPCHDA_AGGRNAME_DELTA = L"Delta";
const LPCWSTR OPCHDA_AGGRNAME_REGSLOPE = L"Regression Line Slope";
const LPCWSTR OPCHDA_AGGRNAME_REGCONST = L"Regression Line Constant";
const LPCWSTR OPCHDA_AGGRNAME_REGDEV = L"Regression Line Error";
const LPCWSTR OPCHDA_AGGRNAME_VARIANCE = L"Variance";
const LPCWSTR OPCHDA_AGGRNAME_RANGE = L"Range";
const LPCWSTR OPCHDA_AGGRNAME_DURATIONGOOD = L"Duration Good";
const LPCWSTR OPCHDA_AGGRNAME_DURATIONBAD = L"Duration Bad";
const LPCWSTR OPCHDA_AGGRNAME_PERCENTGOOD = L"Percent Good";
const LPCWSTR OPCHDA_AGGRNAME_PERCENTBAD = L"Percent Bad";
const LPCWSTR OPCHDA_AGGRNAME_WORSTQUALITY = L"Worst Quality";
const LPCWSTR OPCHDA_AGGRNAME_ANNOTATIONS = L"Annotations";
// OPCHDA_QUALITY -- these are the high-order 16 bits, OPC DA Quality occupies low-order 16 bits.
const DWORD OPCHDA_EXTRADATA = 0x00010000;
const DWORD OPCHDA_INTERPOLATED = 0x00020000;
const DWORD OPCHDA_RAW = 0x00040000;
const DWORD OPCHDA_CALCULATED = 0x00080000;
const DWORD OPCHDA_NOBOUND = 0x00100000;
const DWORD OPCHDA_NODATA = 0x00200000;
const DWORD OPCHDA_DATALOST = 0x00400000;
const DWORD OPCHDA_CONVERSION = 0x00800000;
const DWORD OPCHDA_PARTIAL = 0x01000000;
}
//==========================================================================
// Synchronous Interfaces
interface IOPCHDA_Server;
interface IOPCHDA_Browser;
interface IOPCHDA_SyncRead;
interface IOPCHDA_SyncUpdate;
interface IOPCHDA_SyncAnnotations;
interface IOPCHDA_AsyncRead;
interface IOPCHDA_AsyncUpdate;
interface IOPCHDA_AsyncAnnotations;
interface IOPCHDA_Playback;
interface IOPCHDA_DataCallback;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -