Isigetassembly() – Echelon ISI User Manual
Page 145

143
ISI Programmer’s Guide
E
XAMPLE
The following example sends a periodic message:
boolean SendApplicationPeriodic = FALSE;
boolean IsiCreatePeriodicMsg(...) {
if (have something to do) {
SendApplicationPeriodic = TRUE;
}
return SendApplicationPeriodic;
}
when (SendApplicationPeriodic) {
SendApplicationPeriodic = FALSE;
// Send periodic message, for example, with IsiMsgSend()
// For network variable heartbeats, use propagate()
}
IsiGetAssembly()
unsigned IsiGetAssembly(const IsiCsmoData*
pCsmoData
, boolean
Auto
);
Returns the number of the first assembly that may join the enrollment
characterized with
pCsmoData
. The function returns ISI_NO_ASSEMBLY
(0xFF) if no such assembly exists, or an application-defined assembly number 0 –
254. 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.
IsiGetAssembly() is a forwarder to isiGetAssembly(). The isiGetAssembly()
forwardee returns the assembly number if a compatible network variable exists
for a simple connection, using standard network variable types. The default
implementation is compatible with the default implementation of
IsiCreateCsmo(), and is sufficient for simple devices. The isiGetAssembly()
forwardee always refuses automatic enrollment.
The isiGetAssembly() forwardee assumes the default assembly numbering
scheme that is described in
Assembly Number Allocation
, earlier.
Applications overriding IsiGetAssembly() should also override
IsiGetNextAssembly().
The function operates whether the ISI engine is running or not.