Echelon Neuron C Instrukcja Użytkownika Strona 103

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 267
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 102
Neuron C Reference Guide 83
when (flush_completes)
{
// Go to sleep
nothing_to_do = FALSE;
sleep();
}
flush_cancel( ) Function
The flush_cancel( ) function cancels a flush in progress.
Syntax
#include <control.h>
void flush_cancel (void);
Example
boolean nothing_to_do;
...
when (nv_update_occurs)
{
if (nothing_to_do) {
// was getting ready to sleep but received an input NV
nothing_to_do = FALSE;
flush_cancel();
}
}
flush_wait( ) Function
The flush_wait( ) function causes an application program to enter preemption
mode, during which all outstanding network variable and message transactions
are completed. When a program switches from asynchronous to direct event
processing, flush_wait( ) is used to ensure that all pending asynchronous
transactions are completed before direct event processing begins.
During preemption mode, only pending completion events (for example,
msg_completes or nv_update_fails) and pending response events (for example,
resp_arrives or nv_update_occurs) are processed. When this processing is
complete, flush_wait( ) returns. The application program can now process
network variables and messages directly and need not concern itself with
outstanding completion events and responses from earlier transactions.
Syntax
#include <control.h>
void flush_wait (void);
Example
msg_tag TAG1;
network output SNVT_volt nvoVoltage;
Przeglądanie stron 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 266 267

Komentarze do niniejszej Instrukcji

Brak uwag