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
| Overload | Description |
|---|---|
| OpcValue( | Initializes a new instance of the OpcValue<value. |
| OpcValue( | Initializes a new instance of the OpcValue<value and the sourceTimestamp of the value. |
| OpcValue( | Initializes a new instance of the OpcValue<value, sourceTimestamp and status of the value. |
| OpcValue( | Initializes a new instance of the OpcValue<value, sourceTimestamp and statusCode of the value. |
| OpcValue( | Initializes a new instance of the OpcValue<value, sourceTimestamp and serverTimestamp of the value. |
| OpcValue( | Initializes a new instance of the OpcValue<value, sourceTimestamp, serverTimestamp and status of the value. |
| OpcValue( | Initializes a new instance of the OpcValue<value, sourceTimestamp, serverTimestamp and statusCode of the value. |
OpcValue(T)
Initializes a new instance of the OpcValue<T> class using the value.
public OpcValue(T value)Public Sub New(value As T)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
OpcValue(T, DateTime)
Initializes a new instance of the OpcValue<T> class using the value and the sourceTimestamp of the value.
public OpcValue(T value, DateTime sourceTimestamp)Public Sub New(value As T, sourceTimestamp As Date)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The 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.
public OpcValue(T value, DateTime sourceTimestamp, OpcStatus status)Public Sub New(value As T, sourceTimestamp As Date, status As OpcStatus)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The timestamp at which the source produced the value. |
status | OpcStatus | The 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.
[CLSCompliant(false)]
public OpcValue(T value, DateTime sourceTimestamp, OpcStatusCode statusCode)<CLSCompliant(False)>
Public Sub New(value As T, sourceTimestamp As Date, statusCode As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The timestamp at which the source produced the value. |
statusCode | OpcStatusCode | One 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.
public OpcValue(T value, DateTime sourceTimestamp, DateTime serverTimestamp)Public Sub New(value As T, sourceTimestamp As Date, serverTimestamp As Date)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The timestamp at which the source produced the value. |
serverTimestamp | DateTime | The 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.
public OpcValue(
T value,
DateTime sourceTimestamp,
DateTime serverTimestamp,
OpcStatus status)Public Sub New(
value As T,
sourceTimestamp As Date,
serverTimestamp As Date,
status As OpcStatus)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The timestamp at which the source produced the value. |
serverTimestamp | DateTime | The timestamp at which the server recorded the value. |
status | OpcStatus | The 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.
[CLSCompliant(false)]
public OpcValue(
T value,
DateTime sourceTimestamp,
DateTime serverTimestamp,
OpcStatusCode statusCode)<CLSCompliant(False)>
Public Sub New(
value As T,
sourceTimestamp As Date,
serverTimestamp As Date,
statusCode As OpcStatusCode)Parameters
| Name | Type | Description |
|---|---|---|
value | T | The value to represent. |
sourceTimestamp | DateTime | The timestamp at which the source produced the value. |
serverTimestamp | DateTime | The timestamp at which the server recorded the value. |
statusCode | OpcStatusCode | One of the OpcStatusCode members which defines the status information associated with the value. |
Properties
DataTypeId
Gets the node identifier of the DataType of the value represented.
public override sealed OpcNodeId DataTypeId { get; }Public NotOverridable Overrides ReadOnly Property DataTypeId As OpcNodeIdProperty value
An instance of the OpcNodeId representing the node identifier of the DataType.
Overrides
Value
Gets or sets the T value represented.
public T Value { get; set; }Public Property Value As TProperty value
T
The value of the type T associated with the metadata represented.
ValueAsObject
Gets or sets the value represented.
public object ValueAsObject { get; set; }Public Property ValueAsObject As ObjectProperty value
The value associated with the metadata represented.
Methods
CompareTo
| Overload | Description |
|---|---|
| CompareTo( | Compares the current OpcValue<other. |
| CompareTo( | Compares the current OpcValue< |
| CompareTo( | Compares the current OpcValue< |
CompareTo(object)
Compares the current OpcValue<T> with the other.
public override int CompareTo(object other)Public Overrides Function CompareTo(other As Object) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcValue< |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(object)).
Overrides
Implements
CompareTo(OpcValue)
Compares the current OpcValue<T> with another OpcValue<T>.
public override int CompareTo(OpcValue other)Public Overrides Function CompareTo(other As OpcValue) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcValue | The OpcValue< |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Overrides
CompareTo(OpcValue<T>)
Compares the current OpcValue<T> with another OpcValue<T>.
public virtual int CompareTo(OpcValue<T> other)Public Overridable Function CompareTo(other As OpcValue(Of T)) As IntegerParameters
| Name | Type | Description |
|---|---|---|
other | OpcValue< | The OpcValue< |
Returns
A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(T)).
Implements
Equals
| Overload | Description |
|---|---|
| Equals( | Determines whether the specified other is equal to this OpcValue< |
| Equals( | Determines whether the specified other is equal to this OpcValue< |
| Equals( | Determines whether the specified other is equal to this OpcValue. |
Equals(object)
Determines whether the specified other is equal to this OpcValue<T>.
public override bool Equals(object other)Public Overrides Function Equals(other As Object) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | Object | The OpcValue< |
Returns
The value true if the specified OpcValue<T> is equal to the current OpcValue; otherwise the value false.
Overrides
Equals(OpcValue)
Determines whether the specified other is equal to this OpcValue<T>.
public override bool Equals(OpcValue other)Public Overrides Function Equals(other As OpcValue) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcValue | The OpcValue< |
Returns
The value true if the specified OpcValue<T> is equal to the current OpcValue; otherwise the value false.
Overrides
Equals(OpcValue<T>)
Determines whether the specified other is equal to this OpcValue.
public virtual bool Equals(OpcValue<T> other)Public Overridable Function Equals(other As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
other | OpcValue< | The OpcValue to compare to the current OpcValue. |
Returns
The value true if the specified OpcValue is equal to the current OpcValue; otherwise the value false.
Implements
GetHashCode
Retrieves a hash code for this OpcValue<T>.
public override int GetHashCode()Public Overrides Function GetHashCode() As IntegerReturns
An int that contains the hash code for the OpcValue<T>.
Overrides
Operators
Equality
Returns a value indicating whether two instance of OpcValue<T> are equal.
public static bool operator ==(OpcValue<T> left, OpcValue<T> right)Public Shared Operator =(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left and right are equal; otherwise the value false.
Explicit
Converts a OpcValue<T> to an DataValue object.
[CLSCompliant(false)]
public static explicit operator DataValue(OpcValue<T> value)<CLSCompliant(False)>
Public Shared Narrowing Operator CType(value As OpcValue(Of T)) As DataValueParameters
| Name | Type | Description |
|---|---|---|
value | OpcValue< | A OpcValue< |
Returns
DataValue
An instance of the DataValue class initialized from the value.
GreaterThan
Determines whether the first specified OpcValue<T> object is greater than the second specified OpcValue<T> object.
public static bool operator >(OpcValue<T> left, OpcValue<T> right)Public Shared Operator >(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left is greater than right; otherwise, false.
GreaterThanOrEqual
Determines whether the first specified OpcValue<T> object is greater than or equal to the second specified OpcValue<T> object.
public static bool operator >=(OpcValue<T> left, OpcValue<T> right)Public Shared Operator >=(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left is greater than or equal to right; otherwise, false.
Implicit
| Overload | Description |
|---|---|
| implicit operator OpcValue< | Converts a DataValue to an OpcValue< |
| implicit operator OpcValue< | Converts a Variant to an OpcValue< |
implicit operator OpcValue<T>(DataValue)
Converts a DataValue to an OpcValue<T> object.
[CLSCompliant(false)]
public static implicit operator OpcValue<T>(DataValue value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As DataValue) As OpcValue(Of T)Parameters
| Name | Type | Description |
|---|---|---|
value | DataValue | A DataValue that represents the value. |
Returns
An instance of the OpcValue<T> class initialized from the value.
implicit operator OpcValue<T>(Variant)
Converts a Variant to an OpcValue<T> object.
[CLSCompliant(false)]
public static implicit operator OpcValue<T>(Variant value)<CLSCompliant(False)>
Public Shared Widening Operator CType(value As [Variant]) As OpcValue(Of T)Parameters
| Name | Type | Description |
|---|---|---|
value | Variant | A Variant that represents the value. |
Returns
An instance of the OpcValue<T> class initialized from the value.
Inequality
Returns a value indicating whether two instances of OpcValue<T> are not equal.
public static bool operator !=(OpcValue<T> left, OpcValue<T> right)Public Shared Operator <>(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left and right are not equal; otherwise the value false.
LessThan
Determines whether the first specified OpcValue<T> object is less than the second specified OpcValue<T> object.
public static bool operator <(OpcValue<T> left, OpcValue<T> right)Public Shared Operator <(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left is less than right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |
LessThanOrEqual
Determines whether the first specified OpcValue<T> object is less than or equal to the second OpcValue<T> object.
public static bool operator <=(OpcValue<T> left, OpcValue<T> right)Public Shared Operator <=(
left As OpcValue(Of T),
right As OpcValue(Of T)) As BooleanParameters
| Name | Type | Description |
|---|---|---|
left | OpcValue< | The first OpcValue< |
right | OpcValue< | The second OpcValue< |
Returns
The value true if left is less than or equal to right; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The left is a null reference ( |

