From 1bdb47b00faff39994a041c6d9a291a2c68143d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
Date: Thu, 20 Feb 2014 16:09:35 +0100
Subject: Remove or de-emphasize references to the deprecated asn1rt module
---
lib/asn1/doc/src/asn1_ug.xml | 50 ++++++++++++--------------------------------
1 file changed, 13 insertions(+), 37 deletions(-)
(limited to 'lib/asn1/doc/src/asn1_ug.xml')
diff --git a/lib/asn1/doc/src/asn1_ug.xml b/lib/asn1/doc/src/asn1_ug.xml
index eb9f000e75..ee54fdffd7 100644
--- a/lib/asn1/doc/src/asn1_ug.xml
+++ b/lib/asn1/doc/src/asn1_ug.xml
@@ -205,16 +205,13 @@ ok
is saved in the People.asn1db file, the
generated Erlang code is compiled using the Erlang compiler and
loaded into the Erlang runtime system. Now there is a user interface
- of encode/2 and decode/2 in the module People, which is invoked by:
+ for encode/2 and decode/2 in the module People,
+ which is invoked by:
,),]]>
or
-,),]]>
-
- Alternatively one can use the ,,)]]> and ,,)]]> calls.
- However, they are not as efficient as the previous methods since they
- result in an additional apply/3 call.
+,),]]>
Assume there is a network
application which receives instances of the ASN.1 defined
type Person, modifies and sends them back again:
@@ -241,16 +238,14 @@ receive
encoding-rules.
The encoder and the decoder can also be run from
- the shell. The following dialogue with the shell illustrates
- how the functions
- asn1rt:encode/3 and asn1rt:decode/3 are used.
+ the shell.
@@ -279,11 +274,8 @@ The encoder and the decoder can also be run from
(including the compiler).
-
The module asn1rt which provides the run-time functions.
- However, it is preferable to use the generated encode/2 and
- decode/2 functions in each module, ie.
- Module:encode(Type,Value), in favor of the asn1rt
- interface.
+
The module asn1rt_nif which provides the run-time functions
+ for the ASN.1 decoder for the BER back-end.
The reason for the division of the interface into compile-time
@@ -384,25 +376,9 @@ asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes).
Run-time Functions
-
A brief description of the major functions is given here. For a
- complete description of each function see
- the Asn1 Reference Manual, the asn1rt module.
-
The generic run-time encode and decode functions can be invoked as below:
The asn1 nif is enabled in two occasions: encoding of
- asn1 values when the asn1 spec is compiled with per and
- or decode of encoded asn1 values when the asn1 spec is
- compiled with ber. In
- those cases the nif will be loaded automatically at the first call
- to encode/decode. If one doesn't want the performance
- overhead of the nif being loaded at the first call it is possible
- to load the nif separately by loading the asn1rt_nif module.
+
When an ASN.1 specification is compiled with the ber
+ option, the module asn1rt_nif module and the NIF library in
+ asn1/priv_dir will be needed at run-time.
By invoking the function info/0 in a generated module, one
gets information about which compiler options were used.
@@ -414,8 +390,8 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes).
a line number indicating where in the source file the error
was detected. If no errors are found, an Erlang ASN.1 module will
be created as default.
-
The run-time encoders and decoders (in the asn1rt module) do
- execute within a catch and returns {ok, Data} or
+
The run-time encoders and decoders execute within a catch and
+ returns {ok, Data} or
{error, {asn1, Description}} where
Description is
an Erlang term describing the error.