Post_events( ) function, Syntax, Example – Echelon Neuron C User Manual
Page 140: Power_up( ) function
120
Functions
when (nv_update_occurs(nviZone))
{
// New value of nviZone arrived
}
post_events( )
Function
The post_events( ) function defines a boundary of a critical section at which
network variable updates and messages are sent and incoming network variable
update and message events are posted.
The post_events( ) function is called implicitly by the scheduler at the end of
every task body. If the application program calls post_events( ) explicitly, the
application should be prepared to handle the special events online, offline, and
wink before checking for any msg_arrives event.
The post_events( ) function can also be used to improve network performance.
See
The
post_events
( )
Function
in Chapter 7,
Additional Features,
of the
Neuron C Programmer's Guide
for a more detailed discussion of this feature.
Syntax
#include
void post_events (void);
Example
boolean still_processing;
...
void f(void)
{
while (still_processing) {
post_events();
...
}
}
power_up( )
Function
The power_up( ) function returns TRUE if the last reset resulted from a power-
up. Any time an application starts up (whether from a reset or from a power-up),
the when(reset) task runs, and you can use this function to determine whether
the start-up resulted from a power-up.
Syntax
#include
boolean power_up (void);
Example
when (reset)
{