Echelon LonTal Stack User Manual

Page 73

Advertising
background image

LonTalk Stack Developer’s Guide

61

property array must be shared among all network variables or functional

blocks to which it applies. In this case, the device must implement the
configuration properties within a configuration file.

In addition, you might decide whether to implement configuration properties

within a configuration file for performance reasons. Using the direct memory
files (DMF) feature can be faster than using configuration network variables if

you have more than a few configuration properties because multiple
configuration properties can be updated during a single write to memory

(especially during device commissioning). However, FTP can be faster than DMF

if there are many configuration properties to be updated.

Use the cp_family syntax described in The Configuration Property Type to

implement a configuration property as a part of a configuration file.
When implementing configuration property files, the LonTalk Interface
Developer utility combines all configuration properties declared using the

cp_family keyword, and creates the value files and a number of related data
structures.
However, you must provide one of two supported mechanisms to access these

files:

• An implementation of the L

ON

W

ORKS

file transfer protocol

• Support for the direct memory files feature

The LonTalk Interface Developer utility provides most of the required code to

support direct memory files. However, if you use FTP, you must also implement

the L

ON

W

ORKS

file transfer protocol within your application program. You would

typically implement the L

ON

W

ORKS

file transfer protocol only if the total amount

of related data exceeds (or is likely to exceed) the size of the direct memory file

window.

See the File Transfer engineering bulletin at

www.echelon.com/docs

for more

information about the L

ON

W

ORKS

file transfer protocol; see Using Direct Memory

Files for more information about the direct memory files feature.
To indicate which file access method the application should use, you must declare

the appropriate network variables in your model file:

• For direct memory files, declare an output network variable of type

SNVT_address. If your device implements the SFPTnodeObject
functional profile, you use this network variable to implement the

profile’s nvoFileDirectory member. If your device does not implement
the SFPTnodeObject functional profile, simply add this network

variable to the model file. You do not need to initialize this network

variable (any initial value is ignored – the LonTalk Interface Developer
utility calculates the correct value).

• For FTP, declare at least two mandatory network variables, an input

network variable of type SNVT_file_req, and an output network variable

of type SNVT_file_status. You also need to define a message tag for the
transfer of the data. In addition, you need an input network variable of

type SNVT_file_pos to support random access to the various files. You

must also implement the L

ON

W

ORKS

file transfer protocol within your

application program.

Advertising