
C/C++ Code Generation Options
This dialog permits users to modify the code that is generated by the compiler by adding or subtracting functionality or by applying certain optimizations to the output.
Basic encoding rules are selected by default. Only one of BER, DER, and CER can be checked at any time. XML and XER are also mutually exclusive options.
By default, encoding, decoding, and initialization functions are generated by the compiler. If the target application does not require encoding or decoding capabilities (for example, if it is only intended to read messages and does not need to write them), unchecking the corresponding checkbox will reduce the amount of code generated. Initialization functions produce extra code but usually improve overall performance.
Other functions may also be generated if desired: Memory Free, Copy, Compare, Test, and Named bit macros all supply extra functionality or control of generated types.
Check Stream to modify generated encode and decode functions to use streams instead of memory buffers. This allows encoding and decoding to a source or sink such as a file or socket. Stream-based encoding and decoding cannot be combined with buffer-based.
As an aid to debugging, Print functions may also be generated. Three different different types exist: print to stdout, print to string, and print to stream. These allow the contents of generated types to be printed to the standard output, a string, or a stream (such as a file or socket).
To reduce the code footprint, several other options may be selected: Do not generate indefinite length processing code, Do not generate code to save/restore unknown extensions, Do not generate code to check constraints, and Generate compact code may all be used to reduce the amount of generated code at the expense of some error checking. Generate compact code cannot be used in conjunction with Generate compatible code.
Checking Generate compatible code will activate a drop-down menu from which the compiler version may be tested. No guarantee is made that the generated code will align exactly with what would be generated by the previous version, but it will be closer. This is useful in situations where upgrading the software may introduce test faults.
The Generate static elements option is used to add static elements to choice constructs instead of pointer values.
The compiler automatically attempts to resolve name collisions when items in different modules have the same names. If it is necessary to have unique, non-generated item names, uncheck Automatically create unique names for duplicate items.
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. Some items will be grayed-out if they are not applicable to the encoding rules or language previously selected.
These options provide convenient means for compiling and testing the target application by generating makefiles or Visual Studio project files and configuring them to use different library types as needed. Click Help for additional details on these options.
Objective Systems, Inc.55 Dowlin Forge RoadExton, 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 |