Echelon OpenLNS User Manual

Page 457

Advertising
background image

OpenLNS Programmer's Reference

420

network variables and LonMarkObjects that reflect the

device’s functionality on the network.
You can use the MoveToInterface method to move a dynamic

network variable or LonMarkObject from one custom

interface on a device to another. An advantage of this is that

you do not have to delete the network variable or

LonMarkObject from the first custom interface, and then add

it back to the second one.
Another advantage of this method is that you can use it to

remove a dynamic network variable from a device’s main

interface. You cannot use the Remove method to remove a

network variable from NetworkVariables collection on a

device's main interface, even if it is a dynamic network

variable. However, you can use the MoveToInterface method

to move a dynamic network variable from the main interface

to a custom interface. Once you have done so, you can remove

the network variable from the custom interface, and its

removal will be propagated to the main interface.
The ability to move a dynamic network variable or

LonMarkObject from one interface to another may also be

useful after you have upgraded a device’s interface with the

Upgrade method. Some static network variables and

LonMarkObjects that existed on the old interface, but not the

new one, will be converted to dynamic and stored in a custom

Interface object created during the upgrade. You can use this

method to move those objects back to their correct interface.

For more information on this, see the online help for the

Upgrade method.
If either the main interface, or an interface from another

device, is specified as the new interface for the network

variable or LonMarkObject, then the LCA, #4

lcaErrInvalidOleObject exception will be thrown.
If you call this method on a static LonMarkObject or network

variable, then the LCA, #119

lcaErrInterfaceNotModifyable exception will be thrown.

You can determine if a NetworkVariable or LonMarkObject

is dynamic by reading the object’s IsDynamic property.
If you attempt to call this method on a network variable that

has been previously assigned to a LonMarkObject with the

AssignNetworkVariable method, then the operation will fail,

and the NS, #164 lcaErrNsNvmtInUse exception will be

thrown, unless the LonMarkObject object the network

variable has been assigned to is a member of the target

interface specified as the newInterface element.

Availability

Local, full, and lightweight clients.

Advertising