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



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.DataTypeModel Namespace > GenericData Class : DataType Property
The associated data type of the generic data.
Syntax
'Declaration
 
<DefaultValueAttribute("")>
<DebuggerBrowsableAttribute(DebuggerBrowsableState.Never)>
Public Property DataType As DataType
'Usage
 
Dim instance As GenericData
Dim value As DataType
 
instance.DataType = value
 
value = instance.DataType
[DefaultValue("")]
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public DataType DataType {get; set;}
[DefaultValue("")]
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public:
property DataType^ DataType {
   DataType^ get();
   void set (    DataType^ value);
}
Remarks

When the 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 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 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