Configuration network variables, Network variable property lists (nv-property-list) – Echelon Neuron C User Manual

Page 184

Advertising
background image

164

Network Variable, Configuration Property, and Message Tag Declarations

[signed] long [int]
unsigned long [int]

signed char

[unsigned] char
[signed] [short] [int]

unsigned [short] [int]
enum (An enum is int type)

Structures and unions of the above types up to 31 bytes long. Structures
and unions cannot exceed 31 bytes in length when used as the type of a

network variable.


Single-dimension arrays of the above types.

For interoperability, SNVTs and UNVTs defined in resource files should
be used for network variables instead of these base types.

• A typedef. Neuron C provides some predefined type definitions, for

example:

typedef enum {FALSE, TRUE} boolean;

The user can also define other type definitions and use these for network
variable types.

For interoperability, SNVTs and UNVTs defined in resource files should
be used for network variables instead of typedefs.

Configuration Network Variables

The syntax for network variable declarations above includes the following syntax

fragment for declaring the network variable as a configuration property:

network ... [ config_prop [

cp-modifiers

] ] ...

The config_prop keyword (which can also be abbreviated as cp) is used to specify
that the network variable (or array) is a configuration property (or array of

configuration properties).
If you declare a configuration network variable as const, the compiler issues a
warning message (NCC#599). An application can update a constant

configuration network variable as it would any network variable.
The

cp-modifiers

for configuration network variables are identical to the

cp-

modifiers

described in

Configuration Property Modifiers (cp-modifiers)

on page

171.

Network Variable Property Lists (nv-property-list)

A network variable property list declares instances of configuration properties
defined by CP family statements and configuration network variable declarations

that apply to a network variable. The syntax for a network variable’s property

list is:

nv_properties {

property-reference-list

}

Advertising