Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcData type exposes the following members.
Initializes a new instance of the OpcData class using the dataStore
specified.
C#
protected OpcData(IOpcDataStore dataStore)
Parameters
dataStore
IOpcDataStore
The IOpcDataStore of the object data to represent.
Exceptions
The dataStore
is a null reference (Nothing in Visual Basic).
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.
C#
public static event OpcTypeResolveEventHandler TypeResolve
Gets the IOpcDataStore which contains the data of this OpcData instance.
C#
protected IOpcDataStore DataStore { get; }
Property Value
An instance implementing the IOpcDataStore interface containing the object data represented by this OpcData instance.
Retrieves the Type which implementes the data type which is identified by the typeId
specified.
C#
public static Type GetType(OpcNodeId typeId)
Parameters
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
The typeId
is a null reference (Nothing in Visual Basic).
Retrieves the OpcDataTypeInfo which declares the data type which is identified by the encoding
specified.
C#
public static OpcDataTypeInfo GetTypeInfo(OpcEncoding encoding)
Parameters
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
The encoding
is a null reference (Nothing in Visual Basic).
Retrieves the OpcDataTypeInfo which declares the data type which is identified by the typeId
specified.
C#
public static OpcDataTypeInfo GetTypeInfo(OpcNodeId typeId)
Parameters
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
The typeId
is a null reference (Nothing in Visual Basic).
Retrieves the OpcDataTypeInfo which declares the data type implemented by the underlyingType
specified.
C#
public static OpcDataTypeInfo GetTypeInfo(Type underlyingType)
Parameters
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
The underlyingType
is a null reference (Nothing in Visual Basic).
Retrieves the OpcDataTypeInfo which declares the data type implemented by the T
specified.
C#
public static OpcDataTypeInfo GetTypeInfo<T>()
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.
Creates a new instance of the OpcDataObject class using the dataType
specified.
C#
public static OpcDataObject New(OpcDataTypeInfo dataType)
Parameters
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
The dataType
is not a structured data type (see IsStruct).
The dataType
is a null reference (Nothing in Visual Basic).
Creates a one-dimensional array of OpcDataObject objects using the dataType
and length
with zero-based indexing.
C#
public static OpcDataObject[] NewArray(OpcDataTypeInfo dataType, int length)
Parameters
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
The dataType
is not a structured data type (see IsStruct).
The dataType
is a null reference (Nothing in Visual Basic).
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.
C#
public static void RegisterType(Type dataType)
Parameters
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 OpcDataTypeAttribute 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.
Exceptions
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.
The dataType
is a null reference (Nothing in Visual Basic).
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.
C#
public static void RegisterType(Type dataType, OpcNodeId dataTypeId)
Parameters
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
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.
The dataType
or dataTypeId
is a null reference (Nothing in Visual Basic).
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
.
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.
C#
public static void RegisterType(Type dataType, OpcNodeId dataTypeId, params OpcEncoding[] dataTypeEncodings)
Parameters
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 OpcDataTypeAttribute 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.
dataTypeEncodings
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
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.
The dataType
, dataTypeId
or dataTypeEncodings
or one of its items is a null reference (Nothing in Visual Basic).
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.
C#
public static void RegisterType<T>()
Exceptions
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.
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.
C#
public static void RegisterType<T>(OpcNodeId dataTypeId)
Parameters
dataTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be used to create a data object instance.
Exceptions
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.
The dataTypeId
is a null reference (Nothing in Visual Basic).
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
.
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.
C#
public static void RegisterType<T>(OpcNodeId dataTypeId, params OpcEncoding[] dataTypeEncodings)
Parameters
dataTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be used to create a data object instance.
dataTypeEncodings
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
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.
The dataTypeId
or dataTypeEncodings
or one of its items is a null reference (Nothing in Visual Basic).
Registers all non-abstract types in the assembly
specified which defines the OpcDataTypeAttribute.
C#
public static void RegisterTypes(Assembly assembly)
Parameters
assembly
Assembly
The Assembly its types are inspected for types which using the OpcDataTypeAttribute.
Exceptions
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.
The assembly
is a null reference (Nothing in Visual Basic).
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.
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.
C#
public static void RegisterTypes(IEnumerable<Type> dataTypes)
Parameters
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 OpcDataTypeAttribute is to be created.
Exceptions
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.
The dataTypes
is a null reference (Nothing in Visual Basic).
Remarks
Any null reference (Nothing in Visual Basic) in dataTypes
is ignored.
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.
C#
public static void RegisterTypes(Type dataType, params Type[] dataTypes)
Parameters
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 OpcDataTypeAttribute is to be created.
dataTypes
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 OpcDataTypeAttribute is to be created.
Exceptions
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.
The dataType
or dataTypes
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered (see RegisterType´´1) 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.
C#
public static void UnregisterType<T>()
Unregisters the previously registered (see RegisterType´´1(OpcNodeId)) type defined by T
as the Object type to not longer create for the type definition identified by the dataTypeId
specified.
C#
public static void UnregisterType<T>(OpcNodeId dataTypeId)
Parameters
dataTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be unregistered.
Exceptions
The dataTypeId
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered (see RegisterType´´1(OpcNodeId, OpcEncoding)) 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.
C#
public static void UnregisterType<T>(OpcNodeId dataTypeId, params OpcEncoding[] dataTypeEncodings)
Parameters
dataTypeId
OpcNodeId
The identifier of the type definition for which the T
is to be unregistered.
dataTypeEncodings
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
The dataTypeId
or dataTypeEncodings
or one of its items is a null reference (Nothing in Visual Basic).
Unregisters all previously registered types (see RegisterTypes(Assembly)) in the assembly
specified.
C#
public static void UnregisterTypes(Assembly assembly)
Parameters
assembly
Assembly
The Assembly its types are inspected for types using the OpcDataTypeAttribute.
Exceptions
The assembly
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered (see RegisterTypes(IEnumerable)) dataTypes
specified.
C#
public static void UnregisterTypes(IEnumerable<Type> dataTypes)
Parameters
dataTypes
IEnumerable<Type>
A sequence of Type instances to unregister for the data definitions equals to the data type identifiers defined using the OpcDataTypeAttribute.
Exceptions
The dataTypes
is a null reference (Nothing in Visual Basic).
Unregisters the previously registered dataType
and the further specified dataTypes
(see RegisterTypes(Type, Type)).
C#
public static void UnregisterTypes(Type dataType, params Type[] dataTypes)
Parameters
dataType
Type
The Type instance to unregister for the data definitions equals to the data type identifiers defined using the OpcDataTypeAttribute.
dataTypes
Type[]
Exceptions
The dataType
or dataTypes
is a null reference (Nothing in Visual Basic).