EasyUA Reference
DataValue Class
Members  Example  See Also  Send Feedback
Opc.Ua.Core.Net4 Assembly > Opc.Ua Namespace : DataValue Class

Glossary Item Box

A class that stores the value of variable with an optional status code and timestamps.

Object Model

DataValue ClassStatusCode StructureVariant Structure

Syntax

Visual Basic (Usage)Copy Code
Dim instance As DataValue
C# 
[DataContractAttribute(Namespace="http://opcfoundation.org/UA/2008/02/Types.xsd", IsNamespaceSetExplicitly=true)]
public class DataValue 

Remarks

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:


Example

C#Copy Code
//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 BasicCopy Code
'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);

Inheritance Hierarchy

System.Object
   Opc.Ua.DataValue

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x

See Also

Copyright © 2018 Advosol Inc. All Rights Reserved.