Echelon LNS User Manual

Page 275

Advertising
background image

LNS Programmer's Guide

261

7. Optionally add objects, set properties, and call methods. This includes defining

DeviceTemplate objects, and setting network timers or other properties of the
System object. If you add device templates at this time, your recovered devices will

have more meaningful names for their device templates, and include more accurate
default settings.

Note that you cannot add any objects that consume network resources at this point,
such as AppDevice, Router, Channel or Subnet objects. This could create conflicts

on the network once it is recovered.

8. Call

the

RecoverFromNetwork() method. You can use the options parameter to

control the behavior of the recovery process. If the network being recovered is a small
network, you should specify the lcaRecoveryOptSmallNetwork option, which tells

the LNS Object Server to use a recovery algorithm optimized for small to medium-

sized networks. This algorithm uses domain-wide broadcasts to find devices. The
lcaRcoveryOptSmallNetwork option will work reliably with network containing

up to 64 devices, and may work well with more devices depending on your network
topology.

If the network being recovered has a very high traffic rate, you may want to specify
the lcaRecoveryOptForceOffline option, which tells the LNS Object Server to

force all devices off-line during the discovery process. In this case, all application

traffic stops and the devices will be free to listen to the recovery messages. Large
networks may generate too much traffic with domain-wide broadcasts so the
lcaRecoveryOptForceOffline network option uses subnet broadcasts, which
take much longer. The devices are left in the offline state when recovery is

complete. Note that these options may be ORed together.

RecoveredSystem.RecoverFromNetwork(False, lcaRecoveryOptSmallNetwork)

9. After network recovery has been completed, the system management mode will be set

to lcaMgmtModeDeferConfigUpdates. You need to set the system management
mode to lcaMgmtModePropagateConfigUpdates before resuming normal

operations. You can do so by writing to the MgmtMode property of the System object.

RecoveredSystem.MgmtMode = lcaMgmtModePropagateConfigUpdates

Note that you should thoroughly examine the LNS database to make sure that the

database is consistent and complete before you set the system management mode to
lcaMgmtModePropagateConfigUpdates.

10. Call the System object’s RestoreLicense() method to resume the LNS Device

Credit licensing model. The method takes a single parameter that indicates whether
the recovered network was installed using LNS. This parameter affects whether or

not LNS will charge any LNS Device Credits for the recovery. See chapter 13, LNS

Licensing, for more information on this.

RecoveredSystem.RestoreLicense (True)

11. Configured devices recovered by the network recovery process will be stored in the

Discovered.Installed subsystem. Unconfigured devices will be stored in the
Discovered.Uninstalled subsystem. Once the network recovery has completed,
you can use the AddReference() method to add those devices to other subsystems,

as described in Chapter 6 of this document.

Advertising