📄 opcdx.idl
字号:
//================================================================================
// TITLE: OpcDx.idl
//
// CONTENTS:
//
// The OPC Data Exchange 1.00 IDL file.
//
// This IDL was derived from the XML service description defined in the
// specification. The mapping the XML service and the IDL elements is
// a direct as possible (i.e. XML data types map onto IDL structures, XML
// services map onto IDL interfaces/methods et. al.). However, there is no
// standard representation in IDL for 'missing' attributes (i.e. values that
// are not contained in the XML). The IDL defines bit masks for each optional
// field in a structure. Clients and servers must use these masks to test
// and/or indicate whether a given field contains a meaningful value.
//
// (c) Copyright 2002 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/09/09 RSA First release.
// 2003/03/03 RSA Added fields to ensure natural byte alignment for structures.
// 2004/09/01 RSA Renamed modules in TYPELIB section to avoid name conflicts.
//
import "oaidl.idl";
import "ocidl.idl";
import "objidl.idl";
//==============================================================================
// Category ID declarations (defined as interfaces to ensure they show up in the typelib).
[uuid(A0C85BB8-4161-4fd6-8655-BB584601C9E0)] interface CATID_OPCDXServer10 : IUnknown {}
cpp_quote("#define CATID_OPCDXServer10 IID_CATID_OPCDXServer10")
//==============================================================================
// Structures, Typedefs and Enumerations.
typedef struct tagOpcDxItemIdentifier
{
LPWSTR szItemPath;
LPWSTR szItemName;
LPWSTR szVersion;
DWORD dwReserved;
}
OpcDxItemIdentifier;
typedef struct tagOpcDxIdentifiedResult
{
LPWSTR szItemPath;
LPWSTR szItemName;
LPWSTR szVersion;
HRESULT hResultCode;
}
OpcDxIdentifiedResult;
typedef struct tagOpcDxGeneralResponse
{
LPWSTR szConfigurationVersion;
DWORD dwCount;
[size_is(dwCount)] OpcDxIdentifiedResult* pIdentifiedResults;
DWORD dwReserved;
}
OpcDxGeneralResponse;
typedef struct tagOpcDxSourceServer
{
DWORD dwMask;
LPWSTR szItemPath;
LPWSTR szItemName;
LPWSTR szVersion;
LPWSTR szName;
LPWSTR szDescription;
LPWSTR szServerType;
LPWSTR szServerURL;
BOOL bDefaultSourceServerConnected;
DWORD dwReserved;
}
OpcDxSourceServer;
typedef struct tagOpcDxConnection
{
DWORD dwMask;
LPWSTR szItemPath;
LPWSTR szItemName;
LPWSTR szVersion;
DWORD dwBrowsePathCount;
[size_is(dwBrowsePathCount)] LPWSTR* pszBrowsePaths;
LPWSTR szName;
LPWSTR szDescription;
LPWSTR szKeyword;
BOOL bDefaultSourceItemConnected;
BOOL bDefaultTargetItemConnected;
BOOL bDefaultOverridden;
VARIANT vDefaultOverrideValue;
VARIANT vSubstituteValue;
BOOL bEnableSubstituteValue;
LPWSTR szTargetItemPath;
LPWSTR szTargetItemName;
LPWSTR szSourceServerName;
LPWSTR szSourceItemPath;
LPWSTR szSourceItemName;
DWORD dwSourceItemQueueSize;
DWORD dwUpdateRate;
FLOAT fltDeadBand;
LPWSTR szVendorData;
}
OpcDxConnection;
//==============================================================================
// IOPCConfiguration
[
object,
uuid(C130D281-F4AA-4779-8846-C2C4CB444F2A),
pointer_default(unique)
]
interface IOPCConfiguration : IUnknown
{
HRESULT GetServers(
[out] DWORD* pdwCount,
[out, size_is(,*pdwCount)] OpcDxSourceServer** ppServers
);
HRESULT AddServers(
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxSourceServer* pServers,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT ModifyServers(
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxSourceServer* pServers,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT DeleteServers(
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxItemIdentifier* pServers,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT CopyDefaultServerAttributes(
[in] BOOL bConfigToStatus,
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxItemIdentifier* pServers,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT QueryDXConnections(
[in] LPWSTR szBrowsePath,
[in] DWORD dwNoOfMasks,
[in, size_is(dwNoOfMasks)] OpcDxConnection* pDXConnectionMasks,
[in] BOOL bRecursive,
[out, size_is(,dwNoOfMasks)] HRESULT** ppErrors,
[out] DWORD* pdwCount,
[out, size_is(,*pdwCount)] OpcDxConnection** ppConnections
);
HRESULT AddDXConnections(
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxConnection* pConnections,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT UpdateDXConnections(
[in] LPWSTR szBrowsePath,
[in] DWORD dwNoOfMasks,
[in, size_is(dwNoOfMasks)] OpcDxConnection* pDXConnectionMasks,
[in] BOOL bRecursive,
[in] OpcDxConnection* pDXConnectionDefinition,
[out, size_is(,dwNoOfMasks)] HRESULT** ppErrors,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT ModifyDXConnections(
[in] DWORD dwCount,
[in, size_is(dwCount)] OpcDxConnection* pDXConnectionDefinitions,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT DeleteDXConnections(
[in] LPWSTR szBrowsePath,
[in] DWORD dwNoOfMasks,
[in, size_is(dwNoOfMasks)] OpcDxConnection* pDXConnectionMasks,
[in] BOOL bRecursive,
[out, size_is(,dwNoOfMasks)] HRESULT** ppErrors,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT CopyDXConnectionDefaultAttributes(
[in] BOOL bConfigToStatus,
[in] LPWSTR szBrowsePath,
[in] DWORD dwNoOfMasks,
[in, size_is(dwNoOfMasks)] OpcDxConnection* pDXConnectionMasks,
[in] BOOL bRecursive,
[out, size_is(,dwNoOfMasks)] HRESULT** ppErrors,
[out] OpcDxGeneralResponse* pResponse
);
HRESULT ResetConfiguration(
[in] LPWSTR szConfigurationVersion,
[out] LPWSTR* pszConfigurationVersion
);
};
//==============================================================================
// Type Library
[
uuid(3CA18B30-1088-47d5-8952-0B12B027ED32),
version(1.00),
helpstring("OPC Data eXchange 1.00 Type Library")
]
library OpcDxLib
{
interface CATID_OPCDXServer10;
interface IOPCConfiguration;
module OPCDX_Names
{
// category description strings.
const LPCWSTR OPC_CATEGORY_DESCRIPTION_DX10 = L"OPC Data Exchange Servers Version 1.0";
// common names.
const LPCWSTR OPCDX_NAMESPACE_V10 = L"http://opcfoundation.org/webservices/OPCDX/10";
const LPCWSTR OPCDX_DATABASE_ROOT = L"DX";
const LPCWSTR OPCDX_SEPARATOR = L"/";
const LPCWSTR OPCDX_ITEM_PATH = L"ItemPath";
const LPCWSTR OPCDX_ITEM_NAME = L"ItemName";
const LPCWSTR OPCDX_VERSION = L"Version";
// server status.
const LPCWSTR OPCDX_SERVER_STATUS_TYPE = L"DXServerStatus";
const LPCWSTR OPCDX_SERVER_STATUS = L"ServerStatus";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -