📄 opchda.idl
字号:
//==============================================================================
// TITLE: opchda.idl
//
// CONTENTS:
//
// Interface declarations for the OPC Historial Data Access specifications.
//
// (c) Copyright 1999-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
// ---------- --- -----
// 2001/01/26 OPC Made revisions for version 1.1
// 2003/01/06 RSA Fixed formatting to comply with coding guidelines.
//
import "oaidl.idl";
//==============================================================================
// Category ID declarations (defined as interfaces to ensure they show up in the typelib).
[uuid(7DE5B060-E089-11d2-A5E6-000086339399)] interface CATID_OPCHDAServer10 : IUnknown {}
cpp_quote("#define CATID_OPCHDAServer10 IID_CATID_OPCHDAServer10")
//==============================================================================
// Structures, Typedefs and Enumerations.
typedef enum tagOPCHDA_SERVERSTATUS
{
OPCHDA_UP =1,
OPCHDA_DOWN,
OPCHDA_INDETERMINATE
}
OPCHDA_SERVERSTATUS;
typedef enum tagOPCHDA_BROWSEDIRECTION
{
OPCHDA_BROWSE_UP =1,
OPCHDA_BROWSE_DOWN,
OPCHDA_BROWSE_DIRECT
}
OPCHDA_BROWSEDIRECTION;
typedef enum tagOPCHDA_BROWSETYPE
{
OPCHDA_BRANCH =1,
OPCHDA_LEAF,
OPCHDA_FLAT,
OPCHDA_ITEMS
}
OPCHDA_BROWSETYPE;
typedef enum tagOPCHDA_ANNOTATIONCAPABILITIES
{
OPCHDA_READANNOTATIONCAP = 0x01,
OPCHDA_INSERTANNOTATIONCAP = 0x02
}
OPCHDA_ANNOTATIONCAPABILITIES;
typedef enum tagOPCHDA_UPDATECAPABILITIES
{
OPCHDA_INSERTCAP = 0x01,
OPCHDA_REPLACECAP = 0x02,
OPCHDA_INSERTREPLACECAP = 0x04,
OPCHDA_DELETERAWCAP = 0x08,
OPCHDA_DELETEATTIMECAP = 0x10
}
OPCHDA_UPDATECAPABILITIES;
typedef enum tagOPCHDA_OPERATORCODES
{
OPCHDA_EQUAL =1,
OPCHDA_LESS,
OPCHDA_LESSEQUAL,
OPCHDA_GREATER,
OPCHDA_GREATEREQUAL,
OPCHDA_NOTEQUAL
}
OPCHDA_OPERATORCODES;
typedef enum tagOPCHDA_EDITTYPE
{
OPCHDA_INSERT = 1,
OPCHDA_REPLACE,
OPCHDA_INSERTREPLACE,
OPCHDA_DELETE
}
OPCHDA_EDITTYPE;
typedef enum tagOPCHDA_AGGREGATE
{
OPCHDA_NOAGGREGATE = 0,
OPCHDA_INTERPOLATIVE,
OPCHDA_TOTAL,
OPCHDA_AVERAGE,
OPCHDA_TIMEAVERAGE,
OPCHDA_COUNT,
OPCHDA_STDEV,
OPCHDA_MINIMUMACTUALTIME,
OPCHDA_MINIMUM,
OPCHDA_MAXIMUMACTUALTIME,
OPCHDA_MAXIMUM,
OPCHDA_START,
OPCHDA_END,
OPCHDA_DELTA,
OPCHDA_REGSLOPE,
OPCHDA_REGCONST,
OPCHDA_REGDEV,
OPCHDA_VARIANCE,
OPCHDA_RANGE,
OPCHDA_DURATIONGOOD,
OPCHDA_DURATIONBAD,
OPCHDA_PERCENTGOOD,
OPCHDA_PERCENTBAD,
OPCHDA_WORSTQUALITY,
OPCHDA_ANNOTATIONS
}
OPCHDA_AGGREGATE;
typedef DWORD OPCHANDLE;
typedef struct tagOPCHDA_ANNOTATION
{
OPCHANDLE hClient;
DWORD dwNumValues;
[size_is (dwNumValues)] FILETIME* ftTimeStamps;
[size_is (dwNumValues), string] LPWSTR* szAnnotation;
[size_is (dwNumValues)] FILETIME* ftAnnotationTime;
[size_is (dwNumValues), string] LPWSTR* szUser;
}
OPCHDA_ANNOTATION;
typedef struct tagOPCHDA_MODIFIEDITEM
{
OPCHANDLE hClient;
DWORD dwCount;
[size_is(dwCount)] FILETIME* pftTimeStamps;
[size_is(dwCount)] DWORD* pdwQualities;
[size_is(dwCount)] VARIANT* pvDataValues;
[size_is(dwCount)] FILETIME* pftModificationTime;
[size_is(dwCount)] OPCHDA_EDITTYPE* pEditType;
[size_is(dwCount)] LPWSTR* szUser;
}
OPCHDA_MODIFIEDITEM;
typedef struct tagOPCHDA_ATTRIBUTE
{
OPCHANDLE hClient;
DWORD dwNumValues;
DWORD dwAttributeID;
[size_is (dwNumValues)] FILETIME* ftTimeStamps;
[size_is (dwNumValues)] VARIANT* vAttributeValues;
}
OPCHDA_ATTRIBUTE;
typedef struct tagOPCHDA_TIME
{
BOOL bString;
[string] LPWSTR szTime;
FILETIME ftTime;
}
OPCHDA_TIME;
typedef struct tagOPCHDA_ITEM
{
OPCHANDLE hClient;
DWORD haAggregate;
DWORD dwCount;
[size_is(dwCount)] FILETIME* pftTimeStamps;
[size_is(dwCount)] DWORD* pdwQualities;
[size_is(dwCount)] VARIANT* pvDataValues;
}
OPCHDA_ITEM;
//==============================================================================
// IOPCHDA_Browser
[
object,
uuid(1F1217B1-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_Browser : IUnknown
{
HRESULT GetEnum(
[in] OPCHDA_BROWSETYPE dwBrowseType,
[out] LPENUMSTRING* ppIEnumString
);
HRESULT ChangeBrowsePosition(
[in] OPCHDA_BROWSEDIRECTION dwBrowseDirection,
[in, string] LPCWSTR szString
);
HRESULT GetItemID(
[in, string] LPCWSTR szNode,
[out, string] LPWSTR* pszItemID
);
HRESULT GetBranchPosition(
[out, string] LPWSTR* pszBranchPos
);
}
//==============================================================================
// IOPCHDA_Server
[
object,
uuid(1F1217B0-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_Server : IUnknown
{
HRESULT GetItemAttributes(
[out] DWORD* pdwCount,
[out, size_is(,*pdwCount)] DWORD** ppdwAttrID,
[out, size_is(,*pdwCount),string] LPWSTR** ppszAttrName,
[out, size_is(,*pdwCount),string] LPWSTR** ppszAttrDesc,
[out, size_is(,*pdwCount)] VARTYPE** ppvtAttrDataType
);
HRESULT GetAggregates(
[out] DWORD* pdwCount,
[out, size_is(,*pdwCount)] DWORD** ppdwAggrID,
[out, size_is(,*pdwCount), string] LPWSTR** ppszAggrName,
[out, size_is(,*pdwCount), string] LPWSTR** ppszAggrDesc
);
HRESULT GetHistorianStatus(
[out] OPCHDA_SERVERSTATUS* pwStatus,
[out] FILETIME** pftCurrentTime,
[out] FILETIME** pftStartTime,
[out] WORD* pwMajorVersion,
[out] WORD* pwMinorVersion,
[out] WORD* pwBuildNumber,
[out] DWORD* pdwMaxReturnValues,
[out, string] LPWSTR* ppszStatusString,
[out, string] LPWSTR* ppszVendorInfo
);
HRESULT GetItemHandles(
[in] DWORD dwCount,
[in, size_is(dwCount)] LPWSTR* pszItemID,
[in, size_is(dwCount)] OPCHANDLE* phClient,
[out, size_is(,dwCount)] OPCHANDLE** pphServer,
[out, size_is(,dwCount)] HRESULT** ppErrors
);
HRESULT ReleaseItemHandles(
[in] DWORD dwCount,
[in, size_is(dwCount)] OPCHANDLE* phServer,
[out, size_is(,dwCount)] HRESULT** ppErrors
);
HRESULT ValidateItemIDs(
[in] DWORD dwCount,
[in, size_is(dwCount)] LPWSTR* pszItemID,
[out, size_is(,dwCount)] HRESULT** ppErrors
);
HRESULT CreateBrowse(
[in] DWORD dwCount,
[in, size_is(dwCount)] DWORD* pdwAttrID,
[in, size_is(dwCount)] OPCHDA_OPERATORCODES* pOperator,
[in, size_is(dwCount)] VARIANT* vFilter,
[out] IOPCHDA_Browser** pphBrowser,
[out, size_is(,dwCount)] HRESULT** ppErrors
);
}
//==============================================================================
// IOPCHDA_SyncRead
[
object,
uuid(1F1217B2-DEE0-11d2-A5E5-000086339399),
pointer_default(unique)
]
interface IOPCHDA_SyncRead: IUnknown
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -