Network variable classes (class) – Echelon Neuron C User Manual

Page 182

Advertising
background image

162

Network Variable, Configuration Property, and Message Tag Declarations

sd_string (

concatenated-string-constant

)

Sets a network variable’s self-documentation (SD) string
of up to 1023 characters. This modifier can only appear

once per network variable declaration. If any of the sync,

polled, or changeable_type keywords are used, then the
sd_string modifier must follow these other keywords.

Concatenated string constants are permitted. Each
variable’s SD string can have a maximum length of 1023

bytes.

The use of any of the following Neuron C Version 2
keywords causes the compiler to take control of the

generation of self-documentation strings: fblock,

config_prop, cp, device_properties, nv_properties,
fblock_properties, or cp_family.

In an application that uses compiler-generated SD data,

additional SD data can still be specified with the
sd_string( ) modifier. The compiler appends this

additional SD information to the compiler-generated SD

data, but it is separated from the compiler-generated
information with a semicolon.

Network Variable Classes (class)

Network variables constitute one of the storage classes in Neuron C. They can

also be combined with one or more of the following classes:

config

This variable class is equivalent to the const and eeprom

classes, except that the variable is also identified as a
configuration variable to network tools which access the

device’s interface information. The config keyword is

obsolete and is included only for legacy applications. The
Neuron C compiler does not generate self-documentation

data for config class network variables. New applications

should use the configuration network variable syntax
explained in

Configuration Network Variables

on page

164.

const

The network variable is of const type. The Neuron C
compiler does not allow modifications of const type

variables by the device’s program. However, a const
network input variable is still placed in modifiable

memory and the value can change as a result of a network

variable update from another device.

When used with the declaration of a configuration

network variable, the const storage class prevents both

the Neuron C application and network tools from writing
to the configuration network variable. The application

can cast away the const-ness of the property to implement

device-specific configuration properties as configuration
network variables. However, because the network

variable is placed in modifiable memory, network variable

Advertising