Model file overview – Echelon FTXL User Manual

Page 36

Advertising
background image

24

Creating a Model File

Model File Overview

The interoperable application interface of a L

ON

W

ORKS

device consists of its

functional blocks, network variables, configuration properties, and their
relationships. The

network variables

are the device’s means of sending and

receiving data using interoperable data types. The

configuration properties

are

the device’s means of providing externally exposed configuration data, again
using interoperable data types. The configuration data items can be read (and

typically also written) by a network tool. The device interface is organized into

functional blocks

, each of which groups together a collection of network variables

and configuration properties that are used to perform one task. These network

variables and configuration properties are called the

functional block members

.

The model file describes the functional blocks, network variables, configuration

properties, and their relationships, that make up the interoperable interface for

an FTXL device, using the Neuron C programming language. Neuron C is based
on ANSI C, and is designed for creating a device’s interoperable interface and

implementing its algorithms to run on Neuron Chips and Smart Transceivers.

However, you do not need to be proficient in Neuron C to create a model file for
an FTXL application because the model file does not include executable code. All

tools required to process model files are included with FTXL; you do not need to

license another Neuron C development tool to work with an FTXL model file.
The model file uses Neuron C Version 2.1 declaration syntax.
The LonTalk Interface Developer utility uses the model file to generate device

interface data and device interface files. You can use any of the following
methods to create a model file:

• Manually create a model file

A model file is a text file that you can create with any text or

programming editor, including Windows Notepad. Model files have the

.nc file extension. This chapter describes the types of Neuron C
statements you can include in a model file. Appendix C describes the

syntax for the Neuron C statements.

• Reuse existing Neuron C code

You can reuse an existing Neuron C application that was originally

written for a Neuron Chip or a Smart Transceiver as a model file. The
LonTalk Interface Developer utility uses only the device interface

declarations from a Neuron C application program, and ignores all other

code. You might have to delete some code from an existing Neuron C
application program, or exclude this code using conditional compilation,

as described later in this chapter.

• Automatically generate a model file

You can use the NodeBuilder Code Wizard, included with Release 3 or

later of the NodeBuilder Development Tool, to automatically generate a
model file. Using the NodeBuilder Code Wizard, you can define your

device interface by dragging functional profiles and type definitions from
a graphical view of your resource catalog to a graphical view of your

device interface, and refine them using a convenient graphical user

interface. When you complete the device interface definition, click the
Generate Code and Exit button to automatically generate your model file.

Use the main file produced by the NodeBuilder Code Wizard as your

model file. NodeBuilder software is not included with the FTXL

Advertising