Declaring a configuration network variable, Defining a device property list – Echelon LonTal Stack User Manual
Page 187
LonTalk Stack Developer’s Guide
175
5. If no initial value is available from any of the preceding rules, a value of
all zeros is used.
The compiler uses the first rule in this list that applies to the configuration
property.
These initialization rules are used to set the initial value that are loaded in the
value file from the linked image, as well as the value file stored in the device
interface file. A network management tool can use the initial value as a default
value, and might at times reset the configuration properties (or a subset of them)
back to the default values. Consult the documentation of the particular network
management tool, for example, the OpenLNS Commissioning Tool User’s Guide,
for more information on the use of configuration property default values.
Declaring a Configuration Network Variable
The configuration network variable declaration syntax is similar to the
declaration syntax of a non-configuration network variable.
The declaration of a configuration network variable is distinct from other
network variable declarations by the inclusion of the config_prop keyword
following the type of the network variable declaration. The config_prop
keyword can be abbreviated as cp.
The syntax for declaring a configuration network variable is:
network input [ netvar-modifier ] [ storage-class ] type
config_prop [ cp-modifiers ]
[
connection-info ] identifier [ [ array-bound ] ]
[
=
initial-value ] ;
The netvar-modifier, storage-class, connection-info, array-bound, and initial-value
portions of this syntax are described in Network Variable Syntax, and they apply
equally to a configuration network variable as they do to any other network
variable.
Similar to the configuration CP family members, configuration network variables
must be declared with a type that is defined by a standard configuration property
type (SCPT) or a user configuration property type (UCPT) defined within a
resource file.
The cp-modifiers clause that can optionally follow the config_prop keyword is
described in The Configuration Property Modifiers.
Example:
network input SCPTupdateRate config_prop nciUpdateRate;
network input SCPTbypassTime cp nciBypassTime = ...
Defining a Device Property List
A device property list declares instances of configuration properties defined by
CP family declarations and configuration network variables declarations that
apply to a device.