Addtarget – Echelon OpenLNS User Manual
Page 612
OpenLNS Programmer's Reference
575
•
•
•
•
•
•
AddTarget
Summary
to a hub's pending target list.
This method defines a hub network variable's pending target
list. This list is used when the Connect or Disconnect method
is invoked to create or remove a network variable connection.
Connections, as defined within OpenLNS, always consist of a
single hub and one or more complementary targets.
To create a network variable connection, follow these steps:
1. Select a single hub object and a set of one or more target
objects to connect to the hub.
2. Add the targets to the pending target list by invoking the
hub's AddTarget method for each target object (up to a
maximum of 25, see below).
3. When the list is complete, invoke the hub's Connect
method.
To remove a connection, invoke the Disconnect method,
instead.
The pending target list will only hold 25 targets at a time,
but it is cleared upon completion of the Connect or Disconnect
method. You can therefore create larger connections by
iterating through the process outlined above.
For example, upon completion of the Connect method, you
can add additional targets by invoking the AddTarget
method on the original hub object. You can then invoke the
Connect method to append the new targets to the previously
defined connection.
For network variable connections, the hub and target
variables must be complementary. A complementary
network variable is one that has a matching type/length but
the opposite direction. For example, if the hub is an output
network variable, all the targets must be input network
variables. The type or length restriction is applied depending
on the category of network variable used. When connecting
standard network variable types (SNVTs), all members of
must be the same type. When connecting user-defined
network variable types (UNVTs), all members must be the
same length.
While its basic connection model is fairly simple, LNS allows
network variables to participate in multiple connections. As
a result, it is possible to create arbitrarily complex network