Figure 6 on – Echelon LonBridg Server User Manual
Page 57

LonBridge Server User’s Guide
51
Figure 6. Attribute Information for the SNVT_switch_2 Type
The first piece of information that you need about a network variable is its size.
As the figure shows, the SNVT_switch_2 type is a structured type. Thus, you
need to determine the lengths of each of the network variable fields within the
structure to determine the overall network variable size:
• The switch_state_t type is a one-byte enumeration type
• The union includes unsigned short types and the SNVT_multiplier_s type
(which is also an unsigned short type); the Neuron C language defines the
unsigned short type as a one-byte type
• The final member of the structure is an unsigned short, which is 1 byte
Thus, the overall size of the SNVT_switch_2 type is 3 bytes.
The indices for each of the three fields within the network variable are 0, 1, and
2, and each field has a length of 1 byte. For the simplified Lamp Module, the
nviValue and nvoValueFb network variables use fields 0 and 1, but not field 2.
By default, the first value within the setting union scales its values by 0.5, as