From 8a7f914affce3102e4889c2973ea2d2e99ad633d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?=
Date: Mon, 16 Jan 2017 16:47:58 +0100
Subject: Teach the ASN.1 compiler the 'maps' option
When the 'maps' option is given, the SEQUENCE and SET types are
represented as maps instead of as records. Optional and default values
must be not be given as asn1_NOVALUE or asn1_DEFAULT in a map passed
to the M:encode/2 function; they must be omitted from the
map. Similarly, when decoding missing values will be omitted from the
map.
No .hrl files will be generated when the 'maps' options is used.
That means values in an ASN.1 module must be retrieved by calling the
appropriate function in generated module.
Since we one day hope to get rid of the options 'compact_bit_string',
'legacy_bit_string', and 'legacy_erlang_types', we will not allow them
to be combined with the 'maps' option.
---
lib/asn1/doc/src/asn1ct.xml | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
(limited to 'lib/asn1/doc/src/asn1ct.xml')
diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml
index ebe1ce44dc..859d6a50bb 100644
--- a/lib/asn1/doc/src/asn1ct.xml
+++ b/lib/asn1/doc/src/asn1ct.xml
@@ -170,11 +170,24 @@ File3.asn
as for ber.
+ maps
+ -
+
This option changes the representation of the types
+ SEQUENCE and SET to use maps (instead of
+ records). This option also suppresses the generation of
+ .hrl files.
+ For details, see Section
+
+ Map representation for SEQUENCE and SET
+ in the User's Guide.
+
+
compact_bit_string
-
The BIT STRING type is decoded to "compact notation".
This option is not recommended for new code.
+ This option cannot be combined with the option maps.
For details, see Section
@@ -188,6 +201,7 @@ File3.asn
The BIT STRING type is decoded to the legacy
format, that is, a list of zeroes and ones.
This option is not recommended for new code.
+ This option cannot be combined with the option maps.
For details, see Section
BIT STRING
@@ -202,7 +216,8 @@ File3.asn
marker="asn1_getting_started#BIT STRING">BIT STRING and Section
OCTET
STRING in the User's Guide.
- This option is not recommended for new code.
+ This option is not recommended for new code.
+ This option cannot be combined with the option maps.
{n2n, EnumTypeName}
-
--
cgit v1.2.3