Introduction – Echelon Neuron C User Manual

Page 180

Advertising
background image

160

Network Variable, Configuration Property, and Message Tag Declarations

Introduction

The external application interface of a L

ON

W

ORKS

device consists of its functional

blocks, network variables, and configuration properties. The

network variables

are the device’s means of sending and receiving data using interoperable data

types and using an event-driven programming model. The

configuration

properties

are the device’s means of providing externally exposed configuration

data, again using interoperable data types. The configuration data items can be

read and written by a network tool. The device interface is organized into

functional blocks

, each of which provides a collection of network variables and

configuration properties that are used together to perform one task. These

network variables and configuration properties are called the

functional block

members

.

Configuration properties can be implemented using two different techniques.

The first, called a

configuration network variable

, uses a network variable to

implement a configuration property. This 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.

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 of 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 other than the limitations on the size of a file. The
disadvantages are that other devices cannot connect to or poll a configuration

property implemented within a configuration file; requiring a network tool to
modify a configuration property implemented within a configuration file; and, no

events are automatically generated upon an update of a configuration property

implemented within a configuration file. The application can force notification of
updates by requiring network tools to disable a functional block or take a device

offline when a configuration property is updated, and then re-enable or put the

device back online.

You can declare functional blocks, network variables, and configuration

properties using the Neuron C Version 2 syntax. You can declare configuration

properties that are implemented within configuration files or configuration
network variables. The Neuron C Version 2 compiler uses these declarations to

generate the value files, template file, all required self-identification and self-

documentation data, and the device interface file (.xif extension) for a Neuron C
application.

Advertising