Nv_table_index( ) built-in function, Syntax, Example – Echelon Neuron C User Manual
Page 138: Offline_confirm( ) function

118
Functions
{
application_restart();
}
nv_table_index( )
Built-in Function
The nv_table_index( ) built-in function is used to determine the index of a
network variable as allocated by the Neuron C compiler. The returned value is
limited by the application’s number of static network variables, and is never
more than 61 for devices that are limited to 62 static network variables, or 253
for devices that are limited to 254 static network variables. The global_index
property, introduced in Neuron C Version 2, is equivalent to the nv_table_index( )
built-in function.
Syntax
int nv_table_index (
netvar-name
);
netvar-name
A network variable name, possibly including an index
expression.
Example
int nv_index;
network output SNVT_lux nvoLux;
void f(void)
{
nv_index = nv_table_index(nvoLux);
// Equivalent statement
nv_index = nvoLux::global_index;
}
offline_confirm( )
Function
The offline_confirm( ) function allows a device to confirm to a network tool that
the device has finished its clean-up and is now going offline. This function is
normally only used in bypass mode (that is, when the offline event is checked
outside of a when
clause). If the program is not in bypass mode, use when
(offline) rather than offline_confirm( ).
In bypass mode, when the Neuron firmware goes offline using offline_confirm( ),
the program continues to run. It is up to the programmer to determine which
events are processed when the Neuron firmware is offline.
Syntax
#include <control.h>
void offline_confirm (void);
Example
void f(void)
{