Defining a configuration property, Declaring a configuration property – Echelon LonTal Stack User Manual
Page 71
LonTalk Stack Developer’s Guide
59
1. Declare the network variable with the changeable_type keyword. You
must declare an initial type for the network variable, and the size of the
initial type must be equal to the largest network variable size that your
application supports. The initial type must be one of the interoperable
standard or user network variable types.
2. Select Has Changeable Interface in the L
ON
M
ARK
Standard Program
ID Calculator (included with the LonTalk Interface Developer utility) to
set the changeable-interface bit in the program ID when you create the
device template.
3. Declare a SCPTnvType configuration property that applies to the
changeable-type network variable. This configuration property is used by
network management tools to notify your application of changes to the
network variable type.
4. You can optionally also declare a SCPTmaxNVLength configuration
property that applies to the changeable-type network variable. This
configuration property informs network management tools of the
maximum type length supported by the changeable-type network
variable. This value is a constant, so declare this configuration property
with the const modifier.
5. Implement code in your LonTalk Stack application to process changes to
the SCPTnvType value. This code can accept or reject a type change.
Ensure that your application can process all possible types that the
changeable-type network variable might use at runtime.
6. Implement code to provide information about the current length of the
network variable.
The OpenLNS CT Browser provides integrators with a user interface to change
network variable types. However, you can provide a custom interface for
integrators to change network variable types on your device. For example, the
custom interface could restrict the available types to those types supported by
your application, thus preventing configuration errors.
See Handling Changes to Changeable-Type Network Variables for information
about how your application should handle changes to changeable-type network
variables.
Defining a Configuration Property
Like network variables, configuration properties have types, called configuration
property types, that determine the units, scaling, and structure of the data that
they contain. Unlike network variable types, configuration property types also
specify the meaning of the data. For example, standard network variable types
represent temperature values, whereas configuration property types represent
specific types of temperature settings, such as the air temperature weighting
used during daytime control, or the weighting of an air temperature sensor when
calculating an air temperature alarm.
Declaring a Configuration Property
You declare a configuration property in a model file. Similar to network variable
types, there are standard and user-defined configuration property types. You can