Device configuration considerations, Lns licensing considerations – Echelon LNS User Manual
Page 138
LNS Programmer's Guide
124
Device Configuration Considerations
Before commissioning a device, you should make sure that the configuration property
information contained in the LNS database for the device is complete, and you should
download the configuration property values in the LNS database into the physical device.
To do so, call DownloadConfigProperties() on the AppDevice before you commission
it. Use the lcaConfigPropOptLoadValues and lcaConfigPropOptLoadUnknown
download options when you call DownloadConfigProperties(). This will set any
unknown configuration properties in the AppDevice object in the LNS database to their
default values, and then set all configuration property information in the physical device
on the network to match the information stored in the LNS database. As a result, when
the device is commissioned, it will contain current values for any configuration properties
that have been explicitly set, and default values for any configuration properties that
were unknown before the download.
Note that by using DownloadConfigProperties() as described above, you will
preserve the information stored in the LNS database for the AppDevice, by changing the
configuration property information stored in the physical device. In some cases, you may
want to do the opposite. You may want to change the configuration property information
stored in the LNS database to match the information stored in the physical device on the
network.
This can usually be accomplished by calling UploadConfigProperties() on the
AppDevice, but you cannot use this method on a device until it has been commissioned.
If you are commissioning a device for the first time and want to preserve the
configuration property information stored in the physical device, the solution is to call
DownloadConfigProperties() with the lcaConfigPropOptSetUnknown value as
the download option before you commission the device. All configuration property
information in the database will be set to unknown status, but the configuration property
in the physical device will not be affected. Once the device has been commissioned, you
can call UploadConfigProperties() with the lcaConfigPropOptLoadValues value
as the upload option to set the configuration property information in the database to
match the configuration property information stored in the physical device.
Echelon recommends that you use the same explicit transaction to call the
DownloadConfigProperties() method, and the Commission() or CommissionEx()
methods. Otherwise, this procedure will take longer and consume more network
bandwidth than when performed in separate transactions.
For more information on transactions, see Using Transactions and Sessions on page 65.
For more information on how you can use the DownloadConfigProperties() and
UploadConfigProperties() methods, see Configuring Devices on page 125.
LNS Licensing Considerations
All applications using the standard LNS Device Credit licensing model will require one
LNS Device Credit for each device being commissioned. Therefore, when commissioning
devices, you need to make sure that you have a sufficient number of LNS Device Credits
available. For more information on this, see Chapter 13, LNS Licensing.