logo

ASN1C

C/C++ Compiler User's Manual

Objective Systems, Inc.

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. 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
2. Using the Compiler
Running ASN1C from the Command-line
Compiling and Linking Generated Code
Porting Run-time Code to Other Platforms
Compiler Configuration File
Compiler Error Reporting
3. ASN1C GUI Users Guide
Quick Start
Creating a Project
Editing Schemas
Compiling
Interface
4. ASN.1 To C/C++ Mappings
Type Mappings
Value Mappings
Table Constraint Related Structures
5. XSD to C/C++ Type Mappings
XSD Simple Types
XSD Complex Types
6. Generated C/C++ Source Code
Header (.h) File
Generated C Source Files
Generated C++ files
Generated C/C++ files and the -compat Option
Generated C++ files and the -symbian Option
Considerations When Using C++ Standard Library
Generated Build Files
7. Generated Encode/Decode Function and Methods
Encode/Decode Function Prototypes
Generated C++ Control Class Definition
Generated Information Object Table Structures
General Procedures for Encoding and Decoding
8. Memory Management in C/C++
The ASN1C Default Memory Manager
High Level Memory Management API
Built-in Compact Memory Management
Low Level Memory Management API
C++ Memory Management
Memory Security
9. Generated BER Functions
Generated BER Encode Functions
Generated BER Streaming Encode Functions
Generated BER Decode Functions
BER Decode Performance Enhancement Techniques
Generated BER Streaming Decode Functions
10. Generated PER Functions
Generated PER Encode Functions
Generated PER Decode Functions
11. Generated Octet Encoding Rules (OER) Functions
Generated OER Encode Functions
Generated OER Decode Functions
12. Generated Medical Device Encoding Rules (MDER) Functions
Generated MDER Encode Functions
Generated MDER Decode Functions
Two-Phase Messaging
13. Generated XML Functions
Overview
Generated XER Encode Functions (Old Style - Deprecated)
Generated XER Decode Functions (Old Style - Deprecated)
Generated XML Encode Functions
Generated XML Decode Functions
14. Generated JavaScript Object Notation (JSON) Functions
Generated JSON Encode Functions
Generated JSON Decode Functions
15. Generated 3GPP Layer 3 (3GL3) Functions
Generated 3GPP Layer 3 Encode Functions
Generated 3GPP Layer 3 Decode Functions
16. CSN.1 Described
Definitions
CSN.1 Lexical Items
Module
Labels and References
BasicString
CSN1String
Alternation
Concatenation
Exponents
Exclusion
Intersection
Send Expression
Subclass Expressions
17. Mapping CSN.1 to ASN.1
Introduction
General Procedure
Mapping CSN.1 name to ASN.1 identifier
Mapping CSN.1 name to ASN.1 typereference
ASN.1 Identifier Assignment
CSN1String Mapping Procedure
Alternation Mapping Procedure
Concatenation Mapping Procedure
Exponential Mapping
Intersection Procedures
Literal Mapping
Reference Mapping
Send Mapping
18. Compiling CSN.1
Basics
Using CSN.1 and ASN.1 Together
Tips on Working with CSN.1
CSN.1 to ASN.1 Example
19. Additional Generated Functions
Generated Initialization Functions
Generated Memory Free Functions
Generated Print Functions
Generated Compare Functions
Generated Copy Functions
Generated Test Functions
20. Event Handler Interface
How it Works
How to Use It
21. IMPORT/EXPORT of Types
22. ROSE and SNMP Macro Support
ROSE OPERATION and ERROR
SNMP OBJECT-TYPE
A. ASN1C Error Codes
Code Generation Error Messages
General Runtime Error Messages
ASN.1-specific Status Messages

List of Tables

16.1. CSN.1 Operations from highest to lowest precedence.

List of Examples

18.1. main.csn1
18.2. main.asn1
18.3. common.csn1
18.4. common.asn1
18.5. CSN.1 Example
18.6. The resulting ASN.1