Format file, Alternate formats – Echelon LNS DDE Server User Manual
Page 115
For each network variable and configuration property type, the type file supplies
the following information:
• The name of the type and the names for any fields within the type. These
names are all programmatic names defined by the application developer.
• Indices to language-dependent strings for language-dependent names,
comments, and units for the type, and any fields within the type.
• A minimum and maximum for each field in the type. The LNS DDE Server
uses this information to check that values supplied by the user are within the
valid range.
• For applicable fields, there are scaling factors that convert raw data into
formatted data. By default, this transformation is an addition of zero and a
multiplication by one. Certain fields, such as floating point numbers and
enumeration values, do not use scaling factors.
Note:
The valid range for floating point values is –3.4E38 to +3.4E38.
Format File
The format files (e.g. STANDARD.FMT) define how the information contained in a
network variable or configuration property should be displayed. The format file
uses the information in the a file to obtain the data types and structures, and to
convert enumeration types into strings.
The format specification and the network variable or configuration property type
are related by the programmatic name key, for example “SNVT_elapsed_tm” or
“SCPT_location”. For integer, floating point, and enumeration types, the
formatting is almost always a simple conversion to an ASCII string. For
structured types (for example, time-of-day expressed in hours, minutes, and
seconds), the data will be formatted as individual fields. Each data type present
in the format file must have a corresponding type defined in a user type file,
although user type files may have additional types defined.
Alternate Formats
Alternate formats are used to specify multiple formats for a single type. Alternate
formats for a type are specified using the # symbol after the type name. For
example, SNVT_temp_f (temperature in degrees celcius as a floating point
number) has two formats, SNVT_temp_f#SI for Système Internationale units
(i.e. Celsius) and SNVT_temp_f#US for US units (i.e. Fahrenheit).
Alternate formats are grouped into alternate format classes, where an alternate
format class defines a set of related alternate formats. Alternate format classes
are identified by two-character, upper-case, substrings within an alternate
format specifier. Three standard alternate format classes are defined to support
locale-specific formatting. The standard alternate formats are the following:
1. SI = Système Internationale measurement system format (also known as
metric). These formats will be automatically selected if the operating system
is configured to use Système Internationale units.
LNS DDE Server User’s Guide
A-3