ASN1C

ASN.1 Compiler User's Guide for Java

Objective Systems, Inc.

Version 7.5

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 Java
2. Using the Compiler
Running ASN1C
ASN1C Java Command Line Options
Compiler Configuration File
Compiler Error Reporting
3. ASN1C GUI Users Guide
Quick Start
Creating a Project
Editing Schemas
Compiling
Interface
4. Generated Java Source Code Overview
General Form of a Generated Java Source File
Package Specification
Class Declaration
Tag Constant
Public Member Variables
Constructors
Decode Method
Encode Method
Other Methods
Inner Classes
Error Handling
5. ASN.1 Type to Java Class Mappings
BOOLEAN
INTEGER
BIT STRING
OCTET STRING
Character String Types
ENUMERATED
NULL
OBJECT IDENTIFIER
RELATIVE-OID
REAL
SEQUENCE
SEQUENCE OF
SET OF
CHOICE
Open Type
External Type
EmbeddedPDV Type
Parameterized Types
Value Specifications
6. Generated BER/DER/CER Encode Methods
Memory-buffer Based Definite Length Encoders
Stream-Oriented Indefinite Length Encode Methods
7. Generated BER/DER/CER Decode Methods
Generated Java Method Format and Calling Parameters
Procedure for Calling Java BER Decode Methods
Reuse of Java Decoding Objects
Deferred Decoding and Partial Decoding
8. Generated PER Encode Methods
Generated Java Method Format and Calling Parameters
Procedure for Calling Java PER Encode Methods
Reuse of Java Encoding Objects
9. Generated PER Decode Methods
Generated Java Method Format and Calling Parameters
Procedure for Calling Java PER Decode Methods
Reuse of Java Decoding Objects
10. Generated XML Methods
Overview
Differences between OSys-XER and XER (BASIC-XER)
EXTENDED-XER
Generated Encode Methods
Generated Decode Methods
11. Generated OER Encode Methods
Generated Java Method Format and Calling Parameters
Procedure for Calling Java OER Encode Methods
Reuse of Java Encoding Objects
12. Generated OER Decode Methods
Generated Java Method Format and Calling Parameters
Procedure for Calling Java OER Decode Methods
Reuse of Java Decoding Objects
13. Generated JSON Methods
Overview
Generated JSON Encode Methods
Generated JSON Decode Methods
14. Generated MDER Encode Methods
Generated Method Format and Calling Parameters
Populating Generated Variables for Encoding
Procedure for Calling MDER Encode Methods
Reuse of Java Encoding Objects
15. Generated MDER Decode Methods
Generated Method Format and Calling Parameters
Procedure for Calling Java MDER Decode Methods
Reuse of Java Decoding Objects
16. Table Constraint Processing
CLASS specification
Information Object
Information Object Set
Generated Information Object Table Structure
Populating OpenType Variables for Encoding
Decoding Types with Table Constraints
17. Generated Print Methods
Generated Java Print Method Format and Calling Parameters
Generated Java Print-To-String Method Format and Calling Parameters
18. Generated Copy Methods
19. Generated Compare Methods
20. Generated Metadata Methods
isRequired
getValueRange
21. Generated Sample Programs
22. Build Scripts
Generating Command Line or Shell Scripts
Generating Ant build.xml
Generating Maven pom.xml
Generating Gradle build.gradle
23. Event Handler Interface
How It Works
How to Use It
24. IMPORT/EXPORT of Types
25. Compact Code Generation
26. ROSE and SNMP Macro Support
ROSE OPERATION and ERROR
SNMP OBJECT-TYPE
27. Other Java-based Platforms
Java Micro Edition Support
Android