Measurementunits – Echelon OpenLNS User Manual

Page 380

Advertising
background image

OpenLNS Programmer's Reference

343

MeasurementUnits

Summary

Determines the measurement units (Systeme Internationale

[SI metric] or U.S.)

that will be used to display the formatted

values of data points when this FormatLocale object is used

by an application. This is implemented when a data point is

using a default type that has several alternate formats

associated with it.
For example, consider a case where a data point is using

SNVT_temp as its default type. The formatted value of the

data point would be displayed using the SNVT_temp#US

format if this property is set to lcaMeasurementUnitsUS

(1), or using the SNVT_temp#SI format if this property is

set lcaMeasurementUnitsSI (0).
You can also cause LNS to choose localized formats whenever

possible by writing the value "LO" to the

CategoryPreferenceList property. In this case, OpenLNS will

first determine whether to use U.S. or metric measurement

units by reading the MeasurementUnits property. If the

CategoryPreferenceList is set to "LO", and a localized

alternate type that complies with the measurement units

selected exists for the format used by the data point,

OpenLNS will use the localized type. Otherwise, it will use

the first alternate type it finds that complies with the setting

of the MeasurementUnits property.
For example, consider a case where a data point is using the

SNVT_hvac_overid type. If the MeasurementUnits property

is set to use U.S. units, and the CategoryPreferenceList

property is not set, LNS would use the

SNVT_hvac_overid#US format to display the value of the

data point, as described earlier in this section. However, if

the CategoryPreferenceList property is set to "LO", LNS

would use the SNVT_hvac_overid#US_LO format to

display the value. This may be useful if you want your

application to use localized formats as much as possible.
You can use the MeasurementUnitsSource property to

determine how the MeasurementUnits property should be

filled in.

Availability

Local, full, lightweight, and independent clients.

Syntax

formatLocale.

MeasurementUnits

= units

Element

Description

formatLocale

The FormatLocale object being acted

upon.

units

The measurement units being used.
The possible values for this element,

which are stored in the

ConstFormatLocaleMeasurementUnits

constant, are as follows:

Advertising