Sharing a configuration property – Echelon FTXL User Manual

Page 49

Advertising
background image

FTXL User’s Guide

37

Sharing a Configuration Property

The typical instantiation of a configuration property is unique to a single device,

functional block, or network variable. For example, a configuration property
family whose name appears in the property list of five separate network variables

has five instantiations, and each instance is specific to a single network variable.

Similarly, a network variable array of five elements that includes the same
configuration property family name in its property list instantiates five members

of the configuration property family, and each one applies to one of the network

variable array elements.

Rather than creating extra configuration property instances, you can specify that

functional blocks or network variables share a configuration property by
including the static or global keywords in the configuration property declaration.
The global keyword causes a configuration property member to be shared among

all the functional blocks or network variables whose property list contains that
configuration property family name. The functional blocks or network variables

in the configuration property family can have only one such global member.

Thus, if you specify a global member for both the functional blocks and the
network variables in a configuration property family, the global member shared

by the functional blocks is a

different

member than the global member shared by

the network variables.

The static keyword causes a configuration property family member to be shared

among all elements of the array it is associated with (either network variable

array or functional block array). However, the sharing of the static member does
not extend to other network variables or functional blocks outside of the array.
Example 1:

// CP for throttle (default 1 minute)

SCPTmaxSndT cp_family cpMaxSendT = { 0, 0, 1, 0, 0 };


// NVs with shared throttle:

network output SNVT_lev_percent nvoValue1

nv_properties

{

global cpMaxSendT

};

network output SNVT_lev_percent nvoValue2

nv_properties

{

global cpMaxSendT

// the same as the one above

};
network output SNVT_lev_percent nvoValueArray[10]
nv_properties

{

static cpMaxSendT

// shared among the array

//

elements

only

};

In addition to sharing members of a configuration property family, you can use
the static or global keywords for a configuration network variable (CPNV) to

specify sharing. However, a shared configuration property network variable

cannot appear in two or more property lists without the global keyword because
there is only one instance of the network variable (configuration property

families can have multiple instances).
A configuration property that applies to a device cannot be shared because there
is only one device per application.

Advertising