Skip to content

Reference

OpcEngineeringUnitInfo Members

Provides information to classify a value using codes for units of measurements.

Reference

OpcEngineeringUnitInfo Members ​

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

Constructors ​

OpcEngineeringUnitInfo ​

7 overloads

OverloadDescription
OpcEngineeringUnitInfo()Initializes a new instance of the OpcEngineeringUnitInfo class.
OpcEngineeringUnitInfo(string)Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName specified.
OpcEngineeringUnitInfo(string, string)Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName and namespaceUri specified.
OpcEngineeringUnitInfo(string, string, string)Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName, description and namespaceUri specified.
OpcEngineeringUnitInfo(int)Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId specified.
OpcEngineeringUnitInfo(int, string)Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId and displayName specified.
OpcEngineeringUnitInfo(int, string, string)Initialues a new instance of the OpcEngineeringUnitInfo class using the unitId, displayName and description specified.

OpcEngineeringUnitInfo() ​

Initializes a new instance of the OpcEngineeringUnitInfo class.

csharp
public OpcEngineeringUnitInfo()
vbnet
Public Sub New()

OpcEngineeringUnitInfo(string) ​

Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName specified.

csharp
public OpcEngineeringUnitInfo(string displayName)
vbnet
Public Sub New(displayName As String)

Parameters

NameTypeDescription
displayNameStringThe name of the engineering unit which is typically an abbreviation. For example "h" for "hour".

OpcEngineeringUnitInfo(string, string) ​

Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName and namespaceUri specified.

csharp
public OpcEngineeringUnitInfo(string displayName, string namespaceUri)
vbnet
Public Sub New(displayName As String, namespaceUri As String)

Parameters

NameTypeDescription
displayNameStringThe name of the engineering unit which is typically an abbreviation. For example "h" for "hour".
namespaceUriStringA string representing the Uri of the organization (company, standards organization) that defines the engineering unit.

OpcEngineeringUnitInfo(string, string, string) ​

Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName, description and namespaceUri specified.

csharp
public OpcEngineeringUnitInfo(
    string displayName,
    string description,
    string namespaceUri)
vbnet
Public Sub New(
    displayName As String,
    description As String,
    namespaceUri As String)

Parameters

NameTypeDescription
displayNameStringThe name of the engineering unit which is typically an abbreviation. For example "h" for "hour".
descriptionStringThe full name of the engineering unit such as "hour" or "meter per second".
namespaceUriStringA string representing the Uri of the organization (company, standards organization) that defines the engineering unit.

OpcEngineeringUnitInfo(int) ​

Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId specified.

csharp
public OpcEngineeringUnitInfo(int unitId)
vbnet
Public Sub New(unitId As Integer)

Parameters

NameTypeDescription
unitIdInt32The numeric identifier of the engineering unit.

Remarks

Using this constructor will use the CommonCode as the initial value of the DisplayName and Description of the engineering unit represented.

OpcEngineeringUnitInfo(int, string) ​

Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId and displayName specified.

csharp
public OpcEngineeringUnitInfo(int unitId, string displayName)
vbnet
Public Sub New(unitId As Integer, displayName As String)

Parameters

NameTypeDescription
unitIdInt32The numeric identifier of the engineering unit.
displayNameStringThe name of the engineering unit which is typically an abbreviation. For example "h" for "hour".

OpcEngineeringUnitInfo(int, string, string) ​

Initialues a new instance of the OpcEngineeringUnitInfo class using the unitId, displayName and description specified.

csharp
public OpcEngineeringUnitInfo(
    int unitId,
    string displayName,
    string description)
vbnet
Public Sub New(unitId As Integer, displayName As String, description As String)

Parameters

NameTypeDescription
unitIdInt32The numeric identifier of the engineering unit.
displayNameStringThe name of the engineering unit which is typically an abbreviation. For example "h" for "hour".
descriptionStringThe full name of the engineering unit such as "hour" or "meter per second".

Fields ​

DefaultNamespaceUri ​

static

Defines the default value used for the NamespaceUri property.

csharp
public static readonly string DefaultNamespaceUri
vbnet
Public Shared ReadOnly DefaultNamespaceUri As String

Field value

String

Properties ​

CommonCode ​

Gets the common code derived from the UnitId of the engineering unit represented.

csharp
public string CommonCode { get; }
vbnet
Public ReadOnly Property CommonCode As String

Property value

String

The unique code defined by the UNECE/CEFACT Trade Facilitation Recommendation No.20 from which the UnitId is derived. In case there is no UnitId defined (see HasUnitId) an empty string.

Description ​

Gets or sets the full name of the engineering unit represented.

csharp
public string Description { get; set; }
vbnet
Public Property Description As String

Property value

String

The full name of the engineering unit for example "hour" or "meter per second". For the according abbreviation see DisplayName.

DisplayName ​

Gets or sets the name of the engineering unit represented.

csharp
public string DisplayName { get; set; }
vbnet
Public Property DisplayName As String

Property value

String

The name (typically an abbreviation) of the engineering unit for example "h" for "hour" or "m/s" for "meter per second".

HasUnitId ​

Gets a value indicating whether the engineering unit provides an according numeric identifier (see UnitId) for programmatic evaluation.

csharp
public bool HasUnitId { get; }
vbnet
Public ReadOnly Property HasUnitId As Boolean

Property value

Boolean

The value true if the engineering unit provides an identifier for the unit represented; otherwise the value false.

IsUndefined ​

Gets a value indicating whether the engineering unit does not provide any concrete information about the unit represented.

csharp
public bool IsUndefined { get; }
vbnet
Public ReadOnly Property IsUndefined As Boolean

Property value

Boolean

The value true if the engineering unit represented does not provide any concrete information; otherwise the value false. This property provides by default the value true in case there the parameterless default constructor is used to create a new instance of the OpcEngineeringUnitInfo class.

NamespaceUri ​

Gets or sets a value that identifies the organization (company, standards organization) that defines the OpcEngineeringUnitInfo represented.

csharp
public string NamespaceUri { get; set; }
vbnet
Public Property NamespaceUri As String

Property value

String

A string representing the Uri of the organization (company, standards organization) that defines the engineering unit.

UnitId ​

Gets or sets the numeric identifier of the engineering unit.

csharp
public int UnitId { get; set; }
vbnet
Public Property UnitId As Integer

Property value

Int32

The numeric identifier of the engineering unit used for programmatic evaluation. A value equals -1 indicates that the UnitId is not available for the engineering unit represented.

Methods ​

GetCommonCode ​

static

Retrieves the common code which is associated with the unitId specified.

csharp
public static string GetCommonCode(int unitId)
vbnet
Public Shared Function GetCommonCode(unitId As Integer) As String

Parameters

NameTypeDescription
unitIdInt32The numeric unit identifier specified by the OPC Foundation for OPC UA to unique identify a specific unit specified by the UNECE/CEFACT Trade Facilitation Recommendation No.20.

Returns

String

The according (mostly three letters) encoded string representation of the unit identified using unitId specified. In case there the unitId is less or equals zero or results into a non alphanumeric code a null reference (Nothing in Visual Basic).

ToString ​

override

Returns a string that represents the current OpcEngineeringUnitInfo.

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

Returns

String

A string that represents the current OpcEngineeringUnitInfo including the used DisplayName (if available), Description (if available), alternatively the UnitId or "Unknown" in case there the OpcEngineeringUnitInfo does not provide any engineering unit information.

Overrides

ToString()

Operators ​

Explicit ​

static

Converts a OpcEngineeringUnitInfo to an EUInformation object.

csharp
public static explicit operator EUInformation(OpcEngineeringUnitInfo value)
vbnet
Public Shared Narrowing Operator CType(
    value As OpcEngineeringUnitInfo) As EUInformation

Parameters

NameTypeDescription
valueOpcEngineeringUnitInfoA OpcEngineeringUnitInfo that represents the engineering unit information.

Returns

EUInformation

An instance of the EUInformation class initialized from the value.

Implicit ​

static

Converts a EUInformation to an OpcEngineeringUnitInfo object.

csharp
public static implicit operator OpcEngineeringUnitInfo(EUInformation value)
vbnet
Public Shared Widening Operator CType(
    value As EUInformation) As OpcEngineeringUnitInfo

Parameters

NameTypeDescription
valueEUInformationA EUInformation that represents the engineering unit information.

Returns

OpcEngineeringUnitInfo

An instance of the OpcEngineeringUnitInfo class initialized from the value.