Implementation specific scope rules, Writing acceptable neuron c code, Implementation-specific scope rules – Echelon LonTal Stack User Manual
Page 82
70
Creating a Model File
the highest (most specific) applicable scope level. See the NodeBuilder FX User’s
Guide for information about developing a plug-in to set the scope, or see the
OpenLNS Commissioning Tool User’s Guide (or online help) for information
about modifying a device shape to set the scope.
Implementation-Specific Scope Rules
When you add implementation-specific network variables or configuration
properties to a standard or user functional profile, you must ensure that the
scope of the resource definition for the additional item is numerically less than or
equal to the scope of the functional profile, and that the member number is set
appropriately. For example:
• If you add an implementation-specific network variable or configuration
property to a standard functional block (SFPT, scope 0), it must be
defined by a standard type (SNVT, or SCPT).
• If you implement a functional block that is based on a manufacturer
scope resource file (scope 3), you can add an implementation-specific
network variable or configuration property that is defined in the same
scope 3 resource file, and you can also add an implementation-specific
network variable or configuration property that is defined by a SNVT or
SCPT (scope 0).
You can add implementation-specific members to standard functional profiles
using inheritance by performing the following tasks:
1. Use the NodeBuilder Resource Editor to create a user functional profile
with the same functional profile key as the standard functional profile.
2. Set Inherit Members from Scope 0 in the functional profile definition.
This setting makes all members of the standard functional profile part of
your user functional profile.
3. Declare a functional block based on the new user functional profile.
Add implementation-specific members to the functional block.
Writing Acceptable Neuron C Code
When processing the model file, the LonTalk Interface Developer utility
distinguishes between three categories of Neuron C statements:
• Acceptable
• Ignored – ignored statements produce a warning
• Unacceptable – unacceptable statements produce an error
Appendix B, Model File Compiler Directives, lists the acceptable and ignored
compiler directives for model files. All other compiler directives are not accepted
by the LonTalk Interface Developer utility and cause an error if included in a
model file. A statement can be unacceptable because it controls features that are
meaningless in a LonTalk Stack device, or because it refers to attributes that are
determined by the LonTalk protocol stack or by other means.
The LonTalk Interface Developer utility ignores all executable code and I/O
object declarations. These constructs cause the LonTalk Interface Developer
utility to issue a warning message. The LonTalk Interface Developer utility