Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcEngineeringUnitInfo type exposes the following members.
Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId
specified.
C#
public OpcEngineeringUnitInfo(int unitId)
Parameters
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.
Initializes a new instance of the OpcEngineeringUnitInfo class using the unitId
and displayName
specified.
C#
public OpcEngineeringUnitInfo(int unitId, string displayName)
Parameters
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”.
Initialues a new instance of the OpcEngineeringUnitInfo class using the unitId
, displayName
and description
specified.
C#
public OpcEngineeringUnitInfo(int unitId, string displayName, string description)
Parameters
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”.
Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName
specified.
C#
public OpcEngineeringUnitInfo(string displayName)
Parameters
displayName
String
The name of the engineering unit which is typically an abbreviation. For example “h” for “hour”.
Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName
and namespaceUri
specified.
C#
public OpcEngineeringUnitInfo(string displayName, string namespaceUri)
Parameters
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 (company, standards organization) that defines the engineering unit.
Initializes a new instance of the OpcEngineeringUnitInfo class using the displayName
, description
and namespaceUri
specified.
C#
public OpcEngineeringUnitInfo(string displayName, string description, string namespaceUri)
Parameters
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 (company, standards organization) that defines the engineering unit.
Defines the default value used for the NamespaceUri property.
C#
public static readonly string DefaultNamespaceUri
Field Value
String
Gets the common code derived from the UnitId of the engineering unit represented.
C#
public string CommonCode { get; }
Property 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.
Gets or sets the full name of the engineering unit represented.
C#
public string Description { get; set; }
Property Value
The full name of the engineering unit for example “hour” or “meter per second”. For the according abbreviation see DisplayName.
Gets or sets the name of the engineering unit represented.
C#
public string DisplayName { get; set; }
Property Value
The name (typically an abbreviation) of the engineering unit for example “h” for “hour” or “m/s” for “meter per second”.
Gets a value indicating whether the engineering unit provides an according numeric identifier (see UnitId) for programmatic evaluation.
C#
public bool HasUnitId { get; }
Property Value
The value true if the engineering unit provides an identifier for the unit represented; otherwise the value false.
Gets a value indicating whether the engineering unit does not provide any concrete information about the unit represented.
C#
public bool IsUndefined { get; }
Property 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.
Gets or sets a value that identifies the organization (company, standards organization) that defines the OpcEngineeringUnitInfo represented.
C#
public string NamespaceUri { get; set; }
Property Value
A string representing the Uri of the organization (company, standards organization) that defines the engineering unit.
Retrieves the common code which is associated with the unitId
specified.
C#
public static string GetCommonCode(int unitId)
Parameters
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.20.
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).
Returns a string that represents the current OpcEngineeringUnitInfo.
C#
public override string ToString()
Returns
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.
Converts a OpcEngineeringUnitInfo to an EUInformation object.
C#
public static explicit operator EUInformation(OpcEngineeringUnitInfo value)
Converts a EUInformation to an OpcEngineeringUnitInfo object.
C#
public static implicit operator OpcEngineeringUnitInfo(EUInformation value)