Isigetnextassembly() – Echelon ISI User Manual

Page 147

Advertising
background image

145

ISI Programmer’s Guide

You must override the IsiSetConnection() and IsiGetConnection() functions if you

override the IsiGetConnectionTableSize() function.

E

XAMPLE

The following example creates a connection table with 16 entries stored in on-

chip EEPROM:

#define CTABSIZE 16u
static eeprom fastaccess IsiConnection
MyConnectionTable[CTABSIZE];

unsigned IsiGetConnectionTableSize(void) {
return CTABSIZE;
}
const IsiConnection* IsiGetConnection(unsigned Index) {
return MyConnectionTable + Index;

}
void IsiSetConnection(IsiConnection* pConnection, unsigned Index){
MyConnectionTable[Index] = *pConnection;
}

IsiGetNextAssembly()

unsigned IsiGetNextAssembly(const IsiCsmoData*

pCsmoData

,

boolean

Auto

, unsigned

Assembly

);

Returns the next applicable assembly following the one indicated with the

Assembly

argument for an incoming CSMO following the specified assembly.

The function returns ISI_NO_ASSEMBLY (0xFF) if there are no such

assemblies, or an application-specific assembly number 1 – 254. This function is
called after calling the IsiGetAssembly() function, unless IsiGetAssembly()

returned ISI_NO_ASSEMBLY. The

Auto

parameter specifies a manually

initiated enrollment (

Auto

= FALSE) or an automatically initiated enrollment

(

Auto

= TRUE). The

Auto

flag is true both for initial automatic enrollment

messages (CSMA) or reminders that relate to a possibly new connection (CSMR).

Automatic enrollment reminder messages that relate to existing connections on
the local device are not passed to the application. The pointer provided with the

pCsmoData

parameter is only valid for the duration of this function call.

IsiGetNextAssembly() is a forwarder to isiGetNextAssembly().

The isiGetNextAssembly() forwardee returns the next assembly number if a
complementary network variable exists for a simple connection, using standard

network variable types. The isiGetNextAssembly() forwardee always refuses

automatic enrollment. The default implementation is compatible with the
default implementation of IsiCreateCsmo(), and is sufficient for simple devices.

The isiGetNextAssembly() forwardee assumes the default assembly numbering
scheme that is described in

Assembly Number Allocation

earlier.

Applications overriding IsiGetNextAssembly() should also override

IsiGetAssembly().

The function operates whether the ISI engine is running or not.

Advertising