Introduction

The OSS ASN.1 Tools for C is a development tool for building C applications using ASN.1. It supports the 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 for C is designed to meet your needs and comes with many customization features, which include: command-line options, compiler directives, and encoder/decoder flags.

Components

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

The ASN.1/C compiler takes ASN.1 specifications as input and generates C language data structures and control tables for encoding and decoding. It also provides extensive diagnostic capabilities to minimize your development time and effort.

The following files are generated:

  • Diagnostic messages
  • C language header files
  • Control tables
  • Input-module listing files
  • Files that capture all on-screen compiler output
  • Files that capture all input compiler directives and generate directives for name preservation
  • Files that contain compiler directives
  • Multiple Data Type Definitions (DTD) files and Stylesheet files (XSL)

Based on the code size, encoding/decoding speed and diagnostic capabilities, the runtime libraries are classified into three categories:

  • 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. Both the encoder and decoder have a simple, yet flexible memory management interface, as well as a wealth of trace, error trapping, diagnostic, and recovery capabilities.

The Time-Optimized Encoder/Decoder (TOED), on the other hand, is optimized for speed. It includes the same capabilities as SOED, except for tracing.

The Lean Encoder/Decoder (LED) is a table-driven encoder/decoder that is provided separately by OSS Nokalva. Similar to TOED, it is optimized for speed, and, similar to SOED, it uses a minimum amount of memory. 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.

ASN.1 Studio is a graphical development environment available for Windows and Linux platforms, and provides a rich set of capabilities that make the ASN.1 compilation process easier.

You can use ASN.1 Studio to:

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

To read more about its features, see ASN.1 Studio.

TOED SOED workflow

SOED and TOED workflow

Utilities


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

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.