Overview, Declaring configuration properties – Echelon Neuron C User Manual

Page 96

Advertising
background image

84

Using Configuration Properties to Configure Device Behavior

Overview

A configuration property is a data item that, like a network variable, is part of

the device’s interoperable interface. A configuration property can be modified by
a network tool. Configuration properties facilitate interoperable installation and

configuration tools by providing a standardized network interface for device

configuration data. Like network variables, configuration properties also provide
a well-defined interface.
Each configuration property type is defined in a resource file that specifies the

data encoding, scaling, units, default value, invalid value, range, and behavior for
configuration properties based on the type. A rich variety of standard

configuration property types (SCPTs) are defined in the standard resource file
set. You can view all currently defined SCPTs online at

types.lonmark.org

. You

can also create your own user configuration property types (UCPTs) that are

defined in resource files that you create with the NodeBuilder Resource Editor.

Declaring Configuration Properties

You can implement a configuration property using one of two different

techniques. The first, called a

configuration network variable

, uses a network

variable to implement the configuration property. This method has the
advantage of enabling the configuration property to be modified by another

L

ON

W

ORKS

device, just like any other network variable. It also has the

advantage of having the Neuron C event mechanism available to provide
notification of updates to the configuration property.
The disadvantages of configuration network variables are that they are limited to

a maximum of 31 bytes each, and that the number of configuration network
variables is determined by the maximum number of network variables for the

target platform.

To implement a configuration property as a configuration network variable,

declare it using the network … config_prop syntax described in

Declaration of

Configuration Network Variables

on page 85.

The second method of implementing configuration properties uses

configuration

files

to implement the configuration properties for a device. Rather than being

separate externally exposed data items, all configuration properties implemented
within configuration files are combined into one or two blocks of data called

value

files

. A value file consists of configuration property records of varying length

concatenated together. Each value file must fit as contiguous bytes into the
memory space in the device that is accessible by the application. When there are

two value files, one contains writeable configuration properties and the second

contains read-only data. To permit a network tool to access the data items in the
value file, there is also a

template file

, an array of text characters that describes

the elements in the value files.

The advantages of implementing configuration properties as configuration files is

that there are no limits on configuration property size or the number of

configuration properties, except as constrained by the available memory space on
the device. The disadvantages are that other devices cannot connect to or poll a

configuration property implemented as a configuration file, instead requiring a

network tool to modify a configuration property implemented within a

Advertising