OpcEngineeringUnitInfo Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcEngineeringUnitInfo type exposes the following members.

OpcEngineeringUnitInfo()

Initializes a new instance of the OpcEngineeringUnitInfo class.

C#

public OpcEngineeringUnitInfo()

OpcEngineeringUnitInfo(Int32)

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.

OpcEngineeringUnitInfo(Int32, String)

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”.

OpcEngineeringUnitInfo(Int32, String, String)

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”.

OpcEngineeringUnitInfo(String)

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”.

OpcEngineeringUnitInfo(String, String)

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.

OpcEngineeringUnitInfo(String, String, String)

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.

DefaultNamespaceUri

Defines the default value used for the NamespaceUri property.

C#

public static readonly string DefaultNamespaceUri


Field Value
String

CommonCode

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

C#

public string CommonCode { get; }


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.

C#

public string Description { get; set; }


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.

C#

public string DisplayName { get; set; }


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.

C#

public bool HasUnitId { get; }


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.

C#

public bool IsUndefined { get; }


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.

C#

public string NamespaceUri { get; set; }


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.

C#

public int UnitId { get; set; }


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.

GetCommonCode(Int32)

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

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()

Returns a string that represents the current OpcEngineeringUnitInfo.

C#

public override string ToString()


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.

Explicit(OpcEngineeringUnitInfo to EUInformation)

Converts a OpcEngineeringUnitInfo to an EUInformation object.

C#

public static explicit operator EUInformation(OpcEngineeringUnitInfo value)

Implicit(EUInformation to OpcEngineeringUnitInfo)

Converts a EUInformation to an OpcEngineeringUnitInfo object.

C#

public static implicit operator OpcEngineeringUnitInfo(EUInformation value)