LM Xif 4501
LM Xif 4501
LM Xif 4501
Reference Guide
Revision 4.501
December 2020
Introduction
LONMARK device interface (XIF) files are files that define the network-visible interface for one or more
LON™ devices. The device interface is the interface to a device that is exposed over a control network.
The device interface does not expose the internal algorithms of a device. Instead, it only exposes the
inputs to the algorithms and the outputs from the algorithms. The device interface includes the device’s
self-documentation information, the number of address table entries, the number of message tags, and
the number, types, and directions of network variables.
Much of the device interface can be queried over the network by a network tool. The device
manufacturer determines the completeness of a queried interface. For example, a device manufacturer
may choose to embed network variable names in a device to ensure that the queried network interface
includes these names.
There are two benefits to using device interface files. First, a device interface file may include information
that is not included in a device such as network variable names. Second, a device interface file can be
used during network engineering when the device is not accessible from the network engineering tool.
The primary device interface file type is a text file with a .xif extension. Some network operating systems
such as the IzoT™ Net Server may convert this file to alternate formats for performance optimization.
For example, the IzoT Net Server uses a binary device interface file (.xfb extension) and an optimized
device interface file (.xfo extension). These files are created from the data contained within the text
device interface file. This document describes the format of the text device interface file. The XIF32BIN
Device Interface File Conversion Utility is used to convert a text device interface file to a binary device
interface file. The optimized device interface file is created automatically by the IzoT Net Server to
reduce the access time to data within a device interface file. Other network operating systems may create
their own optimized versions of the device interface file.
Revision History
The following table lists the major changes in each format version of the device interface file.
Version Changes
2.0 Allow a network variable array to be described by a single network variable description
record, instead of one per element. Other transaction and size parameters added.
3.0 Add a comment indicator. String fields contain an asterisk if they are not applicable or
they are default values. Integer fields contain zero when they are not applicable and
asterisks when they are default values.
3.1 Add support for Neuron® firmware version 6 (including revised binding constraints).
3.2 Add a network variable count that includes dynamic network variables.
4.0 Introduce additional rules to reduce the chances of backward compatibility problems in
future revisions. New records introduced in 4.x or later XIF files must be followed by a
blank line and 4.x interpreters should discard unknown records and their contents up to
the next blank line. Also, starting with format 4.0, the maximum line length has been
fixed at 160 characters. Any XIF interpreters should be able to handle up to 160
characters in a XIF input line. Any XIF interpreter that claims to accept version X.Y
should also accept the known parts of any file of version X.Z, where Z > Y, ignoring any
data fields on any line beyond the expected end of the data line for version X.Y.
4.2 Add fields for devices that support the extended network management command set
(ECS). ECS is defined by the ISO/IEC 14908-1 Control Network Protocol standard and
allows devices to have more address table entries, and to be a member of more groups.
4.3 Add fields that identify the version number and capabilities of the Neuron firmware used
by the device.
4.400 Add a field that identifies the base clock rate factor to be used by the device. Changed
the minor format version number to 3 digits.
4.401 Add fields to support dynamic functional blocks. Clarified requirements for duplicate
programmatic NV names.
4.402 Modified to support increased network variable and alias limits. Add a field that
identifies whether legacy tools that require commissioning credits are to deduct a credit
when the device is commissioned.
• Header
• Network variable and message tag definitions
• File definitions (added in version 4.0)
• Network variable value definitions (added in version 4.0)
All sections are optional, except for the header section. These sections must be in the specified order, and
are described in the following sections. Following are a few general rules that apply to all sections:
• If the first non-blank character on a line is ‘#’, the entire line is ignored. This means that comment
lines may be inserted anywhere, since they do not count as blank lines.
• Multiple blank lines are allowed anywhere a single blank line is required, blank lines may appear
between individual network variable or message tag records and at the end of the file, and blank
characters are allowed at the beginning of any line.
• In general, string fields contain an asterisk if they are not applicable or they are default values.
Integer fields contain zero when they are not applicable, and asterisks when they are default values.
• The maximum line length for any line is 160 characters.
Header Section
The header section is the first section of the device interface file, and is the only required section. The
header describes some basic information about the capabilities of the device, such as the transceiver type
and buffer configuration.
Installation tools may use the transceiver type information to determine if a device is compatible with its
intended channel. This usage is optional. An installation tool may use the device interface file solely for
program definition and may ignore the transceiver type information.
Following is an example of a header section. The lines are numbered for reference in this document;
these line numbers are not included in the device interface file.
1: File: 6kEvbMultiSensor.XIF generated by LONNCC32 Version 6.39.03, XIF Version 4.501
2: Copyright (c) Echelon Corporation 1989-2019
3: All Rights Reserved. Run on Thu Dec 03 09:17:13 2020
4:
5: 9F:FF:FF:05:01:84:04:65
6: 2 15 1 22 1 4 2 0 0 2 4 0 0 0 0 7 0 13 17 1 1 11 22 0 0 0 0 0 0 0 0 0 2 15 1 0 0 0 0 2 609 0 0 15 0
7: 36 6 21 15 43 1176 2614 15 5 4 279 5 10000000 1
8: 1 7 1 1 4 4 4 15 200 0
9: 78125 0 0 0 0 0 252 0 0 0 0 0
The header section consists of the following lines (the Version column identifies the minimum XIF format
version required to support the entry):
Line 1 All File name, source of the file, and format version number. This document
describes format version 4.500. The format of the string must be as follows:
If the file was manually generated, specify the toolName as Manual 0.0.0.
For version 4.501, specify the majorNumber.minorNumber as 4.501.
Line 3 All Optional additional copyright information plus a required timestamp of when
the file was created. The format of the string must be as follows:
Line 5 All Program ID. This consists of eight 2-digit hex values, separated by colons
(no spaces). The first hex digit identifies the program ID format. If the first
digit is 7 or less, the format is an ASCII string, typically with the name of the
program. If the first digit is 8 or 9, the format is the following:
FM:MM:MM:CC:CC:UU:TT:NN
0 0
1 2
2 3
3 4
5 5
7 6
11 7
15 8
23 9
31 10
47 11
63 12
95 13
127 14
191 15
20 2
21 3
22 4
24 5
26 6
30 7
34 8
42 9
50 10
66 11
82 12
114 13
146 14
210 15
255 0
0 Unknown
5 Reserved
For ECS devices, set this field to 1 and then set the binding
constraint number field below (field 26) to match the
constraints of the device.
3.1 Field 22 Maximum size memory block that may be written at a time.
For devices with flash memory, this is the flash sector size.
For other devices, this value is 11 bytes.
4.2 Field 26 Binding constraint level. Applications that parse XIF files
must ignore any higher levels not specified below. If absent
or set to 0, level 1 is used.
Level Description
0: Classic LON
3: Reserved
4.400 Field 42 The number of entries in the Proxy Source table for devices
that support the Enhanced LonTalk Proxy Protocol. Set to 0
for devices that do not support the Enhanced LonTalk Proxy
Protocol. The default value is 0 if not specified.
4.500 Field 44 The number of address table entries, including the extended
address table.
4.501 Field 45 Reserved. Set to 0. Applications that parse XIF files can
ignore this value.
Line 7 Describes the Neuron processor configuration. Line 7 contains the fields
described below. Set fields 1 – 12 to 0, and set field 13 to 10000000, for
host-based devices where the network image is not downloadable.
All Field 2 MAC-layer processor clock rate. The value of this field will
be used in conjunction with the base clock rate factor (field
13) and a 0.5 multiplier to determine the base clock rate of
the MAC-layer processor for the device. Encoded as
follows:
Value Rate
1 625 kHz
2 1.25 MHz
3 2.5 MHz
4 5 MHz
5 10 MHz
6 20 MHz
7 40 MHz
3.0 Field 6 Number of bytes of on-chip RAM from the end of the system
area that precedes the receive transaction blocks to the first
user variable or the end of on-chip RAM, whichever comes
first.
3.0 Field 7 Number of bytes of off-chip RAM from the end of the
available RAM that may be used by the Neuron firmware to
the first user variable or the end of off-chip RAM, whichever
comes first.
3.1 Field 12 Network variable alias table entry size in bytes. Set to 0 if
aliases are not supported in the device.
4.4 Field 13 The base clock rate factor. Must be set to either 10000000
or 13107200. This value combined with the MAC-layer
processor clock rate (field 2) determines the base clock rate
of the device. If the base clock rate factor is 10000000, the
device clock rate is equivalent to the MAC-layer processor
clock rate defined in field 2. If the base clock rate factor is
13107200, the device clock rate is equivalent to the MAC-
layer processor clock rate defined in field 2, multiplied by a
factor of 1.31072. For example, if field 4 is set to use value
4 (5 MHz), and the base clock rate factor is set to 13107200,
the actual device clock rate is 6.5536 MHz.
4.4 Field 14 Reserved. Set to 0. Applications that parse XIF files can
ignore this value.
Line 8 3.0 Describes the channel parameters. Contains the following fields:
0 Not specified
1 Single ended
2 Special purpose
5 Differential
1 625 kbps
3 156.3 kbps
4 78.1 kbps
5 39.1 kbps
6 19.5 kbps
7 9.8 kbps
8 4.9 kbps
9 2.4 kbps
10 1.2 kbps
11 0.6 kbps
Field 7 Minimum clock rate for the channel. Encoded with the same
values as the clock rate in line 7 field 2.
Line 9 3.0 Describes the transceiver parameters. Contains the following fields:
Field 2 Special purpose mode alternate channel bit rate in bits per
second. Set to 0 for devices that do not use special purpose
mode transceivers.
Field 5 Boolean that specifies whether the device can override the
general purpose data used for special purpose mode. Set
to 1 if the device can override, otherwise set to 0. Set to 0
for devices that do not use special purpose mode
transceivers.
Line 10 3.0 Describes the channel timing parameters. Contains the following fields. All
field values are in tenths of a bit time, except as noted.
Field 9 Boolean that specifies whether raw data overrides the timing
values. Set to 1 if raw data overrides, 0 otherwise.
Field 10 Raw data clock rate. Encoded with the same values as the
clock rate in line 7 field 2.
Line 11 3.0 Contains a single asterisk indicating the end of the transceiver parameters.
Lines 12 – All Device self-documentation string. If the documentation string is not supplied,
N there is a single line containing a single asterisk. If supplied, the
documentation lines each begin with a double-quote character (not part of the
documentation string). Multiple lines must be concatenated without any
intervening characters. There is no end double-quote, instead the line is
terminated by a newline. The characters of the string must all be printable
ASCII characters (this includes spaces, but not tabs). Trailing spaces are
included. The line may be up to 60 characters long, not including the starting
double-quote character or the newline. Any non-printable characters must be
encoded using an ANSI C hex character escape sequence of “\xHH”' where
H represents a single hexadecimal digit. The values A – F within a hex
character escape sequence must be specified with upper case letters
exclusively.
Field 9 Specifies the default use of priority for the network variable.
Set to 1 to use priority for the variable by default, 0 to not
use priority by default.
Line N+1 All The first line after the self-documentation provides network variable type
information. The line has the following syntax:
snvtIndex * elementCount
Lines N+2 All Network variable characteristics. If the network variable is not a structure or
–M union, there is just one line. If the network variable is a structure or union,
there is one line for each data element of the structure or union.
0 Character
3 Bitfield
arraySize Set to 0 if the network variable type is not an array or, if the
type is an array, the size of the array (1 to 8196 bytes).
Following are several example network variable declarations and the corresponding device interface file
definitions. See the Neuron C Programmer's Guide for a description of network variable declarations.
Example 1:
network output polled long
bind_info(offline ackd(nonconfig) authenticated(nonconfig)
priority(nonconfig) rate_est(123) max_rate_est(234)) outvar;
VAR outvar 0 69 76 0
1 1 63 1 0 0 1 0 1 0 1 0 0
*
0 * 1
2 0 0 1 0
Example 2:
network input sync config int invar;
VAR invar 1 0 0 0
0 1 63 0 0 1 0 1 0 1 0 1 1
*
0 * 1
1 0 0 1 0
Example 3:
typedef struct {
int x;
long y;
int array[5];
unsigned z : 3;
unsigned zz : 5;
union {
int a;
int b;
} u;
} group;
VAR ingroup 2 0 0 0
0 1 63 0 0 1 0 1 0 1 0 0 0
*
0 * 6
1 0 0 1 0
2 0 0 1 0
1 0 0 1 5
3 0 3 0 0
3 3 5 0 0
4 0 1 0 0
0 bindFlag 63 1 0 1 0 1 0 1 0 0 0
The bindFlag field specifies whether the tag is bindable. Set to 1 if it is, 0 if it
is not. In general, this should be set to 1.
TAG user_tag 0 69 76 0
0 1 63 1 0 1 0 1 0 1 0 0 0
length The number of bytes in the file. This value is optional and is
calculated from the contents of the file, but must be
specified if the contents of the file are not specified. When
not required, the value may be omitted or set to 0. If both
the length and file contents are specified, the length value
must equal the number of bytes in the file contents.
Lines 2 – N 4.0 File contents. A line can be interpreted as characters or as binary data.
The network variable values definition section consists of the following lines:
Lines 2 – N 4.0 A definition line for each configuration network variable defined in the device
interface file. The order of the definitions must match the order of declaration
of the configuration network variables in the device interface file, and there
can be no more values than there are configuration network variables in the
device interface file. Each line contains the default values, in hex. Each
value may optionally start with a “0x” or “\x” prefix. Values may optionally be
separated with commas or spaces. If separators are not used, every pair of
values represents one hex byte. Non-hex value characters are ignored. For
example, the following generates a two-byte value of 0x0789:
0x07, 0x89
0x0789
0789
7,89
\x07\x89
Following is an example network variable values definition. Comments are used to identify each of the
values.
NVVAL
# config network input long configNv1 = {5000};
0x13, 0x88
# config network input int configNv2 = {100};
0x64
Dialog Semiconductor, Adesto, Echelon, IzoT, LON, LNS, LonMaker, LonSupport, LonTalk, LONWORKS,
i.LON, Neuron, NodeBuilder, 3120, 3150, the Dialog Semiconductor logo, the Adestor logo, and the
Echelon logo are trademarks of Dialog Semiconductor Corporation that may be registered in the United
States and other countries.
LONMARK and the LONMARK Logo are registered trademarks of LonMark International in the U.S. and
other jurisdictions.