Maintaining device interfaces with lns – Echelon LNS User Manual

Page 126

Advertising
background image

LNS Programmer's Guide

112

Maintaining Device Interfaces With LNS

The recommended way to manage your device interface and resource file sets is to

register all required resource files with the resource catalog, and then to create your
DeviceTemplate objects by importing the device interface files. Most LNS plug-in

applications perform these tasks automatically.

LNS Turbo Edition provides a set of tools that may be used to re-synchronize resources to

interfaces, or interfaces to devices, when necessary. You can call the
ResyncToResources() method on a DeviceTemplate to resynchronize the
DeviceTemplate with the device resource files. This may be necessary if a device’s

external interface was imported when the resource files for that device were not available
in the resource file catalog, or if the device resource files have been updated or modified

since the device’s external interface was imported. Note that resource file sets should be

modified carefully in order to maintain compatibility with existing devices.

You can also call the ResyncToTemplate() method on an AppDevice to re-synchronize
the device with its DeviceTemplate. This may be necessary after re-importing the

device interface file with the Import() method, or after using the
ResyncToResources() method to resynchronize the DeviceTemplate with the device

resource files.

See the LNS Object Server Reference help file for a complete list of the properties each
DeviceTemplate object contains, and descriptions of how they might be useful to you.

As stated earlier, each device interface consists of network variables, configuration

properties and LonMark Functional Blocks. In LNS, network variables, configuration
properties and LonMark Functional Blocks are represented by NetworkVariable,
ConfigProperty, and LonMarkObject objects. The device interface as a whole is

represented by an Interface object, which can be accessed through the Interface
property of the AppDevice object associated with the device. You can use the network

variables and configuration properties on each device to monitor and control the device
on the network. For information on using LNS to monitor and control a network, see

Chapter 9, Monitor and Control.

NOTE: In some cases, there may be need to modify the functionality provided by a device

interface. For example, controller devices may be used to control other devices. As a
result, the number of components required for that device’s interface is often an attribute

of the network configuration (i.e. how many devices it is controlling), rather than of the

device’s hardware. Ideally, the resources on these controllers could be allocated
dynamically, in order to fit the changing requirements of a given network as devices are

added to it. As a result, LNS features support for dynamic interfaces. For more

information on this, see Using Dynamic Device Interfaces on page 179.

Note that application image files (.NXE, or .APB extensions) that are used for device
loading are also typically stored in the server PC’s Import\ folder, and must be

referenced using a server-centric path similar to the device interface file path discussed

in this section.

Advertising