6.4                 Project Wizard

With the Project Wizard you specify the Velocity templates that should be used for the code generation and the MIB modules that should be accessible to those templates.

The wizard is divided into three steps which are described by the following sections.

6.4.1             Job Configuration

Tip: In order to be able to merge existing code, make sure that the input directories (and file name templates respectively) are provided and point to (copies of) the existing source code.

The Job Configuration specifies the generation jobs to be processed for this project. If the "Do not merge with existing code" option is selected, any given input directory (see below) will be ignored and existing code will not be preserved.

Environment variables of the operating system can be used within the path strings too. Environment variables may be included in a path string by using the following format: ${<VARIABLE_NAME>}, whereas <VARIABLE_NAME> must contain letters, digits and the underscore ('_') character only.

With the Root Directories panel, you can specify root directories for relative template paths and input/ouput directories. You may leave these two root directories empty, if you intend to use only absolute paths in the Job specification below.

Each job consists of the following attributes:

<context1>:
[<Module1>=]<object1>[,[<ModuleN>=]<objectN>..];
<...>

where ModuleN is the module name of the MIB specification defining the MIB object with name objectNameN. There must be generated at least one context per selection template which has to contain at least one object name. Specifying a MIB module name for an object name is optional but recommended since it prevents incorrect mappings when the MIB modules within a project do not have unique object names.
For each context generated by a selection template, an output file will be generated and the code generation job will be executed with the contexts described in the section “Customizing Code Generation” on page 35 for the job type 3. The contexts scalars, tables, traps, etc. will be filled with the selected objects for the respective context name as generated by the selection template.

Because default code will not be replaced with new template code as long as existing code is found, you will have to deactivate the Preserve existing code option in AgenPro project wizard to regenerate default code.
But caution: This option affects the whole code generation run. Therefore it might be better to delete/rename the source file that needs new default code instead.

6.4.2             Job Properties

The Job Properties wizard step defines global properties for the code generation project. Properties defined here are available in all job types using the agenUtils.getJobProperty method.

To Add a Job Property

1.   Choose Add New and enter the property name in the empty Property column in the newly created row in the job properties table.

2.   Enter the value in the Value column or choose Edit if you want to enter a multi-line value.

To Remove a Job Property

1.   Select the property to remove in the table and the choose Remove.

6.4.3             AGENT-CAPABILITIES Selection

If at least one of the loaded MIB modules contains an AGENT-CAPABILITIES statement, you may select the „Use AGENT-CAPABILITIES Statement“ check box. Step two will then replace step three of the wizard.

Note: Only leafs in the displayed tree of available AGENT-CAPABILITIES statements can be selected, because folders (other than the root node) represent the MIB modules defining the AGENT-CAPABILITIES under them.

Instead of selecting the MIB modules with step three, using an AGENT-CAPABILITIES statement has the advantage, that you can specify the objects to be generated on the object level rather than on the module level. In addition, AGENT-CAPABILITIES can provide in depth documentation of an agent implementation.

6.4.4             MIB Module Selection

If you have not specified an AGENT-CAPABILITIES statement in step two, step three allows you to select a subset of the currently loaded MIB modules to be used for the code generation or to use all MIB modules available from the MIB repository at the time of code generation. If you want to select specific MIB modules uncheck the checkbox at the top of the dialog and follow the steps below:

If a MIB module is selected for code generation, then it is a member of the current project.

MIB modules that are members of the current project are displayed with bold text in the open MIB modules list left to the MIB tree. By using the list‘s context menu, the membership of a particular MIB module in the current project can be changed.

MIB objects for which code will be generated are also displayed with bold node names in the MIB tree while the simulation agent is running.

Generated MIB objects are objects that are part of the projects MIB modules or supported by its AGENT-CAPABILITIES and that are not skipped from code generation by a skip=yes property.