
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As DataValue |
C# | |
---|---|
[DataContractAttribute(Namespace="http://opcfoundation.org/UA/2008/02/Types.xsd", IsNamespaceSetExplicitly=true)] public class DataValue |
This object relates to the OPC UA Specifications Part 6: Mappings, section 6.2.2.16 titled DataValue.
This object is essentially a place-holder for the following:
- Variant
- StatusCode
- System.DateTime for the Servers Timestamp
C# | ![]() |
---|---|
//define a new DataValue first where: // (a) the value is a string, which is "abc123" // (b) the statuscode is 0 (zero) // (c) the timestamp is 'now' DataValue dv = new DataValue(new Variant("abc123"), new StatusCode(0), DateTime.Now); |
Visual Basic | ![]() |
---|---|
'define a new DataValue first where: ' (a) the value is a string, which is "abc123" ' (b) the statuscode is 0 (zero) ' (c) the timestamp is 'now' Dim dv As DataValue = New DataValue(New Variant("abc123"), New StatusCode(0), DateTime.Now); |
System.Object
Opc.Ua.DataValue
Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x