Changeable network variable types, Improved support for dynamic interfaces – Echelon LNS User Manual

Page 23

Advertising
background image

LNS Programmer's Guide

9

Changeable Network Variable Types

Each NetworkVariable object contains a new property called the
ChangeableTypeSupport property, which indicates whether or not you can use LNS to
change the network variable’s type. If the ChangeableTypeSupport property is set to
lcaNvChangeableTypeSdOnly or lcaNvChangeableTypeSCPT, you can change the
network variable’s type. You can do so by modifying the NetworkVariable object’s new
TypeSpec property.

The TypeSpec property returns a TypeSpec object. If a network variable supports

changeable types, you can change the various properties of the TypeSpec object
(ProgramId, Scope, TypeName), and then pass it back to the TypeSpec property to

change the network variable’s type. Alternatively, you can write the TypeSpec property
of one network variable to the TypeSpec property of another network variable. By doing

so, you can change the type of a network variable to any type contained in your local set

of resource files, provided that the device containing the network variable supports the
selected type.

If a network variable supports changeable types via a SCPTnvType configuration

property (as specified in version 3.3 of the LonMark Application-Layer Interoperability

Guidelines), LNS will automatically set the value of the SCPTnvType configuration
property when the network variable’s

TypeSpec

or

SnvtId

property is changed.

For more information on LNS support for changeable network variable types, see

Changeable Network Variable Types on page 185.

Improved Support for Dynamic Interfaces

A typical device in a L

ON

W

ORKS

network uses a static interface, consisting of a static set

of LonMark Functional Blocks, member network variables and configuration properties
that define the device’s functionality in the system. In most cases, this functionality is

dependent upon the device’s hardware and defined by the device manufacturer.

Sometimes, there is a need to modify this functionality. For example, controller devices

may be used to control other devices. As a result, the number of components required for
a controller device’s interface is often an attribute of the network configuration (e.g. how

many devices it is controlling), rather than of the device’s hardware. Ideally, the

resources on these controllers would be allocated dynamically, in order to fit the
changing requirements of a given network as devices are added to it.

In Release 3.0, LNS supported dynamic network variables, which solved one aspect of the

dynamic allocation of resources on a controller. However, dynamic network variables do

not convey semantic information to a device or an LNS application in the same way that

LonMark Functional Blocks and LonMark Functional Block membership do. In order to
support the dynamic definition of a controller’s interface in Turbo Edition, LNS has been

enhanced to support additional dynamic interface components.

Dynamic LonMark Functional Blocks and dynamic network variables can only be added

to application devices that support them. For example, Network Services Devices support
up to 4096 dynamic network variables, but do not support dynamic LonMark Functional

Blocks. The number of LonMark Functional Blocks and dynamic network variables that

a device supports is documented in the device’s external interface file and self-
documentation. LNS reads this information from the external interface file when it is

Advertising