分类:
2009-10-11 02:25:28
The purpose of the ASN.1 compiler, of which this document is part, is to convert the specifications in ASN.1 notation into some other language. At this moment, only C and C++ target languages are supported, the latter is in upward compatibility mode.
The compiler reads the specification and emits a series of target language structures (C's structs, unions, enums) describing the corresponding ASN.1 types. The compiler also creates the code which allows automatic serialization and deserialization of these structures using several standardized encoding rules (BER, DER, XER).
For example, suppose the following ASN.1 module is given:
RectangleTest DEFINITIONS ::= BEGIN