Echelon Neuron C User Manual

Page 47

Advertising
background image

Neuron C Reference Guide

27

#pragma idempotent_duplicate_off
#pragma idempotent_duplicate_on

These pragmas control the idempotent request retry bit in the application

buffer. This feature only applies to MIP or ShortStack Micro Server

applications. One of these pragmas is required when compiling, if the
#pragma micro_interface directive also is used. See the

LonWorks

Microprocessor Interface Program (MIP) User's Guide

or the

ShortStack

User’s Guide

for more information.

These directives are not supported in model files.

#pragma ignore_notused

symbol

Requests that compiler ignore the symbol-not-referenced flag for the named

symbol. The compiler normally prints warning messages for any variables,

functions, I/O objects, and so on, that are declared but never used in a
program. This pragma may be used one or more times to suppress the

warning on a symbol by symbol basis.
The pragma should appear after the variable declaration. A good coding
convention is to place the pragma on the line immediately following the

variable’s declaration. For automatic scope variables, the pragma must

appear no later than the line preceding the closing brace character ('}') that
terminates the scope containing the variable. There is no terminating brace

for any variable declared at file scope.

#pragma include_assembly_file

filename

This pragma can be used with the Neuron C Version 2 compiler to cause the

compiler to open

filename

and copy its contents to the assembly output file.

The compiler copies the contents such that the assembly code does not

interfere with code being generated by the compiler. See the

Neuron

Assembly Language Reference

for more information about including

assembly language routines with Neuron C programs.
This directive is not supported in model files.

#pragma library “

library

This pragma allows you to specify a library file (a file with a .lib extension)

with which the application is to be linked. You can use this directive as an

alternative to adding an explicit library reference to a NodeBuilder project or
specifying the library in the Mini FX Application. The directive is

recommended for new development, because it promotes self-contained,
modular development, and self-documenting code.
You can specify a library with either an absolute path or a relative path

(relative to the location of the NodeBuilder device template file [*.nbdt file]),
for example:

#pragma library “cenelec.lib”
#pragma library “..\myLibraries\myToolkit.lib”

You can also include macros in the path names. Table 4 on page 28 lists

system-defined macros, but you can also define custom macros. A custom

macro is expanded to the value of an operating system environment variable
of the same name as the macro. For example, if you define an environment

variable “MYPROJ” as “$LONWORKS$\myProjects”, then the following

Advertising