Handling an incoming message – Echelon ISI User Manual
Page 22

ISI Programmer’s Guide
20
If your device supports a single ISI type, you can use one of the three specialized
versions of the IsiTick() function to minimize the memory footprint of your
application.
The IsiTick() and IsiTickDas() functions are not supported for PL 3170 devices.
E
XAMPLE
The following example calls the IsiTickS() function every 250ms:
#include
mtimer repeating isiTimer = 1000ul / ISI_TICKS_PER_SECOND;
when (timer_expires(isiTimer)) {
IsiTickS();
}
Handling an Incoming Message
boolean IsiApproveMsg(void);
boolean IsiProcessMsg(IsiType
Type
);
boolean IsiProcessMsgS(void);
boolean IsiProcessMsgDa(void);
boolean IsiProcessMsgDas(void);
boolean IsiApproveMsgDas(void);
boolean IsiProcessResponse(void);
You can determine if an incoming message is an ISI message, and you can pass
all ISI messages to the ISI engine for processing. To determine if a message is an
ISI message, call the IsiApproveMsg() function. This function returns a non-zero
value if the incoming message is an ISI message and the ISI engine is running.
To process an ISI message, call one of the IsiProcessMsg()
functions. If the
IsiProcessMsg() function returns FALSE, then the message has been recognized.
You can use the IsiProcessMsg() function to process an ISI message on a device
that supports multiple ISI types. If your device supports a single ISI type, you
can use one of the three specialized versions of the IsiProcessMsg() function to
minimize the memory footprint of your application.
The IsiProcessMsg() functions pass the received message to the ISI engine, which
handles all of the processing. You can perform any application-specific
processing for the received message before calling the IsiProcessMsg() function.
Domain address servers need to use the IsiApproveMsgDas() function to approve
an incoming message. This is necessary for the device acquisition process
watching for service pin messages. Domain address servers also need to
implement the IsiProcessResponse() function. Not using either of these functions
will cause the domain or device acquisition processes to fail. Both
IsiApproveMsgDas() and IsiProcessResponse() share the same return values as
IsiApproveMsg() and IsiProcessMsg(), respectively.