Currentformatlocale – Echelon LNS User Manual

Page 258

Advertising
background image

LNS Programmer's Guide

244

Property Description

UnitsAdder

This property indicates the value that

should be added to the raw value of the

data point or monitor point when it is
unit-converted for display as a formatted
value (via the FormattedValue

property). This addition is performed

after the raw value is multiplied based
on the UnitsMultiplier property.

CurrentFormatLocale

As described in the previous section, the

FormatSpec

object assigned to a data point or

monitor point determines the base type of the data stored in the object. For data points,

you can customize how this data will be displayed using

FormatLocale

objects.

Each FormatLocale object contains a series of properties that reflect a particular

geographical area’s conventions for data display. These conventions affect how data
should be displayed in that area, including factors such as language, measurement

system (U.S. or Systeme Internationale), date formats, time formats, and decimal
number formats. The settings of a FormatLocale object determine how data accessed
through the FormattedValue properties of all DataPoint objects will be displayed

when your application uses that FormatLocale object.

Each client application can select which FormatLocale object it will use for a given

session by passing a selected FormatLocale object to the CurrentFormatLocale
property of the ObjectServer object before opening any networks and formatting any

data. Operations that will cause your application to format data include acquiring
DataPoint objects, and reading or writing the values of configuration properties and

network variables on your network.

By specifying their own FormatLocale object, client applications in different regions can

use their own sets of local or absolute formats when displaying data, without affecting

the data formatting used by other clients. This greatly reduces the risk of your
application returning information that is confusing or misleading due to formatting

changes made by another application.

You can access the FormatLocales collection through the FormatLocales property of

the ObjectServer object. Initially, the FormatLocales collection contains 4 pre-
defined FormatLocale objects:

1. UserDefaultRegionalSettings. This is the default value for the

CurrentFormatLocale property. When you use this FormatLocale object, all

the properties will be set based on the user-defined Windows regional settings for
the user currently logged onto the PC running your application. You can change

the regional settings on a PC using the Windows control panel Regional Options

applet. Consult the Microsoft Developer’s Network (MSDN) documentation of the
Win32 GetLocaleInfo() function for more information on the Windows

regional settings.

2. SystemDefaultRegionalSettings. When you use this FormatLocale object,

all the properties will be set based on the default Windows regional settings on

Advertising