Accepting a connection invitation – Echelon ISI User Manual

Page 40

Advertising
background image

ISI Programmer’s Guide

38

Accepting a Connection Invitation

void IsiCreateEnrollment(unsigned

Assembly

);

void IsiExtendEnrollment(unsigned

Assembly

);

For manual and controlled enrollment, you can accept a connection invitation to

join the offered connection. When you accept a connection invitation, the ISI
engine sends an enrollment acceptance message (CSME) to the connection host.

Accepting an invitation only sends an acceptance to the connection host—the

connection is not implemented until the connection host confirms the new
connection.

You can only accept enrollment for an assembly that has been provisionally

approved. To provisionally approve an assembly, the IsiGetAssembly() or
IsiGetNextAssembly() function must have returned the assembly number for the

CsmoData structure currently under inspection, and the

IsiUpdateUserInterface() callback function must have identified the assembly in
question to be in the isiPending state.

For manual enrollment, a connection invitation will typically be accepted based
on user input. For example, LEDs may blink on a device when invitations are

received and provisionally approved as described in the previous section, and the
user may then push the related Connect button to accept a specific invitation.

For a controlled enrollment, a connection invitation will typically be accepted
based on a request from a connection controller. This request is typically

initiated by some user input to the connection controller.

For automatic enrollment, a connection invitation will typically be accepted
based on some application-specific criteria. For example, a home gateway may

open automatic enrollment for its inputs and outputs, and newly installed home
devices may automatically accept all eligible connection invitations from the

home gateway. The actual establishment of an automatic connection is handled

by the ISI engine, and requires no call to IsiCreateEnrollment() or
IsiExtendEnrollment(). The ISI engine extends the connection if the library

supports connection extension, or creates the extension if the library does not

support connection extension and the assembly is not already connected, or if the
library supports connection removal.

For devices that support connection removal, you can create a connection that
replaces all existing connections for an assembly. For devices that support

connections extension, you can add a new connection to an assembly that may
already be enrolled in other connections. To create a connection that replaces all

existing connections for an assembly, call IsiCreateEnrollment(). To add a
connection to an assembly without overriding any existing connections associated

with the same assembly, call IsiExtendEnrollment(). You can extend a non-

existent connection; IsiExtendEnrollment() has the same functionality as
IsiCreateEnrollment() if no connection exists for the assembly in question.

Extending a connection consumes network resources. Each extension to a
connection requires one or more new aliases and connection table entries, and

results in additional network transactions for every update to the connection.

Advertising