Device-specific configuration properties – Echelon LNS User Manual

Page 248

Advertising
background image

LNS Programmer's Guide

234

properties when it is absolutely necessary. For an overview of configuration property

access performance, see Performance Considerations on page 240.

Generally, you should perform configuration property management using the

ConfigProperty

objects stored in the LNS database, rather than by writing to the

configuration property value directly via network variable writes. If a configuration

property is implemented as a configuration network variable and is then modified via a
network variable write, the value of the configuration property on the physical device

will be updated. However, the value stored in the LNS database will not be updated.

Then, if the

DownloadConfigProperties()

method is called, the unsynchronized

values in the LNS database will be downloaded to the device, and the changes made to

the physical device will be lost. As a result, you need to make sure that the values of the

configuration properties on the devices on your network are synchronized with the values
stored in the LNS database for those configuration properties.

To facilitate this, LNS Turbo Edition features the ability to access configuration

properties via

DataPoint

objects. To do so, the LNS application must first call the

ConfigProperty

object’s

GetDataPoint()

method. The

GetDataPoint()

method

takes an

options

element, which you can use to determine how the value of the

configuration property in the LNS database and in the physical device will be affected by

changes made to the

DataPoint

object. The following sections describe how you can use

the

GetDataPoint()

method.

NOTE: Prior to LNS Turbo Edition0, the ConfigProperty object’s Value property was

provided for single read and write operations to configuration properties. Note the Value

property is deprecated and only supported for backwards compatibility.

Device-Specific Configuration Properties

Some configuration properties are designed to be modifiable by multiple distributed

sources, instead of solely by a central network manager. They are designated as such by

the device-specific flag. The value of a device-specific configuration property should
generally be read from the device itself, and not from the LNS database. However, LNS

does not enforce this restriction. The LNS application must decide whether to use the

device-specific configuration property in the device, or in the database. You can use LNS
to determine if a configuration property is device-specific by reading its

DeviceSpecificAttribute

property. If a configuration property is device-specific, the

DeviceSpecificAttribute

property will be set to True.

By default, the values of device-specific configuration properties will be read from the

device. The values of non-device specific configuration properties will be read from the
database if the values are available there, and from the device if they are not. You can

set the

SourceOptions

property to

lcaDataSourceOptionsfromDevice

at any time

to read configuration property values from the device rather than the database, or to

lcaDataSourceOptionsDatabaseOnly

to specify that the values must be read from

the database, independently of the device-specific flag.

To provide full support of device-specific configuration properties, the

UploadConfigProperties()

and

DownloadConfigProperties()

methods have

options to that allow you to upload or download device-specific configuration properties

separately from non-device specific configuration properties. These options are the

lcaConfigPropOptExcludeDeviceSpecific

and

lcaConfigPropOptOnlyDeviceSpecific

flags. They can be combined with the other

download/upload flags. For example, to download non-device specific configuration

Advertising