Echelon NodeBuilder Resource Editor User Manual
Page 67

E
XAMPLE
1:
A simple integer that does not require localization, with a “%d” decimal conversion
specification:
SNVT_count: text("%d");
E
XAMPLE
2:
A simple floating point value that does not require localization, with a “%f” floating-
point conversion specification:
SNVT_count_f: text("%f");
E
XAMPLE
3:
A temperature value that must be displayed differently in US, SI, and US differential
units, with a “%f” floating-point conversion specification and scaling factors:
SNVT_temp#SI: text("%f", *1+0(0:854)); ! degrees C
SNVT_temp#US: text("%f", *1.8+32(0:855)); ! degrees F
SNVT_temp#US_diff: text("%f", *1.8+0(0:855));
E
XAMPLE
4:
A time that must be localized, with a “LO” localized modifier and time() localization
function:
SNVT_date_time#LO: text(time(hour, minute, second));
E
XAMPLE
5:
A refrigeration type that requires a string, floating-point values, and locale-specific
list-separators:
SCPTrefrigType#LO:text("%s %f|%f|%f", refrigerant, A, B,
C);
This format definition displays the refrigerant field as a string, and A, B, and C as
floating point values separated by a localize list separator.
E
XAMPLE
6:
A position that includes conditional text:
SNVT_earth_pos#SI: text(("%d %d ",
latitude_direction,
longitude_direction),
((latitude_direction == 0) ? ("S") : ("N")),
(" %d %d ", latitude_deg, latitude_min),
((longitude_direction == 0) ? ("E") : ("W")),
(" %d %d %f", longitude_deg, longitude_min,
height_above_sea));
Following is a formal definition of the text format:
= '('
=
NodeBuilder Resource Editor User's Guide
59