Addreference – Echelon OpenLNS User Manual

Page 132

Advertising
background image

OpenLNS Programmer's Reference

95

commissioned. You should specify

the channel whenever possible.

channelObject

The

Channel

object of the channel

in which the device is to be placed.

subnetObject

The

Subnet

object of the subnet to

which the device is to be assigned.

This parameter is optional, and is

not typically specified. If not

specified, the Object Server

determines the subnet assignment,

creating one if necessary.
To explicitly assign the subnet,

specify a previously defined

subnetObject. This allows you to

take advantage of subnet broadcast

messaging. Note that you can use

the MoveEx method to move a

device to a different subnet after

the device has been added.

Added to API

Prior to LNS Release 3.0.

AddReference

Summary

Adds an

AppDevice

object reference to an

AppDevices

collection.

This method

can be

used to add an existing AppDevice to

multiple Subsystem objects (by invoking this method on the

AppDevices collection in those Subsystem objects). For

example, an application might contain both a logical

hierarchy for the system (where each subsystem represents a

function, such as lighting control or the first stage of a batch

process) and a physical hierarchy for the system (where each

subsystem represents a physical place such as a room or cell).

This method allows AppDevices to be placed within both

hierarchies in the appropriate subsystems.
When initially defining a device, it is first added to a single

subsystem. References to the device may then be added to

other subsystems. The device is not deleted from the

OpenLNS database or decommissioned until all references

have been deleted. The device’s association with the first

subsystem is also treated as a reference, so it may be

removed from its initial subsystem at any time.
If AddReference is used to "add" a device discovered in one of

the Discovered.<xxx> subsystems, invoking this method will

cause the device to be removed from its original discovered

subsystem.

Availability

Local, full, and lightweight clients.

Syntax

collection.AddReference object

Advertising