Methods, Addtarget – Echelon OpenLNS User Manual

Page 487

Advertising
background image

OpenLNS Programmer's Reference

450

AppDeviceName

ClassId

ConnectDescTemplate

Direction

Index

IsDynamic

MtHubs

MtTargets

Name

Parent

Methods

The

MessageTag

object contains the following methods

.

AddTarget

Connect

Disconnect

AddTarget

Summary

Adds a single

MessageTag

to a hub's pending target list.

This method defines a hub message tag's pending target list.

This list is used when the Connect or Disconnect method is

invoked to create or remove a message tag connection.

Connections, as defined within OpenLNS, always consist of a

single hub and one or more complementary targets.
To create a message tag 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 message tags, different restrictions on multiple

connections apply depending on whether a message tag is a

static tag, dynamic tag, or the predefined msg_in tag.

Advertising