Home > Products > ASN1C News

ASN1C ASN.1 Compiler News

The current major version of ASN1C is 6.5. The following features have been added recently:

General

Use of Visual Studio 2008 as Default Compiler on Windows
The ASN1C compiler and default run-time library set had always been built with Visual C++ v6.0 prior to the version 6.5 release (although other versions of Visual Studio were supported). Visual Studio 2008 is now the default compiler used to build all components on Windows.
Capability to generate HTML representation of ASN.1
The capability to generate HTML files from ASN.1 sources was added. These files contain hyperlinks to items referenced within the specification making it easier to navigate between components.
XML Schema (XSD) Compilation
The capability to generate code for XSD files has been added in addition to ASN.1 files. This is accomplished by doing an internal transformation of XSD-to-ASN.1 as specified in the X.694 standard. The resulting types and encoders/decoders make it possible to encode data in W3C-compliant XML form as well as the fast, efficient binary forms as specified in ASN.1 encoding rules standards (BER, DER, CER, or PER).
XSD-to-ASN.1 Translation
The -asn1 switch was added to provide generation of ASN.1 source code from the ASN.1 input based on what the compiler sees and supports. Besides the obvious use of providing neatly formatted ASN.1 source code, the tool is also useful for producing ASN.1 source code from XML schema document (XSD) files as well as producing trimmed specifications when <include> or <exclude> configuration directives are used.
Eclipse Editor Plug-in
An ASN.1 editor plug-in is now available for use with ASN1C. This plug-in allows ASN.1 source files to be created and edited. ASN1C projects can be created to select compilation options and to invoke the compiler to compile the source files. Any errors that occur during compilation are shown in an error syntax window.

C/C++

Support added for Visual Studio 2010
Run-time libraries built with Visual Studio 2010 are now included in Windows packages. In addition, the capability to generate a Visual Studio 2010 project file has also been added.
64-bit Support
Versions of the run-time libraries compiled with 64-bit support are available on all major platforms. In addition, on Windows, 64-bit libraries compiled with Visual Studio version 2005, 2008, and 2010 are available.
Improved Table Constraint Handling
The -table-unions compile option was added to create unions-based table constraint code for ASN.1 specifications that make use of table constraints. These include 3GPP specifications such as RANAP, NBAP, and RNSAP as well as security specifications (CMS, PKIX) and legacy telecom applications (MAP).
Support for stream-based PER encode/decode
Support has been added for stream-based encoding/decoding of PER messages in C/C++. In previous releases, only encoding and decoding from memory buffers was supported. The EmployeeSocketStream sample program demonstrates encoding and decoding PER messages to and from a socket-based stream.
Support for the ASN.1 CONTAINING keyword
Support has been added for adding the type definition contained within a contents constraint specified using the CONTAINING keyword directly into the container type. The generated code will then automatically deal with converting the content to and from the BIT or OCTET STRING type that uses this constraint.
Configuration variables for reducing code size
Several configuration variables have been added for reducing the size of generated code. <notUsed/> and <perEncoding/ were added to allow a user to reduce the code footprint size by removing unused or boilerplate parts of encoded PER messages from generated encoders and decoders. The <encoders>, <decoders>, and <memfree> module directives were added to select individual encode, decode, and memory free functions for generation in a given compilation run.
Support for MDER and OER Encoding Rules
Run-time libraries and code generation logic have been added for for the Medical Device Encoding Rules (MDER) as documented in ISO/IEEE 11073-20601 and the Octet Encoding Rules (OER) as documented in NTCIP 1102:2004.

Java/C#

Improved Table Constraint Code Generation in Java and C#
Additional helper methods are now generated to assist users in working with code that uses table constraints.
Output File Selection for C#
It is now possible when generating C# code to specify that all generated source code be written to a single output file or to one output file for each ASN.1 file being compiled. Before, the only option was to generate one file per class as is done in Java.
Constraint checking added to Java/C# setters
Generated Java and C# set methods will now do constraint checks as defined in the ASN.1 source code when setting a variable. This is done in addition to checks done by the encode methods.
J2ME CLDC and Android Support
ASN1C can now generate code with Java J2ME CLDC support by using the -cldc command-line option in conjunction with the optimized .jar files with this support. Java code compatible with Android can be generated as well. A comprehensive Android sample program is now provided.
Generation of Ant build.xml files for Java
The capability has been added to generate Ant build.xml files for building generated Java projects including a reader and a writer. This makes it possible to easily import the project into popular Java IDE's such as Eclipse or Netbeans.
Generation C# Project Files
C# project (.csproj) files to build all generated code can be generated by specifying the -vcproj option along with the -csharp option.
Deferred Decoding
The C/C++ deferred decoding feature is now available for Java and C#. This allows decoding of selected fields to be done within a message without the need to fully decode the entire message. This can also be done with table-constrained fields at run-time to either fully decode the open type fields using the table parameters or decode as open type.

Related Links

ASN1C v6.5 Release Notes