Declaration of configuration network variables – Echelon Neuron C User Manual
Page 97

Neuron C Programmer’s Guide
85
configuration file, and no events are automatically generated when a
configuration property implemented within a configuration file is updated. The
application can force notification of updates by requiring network tools to reset
the device, disable the functional block, or take the device offline when a
configuration property is updated (though the reset or online notification is the
only type of notification that occurs after the configuration property has been
modified). Alternatively, the application can also force notification by
implementing configuration file access through the L
ON
W
ORKS
file transfer
protocol (LW-FTP) and monitoring the stop_transfer( ) function. This option
requires additional code space for the LW-FTP server code.
To implement a configuration property as a part of a configuration file, declare it
with the cp_family syntax described in
Declaring Configuration Properties within
on page 86.
Declaration of Configuration Network Variables
The configuration network variable declaration syntax is similar to the
declaration syntax of a non-configuration network variable as already discussed
in Chapter 3,
How Devices Communicate Using Network Variables
, on page 43.
The complete syntax for declaring a configuration network variable is shown
below. The declaration is made 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.
network input [
netvar-modifier
] [
class
]
type
config_prop [
cp
-
modifiers
]
[
connection
-
info
]
identifier
[ =
initial
-
value
] ;
network input [
netvar
-
modifier
] [
class
]
type
config_prop [
cp
-
modifiers
]
[
connection
-
info
]
identifier
[
array
-
bound
] [ =
initializer
-
list
] ;
Examples:
network input SCPTupdateRate config_prop nciUpdateRate;
network input SCPTbypassTime cp nciBypassTime = ...
The
netvar-modifier
and
class
portions of this syntax were discussed in depth in
the previous chapter, and they apply equally to a configuration network variable
as they do to any other network variable, except that the
class
cannot be config.
A config network variable is not a fully managed configuration property, it is a
manually managed one. The config keyword is obsolete and not recommended for
use in new development, but is provided to allow legacy applications to be used
with the Neuron C Version 2 compiler.
Similar to the configuration CP family members, configuration network variables
must be declared with a
type
that is defined by a configuration property type
within a resource file. The type can be a standard (SCPT) or user (UCPT) type.
The
cp-modifiers
clause that can optionally follow the config_prop keyword is also
identical with the CP family declaration discussed earlier in this chapter (see the
Neuron C Reference Guide
for a discussion of the
cp-modifiers
syntax and
semantics).
The
connection-info
for a configuration network variable is no different than the
connection info for any other input network variable, as discussed in the previous
chapter. Like any other network variable, a configuration network variable can
be an array, with each element of the array being a separately handled