ASN.1 Tools for C++ — Enhancements History

ASN.1 Tools for C++ - version 6.4.0 (latest version)

  • The ASN.1/C++ Tools now include ASN.1 Studio v8.1.0.
  • The ASN.1/C++ Compiler and Runtime now support 64-bit precision (19-20 decimal digits) in TIME type fractions. The only visible change to the C++ API is that the OssTimePoint and OssDuration classes now use 64-bit integers to represent fractional values.
  • The ASN.1/C++ SOED/LEAN/TOED PER encoder-decoder implementation now conforms to the recent X.691 corrigendum (2015): an encoding contained in a BIT STRING should be at least one octet for PER ALIGNED and 1 bit for PER UNALIGNED.
  • The ASN.1/C++ runtime implementations are now aligned to conform to ITU-T X.680 Clause 46.3c. This clause states that the minutes component of a GeneralizedTime type value can be omitted when the difference between local time and UTC is an integral number of hours. Previously, a false error could be issued when the minutes component was absent.
  • New samples:
    • A sample for the 2016-03 version of the J2735 protocol has been created. The sample does not include the J2735:2016 ASN.1 specification due to licensing reasons. Users should obtain it directly from the ITS SAE site.
    • A sample for the 3GPP XwAP (TS 36.463) protocol has been created.

ASN.1 Tools for C++ - version 6.3.0

  • The ASN.1/C++ Tools now include ASN.1 Studio v8.0.0.
  • Support for the JSON Encoding Rules is available in the ASN.1/C++ compiler and in all three runtime libraries of the OSS ASN.1/C++ Tools: Space-Optimized Encoder/Decoder (SOED), Time-Optimized Encoder/Decoder (TOED), and Lean Encoder/Decoder (LED).
  • Two new API methods, PDU::binary2JSON() and PDU::JSON2Binary(), have been added to convert data encoded in ASN.1 binary form (e.g., BER, PER, DER, OER, etc.) to JSON text encoding form (JSON/ER) and vice versa.

ASN.1 Tools for C++ - version 6.2.1

  • The ASN.1/C++ Tools now include ASN.1 Studio v7.5.1. (Windows only)
  • The Windows ASN.1/C++ packages have been changed to include binaries targeted for Microsoft Visual Studio 2015 along with the binaries supporting MVS2005-MVS2013.

ASN.1 Tools for C++ - version 6.2

  • The ASN.1/C++ Tools now include ASN.1 Studio v7.4.
  • The ASN.1/C++ compiler and the ASN.1/C++ TOED runtime library now have partial decode capabilities. The partial decode feature enables you to:
    • Decode preselected fields from incoming messages at a high speed
    • Directly access the decoded field in the callback function without traversing from the top of the PDU
    • Get the offset and length of the field encoding in a binary BER/DER/OER/COER message. It allows you to replace the value of the field directly in the binary message, if the encoding of the new value is of the same length as of the previous one.
    Existing customers who are interested in evaluating this feature should contact

ASN.1 Tools for C++ - version 6.1

  • The ASN.1/C++ Tools now include ASN.1 Studio v7.1
  • The ASN.1/C++ compiler and the ASN.1/C++ SOED/LED/TOED runtime libraries now support Octet Encoding Rules (OER) and Canonical Octet Encoding Rules (C-OER) as defined in "Rec. ITU-T X.696 | ISO/IEC 8825-7", rather than only the subset of ASN.1 types as defined in the "NTCIP 1102:2004 Octet Encoding Rules (OER) Base Protocol" document.
    The Octet Encoding Rules (OER), like the Packed Encoding Rules (PER), produce compact encodings by taking advantage of information present in the ASN.1 schema to limit the amount of information included in each encoded message. However, in contrast to PER, OER favors encoding/decoding speed over compactness of the encodings.
  • The ASN.1 C++ compiler can now generate sample code for a user provided asn1 specification. The sample code is an application that uses the C++ interface of the runtime to encode/decode generated values that conform to the specification.
  • Samples have been added that illustrate use of the SBc-AP, M2AP, and M3AP LTE protocols based on 3GPP Release 11.
  • A sample has been added that illustrates use of the DSRC Message Set Standard, SAE J2735_200911.
  • The default error handling mechanism is now "full-exception mode". Therefore, legacy code written for C++ runtimes v6.0 and older using "no-exception mode" default error handling should be modified to either catch exceptions of the new ASN1RuntimeException class or revert to "no-exception mode". To revert to the legacy "no-exception mode", add the following line before instantiating or calling any OSS ASN1 objects or functions:

Note: OSS ASN.1 Tools for C++ version 6.0.0 implement an older version of OER, specified by NTCIP 1102:2004. If you are using OER we strongly recommend that you upgrade to 6.1.0 or later.

ASN.1 Tools for C++ - version 6.0

  • The ASN.1/C++ Tools now include ASN.1 Studio v7.0
  • Support for the Octet Encoding Rules (OER), as specified by the NTCIP 1102:2004 Octet Encoding Rules (OER) Base Protocol document, has been implemented in the ASN.1/C++ compiler, the TOED runtime library and ASN.1 Studio. OER messages can generally be encoded/decoded significantly faster than BER and PER messages, while being only slightly less compact than PER messages. Support for OER in ASN.1/C++ SOED and ASN.1/C++ LED will be provided in the next release.
  • The ability to decode open types with table (component relation) constraints, when the AUTOMATIC_ENCDEC runtime flag is not set, has been added.
  • Several new methods are provided:
    • Support for decoding into preallocated memory buffers
      • - Generated files now contain the following new methods:
        void set_const_data(const <Type> & d);
        const <Type> *get_const_data() const;
        void set_const_<Type> (const <Type> &);
        const <Type> *get_const_<Type>() const;
      • - The following method has been added to the PDU class:
        virtual int decode(OssControl &ctl, EncodedData &input,
        EncodedBuffer &output);
      • - The following method has been added to the ASN1Handle class:
        int is_constant() const;
      • - Two methods have been added to the OssOpen class, which replace the previous get_decoded() method:
        int get_decoded_data(PDU &);
        int get_decoded_data(PDU &) const.
    • The reset() method has been added to the EncodedBuffer and the PEREncodedBuffer classes. Use this method to reset the buffer to its initial state when you want to reuse the same buffer for the output of several encoding/decoding operations.
    • Two methods have been added to the ASN1Handle class:
      • - The following method prints the data contained in ASN1Handle to a specified pre- or newly allocated memory buffer in ASN.1 value notation format:
        char *toString(OssControl &ctl, char *buffer = NULL, unsigned long length = 0) const;
      • - The following method returns the size of the memory buffer required by the first function to print the data:
        unsigned long toStringLength(OssControl & ctl) const.
    • Two methods have been added to the EncodedBuffer class:
      • - The following method pretty-prints the data contained in EncodedBuffer in hexadecimal format
        int print_hex(OssControl & ctl) const;
      • - The following method prints the data contained in EncodedBuffer in XML format:
        int print_xml(OssControl & ctl, int pretty-print) const.
    • The set of samples provided now includes samples illustrating the use of protocols based on the SAE J2735 Intelligent Transportation standard, as well as the 3GPP Release 10 RRC, S1AP, and X2AP LTE protocols.

ASN.1 Tools for C++ - version 5.0

  • The ASN.1/C++ Tools now include ASN.1 Studio, a powerful new IDE packed with functionality that allows you to compile ASN.1 specs, display, create, modify or encode messages with just a few mouse clicks, and so much more!
  • The TOED (Time Optimized Encoder/Decoder) is now the default runtime library, providing you with speed optimized code "right out of the box". We haven't retired the SOED (Space Optimized Encoder/Decoder). We've just put our faster foot forward in response to a growing focus on speed.
  • Support for new built-in ASN.1 OID-IRI and RELATIVE-OID-IRI types from the ASN.1:2008 standards has been added.
  • On Windows, the ASN.1/C++ tools now install under the Program Files\OSS Nokalva\asn1cpp\ folder (whereas before the 5.0 release, they were installed under Program Files\OSS\asn1cpp\).
  • Samples for the Windows platforms are now installed under the folder pointed to by the environment variable %ALLUSERSPROFILE%. By default, on Windows 7 and VISTA, the samples are installed under the C:\ProgramData\OSS Nokalva\asn1cpp\win32\<version-number>\samples folder, and on Windows XP, the samples are installed under the C:\Documents and Settings\All Users\Application Data\OSS Nokalva\asn1cpp\win32\<version-number>\samples folder.

ASN.1 Tools for C++ - version 4.3.1

  • The ASN.1/C++ Tools now support Contents Constraints for the Time-Optimized encoder/decoder.
  • A new value sharing algorithm has been added to the ASN.1/C++ compiler to make the compilation of ASN.1 specifications with large value notations very fast. Consequently, the size of the generated data is reduced because more values are now shared.
  • The ASN.1/C++ compiler warning message, A1140W, has been enhanced to print more details about unknown encoding instructions when possible.
  • All ASN.1/C++ runtime functions that take OssControl objects as parameters now return a newly introduced error, OSS_CONTROL_NOT_INITIALIZED, if the OssControl object is not properly initialized. Also, a new public method, valid(), was added to the OssControl class for determining if the OssControl object was properly initialized with a valid control table. If there are ASN.1/C++ compiler license restrictions, then the OssControl object will not be initialized properly.

ASN.1 Tools for C++ - version 4.3

  • The ASN.1/C++ Tools now provide the following support for INTEGER types using the HUGE compiler directive:
    • - support for constrained HUGE integers with constraints other than (0..MAX);
    • - support for the application of the [DEFAULT-FOR-EMPTY] E-XER encoding instruction onto HUGE integer fields;
    • - support for DEFAULT values and named values of HUGE INTEGER types provided values can be represented in 64 bits.
  • The ASN.1/C++ compiler can now produce TOED E-XER decoder code that will skip unknown XML content found on input. The new code is generated inside the #ifdef OSS_SKIP_UNKNOWN_CONTENT_SUPPORTED #endif section and is disabled by default. To enable the code that supports the OSS_SKIP_UNKNOWN_CONTENT runtime flag, specify the OSS_SKIP_UNKNOWN_CONTENT_SUPPORTED macro when C-compiling the generated code file.
  • The ASN.1/C++ compiler now supports the -inline command line option. This option instructs the compiler to generate definitions of methods of generated classes inline in the header.
  • The ASN.1/C++ compiler now supports the -encodeOnly/-decodeOnly command line options. These options specify the generation of only decoding or encoding routines for the TOED encoder/decoder. The -decodeOnly option specifies the generation of decoder routines only while the -encodeOnly option specifies the generation of encoder routines only.
  • The E-XER decoders will now discard any unknown XML tag or attribute that is passed on input, provided the new OSS_SKIP_UNKNOWN_CONTENT runtime flag is set with the ossSetFlags() or ossSetDecodingFlags() function. By default, when the flag is not set, any unknown element or attribute will cause the decoder to issue an error.
  • The SOED PER encoder/decoder has been enhanced to support tracing of the new time types.

ASN.1 Tools for C++ - version 4.2

  • The ASN.1 compiler now supports combining the -exer and -code options and generates a code file for encoding and decoding Extended XER (E-XER) data using the Time-Optimized (TOED) runtime.
  • The TOED runtime now supports the Extended XER encoding rules. You must use version 4.2 or later of the ASN.1 compiler and specify -exer and -code on the compiler command line in order to generate the code file to use E-XER with TOED.
  • The ASN.1 compiler has been changed to automatically select the -ignoreIncompleteItems option if the -relaxedMode option is specified.
  • A new runtime function, asn1_describe_error_code(), provides useful debugging information. It displays full textual descriptions corresponding to the numeric codes returned by any runtime OSS/C++ API function. It works with error codes set by ASN.1/C++ constructors as well.

ASN.1 Tools for C++ - version 4.1

  • OSS ASN.1 Tools for C++ version 4.1 supports the full range of time types as specified in ISO 8601 (TIME, DATE, TIME-OF-DAY, DATE-TIME, DURATION). These representations of date and time were standardized to avoid misinterpretations when communicating across national boundaries. A new class, OssTime, supports these new types, while new utility classes OssTimePoint, OssDuration, andOssTimeInterval, allow you to easily split the time values into their components. Support for time types is available in the Space-Optimized Encoder/Decoder (SOED).
  • New classes for compression support, OssCompressor and OssZlibCompressor, allow you to compact data with the ready-to-use zlib compression algorithm or with your own custom compression methods. Improve storage and transmission by further compacting your already efficient ASN.1 binary and text encodings.
  • The –relaySafe option is now supported for XER and E-XER in the TOED (Time Optimized Encoder/Decoder) and LED (Lean Encoder Decoder) Runtimes of the OSS ASN.1 Tools for C++ . When –relaySafe is specified, the decoder will not discard unrecognized extension additions encountered, but instead will preserve them for later re-encoding.
  • A new OSS-specific directive, OSS.ExtensibleUseType, can be applied locally or globally to selected extensible CHOICE types being encoded in E-XER. The new directive instructs the E-XER decoder to handle unknown alternatives of an extensible CHOICE type as unknown extensions, so that the complete XML or binary encoding of the unknown type is preserved when –relaySafe is in effect.
  • A new OSS-specific directive, OSS.ExerNumericBoolean, can be applied locally or globally to BOOLEAN types causing the E-XER encoder to produce numeric BOOLEAN values (0 and 1) instead of textual values (true/false or their replacements as set using the TEXT encoding instruction).

ASN.1 Tools for C++ - version 4.0.2

  • A new compiler option, -ignoreIncompleteItems, instructs the compiler to ignore incomplete ASN.1 definitions that appear within ASN.1 modules and directly or indirectly reference undefined types or values. This allows you to successfully utilize specs that have unresolved references that don’t affect your application.
  • A new OSS-specific directive, OSS.SelfCompleteWildcard, can be applied globally or locally to types that contain an “ANY-ELEMENT XER” encoding instruction. This directive will mark the associated type as a self-complete entity whose content will be taken as a complete XML document that can be passed to another application or function. This new directive is supported in the LED and SOED runtimes, with TOED support coming soon.
  • When the -relaySafe compiler option is present, the compiler now generates methods, for every extensible SEQUENCE, SET, or CHOICE type, which allow manipulation of unknown extension information in the encoding.
  • New methods, ossSetXMLEncodingRules() / getXMLEncodingRules(), allow you to specify the XML encoding rules (Basic XER, Canonical XER or Extended XER) to be used by the ossXML2Binary() andossBinary2XML() methods for performing direct conversions from XML to binary and vice versa.
  • New API methods, enableSkipPadBytes() / disableSkipPadBytes(), allow you to skip “padding” bytes when decoding.
  • New methods, getCompatibilityFlags() / setCompatibilityFlags() allow you to direct the encoder and decoder to emulate specific backward compatibility behaviors via various flags.
  • The TOED XER and LED XER/E-XER encoders have been optimized for the encoding of REAL values. Encoding of character REAL values (when the exponential form is not used) is up to 20% faster than the previous version.

ASN.1 Tools for C++ - version 4.0.1

  • 25% Faster - TOED PER/UPER encoding, now up to 25% faster for the following ASN.1 types:
    • - BIT STRING
    • - INTEGER (with a value range greater than 64K)
  • The ASN.1/C++ Runtime now includes support for "memory pools", which allow the user to:
    • - decrease the number of calls to the system 'malloc' and 'free' functions when encoding and decoding,
    • - reuse allocated dynamic memory blocks when the encoder and decoder are being run in a loop,
    • - significantly speed up the freeing of complex representation objects.
  • On some platforms that have relatively heavy malloc/free usage, the use of "memory pools" can result in a significant speedup of encoder/decoder, copying, freeing and other runtime operations.

ASN.1 Tools for C++ - version 4.0

  • E-XER (Extended XML Encoding Rules) is now supported in the OSS ASN.1 Tools for C++. Now you can have the full capabilities of XML with ASN.1.
  • ASN.1/C++ now supports the Time Optimized Encoder Decoder (TOED) library for the BER, CER, DER, PER, UPER, XER and CXER encoding rules. The TOED runtime emphasizes minimal CPU utilization (it is the fastest of our runtime libraries).
  • A new compiler option, -namespace, provides namespace support. All the compiler-generated classes are placed in a C++ namespace. This avoids potential clashes of the compiler-generated class names with other class names used in the application.
  • A new compiler option, -restrictedContraintChecking, allows runtime constraint checking to be applied selectively (for individually selected types).
  • The ASN.1/C++ compiler now supports the contents constraints subtype in the SOED (Space Optimized Encoder Decoder) and LED (Lean Encoder Decoder) runtimes.
  • A new compiler option, -relaxMode, has been added so that you can control whether relaxed checking is performed. Relaxed checking will eliminate the generation of warning messages, and some insignificant error messages, by the compiler. Additionally, a runtime flag, STRICT_ENCODING_DECODING_RULES, has been added to enable strict checking of encodings.
  • New APIs allow users to set various debugging levels to control the amount of debug data that is generated at runtime while encoding or decoding. The PrintHex() method of the OSSControl class has been enhanced to display the hex data and its ASCII equivalent.
  • The LED Runtime has been enhanced to produce more descriptive (SOED-like) error messages.
  • A new utility API, the ASN.1/C++ XML time/date API, allows easy conversion of date/time types between the numeric format and text formats which conform to XSD builtin types.

ASN.1 Tools for C++ - version 3.1

  • The OSS ASN.1 Tools for C++ version 3.1 now gives more support for XML. The OSS ASN.1 Tools for C++ runtime API now has new methods:
    • - printXML() allows printing of the XML-encoded buffer (with either XER or CXER encoding) to the console. The function is able to reformat the input XML buffer to print a tree-like document (one way in which this is useful is for displaying CXER encodings that have no white space between XML tags).
    • - binary2XML() and XML2Binary() allow the conversion of any of the ASN.1 binary encodings (BER, PER, UPER, CER, DER) to XML (Basic-XER) and vice versa.
  • The Lean encoder/decoder (LED) now supports XER. So, you now when you want XER, you have the choice to use either the LED runtime or the SOED runtime.

ASN.1 Tools for C++ - version 3.0

The OSS ASN.1 Tools for C++ version 3.0 supports the XML additions to ASN.1 described in the ASN.1:2002 standards documents. The tool includes the following functionality:

  • The ASN.1 compiler supports the XML value notation that provides a means of representing ASN.1 values using eXtensible Markup Language (XML) with the ASN.1 type definition as the schema. The XML value notation may be present within the same input ASN.1 file as other ASN.1 components.
  • The space-optimized encoder/decoder has been enhanced to allow you to encode/decode any PDU in the input using the XML encoding rules (XER). You can now add visibility to your ASN.1-described messages via XML.
  • New compiler command-line options are now available, -xer and -cxer. These options are similar to the -ber/-der/-per/uper options in that they allow the associated set of encoding rules (namely, the XML encoding rules (XER) and the canonical XML encoding rules (CXER)) to be available to the encoder/decoder during runtime.
  • A new ASN.1 compiler command-line option called "-xsl" has been added to allow you to automatically generate multiple default stylesheets, one for each PDU. Stylesheets allow you to have greater control over the visual aesthetic quality of an XML encoding.
  • A new compiler directive OSS.Stylesheet has been introduced to allow you greater control over the default stylesheets which are produced by the ASN.1 compiler. Using this directive, you can instruct the ASN.1 compiler to generate a separate stylesheet with your own desired filename for any particular PDU.
  • A new ASN.1 compiler command line option called "-dtd" has been added to generate XML DTDs (Data Type Definitions)-one for each PDU. This allows you to view and edit XER output of the pdu.encode() in an ASN.1 independent tool, which only recognizes XML.
  • The new compiler directive OSS.DTD lets you instruct the ASN.1 compiler to generate a DTD with your own desired filename for any particular PDU.

To learn more about the OSS ASN.1 Tools for C++, contact our Sales department at 

Toll Free +1-888-OSSASN1 (USA & Canada), +1-732-302-9669