Changeable network variable types, Compatibility case 1 – writing compatible network – Echelon LNS User Manual
Page 38
LNS Programmer's Guide
24
circumstances will LNS write a constant device-specific configuration property to a
device unless the configuration property’s
DeviceSpecificAttribute
property is set
to
False
.
Changeable Network Variable Types
This feature has been supported to some extent for several LNS releases. Version 3.3 of
the LonMark Application-Layer Interoperability Guidelines introduced a new, standard
mechanism for supporting network variables with changeable types and sizes. The
version 11 L
ON
M
ARK
standard resource files include a new SCPTnvType configuration
property type that a network manager can use to inform an application device of a
change to a network variable type and size. The version 11 resource files also include a
new SCPTmaxNVLength configuration property type, to be implemented as a constant
configuration property, to document the maximum legal length of a given network
variable.
Compatibility Case 1 – Writing Compatible Network
Management Tools and Plug-Ins
Some network management tools use the SCPtnvType configuration property to change
the type of a network variable. They set the value of the configuration property to match
the new type they want the network variable to use, and they also set the value of the
SnvtId
property in the LNS database. This use-case
demonstrates how a plug-in that
was designed to manage devices using SCPTnvType configuration properties with
previous versions of LNS will work using LNS Turbo Edition.
A) Tools that set the SCPTnvType configuration property first should follow these steps:
1. Get the SCPTnvType configuration property for the network variable.
2. Change its value. When using LNS Turbo Edition this will automatically
set the network variable’s SnvtId property to the correct value (0 for
UNVTs, >0 for SNVTs).
3. Set the value of the
SnvtId
property in the LNS database to match the
type chosen in step 2 (0 for UNVTs, >0 for SNVTs).
When using LNS
Turbo Edition this step has no effect, since the SnvtId property was
already modified by the previous step.
B) Tools that set the SnvtId property first should follow these steps:
1. Set
the
SnvtId property in the LNS database. When using LNS Turbo
Edition, if the SnvtId represents a standard type (non-zero), LNS will
automatically set the SCPTnvType configuration property for the
network variable.
2. Get the SCPTnvType configuration property for the network variable.
3. Change its value. When using LNS Turbo Edition, this step has no effect
if the SnvtId property was set to a standard type in step 1, since the
configuration property value would have already been set at that point.
For either scenario, the same end results will apply. The network variable’s type will be
successfully changed in the LNS database, an event will be generated to indicate this,