Reference
OpcData Members
Defines an abstract base class of data objects used and provided in the ecosystem of a specific OPC UA Server.
Reference
OpcData Members
- Type
- OpcData
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Constructors
OpcData
| Overload | Description |
|---|---|
| OpcData() | Initializes a new instance of the OpcData class. |
| OpcData( | Initializes a new instance of the OpcData class using the dataStore specified. |
OpcData()
Initializes a new instance of the OpcData class.
protected OpcData()Protected Sub New()OpcData(IOpcDataStore)
Initializes a new instance of the OpcData class using the dataStore specified.
protected OpcData(IOpcDataStore dataStore)Protected Sub New(dataStore As IOpcDataStore)Parameters
| Name | Type | Description |
|---|---|---|
dataStore | IOpcDataStore | The IOpcDataStore of the object data to represent. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataStore is a null reference ( |
Properties
DataStore
Gets the IOpcDataStore which contains the data of this OpcData instance.
protected IOpcDataStore DataStore { get; }Protected ReadOnly Property DataStore As IOpcDataStoreProperty value
An instance implementing the IOpcDataStore interface containing the object data represented by this OpcData instance.
Methods
Decode
| Overload | Description |
|---|---|
| Decode< | Converts the buffer specified to the T defined. |
| Decode< | Converts the data in the stream specified to the T defined. |
| Decode< | Converts the value specified to the T defined. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| OpcException | The decoding has failed. For more details exception data. |
Decode<T>(OpcContext, byte[])
Converts the buffer specified to the T defined.
public static T Decode<T>(OpcContext context, byte[] buffer) where T : new()Public Shared Function Decode(Of T As New)(
context As OpcContext,
buffer As Byte()) As TType parameters
| Name | Description |
|---|---|
T | The type to decode with a default constructor. |
Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to decode the buffer. |
buffer | Byte[] | An array of byte values to decode. |
Returns
T
A new instance of the type defined by T and decoded with the information in the buffer.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context or buffer is a null reference ( |
Decode<T>(OpcContext, Stream)
Converts the data in the stream specified to the T defined.
public static T Decode<T>(OpcContext context, Stream stream) where T : new()Public Shared Function Decode(Of T As New)(
context As OpcContext,
stream As Stream) As TType parameters
| Name | Description |
|---|---|
T | The type to decode with a default constructor. |
Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to decode the stream data. |
stream | Stream | A Stream its data is to be decoded. |
Returns
T
A new instance of the type defined by T and decoded with the information in the stream.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context or stream is a null reference ( |
Decode<T>(OpcContext, OpcRawObject)
Converts the value specified to the T defined.
public static T Decode<T>(
OpcContext context,
OpcRawObject value)
where T : new()Public Shared Function Decode(Of T As New)(
context As OpcContext,
value As OpcRawObject) As TType parameters
| Name | Description |
|---|---|
T | The type to decode with a default constructor. |
Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to decode the value. |
value | OpcRawObject | The OpcRawObject to decode, either binary or XML encoded. |
Returns
T
A new instance of the type defined by T and decoded with the information in the RawData of the value.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The context or value is a null reference ( |
DeepCopy
Creates a copy of the current OpcData, which the SDK uses whenever it copies an encodable value of it.
protected virtual object DeepCopy()Protected Overridable Function DeepCopy() As ObjectReturns
A new object which is a copy of the current OpcData.
Remarks
The default implementation creates a shallow copy (see MemberwiseClone()). Override it to copy referenced objects too.
Encode
| Overload | Description |
|---|---|
| Encode( | Encodes the value specified using its Binary encoding. |
| Encode( | Encodes the value specified using its encoding of the encodingType specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | The context or value is a null reference ( |
| OpcException | The encoding has failed. |
Encode(OpcContext, object)
Encodes the value specified using its Binary encoding.
public static OpcRawObject Encode(OpcContext context, object value)Public Shared Function Encode(
context As OpcContext,
value As Object) As OpcRawObjectParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to encode the value. |
value | Object | The value of a structured data type to encode. |
Returns
A new instance of the OpcRawObject class with the encoded value.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The value is not the value of a structured data type or its data type does not state a binary encoding. |
Encode(OpcContext, object, OpcEncodingType)
Encodes the value specified using its encoding of the encodingType specified.
public static OpcRawObject Encode(
OpcContext context,
object value,
OpcEncodingType encodingType)Public Shared Function Encode(
context As OpcContext,
value As Object,
encodingType As OpcEncodingType) As OpcRawObjectParameters
| Name | Type | Description |
|---|---|---|
context | OpcContext | The OpcContext to use to encode the value. |
value | Object | The value of a structured data type to encode. |
encodingType | OpcEncodingType | One of the members defined by the OpcEncodingType enumeration which states the encoding to use. |
Returns
A new instance of the OpcRawObject class with the encoded value.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The value is not the value of a structured data type or its data type does not state an encoding of the encodingType. |
GetDataStore
Retrieves the IOpcDataStore which contains the data of this OpcData instance.
protected virtual IOpcDataStore GetDataStore()Protected Overridable Function GetDataStore() As IOpcDataStoreReturns
The IOpcDataStore which contains the data of this OpcData instance. The default implementation returns the data store passed to the constructor.
Remarks
The DataStore property calls this method once, on its first access, if no data store was passed to the constructor. Override it to provide the data store on demand.
GetType
Retrieves the Type which implementes the data type which is identified by the typeId specified.
public static Type GetType(OpcNodeId typeId)Public Shared Function [GetType](typeId As OpcNodeId) As TypeParameters
| Name | Type | Description |
|---|---|---|
typeId | OpcNodeId | The OpcNodeId which identifies the Type to retrieve. |
Returns
The Type which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known Type which is associated with the typeId specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The typeId is a null reference ( |
GetTypeInfo
| Overload | Description |
|---|---|
| GetTypeInfo< | Retrieves the OpcDataTypeInfo which declares the data type implemented by the T specified. |
| GetTypeInfo( | Retrieves the OpcDataTypeInfo which declares the data type which is identified by the encoding specified. |
| GetTypeInfo( | Retrieves the OpcDataTypeInfo which declares the data type which is identified by the typeId specified. |
| GetTypeInfo( | Retrieves the OpcDataTypeInfo which declares the data type implemented by the underlyingType specified. |
GetTypeInfo<T>()
Retrieves the OpcDataTypeInfo which declares the data type implemented by the T specified.
public static OpcDataTypeInfo GetTypeInfo<T>()Public Shared Function GetTypeInfo(Of T)() As OpcDataTypeInfoType parameters
| Name | Description |
|---|---|
T | The Type which implements the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo which declares the T specified or a null reference (Nothing in Visual Basic) if there isn't a OpcDataTypeInfo associated with the T specified.
GetTypeInfo(OpcEncoding)
Retrieves the OpcDataTypeInfo which declares the data type which is identified by the encoding specified.
public static OpcDataTypeInfo GetTypeInfo(OpcEncoding encoding)Public Shared Function GetTypeInfo(encoding As OpcEncoding) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
encoding | OpcEncoding | The OpcEncoding which identifies the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo which is known under the encoding specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo which is associated with the encoding specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The encoding is a null reference ( |
GetTypeInfo(OpcNodeId)
Retrieves the OpcDataTypeInfo which declares the data type which is identified by the typeId specified.
public static OpcDataTypeInfo GetTypeInfo(OpcNodeId typeId)Public Shared Function GetTypeInfo(typeId As OpcNodeId) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
typeId | OpcNodeId | The OpcNodeId which identifies the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo which is associated with the typeId specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The typeId is a null reference ( |
GetTypeInfo(Type)
Retrieves the OpcDataTypeInfo which declares the data type implemented by the underlyingType specified.
public static OpcDataTypeInfo GetTypeInfo(Type underlyingType)Public Shared Function GetTypeInfo(underlyingType As Type) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
underlyingType | Type | The Type which implements the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo which declares the underlyingType specified or a null reference (Nothing in Visual Basic) if there isn't a OpcDataTypeInfo associated with the underlyingType specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The underlyingType is a null reference ( |
New
Creates a new instance of the OpcDataObject class using the dataType specified.
public static OpcDataObject New(OpcDataTypeInfo dataType)Public Shared Function [New](dataType As OpcDataTypeInfo) As OpcDataObjectParameters
| Name | Type | Description |
|---|---|---|
dataType | OpcDataTypeInfo | The OpcDataTypeInfo which declares the type of data type instance the new OpcDataObject shall represent. |
Returns
An instance of the OpcDataObject which can be used to dynamically access data type instance information.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType is not a structured data type ( |
| Argument | The dataType is a null reference ( |
NewArray
Creates a one-dimensional array of OpcDataObject objects using the dataType and length with zero-based indexing.
public static OpcDataObject[] NewArray(OpcDataTypeInfo dataType, int length)Public Shared Function NewArray(
dataType As OpcDataTypeInfo,
length As Integer) As OpcDataObject()Parameters
| Name | Type | Description |
|---|---|---|
dataType | OpcDataTypeInfo | The OpcDataTypeInfo which declares the type of data type instance the new OpcDataObject shall represent. |
length | Int32 | An size of the array to create. |
Returns
A new one-dimensional array of OpcDataObject instances which can be used to dynamically access array-based data type information
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType is not a structured data type ( |
| Argument | The dataType is a null reference ( |
RegisterType
| Overload | Description |
|---|---|
| RegisterType< | Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcT specified. |
| RegisterType( | Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcdataType specified. |
| RegisterType< | Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId specified. |
| RegisterType( | Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId specified. |
| RegisterType< | Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId or by one of the data specified. |
| RegisterType( | Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId or by one of the data specified. |
RegisterType<T>()
Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcDataTypeAttribute defined on the T specified.
public static void RegisterType<T>()Public Shared Sub RegisterType(Of T)()Type parameters
| Name | Description |
|---|---|
T | The type to use in case there a data object for the data definition equals to the data type identifier defined using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The type T does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
RegisterType(Type)
Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcDataTypeAttribute defined on the dataType specified.
public static void RegisterType(Type dataType)Public Shared Sub RegisterType(dataType As Type)Parameters
| Name | Type | Description |
|---|---|---|
dataType | Type | The Type to use in case there a data object for the data type definition equals to the data type identifier defined using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
| Argument | The dataType is a null reference ( |
RegisterType<T>(OpcNodeId)
Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId specified.
public static void RegisterType<T>(OpcNodeId dataTypeId)Public Shared Sub RegisterType(Of T)(dataTypeId As OpcNodeId)Type parameters
| Name | Description |
|---|---|
T | The type to use in case there a data object for the data definition equals to dataTypeId is to be created. The type needs to provide either a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface and then needs to be a subclass of the OpcData class. |
Parameters
| Name | Type | Description |
|---|---|---|
dataTypeId | OpcNodeId | The identifier of the type definition for which the T is to be used to create a data object instance. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The type T does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
| Argument | The dataTypeId is a null reference ( |
Remarks
It is not possible to register the same or a different data type for the dataTypeId specified as long there is already a data type registered for the type definition specified by dataTypeId.
RegisterType(Type, OpcNodeId)
Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId specified.
public static void RegisterType(Type dataType, OpcNodeId dataTypeId)Public Shared Sub RegisterType(dataType As Type, dataTypeId As OpcNodeId)Parameters
| Name | Type | Description |
|---|---|---|
dataType | Type | The Type to use in case there a data object for the data type definition equals to dataTypeId is to be created. The type needs to provide either a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface and then needs to be a subclass of the OpcData class. |
dataTypeId | OpcNodeId | The identifier of the type definition for which the dataType is to be used to create a data object instance. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
| Argument | The dataType or dataTypeId is a null reference ( |
Remarks
It is not possible to register the same or a different data type for the dataTypeId specified as long there is already a data type registered for the type definition specified by dataTypeId.
RegisterType<T>(OpcNodeId, params OpcEncoding[])
Registers the type defined by T as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId or by one of the dataTypeEncodings specified.
public static void RegisterType<T>(
OpcNodeId dataTypeId,
params OpcEncoding[] dataTypeEncodings)Public Shared Sub RegisterType(Of T)(
dataTypeId As OpcNodeId,
ParamArray dataTypeEncodings As OpcEncoding())Type parameters
| Name | Description |
|---|---|
T | The type to use in case there a data object for the data definition equals to dataTypeId or equals to one of the data specified is to be created. The type needs to provide either a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface and then needs to be a subclass of the OpcData class. |
Parameters
| Name | Type | Description |
|---|---|---|
dataTypeId | OpcNodeId | The identifier of the type definition for which the T is to be used to create a data object instance. |
data | params OpcEncoding[] | An array of OpcEncoding instances identifying the different encodings supported by the T specified. Using OpcEncoding instances enables the possibility to define OpcEncodingType specific identifiers to use to identify the according encoding information required to encode or decode the data object information. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The type T does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
| Argument | The dataTypeId or data or one of its items is a null reference ( |
RegisterType(Type, OpcNodeId, params OpcEncoding[])
Registers the dataType specified as the data object type to create in case there a data instance is to be created for the type definition identified by the dataTypeId or by one of the dataTypeEncodings specified.
public static void RegisterType(
Type dataType,
OpcNodeId dataTypeId,
params OpcEncoding[] dataTypeEncodings)Public Shared Sub RegisterType(
dataType As Type,
dataTypeId As OpcNodeId,
ParamArray dataTypeEncodings As OpcEncoding())Parameters
| Name | Type | Description |
|---|---|---|
dataType | Type | The Type to use in case there a data object for the data type definition equals to the data type identifier defined using the Opc |
dataTypeId | OpcNodeId | The identifier of the type definition for which the dataType is to be used to create a data object instance. |
data | params OpcEncoding[] | An array of OpcEncoding instances identifying the different encodings supported by the dataType specified. Using OpcEncoding instances enables the possibility to define OpcEncodingType specific identifiers to use to identify the according encoding information required to encode or decode the data object information. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The type dataType does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
| Argument | The dataType, dataTypeId or data or one of its items is a null reference ( |
RegisterTypeMapper
| Overload | Description |
|---|---|
| Register | Registers the T implementing the IOpc |
| Register | Registers the mapper as a custom mapper for data types. |
RegisterTypeMapper<T>()
Registers the T implementing the IOpcDataTypeMapper interface as a custom mapper for data types.
public static void RegisterTypeMapper<T>() where T : IOpcDataTypeMapper, new()Public Shared Sub RegisterTypeMapper(Of T As {IOpcDataTypeMapper, New})()Type parameters
| Name | Description |
|---|---|
T | The type implementing the IOpc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The T does not inherit from Opc |
RegisterTypeMapper(IOpcDataTypeMapper)
Registers the mapper as a custom mapper for data types.
public static void RegisterTypeMapper(IOpcDataTypeMapper mapper)Public Shared Sub RegisterTypeMapper(mapper As IOpcDataTypeMapper)Parameters
| Name | Type | Description |
|---|---|---|
mapper | IOpc | The IOpc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The mapper does not inherit from Opc |
| Argument | The mapper is a null reference ( |
RegisterTypes
| Overload | Description |
|---|---|
| RegisterTypes( | Registers all non-abstract types in the assembly specified which defines the Opc |
| RegisterTypes( | Registers the dataTypes specified as the data object type to create in case there a data instance is to be created for the type definitions identified by the OpcdataTypes specified. |
| RegisterTypes( | Registers the dataType and the further specified dataTypes as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcdataType or on one of the dataTypes specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Argument | A Type does not define a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface or any data type specific attribute offers invalid information about the data type to associate with the Type. |
RegisterTypes(Assembly)
Registers all non-abstract types in the assembly specified which defines the OpcDataTypeAttribute.
public static void RegisterTypes(Assembly assembly)Public Shared Sub RegisterTypes(assembly As Assembly)Parameters
| Name | Type | Description |
|---|---|---|
assembly | Assembly | The Assembly its types are inspected for types which using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The assembly is a null reference ( |
Remarks
The Type instances to register need to define the OpcDataTypeAttribute and either a public accessible parameterless constructor or a public accessible constructor accepting an instance of the IOpcDataStore interface and then needs to be a subclass of the OpcData class.
RegisterTypes(IEnumerable<Type>)
Registers the dataTypes specified as the data object type to create in case there a data instance is to be created for the type definitions identified by the OpcEventTypeAttribute used on one of the dataTypes specified.
public static void RegisterTypes(IEnumerable<Type> dataTypes)Public Shared Sub RegisterTypes(dataTypes As IEnumerable(Of Type))Parameters
| Name | Type | Description |
|---|---|---|
dataTypes | IEnumerable<Type> | A sequence of Type instances representing the types to use in case there a data object for the data definition equals to the data type identifier defined using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataTypes is a null reference ( |
Remarks
Any null reference (Nothing in Visual Basic) in dataTypes is ignored.
RegisterTypes(Type, params Type[])
Registers the dataType and the further specified dataTypes as the data object type to create in case there a data instance is to be created for the type definition identified by the OpcDataTypeAttribute used on the dataType or on one of the dataTypes specified.
public static void RegisterTypes(Type dataType, params Type[] dataTypes)Public Shared Sub RegisterTypes(
dataType As Type,
ParamArray dataTypes As Type())Parameters
| Name | Type | Description |
|---|---|---|
dataType | Type | The Type instance to use in case there a data object for the data definition equals to the data type identifier defined using the Opc |
dataTypes | params Type[] | An array of additional Type instances to use in case there a data object for the data definitions equals to the data type identifier defined using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType or dataTypes is a null reference ( |
ShallowCopy
Creates a shallow copy of the current OpcData.
protected virtual object ShallowCopy()Protected Overridable Function ShallowCopy() As ObjectReturns
A new object which is a shallow copy of the current OpcData.
ToExtension
Wraps the instance into an ExtensionObject, so that it can be encoded as the instance of its data type.
public static ExtensionObject ToExtension(object instance)Public Shared Function ToExtension(instance As Object) As ExtensionObjectParameters
| Name | Type | Description |
|---|---|---|
instance | Object | The instance of a data type to wrap. |
Returns
ExtensionObject
A new ExtensionObject whose body holds the instance wrapped for the encoding (see To), or the instance itself if it already is an ExtensionObject.
TryGetTypeMapper
| Overload | Description |
|---|---|
| TryGetTypeMapper< | Determines the IOpcTSource. |
| TryGetTypeMapper( | Determines the IOpcsourceType. |
| TryGetTypeMapper( | Determines the IOpcsourceType and the resulting targetType. |
TryGetTypeMapper<TSource>(out IOpcDataTypeMapper)
Determines the IOpcDataTypeMapper associated with the type specified by TSource.
public static bool TryGetTypeMapper<TSource>(out IOpcDataTypeMapper mapper)Public Shared Function TryGetTypeMapper(Of TSource)(
mapper As IOpcDataTypeMapper) As BooleanType parameters
| Name | Description |
|---|---|
TSource | The Type its mapper is to be determined. |
Parameters
| Name | Type | Description |
|---|---|---|
mapper | out IOpc | The IOpcTSource or a null reference (TSource. |
Returns
The value true if a mapper exists for the type specified by the TSource type; otherwise the value false.
TryGetTypeMapper(Type, out IOpcDataTypeMapper)
Determines the IOpcDataTypeMapper associated with the type specified by sourceType.
public static bool TryGetTypeMapper(
Type sourceType,
out IOpcDataTypeMapper mapper)Public Shared Function TryGetTypeMapper(
sourceType As Type,
mapper As IOpcDataTypeMapper) As BooleanParameters
| Name | Type | Description |
|---|---|---|
sourceType | Type | The Type its mapper is to be determined. |
mapper | out IOpc | The IOpcsourceType or a null reference (sourceType. |
Returns
The value true if a mapper exists for the type specified by sourceType; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The sourceType is a null reference ( |
TryGetTypeMapper(Type, out IOpcDataTypeMapper, out Type)
Determines the IOpcDataTypeMapper associated with the type specified by sourceType and the resulting targetType.
public static bool TryGetTypeMapper(
Type sourceType,
out IOpcDataTypeMapper mapper,
out Type targetType)Public Shared Function TryGetTypeMapper(
sourceType As Type,
mapper As IOpcDataTypeMapper,
targetType As Type) As BooleanParameters
| Name | Type | Description |
|---|---|---|
sourceType | Type | The Type its mapper is to be determined. |
mapper | out IOpc | The IOpcsourceType or a null reference (sourceType. |
targetType | out Type | The Type the sourceType is mapped to by the associated mapper or a null reference (sourceType. |
Returns
The value true if a mapper exists for the type specified by sourceType; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The sourceType is a null reference ( |
UnregisterType
| Overload | Description |
|---|---|
| UnregisterType< | Unregisters the previously registered (T as the object type to not longer create for the type definition identified by the OpcT specified. |
| UnregisterType< | Unregisters the previously registered (T as the object type to not longer create for the type definition identified by the dataTypeId specified. |
| UnregisterType< | Unregisters the previously registered (T as the object type to not longer create for the type definition identified by the dataTypeId or by one of the data specified. |
UnregisterType<T>()
Unregisters the previously registered (see RegisterType) type defined by T as the object type to not longer create for the type definition identified by the OpcDataTypeAttribute defined on the T specified.
public static void UnregisterType<T>()Public Shared Sub UnregisterType(Of T)()Type parameters
| Name | Description |
|---|---|
T | The data type to unregister for the data definition equals to data type identifier defined using the Opc |
UnregisterType<T>(OpcNodeId)
Unregisters the previously registered (see RegisterType) type defined by T as the object type to not longer create for the type definition identified by the dataTypeId specified.
public static void UnregisterType<T>(OpcNodeId dataTypeId)Public Shared Sub UnregisterType(Of T)(dataTypeId As OpcNodeId)Type parameters
| Name | Description |
|---|---|
T | The data type to unregister for the data definition equals to dataTypeId. |
Parameters
| Name | Type | Description |
|---|---|---|
dataTypeId | OpcNodeId | The identifier of the type definition for which the T is to be unregistered. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataTypeId is a null reference ( |
UnregisterType<T>(OpcNodeId, params OpcEncoding[])
Unregisters the previously registered (see RegisterType) type defined by T as the object type to not longer create for the type definition identified by the dataTypeId or by one of the dataTypeEncodings specified.
public static void UnregisterType<T>(
OpcNodeId dataTypeId,
params OpcEncoding[] dataTypeEncodings)Public Shared Sub UnregisterType(Of T)(
dataTypeId As OpcNodeId,
ParamArray dataTypeEncodings As OpcEncoding())Type parameters
| Name | Description |
|---|---|
T | The data type to unregister for the data definition equals to dataTypeId or one of the data. |
Parameters
| Name | Type | Description |
|---|---|---|
dataTypeId | OpcNodeId | The identifier of the type definition for which the T is to be unregistered. |
data | params OpcEncoding[] | An array of OpcEncoding instances identifying the different encodings supported by the T specified for which the T is to be unregistered as well. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataTypeId or data or one of its items is a null reference ( |
UnregisterTypeMapper
| Overload | Description |
|---|---|
| Unregister | Unregisters the T implementing the IOpc |
| Unregister | Unregisters the mapper as a custom mapper for data types. |
UnregisterTypeMapper<T>()
Unregisters the T implementing the IOpcDataTypeMapper interface as a custom mapper for data types.
public static void UnregisterTypeMapper<T>() where T : IOpcDataTypeMapper, new()Public Shared Sub UnregisterTypeMapper(Of T As {IOpcDataTypeMapper, New})()Type parameters
| Name | Description |
|---|---|
T | The type implementing the IOpc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The T does not inherit from Opc |
UnregisterTypeMapper(IOpcDataTypeMapper)
Unregisters the mapper as a custom mapper for data types.
public static void UnregisterTypeMapper(IOpcDataTypeMapper mapper)Public Shared Sub UnregisterTypeMapper(mapper As IOpcDataTypeMapper)Parameters
| Name | Type | Description |
|---|---|---|
mapper | IOpc | The IOpc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The mapper does not inherit from Opc |
| Argument | The mapper is a null reference ( |
UnregisterTypes
| Overload | Description |
|---|---|
| UnregisterTypes( | Unregisters all previously registered types (assembly specified. |
| UnregisterTypes( | Unregisters the previously registered (dataTypes specified. |
| UnregisterTypes( | Unregisters the previously registered dataType and the further specified dataTypes ( |
UnregisterTypes(Assembly)
Unregisters all previously registered types (see RegisterTypes) in the assembly specified.
public static void UnregisterTypes(Assembly assembly)Public Shared Sub UnregisterTypes(assembly As Assembly)Parameters
| Name | Type | Description |
|---|---|---|
assembly | Assembly | The Assembly its types are inspected for types using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The assembly is a null reference ( |
UnregisterTypes(IEnumerable<Type>)
Unregisters the previously registered (see RegisterTypes) dataTypes specified.
public static void UnregisterTypes(IEnumerable<Type> dataTypes)Public Shared Sub UnregisterTypes(dataTypes As IEnumerable(Of Type))Parameters
| Name | Type | Description |
|---|---|---|
dataTypes | IEnumerable<Type> | A sequence of Type instances to unregister for the data definitions equals to the data type identifiers defined using the Opc |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataTypes is a null reference ( |
UnregisterTypes(Type, params Type[])
Unregisters the previously registered dataType and the further specified dataTypes (see RegisterTypes).
public static void UnregisterTypes(Type dataType, params Type[] dataTypes)Public Shared Sub UnregisterTypes(
dataType As Type,
ParamArray dataTypes As Type())Parameters
| Name | Type | Description |
|---|---|---|
dataType | Type | The Type instance to unregister for the data definitions equals to the data type identifiers defined using the Opc |
dataTypes | params Type[] |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The dataType or dataTypes is a null reference ( |
Events
TypeResolve
Occurs when the resolution of a data type fails. Use this event to manually provide the Type to use for a specific data type definition identifier.
public static event OpcTypeResolveEventHandler TypeResolvePublic Shared Event TypeResolve As OpcTypeResolveEventHandlerEvent type

