User`s guide

56 Creating FPM Device Interface (XIF) Files
Creating FPM Device Interface (XIF) Files Overview
In order to deploy an FPM application on the SmartServer, you need to create a device interface (XIF)
file extension). The XIF exposes the logical interface of your FPM application so that network tools
such as the SmartServer and the LonMaker tool can manage it. The XIF specifies the number and
types of functional blocks, and the number, types, and directions of the network variables and
configuration properties in your FPM application. Note that the SmartServer only recognizes the text
file version of the XIF (.xif extension).
To create a device interface (XIF) file for your FPM application, you do the following:
1. Create a model file (.nc extension) with a text or programming editor such as Notepad. In the
model file, you declare all the network variables and configuration properties in the UFPT used by
your FPM application, and you declare a functional block that implements an instance of that
UFPT.
2. Generate a XIF from your model file using the i.LON SmartServer 2.0 LonWorks Interface
Developer tool. Copy the XIF (.xif extension) to the root/lonWorks/Import/<YourCompany>
folder on the SmartServer flash disk.
Creating a Model File
The model file uses the Neuron C programming language to describe the functional blocks, network
variables, and configuration properties in an FPM application. You do not need to be proficient in
Neuron C to create a model file for an FPM because the model file does not include executable code.
The i.LON SmartServer 2.0 Programming Tools includes a command line interface called the i.LON
SmartServer 2.0 LonWorks Interface Developer tool that converts model files to XIFs. Note that the
model file uses Neuron C Version 2.1 declaration syntax.
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 such as Notepad. This section describes the basic Neuron C statements
required to declare network variables, configuration properties, and functional blocks in your
model file.
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 i.LON
SmartServer 2.0 LonWorks Interface Developer tool 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.
Automatically generate a model file. You can use the NodeBuilder Code Wizard, which is
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. You can then use the main file produced by the
NodeBuilder Code Wizard as your model file. Note that the NodeBuilder Code Wizard is not
included with the i.LON SmartServer 2.0 Programming Tools, and it must be licensed separately.
See the NodeBuilder User’s Guide for details about using the NodeBuilder Code Wizard.
Declaring Network Variables
A network variable is a data item that a device application expects to get from other devices on a
network (an input network variable) or expects to make available to other devices on a network (an
output network variable).