Introduction

The OSS ASN.1 Tools for C++ is a development tool for building true C++ applications using ASN.1. It supports the full ASN.1 syntax as described by the ASN.1:1990 through ASN.1:2021 standards and the following encoding rules:

  • Basic Encoding Rules (BER)
  • Packed Encoding Rules (Aligned Basic-PER: PER, Aligned Canonical-PER: CPER, Unaligned Basic-PER: UPER, Unaligned Canonical-PER: CUPER)
  • Distinguished Encoding Rules (DER)
  • Canonical Encoding Rules (CER)
  • XML Encoding Rules (Basic: XER, Canonical: CXER, Extended: E-XER)
  • Octet Encoding Rules (Basic: OER, Canonical: COER)
  • JavaScript Object Notation Encoding Rules (JSON)
  • ASN.1 Value Notation Encoding Rules (AVN)

The OSS ASN.1 Tools completely shields the user from the intricacies of these encoding rules.

You can tailor the OSS ASN.1 Tools' output to suit your needs using command-line options, compiler directives, encoder/decoder flags, and other customization features.

Components

The OSS ASN.1 Tools for C++ includes the following components:

The OSS ASN.1/C++ Compiler takes ASN.1 specifications as input and generates C++ classes and control tables for encoding and decoding. The compiler validates the specification, and can generate

  • Diagnostic messages to help pinpoint errors in the ASN.1 syntax
  • A C++ header file containing class declarations for inclusion in the User's application
  • C++ code to support the classes declared in the generated header
  • Time-Optimized Encoder/Decoder code, or a control table for the Space-Optimized or Lean Encoder/Decoder
  • An input-module listing file
  • A file that captures all on-screen compiler output
  • A file that captures all input compiler directives and generates directives for name preservation
  • A file that contains compiler directives that have been ignored in the input syntax
  • Multiple Data Type Definitions (DTD) files and Stylesheet files (XSL)

The OSS ASN.1/C++ Runtime API includes runtime libraries that perform ASN.1 encoding and decoding functions, as well as auxiliary operations, on application messages. OSS offers these runtime libraries in three versions to satisfy different requirements for code size, encoding/decoding speed, and diagnostic capabilities:

  • Space-Optimized (SOED)
  • Time-Optimized (TOED)
  • Lean (LED)

The Space-Optimized Encoder/Decoder (SOED) is table-driven and, as its name implies, minimizes the use of memory, which is especially useful when the schema is large or complex. The SOED is a popular choice for use during development. Both the encoder and decoder have a simple, yet flexible, memory management interface, along with a wealth of trace, error trapping, diagnostic, and recovery features.

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

The Lean Encoder/Decoder (LED) (packaged separately) is a table-driven encoder/decoder. Similar to the TOED, it is optimized for speed and, similar to the SOED, it uses a minimum amount of memory. The LED is best suited for embedded systems that have a limited amount of memory and require a short amount of processing time while running applications.

The following diagram shows an overview of the SOED and TOED workflow. For more information about choosing the right encoder/decoder that suits your specific needs, see ASN.1 Tools for C++ - Runtime Choices.

TOED SOED workflow

SOED and TOED workflow

ASN.1 Studio® is a powerful IDE included with the OSS ASN.1 Tools for C++ on the Windows and Linux platforms. You can use ASN.1 Studio to graphically create or modify ASN.1 values, without writing any code.

You can use ASN.1 Studio to:

  • ASN.1-compile.
  • Work with ASN.1 encoded data.
  • Build different types of ASN.1 applications instantly.

For more information, go to ASN.1 Studio.

Utilities


This documentation applies to release 7.3 and later of the OSS® ASN.1 Tools for C++.

Copyright © 2024 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS ASN.1 Tools for C++ is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C++ are available to you.