Preemption mode, Processing completion events for network variables, Partial completion event testing – Echelon Neuron C User Manual
Page 67: Comprehensive completion event testing, 55 for th

Neuron C Programmer’s Guide
55
Preemption Mode
The scheduler enters
preemption mode
when a synchronous output network
variable update occurs and there is no application output buffer available.
Because the system must send out the synchronous output network variable
update, it processes completion events, incoming msg_arrives or
nv_update_occurs events, and response events until an application output buffer
becomes available.
Other events are not processed, unless the when clause for the event is preceded
by the keyword preempt_safe. See Chapter 2,
, on
page 15, for the syntax of a when clause. See Chapter 6,
Communicate Using Application Messages
, on page 117, for a further discussion
of preemption mode, and when to use the preempt_safe keyword.
A delay in application processing thus occurs when the system enters preemption
mode. The length of the delay depends on how long it takes for an application
output buffer to become free. This delay depends on network traffic, channel bit
rate, and other factors.
Processing Completion Events for Network
Variables
For network variables, there are two modes of checking for completion events:
partial completion event testing, and comprehensive completion event testing.
For message tags (see Chapter Chapter 6,
, on page 117), only comprehensive completion event testing
is available.
Partial Completion Event Testing
If you choose to use partial completion event testing in your program, you then
have two choices of how to process completion events for each network variable:
1
Do not check for any completion events.
2
Check for only the failure event (nv_update_fails).
For example, within a program containing two network variables:
• Network Variable 1: Program checks for no completion events.
• Network Variable 2: Program checks for failure only.
Comprehensive Completion Event Testing
Comprehensive completion event testing offers the same set of choices for
network variable completion events that is available for processing message tag
completion events (see Chapter 6,
How Devices Communicate Using Application
, on page 117). If you choose to use comprehensive completion event
testing in your program, you then have three choices of how to process completion
events for each network variable:
1
Do not check for any completion events.