Removing routers – Echelon LNS User Manual

Page 192

Advertising
background image

LNS Programmer's Guide

178

3. Call

PreMove()

on the device selected in step 2. You must specify the

new channel for the device with the

newChannelObject

element, and

you can optionally specify the new subnet for the device with the

newSubnetObject

element. Note that if you do not specify the new

channel for the device, LNS will attempt to automatically determine the
channel using the channel isolation process described previously in this

chapter.

MyAppDevice.PreMove(TargetChannel, NOTHING)

4. Physically move the device to its new location. Repeat steps 2, 3 and 4 for

each device being moved.

5. If any of the devices being moved use authentication, end the current

session, commit the transaction, and then start a new transaction and
session. Then, call

PostMove() on each device

to complete the

operation.

If MyAppDevice.AuthenticationEnabled Then
MySystem.EndSession()
MySystem.CommitTransaction()
MySystem.StartTransaction()
MySystem.BeginSession()
End If
MyAppDevice.PostMove()
MySystem.EndSession()
MySystem.CommitTransaction()

If you move a previously configured device to a new network, and the device has network

management authentication enabled, LNS will not typically be able to install the device.
In addition, if the device has the same network address as your client’s Network Service

Device, LNS will not be able to communicate with the device.

There are special considerations you need to make when moving a Network Service

Device. For more on this, see Moving a Network Service Device on page 164. In addition,
moving a configured device from one channel to another, or to a new network, may cause

communication problems between the device and the network. For more information on

this, see the previous section, Resolving Installation Failures.

Removing Routers

While managing your network, it may be necessary to remove routers from the network.
To do so, invoke the Remove() method on the applicable Routers collection as follows:

Dim MyRouters As LcaRouters

Set MyRouters = MySubsystem.Routers

MyRouters.Remove("Router1")

There are several things you should consider before removing a router. LNS allows

routers to be removed if the removal causes channels to become disconnected, but only if

doing so does not break the path between connections, permanent monitor sets, or
disrupt communication between the LNS Server and a remote Full client application.

If you attempt to remove a router and the operation fails because it would break a

connection, the

NS#73

lcaErrNsInsufficientRouters

exception will be thrown. If

you attempt to remove a router and the operation fails because it would break a

permanent monitor set, the

NS#181

lcaErrNsInsufficientRtrsForMnc

exception

will be thrown. If you attempt to remove a router and the operation fails because it would

Advertising