Echelon Neuron C Instrukcja Użytkownika Strona 64

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 268
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 63
52 How Devices Communicate Using Network Variables
io_out(ioLED, nviLampState.state);
}
In the following example, when a thermostat device receives a new temperature
setpoint, it checks the current temperature and turns the heater on or off if
necessary:
network input SNVT_temp nviSetpoint;
network output SNVT_switch nvoHeater;
network output SNVT_temp nvoCurrentTemp;
when (nv_update_occurs(nviSetpoint)) {
nvoHeater.state = nvoCurrentTemp < nviSetpoint;
}
Most applications do not need to know the source of an input network variable
update, and can focus on implementing behavior in response to receiving the
updated network variable value.
However, the nv_in_addr built-in variable, described in the
Neuron C Reference
Guide
, provides addressing information about the device that originated the
update.
The nv_update_succeeds and nv_update_fails
Events
When a network variable update or poll fails, the nv_update_fails event
evaluates to TRUE. If no network variable is specified for the event, it evaluates
to TRUE for any network variable update or poll that failed on that device. If
multiple network variables are specified, the event can be TRUE once for each
network variable update or poll that failed.
Similarly, the nv_update_succeeds event evaluates to TRUE whenever an output
network variable update has been successfully sent or polled values have been
received from all the writers.
You can use the nv_update_fails event for any output network variables. The
following example illustrates using the nv_update_fails event with a single
output network variable:
network output SNVT_switch nvoSwitch;
when (nv_update_fails(nvoSwitch))
{
// take some corrective action
}
Here is an example of testing for network update failure and success:
boolean heater_failed;
network output SNVT_switch nvoHeater;
when (nv_update_fails(nvoHeater))
{
heater_failed = TRUE;
// remember update failure
}
when (nv_update_succeeds(nvoHeater))
{
Przeglądanie stron 63
1 2 ... 59 60 61 62 63 64 65 66 67 68 69 ... 267 268

Komentarze do niniejszej Instrukcji

Brak uwag

Powerfix WINDOW SECURITY BRACKET manuals

Owner’s manuals and user’s guides for For Home Powerfix WINDOW SECURITY BRACKET.
We providing 3 pdf manuals Powerfix WINDOW SECURITY BRACKET for download free by document types: User Manual


Table of contents

Powerfix WINDOW SECURITY BRACKET User Manual (2 pages)


Brand: Powerfix | Category: For Home | Size: 1.22 MB |

    

Table of contents





More products and manuals for For Home Powerfix

Models Document Type
Z30000 User Manual   Powerfix Z30000 User Manual, 1 pages
PPR 4 B2 User Manual      Powerfix PPR 4 B2 User Manual, 27 pages
PPR 4 B2 User Manual    Powerfix PPR 4 B2 Benutzerhandbuch, 33 pages
Z31712A/Z31712B Z31712C/Z31712D User Manual     Powerfix Z31712A/Z31712B Z31712C/Z31712D Benutzerhandbuch, 39 pages
Sun Protection Film User Manual     Powerfix Sun Protection Film Benutzerhandbuch, 2 pages
Sun Protection Film User Manual    Powerfix Sun Protection Film Benutzerhandbuch, 2 pages
Sun Protection Film User Manual    Powerfix Sun Protection Film Benutzerhandbuch, 2 pages
Z31712A/Z31712B Z31712C/Z31712D User Manual      Powerfix Z31712A/Z31712B Z31712C/Z31712D User Manual, 78 pages