Echelon Neuron C User Manual

Page 54

Advertising
background image

34

Compiler Directives

Note this directive can be used to state compatibility with a guidelines

version that is not actually supported by the compiler. Future versions of the
guidelines that require a different syntax for SI/SD data are likely to require

an update to the compiler. This directive only has the effect described above,

and does not change the syntax of SD strings generated.

The set_guidelines_version directive is typically used to specify a version

string in the

major.minor

form (for example, “3.4”). The compiler issues a

NCC#604 warning message if the application-specific version string does not

match that format, but permits the string.
Using this directive can prevent certification of the generated device.

#pragma set_id_string

"ssssssss"

Provides a mechanism for setting the device’s 8-byte program ID. This

directive is provided for legacy application support and should no longer be
used. The program ID should be set in the NodeBuilder device template

instead, and should not be set to a text string except for network interface

devices (for example, devices using the MIP). If this pragma is present, the
value must be the same as the program ID set by the NodeBuilder tool.
This pragma initializes the 8-byte program ID located in the application

image. The program ID is sent as part of the service pin message
(transmitted when the service pin on a device is activated) and also in the

response for the

Query ID

network management message. The program ID

can be set to any C string constant, 8 characters or less.
This pragma can only be used to set a non-standard text program ID where

the first byte must be less than 0x80. To set a standard program ID, use the
#pragma set_std_prog_id directive, documented below. If this pragma is

used, the #pragma set_std_prog_id directive cannot be used. Neither pragma

is required or recommended.

#pragma set_netvar_count

nn

This pragma is only used with the Microprocessor Interface Program (MIP) or

ShortStack Micro Server applications. See the

LonWorks Microprocessor

Interface Program (MIP) User's Guide

or the

ShortStack User’s Guide

for

more information.
This directive is not supported in model files.

#pragma set_node_sd_string

C-string-const

Specifies and controls the generation of a comment string in the self-
documentation (SD) string in a device's application image. Most devices have

an SD string. The first part of this string documents the functional blocks on

the device, and is automatically generated by the Neuron C Version 2
compiler. This first part can be followed by a comment string that documents

the purpose of the device. This comment string defaults to a NULL string

and can have a maximum of 1023 bytes (minus the length of the first part of
the SD string generated by the Neuron C compiler), including the zero

termination character. This pragma explicitly sets the comment string.

Concatenated string constants are

not

allowed. This pragma can only appear

once in the source program.

Advertising