The network variable storage class, The network variable type – Echelon LonTal Stack User Manual

Page 178

Advertising
background image

166

Appendix C: Appendix C


Neuron C Syntax for the

Model File

In an application that uses compiler-generated SD data, you can still specify

additional SD data with the sd_string() modifier. The compiler appends this
additional SD information to the compiler-generated SD data, but it will be

separated from the compiler-generated information with a semicolon. SD
data that appears after the semicolon is treated as a comment and is not

included in the device’s interoperable interface.

The Network Variable Storage Class

Network variables constitute one of the storage classes in Neuron C. The
optional storage-class specification for a network variable includes the following

keywords:
const

Specifies a network variable that cannot be changed by the application

program. Output network variables declared with const can be placed in
PROM or EPROM. Input network variables declared with const can be

updated over the network, and should therefore be placed in RAM.

When const is used with output network variables, the polled modifier

should also be considered.
Important: If specified, the const keyword must appear as the first

keyword for the network variable declaration in a model file. For example:

const network output polled SNVT_address nvoFileDir;

eeprom

Allows the application program to indicate network variables whose values
are stored in non-volatile memory and therefore are preserved across power

outages.

config

This modifier is obsolete and has been replaced by the config_prop keyword.

config_prop | cp

This keyword declares the network variable to be a configuration property.
If no class is specified for a network variable, the network variable is a global

variable. Global variables should be stored in RAM and need not be

preserved across power outages.

The Network Variable Type

Network variable types serve two purposes. First, typing ensures proper use of

the variable in the device's application. Second, typing ensures proper connection

of network variables so that a sending device and a receiving device can agree on
the representation of data within the network variable. A network variable can

be declared using any of the following types:

• A standard network variable type (SNVT) or standard configuration

property type (SCPT) defined in the standard resource file. You can use

the NodeBuilder Resource Editor to view all available SNVTs and SCPTs,
along with their definitions.

Advertising