Echelon ISI User Manual

Page 34

Advertising
background image

ISI Programmer’s Guide

32

function uses the IsiGetPrimaryGroup() function to obtain the associated group

ID, and sets all fields to zero except the Application field (which is filled with
data from the device’s program ID), the Width field (which is set by the value

returned by IsiGetWidth()), the Direction field (which is set to isiDirectionAny),

and the NvType field (which is set to the assembly’s primary network variable’s
SNVT ID). The default implementation of IsiCreateCsmo() is sufficient for

simple devices, but you will typically override it with an application-specific,
implementation. After calling IsiCreateCsmo(), the ISI engine constructs the

remainder of the CSMO message and broadcasts the connection invitation to the

network. In order to create a compound connection (one with an assembly width
larger then 1), you must override the IsiGetWidth() callback.

Controlled enrollment is initiated and controlled by the connection controller as
described in

Creating a Connection with Controlled Enrollment

in Chapter 5. In

summary, the connection controller opens the controlled enrollment by sending a
CTRQ message specifying the IsiOpenEnrollment() function, and also specifying

the assembly number to be offered. The application must respond to the CTRQ

message with a control response (

CTRP

) message indicating that it implements

the requested operation.

To open automatic enrollment, wait for the isiWarm event from the
IsiUpdateUserInterface() callback function, and then call the

IsiInitiateAutoEnrollment() function, passing a pointer to an IsiCsmoData
structure containing the invitation, and an the assembly number to be offered for

this connection. The ISI engine then sends a connection invitation by
broadcasting an automatic enrollment (

CSMA)

message. The ISI engine will also

send periodic reminders about the automatic connection by sending CSMR

messages. The reminder ensures that new devices have an opportunity to join
the automatic connections. Whenever a CSMR is due, the ISI engine calls

IsiCreateCsmo() to create the message. The CSMA and CSMR messages are the

invitations for other devices to enroll in this connection. Opening automatic
enrollment through IsiInitiateAutoEnrollment() is an immediate action, and once

the call is made the connection is implemented for the assembly that the call was

made with, regardless of whether there are any members for the connection or
not.

The ISI engine automatically transmits the extended CSMOEX, CSMAEX, or
CSMREX message (as appropriate) if isiFlagExtended was specified during the
start of the engine. Otherwise, the ISI engine automatically clips the Extended

sub-structure of the IsiCsmoData structure and issues the regular CSMO,

CSMA, or CSMR message.

You can provide feedback to the user while enrollment is open, for example by
starting a Connect light to flash. This is typically only done with manual

enrollment. The ISI engine informs your application of significant ISI events by

calling an IsiUpdateUserInterface() callback function.

Advertising