Going offline in bypass mode, Wink event – Echelon Neuron C User Manual
Page 164

152 Additional
Features
// handle case of device going online
if (online) {
HandleOnline();
}
}
when (online)
{
HandleOnline();
}
Going Offline in Bypass Mode
Use the offline_confirm( ) function if the offline event is checked outside of a
when
clause, as in bypass mode. The offline_confirm( ) function sets the state of
the device to offline and returns immediately. Use this function to confirm that
the device has finished its cleanup and is now going offline.
As shown below, in bypass mode, the program continues to run even though the
device is offline. In bypass mode, it is up to you to determine which events are
not processed when the device is offline.
Here is an example of using offline_confirm( ) in bypass mode:
when (TRUE)
{
while (TRUE) {
post_events();
if
(online)
continue;
if
(nv_update_occurs)
{
...
} else if (offline) {
x();
offline_confirm();
//
Wait
for
online
while
(!online)
{
post_events();
}
}
else
{
...
}
}
}
Wink Event
You can use the wink event to perform an action in response to a
wink
network
management message from a network tool. A network tool can send a
wink
message to a device to help a network integrator physically identify a particular
device. The wink event becomes TRUE any time a
wink
message is received by a
device, whether it is configured or unconfigured.
For an unconfigured device, I/O and variable initialization occur before the wink
event is evaluated. However, none of the initialization in the when (reset) task
has occurred. In addition, the scheduler is not running on an unconfigured