Echelon LonTal Stack User Manual

Page 166

Advertising
background image

154

Appendix B: Appendix B


Model File

Compiler Directives

#pragma set_guidelines_version string

The Neuron C 2.1 compiler generates L

ON

M

ARK

information in the device’s

XIF file and in the device’s SIDATA (stored in device program memory). By

default, the compiler uses “3.3” as the string to identify the L

ON

M

ARK

guidelines version to which the device conforms. To override this default,
specify the overriding value in a string constant following the pragma name,

as shown. For example, a program could specify #pragma
set_guidelines_version “3.2”
to indicate that the device conforms to the 3.2

guidelines. This directive is useful for backward compatibility with older

versions of the Neuron C compiler.

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 has only the effect described above,

and does not change the syntax of SD strings generated.

#pragma set_id_string "ssssssss"

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

directive is allowed for legacy application support, and should not be used in
a model file. Use the LonTalk Interface Developer utility to set the program

ID.

#pragma set_node_sd_string C-string-const

Specifies and controls the generation of a comment string in the

self-documentation (SD) data in a device's application image. Most devices

have an SD string. The first part of this string documents the functional
blocks for the device. This part is automatically generated by the LonTalk

Interface Developer utility. This first part is 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 first part of

the SD string generated by the LonTalk Interface Developer utility, 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 model file.

#pragma set_std_prog_id hh:hh:hh:hh:hh:hh:hh:hh

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

directive is allowed for legacy application support, and should not be used in
a model file. Use the LonTalk Interface Developer utility to set the program

ID.

#pragma warnings_off
#pragma warnings_on

Controls the compiler's printing of warning messages. Warning messages
generally indicate a problem in the model file, or a place where the code could

be improved. Warning messages are on by default. These pragmas can be

intermixed multiple times throughout a model file to turn informational
message printing on and off as needed.

Advertising