Echelon OpenLNS User Manual
Page 96

OpenLNS Programmer's Reference
59
The UpgradeStatus object returned by this method contains
information indicating whether or not the upgrade was
successful, as well as information describing the changes that
were made to each component (for example, LonMark object,
network variable, message tag, configuration property,
monitor set, and monitor point) of the external interface
during the upgrade. You can always access the
UpgradeStatus object returned the last time the Upgrade
method was called on an AppDevice
by reading its
LastUpgradeStatus property.
If the new interface supports dynamic functional blocks and
the old one did not, OpenLNS will automatically create
dynamic functional blocks and dynamic network variables for
any static functional blocks and static network variables in
the old interface that do not appear in the new interface. This
supports a migration strategy in which a new device will
support dynamic functional blocks, instead of defining all of
its functional blocks as static. All such added components will
have the same programmatic name as the original, unless the
original was an array. In this case, an index value will be
appended to the name, or if the name does not fit, the name
will be truncated. This may lead to the assignment of
duplicate names, but an OpenLNS application may change
both the user name (Name) and programmatic name
(ProgrammaticName) in this case.
A new custom interface will be created by OpenLNS to house
network variables and LonMarkObjects that are converted
from static to dynamic in this fashion. The name used for
these custom interfaces is "LcaUpgrade
sequential number reflecting the number of upgrades that
the device has gone through since LNS 3.20 was installed.
For example, the 3rd time the device is upgraded, this
interface would be named "LcaUpgrade3." You can determine
which objects have been converted from static to dynamic
during the upgrade with this Interface object, or with the
UpgradeInfos collection. If you need to store these network
variables and LonMarkObjects on another interface, you can
use the MoveToInterface method to do so.
This method should be called from within an explicit
transaction using the StartTransaction method. This allows
the upgrade to be easily undone if necessary. For more
information on using transactions with LNS, see Chapter 4,
Programming an OpenLNS Application, of the OpenLNS
Programmer’s Guide.
As noted previously, you may need to upgrade a device when
you load the device’s application. Specifically, if the device
was configured, and the application that was previously in
the device and the application that was loaded do not have
the same program ID (and thus may not have the same
external interface), the Object Server will leave the device in
the unconfigured state, and you will need to upgrade it.