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
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the Opc |
| Opc | Initializes a new instance of the OpcdisplayName specified. |
| Opc | Initializes a new instance of the OpcdisplayName and namespaceUri specified. |
| Opc | Initializes a new instance of the OpcdisplayName, description and namespaceUri specified. |
| Opc | Initializes a new instance of the OpcunitId specified. |
| Opc | Initializes a new instance of the OpcunitId and displayName specified. |
| Opc | Initialues a new instance of the OpcunitId, displayName and description specified. |
OpcEngineeringUnitInfo()
Initializes a new instance of the OpcEngineeringUnitInfo class.
public OpcEngineeringUnitInfo()Public Sub New()OpcEngineeringUnitInfo(string)
Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName specified.
public OpcEngineeringUnitInfo(string displayName)Public Sub New(displayName As String)Parameters
| Name | Type | Description |
|---|---|---|
displayName | String | The 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.
public OpcEngineeringUnitInfo(string displayName, string namespaceUri)Public Sub New(displayName As String, namespaceUri As String)Parameters
| Name | Type | Description |
|---|---|---|
displayName | String | The name of the engineering unit which is typically an abbreviation. For example "h" for "hour". |
namespaceUri | String | A string representing the Uri of the organization ( |
OpcEngineeringUnitInfo(string, string, string)
Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName, description and namespaceUri specified.
public OpcEngineeringUnitInfo(
string displayName,
string description,
string namespaceUri)Public Sub New(
displayName As String,
description As String,
namespaceUri As String)Parameters
| Name | Type | Description |
|---|---|---|
displayName | String | The name of the engineering unit which is typically an abbreviation. For example "h" for "hour". |
description | String | The full name of the engineering unit such as "hour" or "meter per second". |
namespaceUri | String | A string representing the Uri of the organization ( |
OpcEngineeringUnitInfo(int)
Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId specified.
public OpcEngineeringUnitInfo(int unitId)Public Sub New(unitId As Integer)Parameters
| Name | Type | Description |
|---|---|---|
unitId | Int32 | The 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.
public OpcEngineeringUnitInfo(int unitId, string displayName)Public Sub New(unitId As Integer, displayName As String)Parameters
| Name | Type | Description |
|---|---|---|
unitId | Int32 | The numeric identifier of the engineering unit. |
displayName | String | The 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.
public OpcEngineeringUnitInfo(
int unitId,
string displayName,
string description)Public Sub New(unitId As Integer, displayName As String, description As String)Parameters
| Name | Type | Description |
|---|---|---|
unitId | Int32 | The numeric identifier of the engineering unit. |
displayName | String | The name of the engineering unit which is typically an abbreviation. For example "h" for "hour". |
description | String | The full name of the engineering unit such as "hour" or "meter per second". |
Fields
DefaultNamespaceUri
Defines the default value used for the NamespaceUri property.
public static readonly string DefaultNamespaceUriPublic Shared ReadOnly DefaultNamespaceUri As StringField value
Properties
CommonCode
Gets the common code derived from the UnitId of the engineering unit represented.
public string CommonCode { get; }Public ReadOnly Property CommonCode As StringProperty value
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.
public string Description { get; set; }Public Property Description As StringProperty value
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.
public string DisplayName { get; set; }Public Property DisplayName As StringProperty value
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.
public bool HasUnitId { get; }Public ReadOnly Property HasUnitId As BooleanProperty value
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.
public bool IsUndefined { get; }Public ReadOnly Property IsUndefined As BooleanProperty value
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.
public string NamespaceUri { get; set; }Public Property NamespaceUri As StringProperty value
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.
public int UnitId { get; set; }Public Property UnitId As IntegerProperty value
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
Retrieves the common code which is associated with the unitId specified.
public static string GetCommonCode(int unitId)Public Shared Function GetCommonCode(unitId As Integer) As StringParameters
| Name | Type | Description |
|---|---|---|
unitId | Int32 | The 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. |
Returns
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
Returns a string that represents the current OpcEngineeringUnitInfo.
public override string ToString()Public Overrides Function ToString() As StringReturns
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
Operators
Explicit
Converts a OpcEngineeringUnitInfo to an EUInformation object.
public static explicit operator EUInformation(OpcEngineeringUnitInfo value)Public Shared Narrowing Operator CType(
value As OpcEngineeringUnitInfo) As EUInformationParameters
| Name | Type | Description |
|---|---|---|
value | Opc | A Opc |
Returns
EUInformation
An instance of the EUInformation class initialized from the value.
Implicit
Converts a EUInformation to an OpcEngineeringUnitInfo object.
public static implicit operator OpcEngineeringUnitInfo(EUInformation value)Public Shared Widening Operator CType(
value As EUInformation) As OpcEngineeringUnitInfoParameters
| Name | Type | Description |
|---|---|---|
value | EUInformation | A EUInformation that represents the engineering unit information. |
Returns
An instance of the OpcEngineeringUnitInfo class initialized from the value.

