beautypg.com

Isiinitiateautoenrollment(), Isiisbecominghost(), Isiisconnected() – Echelon ISI User Manual

Page 134

background image

ISI Programmer’s Guide

132

IsiInitiateAutoEnrollment()

void IsiInitiateAutoEnrollment(const IsiCsma*

pCsma

, unsigned

Assembly

);

Starts automatic enrollment. The local device will become the connection host.
Automatic enrollment may replace previous connections, if any. No forwarder

exists for this function. Once this call returns, then the ISI connection is
implemented for the associated assembly.

This function cannot be called before the isiWarm event has been signaled in the
IsiUpdateUserInterface() callback.

This function does nothing when the ISI engine is stopped.

E

XAMPLE

The following example opens automatic enrollment:

void IsiUpdateUserInterface(IsiEvent Event, unsigned Parameter) {

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

IsiInitiateAutoEnrollment(&MyCsmoData, MyAssembly);
}
}

IsiIsBecomingHost()

boolean IsiIsBecomingHost(unsigned

Assembly

);

Returns TRUE if IsiOpenEnrollment() has been called for the specified assembly
and the enrollment has not yet timed out, been cancelled, or confirmed. The
function returns FALSE otherwise.

You can also override the IsiUpdateUserInterface() callback function and track
the state of the assembly. IsiIsBecomingHost() returns TRUE if that state is

isiPendingHost or isiApprovedHost.

The IsiIsBecomingHost() function does not support a forwarder. The function
operates whether the ISI engine is running or not.

IsiIsConnected()

boolean IsiIsConnected(unsigned

Assembly

);

Returns TRUE if the specified assembly is enrolled in a connection.

No forwarder is provided for IsiIsConnected(). The function operates whether the

ISI engine is running or not. The function returns FALSE if the ISI engine is
stopped.