ASN.1 Tools for C++ — Runtime Choices

Throughout the years, OSS Nokalva's customers have had many different requirements for code size, encoding/decoding speed and diagnostic capabilities on various mainstream and embedded platforms. To satisfy our customers' various needs, OSS Nokalva offers our ASN.1 Tools for C++ runtime libraries in two flavors.

Both flavors of the runtime libraries perform the same function and have an identical API consisting of functions for encoding/decoding ASN.1 messages, functions for copying, comparing, printing, and freeing unencoded/decoded messages, a simple, yet flexible memory management interface, and many other useful functions.

You can change from using one flavor of the ASN.1/C++ runtime to using another with no impact to your application code. See the ASN.1/C++ Runtime API Overview for instructions on how to switch between the various runtime flavors.

SOED

The Space-Optimized Encoder/Decoder (SOED) was so named because of its emphasis on minimizing memory usage (i.e., small code size), especially when the ASN.1 specification is large or complex. SOED is a popular choice for use during development. It offers a wealth of tracing, error trapping, diagnostic and recovery capabilities, our most flexible memory manager, and the ability to work interactively with an ASN.1 specification (which is useful, for example, when you need to read information about the constraints of a particular ASN.1 type at runtime).

TOED 1

The Time-Optimized Encoder/Decoder (TOED) is a popular choice for deployment because of its emphasis on minimizing CPU utilization. We purposely minimized the tracing capability and used a code-driven rather than table-driven design to achieve lightning speed.

For details about each of the ASN.1/C++ runtimes, please consult the ASN.1/C++ Runtime API Overview.

Which ASN.1/C++ Runtime is Right for Me?

Use the table below to choose the ASN.1/C++ runtime that best suits your needs, based on its performance (expressed as both code size and the speed of encoding) and diagnostic capabilities.

SOED

TOED 1

Encoding/Decoding Speed

Fast

Fastest

Code Size2

Small

Medium

Diagnostic Capabilities

Rich

Reduced

Ideal for Use During

Development and Deployment

Deployment

Best Suited for

  • Diagnosis during development
  • Applications used for testing
  • Applications that need to encode/decode messages without prior knowledge of ASN.1 types and constraints
  • Large/complex ASN.1 specs
  • Memory limitations
  • Small ASN.1 specs
  • Very high speed requirements

1 The Read-only function pointers TOED (RTOED) is a variation of the TOED. In code generated for the RTOED runtime, all function pointers are constant, so the C++ compiler toolchain can place them in read-only memory. This protects the pointers from being maliciously overwritten. Note that there are some limitations that apply to the RTOED.

2 The size of the code generated by the ASN.1 compiler is highly dependent on the particular ASN.1 specification used.