Optimizing the footprint of isi applications – Echelon ISI User Manual

Page 97

Advertising
background image

95

ISI Programmer’s Guide

this function; just set the application-specific flag if there is a message to

send and return control to the ISI engine immediately.

3. Use the application-specific flag in a separate when task to send the

periodic message soon after the IsiCreatePeriodicMsg() function is

completed. If you are sending an ISI message, you can use the

IsiMsgSend() function. This function sets header fields for an ISI
message, and then passes the message on to IsiMsgDeliver(), which

propagates the message. If you are sending a network variable update,
use the propagate() function to send the update.

A typical use-case is an application that does not participate in the default
implementation of the network variable heartbeat scheme provided with ISI, but

chooses to insert more specialized network variable heartbeat messages into the
ISI cycle of periodic messages.

E

XAMPLE

boolean sendApplicationPeriodic = FALSE;

when (reset) {

IsiStartS(isiFlagApplicationPeriodic);

}


boolean IsiCreatePeriodicMsg(...) {
if (have something to do) {
// have something to do may always be TRUE
sendApplicationPeriodic = TRUE;
}
return sendApplicationPeriodic;
}

when (sendApplicationPeriodic) {
sendApplicationPeriodic = FALSE;
// Send periodic message, for example, with IsiMsgSend()
// For network variable heartbeats, use propagate()

}

Optimizing the Footprint of ISI Applications

The ISI implementation is packaged in several different libraries named
IsiFull.lib, IsiCompactAuto.lib, IsiCompactManual.lib, IsiCompactS.lib,

IsiCompactSHb.lib, IsiCompactDa.lib, IsiCompactDaHb.lib, and IsiPl3170.lib.
When creating an application that uses the ISI implementation, you must choose

one of these libraries to link to the application. If you are developing an ISI

application for a PL 3170 device, you must use the IsiPl3170.lib library.

The libraries vary in the supported features and required resources. This section
discusses the differences, and helps you choose the best library for your

application.

Advertising