Echelon FTXL User Manual

Page 98

Advertising
background image

86

Developing an FTXL Application

If a network variable update is received while the FTXL device is offline, the

value of the network variable is updated, but the LonNvUpdateOccurred() event
handler function is not called.
To process notification of a network variable update, modify the

LonNvUpdateOccurred() event handler function (in the FtxlHandlers.c file) to
call the appropriate functions in your application. The API calls this function

with the index of the updated network variable. Figure 11 shows the control flow
for receiving a network variable update.

LonEventPump()

LonNvUpdateOccurred()

FTXL Application

FTXL LonTalk Protocol

Stack and API

Receive Network

Variable Update from

Network

Add “Update Received”

Event to Queue

nviCount

Update

Figure 11. Control Flow for Receiving a Network Variable Update

Configuration network variables are used much in the same way as input
network variables, with the exception that the values must be kept in persistent
storage, and the application does not always respond to changes immediately.

Example 1, below, shows the processing flow for regular network variable

updates, and example 2 shows the same flow but with the addition of a
configuration network variable.
Example 1:
This example uses the same power converter model file from the example in the
previous section,

Sending a Network Variable Update

, on page 83. That example

demonstrated how to read the network variable inputs asynchronously by

reading the latest values from the network variables declared in the FtxlDev.c
file.

Advertising