The configuration property initializer – Echelon LonTal Stack User Manual

Page 186

Advertising
background image

174

Appendix C: Appendix C


Neuron C Syntax for the

Model File

has a range modification, then all members must have a range modification

specified. In this case, each range modification pair is delimited by the ASCII
vertical bar character '|'. To specify no range modification for a member of a

structure (that is, revert to the default for that member), encode the field as
'|'. Use the same encoding for structure members that cannot have their

ranges modified due to their data type. The '|' encoding is only allowed for

members of structures.
Whenever a member of a structure is not a fixed or floating-point number, its

range cannot be restricted. Instead, the default ranges must be used.
In the case of an array, the specified range modifications apply to all

elements of the array. For example, to specify a range modification for a
3-member structure where the second member has the default ranges, and

the third member only has an upper limit modification, the range

modification string is encoded as: "n:m||:m;". Positive values for range
modifications and their exponents (if any) are implicit, while negative

numbers and negative exponents must be explicitly designated as such with a

preceding negative sign '-' character. Floating-point numbers use a decimal
point '.' character for the decimal point. Fixed-point numbers must be

expressed as a signed 32-bit integer. Floating-point numbers must be within
the range of an IEEE 32-bit floating-point number. To express an exponent,

precede the exponent by an 'e' or an 'E' and then follow with an integer value.
A range modification string provided in the instantiation of a CP family

member overrides any range modification string provided in the declaration
of the CP family.

The Configuration Property Initializer

The initial-value in the declaration of a CP family is optional. If initial-value is

not provided in the declaration, the default value specified by the resource file is
used. The initial-value given is an initial value for a single member of the family,

but the LonTalk Interface Developer utility replicates the initial value for each
instantiated family member. See Network Variable and Configuration Property

Declarations for more information about initializers.

Initialization for a CP family member is performed according to the following

rules:

1. If the configuration property is initialized explicitly in the instantiation,

then this is the initial value that is used.

2. If the configuration property is initialized explicitly in the CP family

declaration, then the family initializer is used.

3. If the configuration property applies to a functional block, and the

functional profile that defines the functional block specifies a default

value for the associated configuration property member, then the
functional profile default is used.

4. If the configuration property type for the configuration property defines a

default value, then that default value is used as the initial value. This
rule does not apply for a configuration property type that is

type-inheriting; see Inheriting a Configuration Property Type for more
information.

Advertising