OPC Studio User's Guide and Reference
DataType Property (_GenericData)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.DataTypeModel.ComTypes Namespace > _GenericData Interface : DataType Property
The associated data type of the generic data.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Property DataType As DataType
'Usage
 
Dim instance As _GenericData
Dim value As DataType
 
instance.DataType = value
 
value = instance.DataType
[CanBeNull()]
DataType DataType {get; set;}
[CanBeNull()]
property DataType^ DataType {
   DataType^ get();
   void set (    DataType^ value);
}
Remarks

When the OpcLabs.BaseLib.DataTypeModel.GenericData is returned from the server by the component (e.g. from read operations or by subscriptions), this property is always filled in (i.e. not null).

When the OpcLabs.BaseLib.DataTypeModel.GenericData is passed in to the component for transfer to the server (e.g. to a write operation), it is optional. When not null, the component checks the value in OpcLabs.BaseLib.DataTypeModel.GenericData against the data type given by this property, and issues an error if the value does not conform to the type. It is allowed for this property to be not null at some higher level, and be null at lower level, such as for an individual field of a structure.

When the data type is given and passed to the component, it is only used for the checks described above. It does not influence the actual encoding of the values, and the encoding process may further reject some input values as not conforming to the encoding.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also