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
Using the GUI Wizard to Run ASN1C
Using the Visual Studio Wizard to Generate ASN1C Projects
Compiling and Linking Generated Code
Porting Run-time Code to Other Platforms
Compiler Configuration File
Compiler Error Reporting
3. ASN.1 To C/C++ Mappings
Type Mappings
Value Mappings
Table Constraint Related Structures
4. XSD to C/C++ Type Mappings
XSD Simple Types
XSD Complex Types
5. 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
6. 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
7. 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
8. 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
9. Generated PER Functions
Generated PER Encode Functions
Generated PER Decode Functions
10. Generated Octet Encoding Rules (OER) Functions
Generated OER Encode Functions
Generated OER Decode Functions
11. Generated Medical Device Encoding Rules (MDER) Functions
Generated MDER Encode Functions
Generated MDER Decode Functions
Two-Phase Messaging
12. 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
13. Generated JavaScript Object Notation (JSON) Functions
Generated JSON Encode Functions
Generated JSON Decode Functions
14. Generated 3GPP Layer 3 (3GL3) Functions
Generated 3GPP Layer 3 Encode Functions
Generated 3GPP Layer 3 Decode Functions
15. Additional Generated Functions
Generated Initialization Functions
Generated Memory Free Functions
Generated Print Functions
Generated Compare Functions
Generated Copy Functions
Generated Test Functions
16. Event Handler Interface
How it Works
How to Use It
17. IMPORT/EXPORT of Types
18. 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