beautypg.com

Canceling a connection – Echelon ISI User Manual

Page 44

background image

ISI Programmer’s Guide

42

//

(CSME)

message.

IsiCreateEnrollment(Assembly);
break;
... // Processing for other states
} // End of switch(state)
}

// IsiUpdateUserInterface is called with isiApprovedHost as the
// IsiEvent parameter in response to receiving a CSME;
// IsiUpdateUserInterface is called with isiImplemented as the
// IsiEvent parameter in response to invoking
// IsiExtendEnrollement() or IsiCreateEnrollment()
void IsiUpdateUserInterface(IsiEvent Event, unsigned Parameter) {

if (Event == isiApprovedHost){

SetConnectLed(LED_ON);
}

else if (Event == isiImplemented || Event == isiCancelled) {

isiState

=

isiNormal;

SetConnectLED(LED_OFF);

}

... //Processing for other events

}

Canceling a Connection

You can cancel a pending enrollment on the connection host at any stage, and on

any device that has accepted the connection invitation. Cancellation is no longer
possible once the connection is implemented; see

Deleting a Connection

for these

cases.

Pending enrollment sessions are automatically cancelled if:

• On the connection host, if no connection enrollment acceptance message

(CSME) is received within T

enroll

after the IsiOpenEnrollment() function call.

• On the connection host, if the connection is not implemented by a

IsiCreateEnrollment() or IsiExtendEnrollment() function call within T

enroll

after the receipt of a connection enrollment confirmation message (CMSE).

• On an accepting device, if the connection has been accepted and no

connection enrollment confirmation message (CMSC) has been received

within T

enroll

after the acceptance.

To explicitly cancel a pending enrollment, call the IsiCancelEnrollment()
function.

When a connection host cancels a pending enrollment session, it issues a
connection enrollment cancellation message (CSMX). Devices that have accepted
the related connection invitation automatically cancel in result of receiving a

related CSMX message.

When a connection member cancels a pending enrollment session, the

cancellation only has local effect—the approved assembly changes to the
isiCancelled state. Since the connection host may continue re-sending invitation

messages (CSMOs), the same device may, once again, conditionally approve the

assembly and move it to the isiPending state. The user may now accept the
connection invitation once again (by causing the application to call