Echelon LonTal Stack User Manual
Page 188
176
Appendix C: Appendix C
Neuron C Syntax for the
Model File
The syntax for declaring a device property list is:
device_properties { property-reference-list } ;
property-reference-list :
property-reference-list , property-reference
property-reference
property-reference :
property-identifier [ = initializer ] [ range-mod ]
property-identifier [ range-mod ] [ = initializer ]
range-mod :
range_mod_string ( concatenated-string-constant )
property-identifier :
identifier [ constant-expression ]
identifier
The device property list begins with the device_properties keyword. It then
contains a list of property references, separated by commas. Each property
reference must be the name of a previously declared CP family or the name of a
previously declared configuration network variable. If the network variable is an
array, only a single array element can be chosen as the device property, so an
array index must be given as part of the property reference in that case.
Following the property-identifier, there can be an optional initializer, and an
optional range-mod.
The device property list appears at file scope. This is the same level as a function
declaration, a task declaration, or a global data declaration. A model file can
have multiple device property lists. These lists are merged together by the
LonTalk Interface Developer utility to create one combined device property list.
However, you cannot have more than one configuration property of any given
SCPT or UCPT type that applies to the device.
Example 1:
SCPTlocation cp_family cpLocation;
device_properties {
cpLocation = { "Unknown" }
};
Example 2:
network input SCPTlocation cp cpLocation[5];
device_properties {
cpLocation[0] = { "Unknown" }
};
Example 3:
UCPTsomeDeviceCp cp_family cpSomeDeviceCp;
SCPTlocation cp_family cpLocation = {""};
device_properties {
cpSomeDeviceCp,
cpLocation = { "Unknown" }
// This instantiation overrides the