Configuration property instantiation, Device property lists – Echelon Neuron C User Manual
Page 193

Neuron C Reference Guide
173
point numbers delimited by a colon. The first number is the lower limit and the
second number is the high limit. If either the high limit or the low limit should
be the maximum or minimum specified in the configuration property type
definition, then the field should be empty. In the case of a structure or an array,
if one member of the structure or array 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 '|'. 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 ‘-’ character. Floating-point numbers use a ‘.’ 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.
Configuration Property Instantiation
As discussed above, the cp_family declaration is similar to a C language typedef
because no actual variables are created as a result of the declaration. In the case
of a type definition, variables are instantiated when the type definition is used in
a later declaration that is not, itself, another typedef. At that time, variables are
instantiated
, which means that variables are declared and computer storage is
assigned for the variables. The variables can then be used in later expressions in
the executable code of the program.
Configuration properties can apply to a device, one or more functional blocks, or
one or more network variables. In each case, a configuration property is made to
apply to its respective objects through a
property list
. Property lists for a device
are explained in the next section, property lists for network variables are
explained later in this chapter, and property lists for functional blocks is
described in Chapter 6,
, on page 179.
The instantiation of CP family members occurs when the CP family declaration’s
identifier is used in a property list. However, a configuration network variable is
already instantiated at the time it is declared. For a configuration network
variable, the property list serves only to inform the compiler of the association
between the configuration property and the object or objects to which it applies.
Device Property Lists
A device property list declares instances of configuration properties defined by
CP family statements and configuration network variable declarations that apply
to a device. The complete syntax for a device property list is: