The ASN.1 compiler takes an ASN.1 module as input and generates a
corresponding Erlang module, which can encode and decode the specified
data types. Alternatively, the compiler takes a specification module
specifying all input modules, and generates a module with
encode/decode functions. In addition, some generic functions
can be used during development of applications that handles ASN.1
data (encoded as
By default in OTP 17, the representation of the
To revert to the old representation of the types, use option
In OTP R16, the options were simplified. The back end is chosen
using one of the options
Another change in OTP R16 is that the generated function
Compiles the
If
If it is needed to compile a set of
File1.asn File2.asn File3.asn
The output files in this case get their names from the
configuration file. If the configuration file is named
Sometimes in a system of
Name collisions is another unwanted effect that can occur in multi file-compilation. The compiler solves this problem in one of two ways:
If a name collision occurs, the compiler reports a
The encoding rule to be used. The supported encoding rules
are Basic Encoding Rules (BER),
Packed Encoding Rules (PER) aligned, and PER unaligned.
If the encoding rule option is omitted,
The generated Erlang module always gets the same name
as the
With this option the Distinguished Encoding Rules (DER) is chosen.
DER is regarded as a specialized variant of the BER encoding
rule. Therefore, this option only makes sense together
with option
The
For details, see Section
This option implies option
The
For details, see Section
This option implies option
Use the same Erlang types to represent
For details, see Section
This option is not recommended for new code.
Tells the compiler to generate functions for conversion
between names (as atoms) and numbers and conversely for
the specified
If
The generated conversion functions are named
Do not compile (that is, do not produce object code) the
generated
Adds
Specifies directory
When using one of the specialized decodes, exclusive or
selective decode, instructions must be given in
a configuration file. Option
For instructions for exclusive decode, see Section
For instructions for selective decode, see Section
A buffer that holds a message, being decoded it can also
have some following bytes. Those following bytes can now
be returned together with the decoded value. If an
ASN.1 specification is compiled with this option, a tuple
With this option, the generated
All macro names generated by the compiler are prefixed with
All record names generated by the compiler are prefixed with
Causes more verbose information from the compiler describing what it is doing.
Causes warnings to be treated as errors.
Any more option that is applied is passed to
the final step when the generated
The compiler generates the following files:
Returns an Erlang term that is an example of a valid Erlang
representation of a value of the
Currently, the
Performs a test of encode and decode of types in
Currently, the
Schematically, the following occurs for each type in the module:
{ok, Value} = asn1ct:value(Module, Type),
{ok, Bytes} = Module:encode(Type, Value),
{ok, Value} = Module:decode(Type, Bytes).
The