TechnoSoftware OPCDA client(1.2.1) Error Codes

OPCDA.NET Client Interface Wrapper
Summary of OPC Error Codes

We have attempted to minimize the number of unique errors by identifying common generic problems and defining error codes that can be reused in many contexts. An OPC server should only return those OPC errors that are listed for the various methods in this specification or are standard Microsoft errors. Note that OLE itself will frequently return errors (such as RPC errors) in addition to those listed in this specification.

The most important thing for a client is to check FAILED for any error return. Other than that, (the statements above not withstanding) a robust, user friendly client should assume that the server may return any error code and should call the GetErrorString function to provide user readable information about those errors.

Fig.1 Standard COM errors that are commonly used by OPC Servers

 ValueDescription
S_OK0x0  
S_FALSE0x1 
E_FAIL0x80004005Unspecified error
E_INVALIDARG0x80070057The value of one or more parameters was not valid. This is generally used in place of a more specific error where it is expected that problems are unlikely or will be easy to identify (for example when there is only one parameter).
E_NOINTERFACE0x80004002No such interface supported
E_NOTIMPL0x80004001Not implemented
E_OUTOFMEMORY0x8007000ENot enough memory to complete the requested operation. This can happen any time the server needs to allocate memory to complete the requested operation.
CONNECT_E_ADVISELIMIT0x80040201Advise limit exceeded for this object
OLE_E_NOCONNECTION0x80040200Cannot Unadvise - there is no existing connection

 
Fig.2 OPC Specific Errors     

 ValueDescription
OPC_E_BADRIGHTS0xC0040006The Items AccessRights do not allow the operation.
OPC_E_BADTYPE0xC0040004The server cannot convert the data between the specified format/ requested data type and the canonical data type.
OPC_E_DUPLICATENAME0xC004000CDuplicate name not allowed.
OPC_E_INVALIDCONFIGFILE0xC0040010The server's configuration file is an invalid format.
OPC_E_INVALIDFILTER0xC0040009The filter string was not valid
OPC_E_INVALIDHANDLE0xC0040001The value of the handle is invalid. Note: a client should never pass an invalid handle to a server. If this error occurs, it is due to a programming error in the client or possibly in the server.
OPC_E_INVALIDITEMID0xC0040008The item ID doesn't conform to the server's syntax.
OPC_E_INVALID_PID0xC0040203The passed property ID is not valid for the item.
OPC_E_NOTFOUND0xC0040011Requested Object (e.g. a public group) was not found.
OPC_E_PUBLIC0xC0040005The requested operation cannot be done on a public group.
OPC_E_RANGE0xC004000BThe value was out of range.
OPC_E_UNKNOWNITEMID0xC0040007The item ID is not defined in the server address space (on add or validate) or no longer exists in the server address space (for read or write).
OPC_E_UNKNOWNPATH0xC004000AThe item's access path is not known to the server.
OPC_S_CLAMP0x0004000EA value passed to WRITE was accepted but the output was clamped.
OPC_S_INUSE0x0004000FThe operation cannot be performed because the object is being referenced.
OPC_S_UNSUPPORTEDRATE0x0004000DThe server does not support the requested data rate but will use the closest available rate.

转载于:https://www.cnblogs.com/heroius/p/7401026.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值