Postmove, Premove, Premove m – Echelon OpenLNS User Manual

Page 82: Postmove m, D postmove m

Advertising
background image

OpenLNS Programmer's Reference

45

PostMove

Summary

Completes the move of an application device from one

channel (or subnet) to another. As part of the move, the

device’s network address may change; however, the device’s

Handle property cannot change.
To move a device from one channel to another, follow these

steps:
1. Invoke the BeginSession method to begin a session. This

will allow your application to avoid some failure

scenarios that may occur when devices or routers are

moved.

2. Invoke the PreMove method. The target channel is

validated and the device is deconfigured. However, the

device still appears in the database as residing on the

original channel.

3. Physically move the device from one channel to another.
4. If the device being moved uses authentication, the

PostMove method should be called in a different session

than the PreMove method. This means you should call

the EndSession method to end the session begun in step

1, and then call the BeginSession method to begin a new

session.

5. Invoke the PostMove method. This method changes the

device’s channel assignment, does any necessary

rebinding, and updates the device’s configuration.

If you use explicit transactions during this procedure, make

sure that there are separate ones for the PreMove and

PostMove steps.

Availability

Local, full, and lightweight clients.

Syntax

object.PostMove

Element

Description

object

The

AppDevice

object to be moved from

one channel to another.

Added to API

Prior to LNS Release 3.0.

PreMove

Summary

Prepares an application device for movement from one

channel (or subnet) to another

.

When you call this method, you must specify the new channel

(newChannelObject element). If no new Subnet is specified

(i.e. the newSubnetObject is NULL), then automatic subnet

determination is used to determine the new subnet. Note

that you can use this method to move a device from one

subnet to another, without switching channels. In this case,

specify the device’s current channel as the newChannelObject

Advertising