Generating code with the code wizard – Echelon IzoT NodeBuilder User Manual

Page 181

Advertising
background image

Generating Code with the Code Wizard

You can use the NodeBuilder Code Wizard to generate Neuron C source code that implements your
device interface and creates the framework for your device application. To do this, click the Generate
and Close
option in the upper right-hand corner of the user interface. Alternatively, you can
right-click the device template folder in the Program Interface pane and click Generate and Close on
the shortcut menu.

The NodeBuilder Code Wizard checks whether the device template meets the following requirements:

• The device template has a Node Object functional block with an index of 0.
• The network variables required for the selected configuration property access method are in the

Node Object functional block.

• The Synchronized option is set for the nvoStatus network variable in the Node Object functional

block.

• The Changeable Type option is not set for any network variable if the device does not have a

changeable interface (it has network variables with changeable types, or the device supports
dynamic network variables). See Specifying the Program ID in Chapter 5 for more information on
setting the Has Changeable Interface option in the Standard Program ID Calculator for a
device template.

• A member name is defined for each implementation-specific network variable.
• All configuration property types, network variable types, and functional profiles have defined

resources when code is being generated.

• All network variables have a distinct type. Some functional profiles contain network variables

with no defined type (referred to as SNVT_xxx). The NodeBuilder Code Wizard forces a distinct
and valid type to be assigned to these network variables.

If your device interface includes any of these errors, a warning message appears explaining the error.
Fix the error and then re-generate the code.

The NodeBuilder Code Wizard generates the Neuron C source files for your device interface (see Files
Created by the Code Wizard
for more information), the NodeBuilder Code Wizard closes, and you are
returned to the NodeBuilder Project Manager. If any read-only files will be overwritten, a
confirmation dialog opens.

See Chapter 7, Developing Device Applications, for information on using the Neuron C programming
language to write your device application and editing the Neuron C source files created by the Code
Wizard.

Files Created by the Code Wizard

When you generate Neuron C code, the NodeBuilder Code Wizard creates a series of header and
Neuron C source files, which are listed in the Project pane of the NodeBuilder Project Manager. The
main Neuron C source file, <Device Template Name>.nc, is listed underneath the device template. All
the other files are shown under the Source File tree, but all the header and source files are stored in the
same location on your computer.

IzoT NodeBuilder FX User's Guide

167

Advertising