beautypg.com

Isideleteenrollment() – Echelon ISI User Manual

Page 129

background image

127

ISI Programmer’s Guide

Calling this function on a device that does not support connection removal while

indicating an assembly number that is already engaged in another connection,
will not implement the new connection. The isiImplemented event will not be

fired in this case. The application may use the IsiIsConnected() function to

determine if a given assembly is currently engaged in a connection.

Where supported and unless application requirements dictate otherwise, the
IsiExtendEnrollment() function should be used instead.

The ISI engine must be running and in the correct state for this function to have

any effect. For a connection host, the ISI engine must be in the approved state.
Other devices must be in the pending state.

E

XAMPLE

The following example accepts a connection invitation on a connection
member if the Connect button is pushed when a connection is pending:

when (io_changes(...)) {
switch(DeviceState) {

case isiPending:

IsiCreateEnrollment(Assembly);
break;

}
}
}

IsiDeleteEnrollment()

void IsiDeleteEnrollment(unsigned

Assembly

);

Removes the specified assembly from all connections, and sends a CSMD
connection deletion message to all other devices in each connection to remove

them from the connection as well. This function has no effect if the ISI engine is

stopped.

E

XAMPLE

The following removes an assembly from all connections when the Connect

button is held for a long period during normal operation.

when (io_changes(...)) {
switch(DeviceState) {

case isiNormal:
if (Long) {

IsiDeleteEnrollment(Assembly);
} else {

IsiOpenEnrollment(Assembly);
}
break;
}
}
}