Isiprestart() – Echelon ISI User Manual
Page 137

135
ISI Programmer’s Guide
IsiPreStart()
void IsiPreStart(void);
Establishes runtime links between the ISI engine in the read-only memory
(ROM) of a PL 3170 Smart Transceiver and the callbacks in the application.
For PL 3170 devices, you must call the IsiPreStart() function from the
when(reset) task before calling any other ISI functions. You must call this
function even if you do not plan to start the ISI engine.
Important: The IsiPreStart() function is supported only for PL 3170 devices, and
is not supported for other device types.
E
XAMPLE
1
The following example demonstrates the use of the IsiPreStart() function
within the when(reset) task.
network input SCPTnwrkCnfg cp cp_info(reset_required,
device_specific) cpNetConfig;
device_properties {
cpNetConfig = CFG_EXTERNAL;
};
when (reset) {
IsiPreStart();
if (cpNetConfig == CFG_LOCAL) {
// Self-installed network--start the ISI engine
scaled_delay(31745UL);
// 800ms delay
IsiStartS(isiFlagNone);
}
}
E
XAMPLE
2
The following example demonstrates reset tracking, in addition to the use of
the IsiPreStart() function within the when(reset) task.
network input SCPTnwrkCnfg cp cp_info(reset_required) cpNetConfig
= CFG_EXTERNAL;
eeprom SCPTnwrkCnfg oldNetConfig = CFG_NUL;
when (reset) {
SCPTnwrkCnfg
netConfig;
netConfig = oldNetConfig;
// For a PL 3170 device only, establish links to callbacks
IsiPreStart();
if (netConfig == CFG_NUL) {
// First application start, enable self-installation
cpNetConfig
=
CFG_LOCAL;
}
oldNetConfig = cpNetConfig;
if (cpNetConfig == CFG_LOCAL) {
if (netConfig == CFG_EXTERNAL) {
// Managed application has returned to self-installation