ASN1C has the capability to generate custom application programs using code generated by the compiler. The custom programs are formed by combining code from user created template files with generated code. Placeholders are built into the template code which are replaced with the compiler generated items.
The -gen-from-template command-line option or 'Generate program from template' GUI option is used to generate these types of programs.
Currently, the following placeholders in a template file may be specified for replacement:
<include-files> - #include statements for all header files generated for the project are inserted at this location.
<PDU-Type> - the name of a PDU type. If the project contains multiple PDU types, a random one will be selected. The -usepdu command-line option can be used to specify the type that is used.
Examples of some template files may be found in the templates directory within the installation. Templates are used to generate the client and server application programs described in the last section. These templates can be modified to change what is generated when those commands are used.
In the release, only templates in the C/C++ programming language are supported.