1 creating a case structure – Echelon i.LON SmartServer 2.0 User Manual
Page 194

i.LON SmartServer 2.0 Programmer’s Reference
13-6
13.3.2.1 Creating a Case Structure
You can create case structures for each Type Translator Rule that defines the set of operations that will
be performed when a type translation is made with that rule. Each case structure includes several
global elements, and a series of case rules. The case rules are signified by a list of
You can use these rules to establish the value that will be assigned to the data point that the Type
Translator Rule generates as output. See Case Rules for more information on the
For example, consider a Type Translator Rule that converts a SNVT_occupancy input data point
(nviOccupancy) to a SNVT_switch output data point (nvoSwitch). You could set up one case
structure that sets nvoSwitch to ON (100.0 1) when nviOccupancy is set to OC_OCCUPIED. You
could set up another case structure that sets nvoSwitch to OFF (0.0 0) when nviOccupancy is set to
OC_UNOCCUPIED. Each structure could have a different set of case rules that will be used to assign
the output data point, or data points, a different value.
LonFormat="UCPTcompFunction">FN_EQ
LonFormat="">OC_OCCUPIED
/> LonFormat="UCPTcompFunction">FN_NUL LonFormat="">100.0 1 LonFormat="UCPTcompFunction">FN_EQ LonFormat="">OC_UNOCCUPIED /> LonFormat="UCPTcompFunction">FN_NUL LonFormat="">0.0 0 Before the operations defined by the case rules are performed, the Type Translator Rule will use its If the result of the operation is True, each of the case rules defined for the case structure will be used. Note: If none of the case structures for a Type Translator Rule evaluate to True, the data point will be The following table describes the global elements you will fill in to define the comparison that will be
global elements to compare the value of an input data point (and field, where applicable) to a value of
your choice. You will select a comparison function with which the comparison is to be made.
If the result is False, the case rules will not be used. These comparisons are meant to give you
flexibility when setting up your case structures.
updated during the translation. However, its value will not change.
performed. These elements must be inserted at the top of the case structure, before the
elements.