Receiving an invitation – Echelon ISI User Manual

Page 38

Advertising
background image

ISI Programmer’s Guide

36

ISI_DEFAULT_GROUP,

// Group

isiDirectionVarious, //

NV

direction

4,

//

Width

3251,

//

Profile

number

(3251

=

//

SFPTsceneController)

0,

//

Network

variable

type

index

//

(0

=

determined

by

SFPT)

0

//

Variant

(0

=

standard)

};

// Call InitiateAutoEnrollment in response to isiWarm
void IsiUpdateUserInterface(IsiEvent Event, unsigned Parameter) {

if (Event == isiWarm && !IsiIsConnected(myAssemblyNumber)) {

// We waited long enough and we are not connected already,

// so let's open an automatic connection:

IsiInitiateAutoEnrollment(&MyCsmoData,

myAssemblyNumber);

}
}

E

XAMPLE

8

For a complete example that implements connection management for
multiple assemblies, see the MgDemo example application that is available

for free download from

www.echelon.com/isi

.

Receiving an Invitation

unsigned IsiGetAssembly(const IsiCsmoData*

pCsmoData

, boolean

Auto

);

unsigned IsiGetNextAssembly(const IsiCsmoData*

pCsmoData

,

boolean

Auto

, unsigned

Assembly

);

You can receive a connection invitation and specify which assemblies are eligible
to join the ISI connection. When an ISI device receives a CSMO, CSMA, or

CSMR connection invitation message, the ISI engine first checks on the

availability of device resources that are required in order to implement the
connection. If any of these resources is forseeably missing or insufficient, such as

address or connection table space, the invitation is dropped. If the ISI engine
believes there are sufficient resources, it calls the IsiGetAssembly() and

IsiGetNextAssembly() functions with the received CSMO, CSMA, or CSMR

message. These functions return all assembly numbers that are provisionally
approved to join the connection. The Auto argument of IsiGetAssembly() and

IsiGetNextAssembly() indicates whether the enrollment is manual or controlled

(CSMO) or automatically (CSMA or CSMR) initiated, with FALSE meaning the
enrollment was initiated manually or by a connection controller. On devices that

do not support connection removal, the assembly is ignored if it is already

engaged in another connection.

When a device receives an extended CSMOEX, CSMAEX, or CSMREX message,
all fields of the IsiCsmoData structure are passed to the application, and the

fields in the Extended sub-structure are all valid.

When a device receives a regular CSMO, CSMA, or CSMR message, the extended
fields will automatically be set to all zeros with exception of the

Extended.Member field, which will be set to one.

Advertising