Skip to content

Reference

OpcValueRange Members

Defines the range for a value.

Reference

OpcValueRange Members ​

Type
OpcValueRange
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Constructors ​

OpcValueRange ​

3 overloads

OverloadDescription
OpcValueRange()Initializes a new instance of the OpcValueRange class.
OpcValueRange(double)Initializes a new instance of the OpcValueRange class using the high limit specified with the lower limit equals to zero.
OpcValueRange(double, double)Initializes a new instance of the OpcValueRange class using the high and low limit specified.

OpcValueRange() ​

Initializes a new instance of the OpcValueRange class.

csharp
public OpcValueRange()
vbnet
Public Sub New()

Remarks

An instance created using this constructor results into a range with the lower and upper limit equals to zero.

OpcValueRange(double) ​

Initializes a new instance of the OpcValueRange class using the high limit specified with the lower limit equals to zero.

csharp
public OpcValueRange(double high)
vbnet
Public Sub New(high As Double)

Parameters

NameTypeDescription
highDoubleThe upper limit of a value.

Remarks

If high is less then zero, the High limit will become zero and the Low limit will define the value specified by high.

OpcValueRange(double, double) ​

Initializes a new instance of the OpcValueRange class using the high and low limit specified.

csharp
public OpcValueRange(double high, double low)
vbnet
Public Sub New(high As Double, low As Double)

Parameters

NameTypeDescription
highDoubleThe upper limit of a value.
lowDoubleThe lower limit of a value.

Remarks

If high is less than low then High will have the value of low and Low will have the value of high.

Properties ​

High ​

Gets or sets the highest value in the range.

csharp
public double High { get; set; }
vbnet
Public Property High As Double

Property value

Double

The highest value in the range representing the upper limit.

Low ​

Gets or sets the lowest value in the range.

csharp
public double Low { get; set; }
vbnet
Public Property Low As Double

Property value

Double

The lowest value in the range representing the lower limit.

Magnitude ​

Gets the mathematical distance between Low and High.

csharp
public double Magnitude { get; }
vbnet
Public ReadOnly Property Magnitude As Double

Property value

Double

The mathematical distance determined by the absolute difference between Low and High.

Methods ​

Of ​

static · 4 overloads · since v2.10

OverloadDescription
Of<T>()static · since v2.10Determines the according OpcValueRange of the type specified by T.
Of(Type)static · since v2.10Determines the according OpcValueRange of the type specified by type.
Of(OpcDataType)static · since v2.10Determines the according OpcValueRange of the type specified by type.
Of(OpcNodeId)static · since v2.10Determines the according OpcValueRange of the type identified by the specified typeId.

Of<T>() ​

static · since v2.10

Determines the according OpcValueRange of the type specified by T.

csharp
public static OpcValueRange Of<T>()
vbnet
Public Shared Function [Of](Of T)() As OpcValueRange

Type parameters

NameDescription
TThe type which is reflected to look up a 'MinValue' and a 'MaxValue' field to determine the Low and High values of the OpcValueRange to determine.

Returns

OpcValueRange

The OpcValueRange with the according 'MinValue' for Low and the 'MaxValue' for High or a null reference (Nothing in Visual Basic) if the type specified does not provide a 'MinValue' and 'MaxValue' field.

Remarks

To determine the according OpcValueRange 'MinValue' and 'MaxValue' are required as static fields which offer IConvertible values.

Of(Type) ​

static · since v2.10

Determines the according OpcValueRange of the type specified by type.

csharp
public static OpcValueRange Of(Type type)
vbnet
Public Shared Function [Of](type As Type) As OpcValueRange

Parameters

NameTypeDescription
typeTypeThe Type which is reflected to look up a 'MinValue' and a 'MaxValue' field to determine the Low and High values of the OpcValueRange to determine.

Returns

OpcValueRange

The OpcValueRange with the according 'MinValue' for Low and the 'MaxValue' for High or a null reference (Nothing in Visual Basic) if the type specified does not provide a 'MinValue' and 'MaxValue' field or if type is a null reference (Nothing in Visual Basic).

Remarks

To determine the according OpcValueRange 'MinValue' and 'MaxValue' are required as static fields which offer IConvertible values.

Of(OpcDataType) ​

static · since v2.10

Determines the according OpcValueRange of the type specified by type.

csharp
public static OpcValueRange Of(OpcDataType type)
vbnet
Public Shared Function [Of](type As OpcDataType) As OpcValueRange

Parameters

NameTypeDescription
typeOpcDataTypeOne of the members defined by the OpcDataType enumeration its underlying Type is reflected to look up a 'MinValue' and a 'MaxValue' property to determine the Low and High values of the OpcValueRange to determine.

Returns

OpcValueRange

The OpcValueRange with the according 'MinValue' for Low and the 'MaxValue' for High or a null reference (Nothing in Visual Basic) if the according Type of the type specified does not provide a 'MinValue' and 'MaxValue' field.

Remarks

To determine the according OpcValueRange 'MinValue' and 'MaxValue' are required as static fields which offer IConvertible values.

Of(OpcNodeId) ​

static · since v2.10

Determines the according OpcValueRange of the type identified by the specified typeId.

csharp
public static OpcValueRange Of(OpcNodeId typeId)
vbnet
Public Shared Function [Of](typeId As OpcNodeId) As OpcValueRange

Parameters

NameTypeDescription
typeIdOpcNodeIdThe OpcNodeId which identifies the OpcDataTypeInfo its underlying Type is reflected to look up a 'MinValue' and a 'MaxValue' field to determine the Low and High values of the OpcValueRange to determine.

Returns

OpcValueRange

The OpcValueRange with the according 'MinValue' for Low and the 'MaxValue' for High or a null reference (Nothing in Visual Basic) if the according Type identified by the typeId specified does not provide a 'MinValue' and 'MaxValue' field or typeId is a null reference (Nothing in Visual Basic) or is a null identifier (see IsNull).

Remarks

To determine the according OpcValueRange 'MinValue' and 'MaxValue' are required as static fields which offer IConvertible values.

ToString ​

override

Returns a string that represents the current OpcValueRange.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string that represents the current OpcValueRange including the used Low and High limits of the range represented.

Overrides

ToString()

Operators ​

Explicit ​

static

Converts a OpcValueRange to an Range object.

csharp
public static explicit operator Range(OpcValueRange value)
vbnet
Public Shared Narrowing Operator CType(value As OpcValueRange) As Range

Parameters

NameTypeDescription
valueOpcValueRangeA OpcValueRange that represents the engineering unit information.

Returns

Range

An instance of the Range class initialized from the value.

Implicit ​

static

Converts a Range to an OpcValueRange object.

csharp
public static implicit operator OpcValueRange(Range value)
vbnet
Public Shared Widening Operator CType(value As Range) As OpcValueRange

Parameters

NameTypeDescription
valueRangeA Range that represents the engineering unit information.

Returns

OpcValueRange

An instance of the OpcValueRange class initialized from the value.