TOC PREV NEXT INDEX


Using the GUI Wizard to Run ASN1C



The Windows version of ASN1C includes a graphical user interface (GUI) wizard that can be used as an alternative to the command-line version. This allows the user to specify ASN.1 files and configuration files via file navigation windows, set command line options using checkboxes, and get online help on specific options.

The Windows installation program should have installed an `ASN1C Compiler' icon on your computer desktop and an `ASN1C' menu item on the start menu. The wizard can be launched using either of these. The following shows the initial Window that is displayed:







This is a greeting window and no action is required. Click `Next' to proceed to the next window:







In this window, the ASN.1 file or files to be compiled are selected. This is done by clicking the "Add" button on the right hand side of the top windows pane. A file selection box will appear allowing you to select the ASN.1 files to be compiled. Files can be removed from the pane by highlighting the entry and clicking the "Remove" button.

Include directories are selected in a similar manner in the middle pane. The compiler will search these files for import files. By default, the compiler looks for files in the current working directory with the name of the module being imported and extension ".asn". Additional directories to be searched are added here.

User defined configuration files are specified in the third pane. These allow further control of the compilation process. They are optional and are only needed if the default compilation process is to be altered (for example, if a type prefix is to be added to a generated type name). See the Compiler Configuration File section for details on defining these files.

After specification of these files and directories is complete, click the `Next' button to proceed to the next window.

The next window is as follows:





In this window, the encoding rules, target language, and ASN.1 syntax version (1990 or later) options are specified. Encoding rules are BER/DER, PER, XER or XML and can be specified using checkboxes. This allows multiple sets of rules to be specified for a single compiler run. Target language and syntax version have radio button controls that allow only a single choice to be specified in each of these categories. At least one item must be specified from each of these categories. Once these items have been specified, click `Next' to proceed to the next window.

The next window is as follows:






This dialog contains additional optional tabs that allow code reduction options, code addition/alter options, PRO version options and other options to be specified.

Options under the Code Reduction Options tab reduce the amount of code generated at the expense of some features that are normally added to the code. Click on `Help' to get a summary of what each of these options do or read the section, Running ASN1C from the Command-line. All of these items are optional. Items will be grayed-out if they are not applicable to the encoding rules / language combination selected on the previous page.

The Code Addition/Alter Options tab is as follows:





The Code Addition/Alter Options tab contains additional optional items that allow additional code to be generated and alters the type of code generated in some cases:

Named bit macros control the generation of special macros for setting, clearing and testing bits in BIT STRING types. Print routines are special functions for printing the contents of generated type variables.
Trace diagnostic messages are added to encode/decode functions to trace the sequence of function calls used in the encoding or decoding of a message.
The `Generate static elements' option is used to add static elements, instead of pointer values, to CHOICE constructs.
The `Generate code compatible ...' option is for generating code compatible with an older release of the compiler.

You may click on `Help' to get a summary of what each of these options does or read the section Running ASN1C from the Command-line. All of these items are optional. Items will be grayed-out if they are not applicable to the encoding rules / language combination selected on the previous page.

The PRO version Options tab is as follows:





The PRO Version Options tab contains checkboxes for setting options that are only present in the professional version of the compiler.

Click on `Help' to get a summary of what each of these options do. All of these items are optional. Items will be grayed-out if they are not applicable to the encoding rules / language combination selected on the previous page.

The Other Options tab is as follows:






The `Output Directory Name' control at the bottom of the page allows you to specify where your generated code will be stored. By default, this is the same directory as the ASN.1 source files. A different output can be selected by either typing the name directly into the box or clicking the "[ ... ]" button to open a file navigation window.

Once specification of these items is complete, click `Next' to move to the next window.

The next window is as follows:








This page allows the specification of C#-only options. The user can specify a prefix to be added to the beginning of all C# namespace names (for example, if code is being generated in a specific directory), or a complete namespace name can be specified that will be added to all generated modules. Both of these items are optional. Once this is complete, click `Next' to proceed to the final page.

The final window is as follows:






As shown, the GUI has constructed an ASN1C command-line using the specified options. The user can now click `Compile' to execute the compilation. The `Back' button can be used to step back through the sequence of screens in order to change any of the previous inputs.

After `Compile' is clicked, the results of the compilation are shown in the results text window. If the compilation was successful, the generated code is written to the files in the given output directory.



Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX