Echelon FTXL User Manual

Page 87

Advertising
background image

FTXL User’s Guide

75

Host Application

FTXL LonTalk API

Application Framework

Operating System Abstraction Layer

Hardware Abstraction Layer

ANSI/CEA-709.1 control network

FTXL

Transceiver

FtxlApi.h
FtxlDev.h

FTXL LonTalk Protocol Stack

Figure 9. The FTXL LonTalk API within the OSI Model

The [

FTXL

]\Core\libFtxl100.a file contains the FTXL LonTalk protocol stack,

the FTXL LonTalk API, and the parallel interface driver, which together allow

your FTXL application to handle network events, propagate network variables,

respond to network variable poll requests, and so on.

An FTXL application must include the FtxlDev.h file to be able to use the FTXL

LonTalk API. This file is generated by the LonTalk Interface Developer utility,

and is located in your application project directory. The FtxlDev.h file includes
the [

FTXL

]\Core\FtxlApi.h file, which contains definitions for accessing the

FTXL LonTalk API.
The [

FTXL

]\Core\FtxlHandlers.c source file contains stubs for the event handler

functions and callback handler functions that the FTXL LonTalk API calls. You

must add code to these stubs to respond to specific events. For example, the

LonNvUpdateOccurred() event handler function could inform the application of
the arrival of new data for a set-point value, and the related code could re-

calculate the device’s response, assign output values to peripheral I/O devices,
update the appropriate network variables, and propagate the changes to the

network.
The following recommendations can help you manage your FTXL application
project:

• Keep edits to LonTalk Interface Developer utility-generated files to a

minimum, that is, do not edit the LonNvTypes.h, LonCpTypes.h,
FtxlDev.h or FtxlDev.c files unless necessary

• Add #include “FtxlDev.h” to your application source files to provide access

to network variable types and instantiations and the FTXL LonTalk API

• Keep changes to the FtxlHandlers.c file to a minimum

o Add calls to your own functions in files that you create and

maintain

Advertising