Skip to content

Reference

OpcValue Members

Stores a generic value optionally associated with status and timestamp information.

Reference

OpcValue<T> Members ​

Type
OpcValue<T>
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from OpcValue.

Constructors ​

OpcValue ​

7 overloads

OverloadDescription
OpcValue(T)Initializes a new instance of the OpcValue<T> class using the value.
OpcValue(T, DateTime)Initializes a new instance of the OpcValue<T> class using the value and the sourceTimestamp of the value.
OpcValue(T, DateTime, OpcStatus)Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and status of the value.
OpcValue(T, DateTime, OpcStatusCode)Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and statusCode of the value.
OpcValue(T, DateTime, DateTime)Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and serverTimestamp of the value.
OpcValue(T, DateTime, DateTime, OpcStatus)Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp, serverTimestamp and status of the value.
OpcValue(T, DateTime, DateTime, OpcStatusCode)Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp, serverTimestamp and statusCode of the value.

OpcValue(T) ​

Initializes a new instance of the OpcValue<T> class using the value.

csharp
public OpcValue(T value)
vbnet
Public Sub New(value As T)

Parameters

NameTypeDescription
valueTThe value to represent.

OpcValue(T, DateTime) ​

Initializes a new instance of the OpcValue<T> class using the value and the sourceTimestamp of the value.

csharp
public OpcValue(T value, DateTime sourceTimestamp)
vbnet
Public Sub New(value As T, sourceTimestamp As Date)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.

OpcValue(T, DateTime, OpcStatus) ​

Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and status of the value.

csharp
public OpcValue(T value, DateTime sourceTimestamp, OpcStatus status)
vbnet
Public Sub New(value As T, sourceTimestamp As Date, status As OpcStatus)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
statusOpcStatusThe status information associated with the value.

OpcValue(T, DateTime, OpcStatusCode) ​

Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and statusCode of the value.

csharp
[CLSCompliant(false)]
public OpcValue(T value, DateTime sourceTimestamp, OpcStatusCode statusCode)
vbnet
<CLSCompliant(False)>
Public Sub New(value As T, sourceTimestamp As Date, statusCode As OpcStatusCode)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
statusCodeOpcStatusCodeOne of the OpcStatusCode members which defines the status information associated with the value.

OpcValue(T, DateTime, DateTime) ​

Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp and serverTimestamp of the value.

csharp
public OpcValue(T value, DateTime sourceTimestamp, DateTime serverTimestamp)
vbnet
Public Sub New(value As T, sourceTimestamp As Date, serverTimestamp As Date)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.

OpcValue(T, DateTime, DateTime, OpcStatus) ​

Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp, serverTimestamp and status of the value.

csharp
public OpcValue(
    T value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatus status)
vbnet
Public Sub New(
    value As T,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    status As OpcStatus)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.
statusOpcStatusThe status information associated with the value.

OpcValue(T, DateTime, DateTime, OpcStatusCode) ​

Initializes a new instance of the OpcValue<T> class using the value, sourceTimestamp, serverTimestamp and statusCode of the value.

csharp
[CLSCompliant(false)]
public OpcValue(
    T value,
    DateTime sourceTimestamp,
    DateTime serverTimestamp,
    OpcStatusCode statusCode)
vbnet
<CLSCompliant(False)>
Public Sub New(
    value As T,
    sourceTimestamp As Date,
    serverTimestamp As Date,
    statusCode As OpcStatusCode)

Parameters

NameTypeDescription
valueTThe value to represent.
sourceTimestampDateTimeThe timestamp at which the source produced the value.
serverTimestampDateTimeThe timestamp at which the server recorded the value.
statusCodeOpcStatusCodeOne of the OpcStatusCode members which defines the status information associated with the value.

Properties ​

DataTypeId ​

override

Gets the node identifier of the DataType of the value represented.

csharp
public override sealed OpcNodeId DataTypeId { get; }
vbnet
Public NotOverridable Overrides ReadOnly Property DataTypeId As OpcNodeId

Property value

OpcNodeId

An instance of the OpcNodeId representing the node identifier of the DataType.

Overrides

DataTypeId

Value ​

Gets or sets the T value represented.

csharp
public T Value { get; set; }
vbnet
Public Property Value As T

Property value

T

The value of the type T associated with the metadata represented.

ValueAsObject ​

Gets or sets the value represented.

csharp
public object ValueAsObject { get; set; }
vbnet
Public Property ValueAsObject As Object

Property value

Object

The value associated with the metadata represented.

Methods ​

CompareTo ​

3 overloads

OverloadDescription
CompareTo(object)overrideCompares the current OpcValue<T> with the other.
CompareTo(OpcValue)overrideCompares the current OpcValue<T> with another OpcValue<T>.
CompareTo(OpcValue<T>)virtualCompares the current OpcValue<T> with another OpcValue<T>.

CompareTo(object) ​

override

Compares the current OpcValue<T> with the other.

csharp
public override int CompareTo(object other)
vbnet
Public Overrides Function CompareTo(other As Object) As Integer

Parameters

NameTypeDescription
otherObjectThe OpcValue<T> to compare with this OpcValue<T>.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).

Overrides

CompareTo

Implements

CompareTo(object)

CompareTo(OpcValue) ​

override

Compares the current OpcValue<T> with another OpcValue<T>.

csharp
public override int CompareTo(OpcValue other)
vbnet
Public Overrides Function CompareTo(other As OpcValue) As Integer

Parameters

NameTypeDescription
otherOpcValueThe OpcValue<T> to compare with this OpcValue<T>.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).

Overrides

CompareTo

CompareTo(OpcValue<T>) ​

virtual

Compares the current OpcValue<T> with another OpcValue<T>.

csharp
public virtual int CompareTo(OpcValue<T> other)
vbnet
Public Overridable Function CompareTo(other As OpcValue(Of T)) As Integer

Parameters

NameTypeDescription
otherOpcValue<T>The OpcValue<T> to compare with this OpcValue<T>.

Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).

Implements

CompareTo(OpcValue<T>)

Equals ​

3 overloads

OverloadDescription
Equals(object)overrideDetermines whether the specified other is equal to this OpcValue<T>.
Equals(OpcValue)overrideDetermines whether the specified other is equal to this OpcValue<T>.
Equals(OpcValue<T>)virtualDetermines whether the specified other is equal to this OpcValue.

Equals(object) ​

override

Determines whether the specified other is equal to this OpcValue<T>.

csharp
public override bool Equals(object other)
vbnet
Public Overrides Function Equals(other As Object) As Boolean

Parameters

NameTypeDescription
otherObjectThe OpcValue<T> to compare to the current OpcValue<T>.

Returns

Boolean

The value true if the specified OpcValue<T> is equal to the current OpcValue; otherwise the value false.

Overrides

Equals

Equals(OpcValue) ​

override

Determines whether the specified other is equal to this OpcValue<T>.

csharp
public override bool Equals(OpcValue other)
vbnet
Public Overrides Function Equals(other As OpcValue) As Boolean

Parameters

NameTypeDescription
otherOpcValueThe OpcValue<T> to compare to the current OpcValue<T>.

Returns

Boolean

The value true if the specified OpcValue<T> is equal to the current OpcValue; otherwise the value false.

Overrides

Equals

Equals(OpcValue<T>) ​

virtual

Determines whether the specified other is equal to this OpcValue.

csharp
public virtual bool Equals(OpcValue<T> other)
vbnet
Public Overridable Function Equals(other As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
otherOpcValue<T>The OpcValue to compare to the current OpcValue.

Returns

Boolean

The value true if the specified OpcValue is equal to the current OpcValue; otherwise the value false.

Implements

Equals(OpcValue<T>)

GetHashCode ​

override

Retrieves a hash code for this OpcValue<T>.

csharp
public override int GetHashCode()
vbnet
Public Overrides Function GetHashCode() As Integer

Returns

Int32

An int that contains the hash code for the OpcValue<T>.

Overrides

GetHashCode

Operators ​

Equality ​

static

Returns a value indicating whether two instance of OpcValue<T> are equal.

csharp
public static bool operator ==(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator =(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> to compare.
rightOpcValue<T>The second OpcValue<T> to compare.

Returns

Boolean

The value true if left and right are equal; otherwise the value false.

Explicit ​

static

Converts a OpcValue<T> to an DataValue object.

csharp
[CLSCompliant(false)]
public static explicit operator DataValue(OpcValue<T> value)
vbnet
<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcValue(Of T)) As DataValue

Parameters

NameTypeDescription
valueOpcValue<T>A OpcValue<T> that represents the value.

Returns

DataValue

An instance of the DataValue class initialized from the value.

GreaterThan ​

static

Determines whether the first specified OpcValue<T> object is greater than the second specified OpcValue<T> object.

csharp
public static bool operator >(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator >(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> object.
rightOpcValue<T>The second OpcValue<T> object.

Returns

Boolean

The value true if left is greater than right; otherwise, false.

GreaterThanOrEqual ​

static

Determines whether the first specified OpcValue<T> object is greater than or equal to the second specified OpcValue<T> object.

csharp
public static bool operator >=(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator >=(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> object.
rightOpcValue<T>The second OpcValue<T> object.

Returns

Boolean

The value true if left is greater than or equal to right; otherwise, false.

Implicit ​

static · 2 overloads

OverloadDescription
implicit operator OpcValue<T>(DataValue)staticConverts a DataValue to an OpcValue<T> object.
implicit operator OpcValue<T>(Variant)staticConverts a Variant to an OpcValue<T> object.

implicit operator OpcValue<T>(DataValue) ​

static

Converts a DataValue to an OpcValue<T> object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue<T>(DataValue value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As DataValue) As OpcValue(Of T)

Parameters

NameTypeDescription
valueDataValueA DataValue that represents the value.

Returns

OpcValue<T>

An instance of the OpcValue<T> class initialized from the value.

implicit operator OpcValue<T>(Variant) ​

static

Converts a Variant to an OpcValue<T> object.

csharp
[CLSCompliant(false)]
public static implicit operator OpcValue<T>(Variant value)
vbnet
<CLSCompliant(False)>
Public Shared Widening Operator CType(value As [Variant]) As OpcValue(Of T)

Parameters

NameTypeDescription
valueVariantA Variant that represents the value.

Returns

OpcValue<T>

An instance of the OpcValue<T> class initialized from the value.

Inequality ​

static

Returns a value indicating whether two instances of OpcValue<T> are not equal.

csharp
public static bool operator !=(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator <>(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> to compare.
rightOpcValue<T>The second OpcValue<T> to compare.

Returns

Boolean

The value true if left and right are not equal; otherwise the value false.

LessThan ​

static

Determines whether the first specified OpcValue<T> object is less than the second specified OpcValue<T> object.

csharp
public static bool operator <(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator <(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> object.
rightOpcValue<T>The second OpcValue<T> object.

Returns

Boolean

The value true if left is less than right; otherwise the value false.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe left is a null reference (Nothing in Visual Basic).

LessThanOrEqual ​

static

Determines whether the first specified OpcValue<T> object is less than or equal to the second OpcValue<T> object.

csharp
public static bool operator <=(OpcValue<T> left, OpcValue<T> right)
vbnet
Public Shared Operator <=(
    left As OpcValue(Of T),
    right As OpcValue(Of T)) As Boolean

Parameters

NameTypeDescription
leftOpcValue<T>The first OpcValue<T> object.
rightOpcValue<T>The second OpcValue<T> object.

Returns

Boolean

The value true if left is less than or equal to right; otherwise the value false.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe left is a null reference (Nothing in Visual Basic).