ASN1C

ASN.1 Compiler User's Guide for Python

Objective Systems, Inc.

Version 7.6

License.  The software described in this document is furnished under a license agreement and may be used only in accordance with the terms of this agreement. This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety with the copyright and this notice intact.

Author's Contact Information.  Comments, suggestions, and inquiries regarding ASN1C or this document may be sent by electronic mail to .

Revision History

Table of Contents

1. Overview of ASN1C for Python
2. ASN1C Command Line Interface (CLI)
Running ASN1C
ASN1C Python Command Line Options
Compiler Configuration File
ASN.1 Standard Revisions
Compiler Error Reporting
3. ASN1C GUI Users Guide
Quick Start
Creating a Project
Editing Schemas
Compiling
Interface
4. Generated Python Source Code
General Form of a Generated Python Source File
Import Statements
Simple Value Definitions
Class Definitions
Complex Value Definitions
5. ASN.1 Type to Python Class Mappings
BIT STRING
BOOLEAN
INTEGER
ENUMERATED
OCTET STRING
Character String Types
Time String Types
REAL
OBJECT IDENTIFIER and RELATIVE-OID
6. Generated BER/DER Encode Methods
Run-time and Generated Python Encode Methods
Populating Generated Variables for Encoding
Procedure for Calling Python BER Encode Methods
7. Generated BER/DER Decode Methods
Run-time and Generated Python Decode Methods
Procedure for Calling Python BER Decode Methods
8. Generated JER (JSON) Decode Methods
Run-time and Generated Python Decode Methods
Procedure for Calling Python JER Decode Methods
9. Generated JER (JSON) Encode Methods
Run-time and Generated Python Encode Methods
Procedure for Calling Python JER Encode
10. Generated Sample Programs
11. Generated Print Methods
Generated Python print_value Method Format and Calling Parameters
Generated Python __str__ Method Format and Calling Parameters
12. Generated Compare Methods
13. Generated Copy Methods