aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2005-11-26 11:25:14 +0000
committerLev Walkin <vlm@lionet.info>2005-11-26 11:25:14 +0000
commit59b176ee355b3e82e6a8649b164c187c7a17a28f (patch)
tree6d864f02cd16eb75f4ae6e40199d1879d8363152
parent708530582f5ba965fb596c3e189eec23c52337d9 (diff)
upgrade: PER related changes
-rw-r--r--ChangeLog4
-rw-r--r--TODO7
-rw-r--r--asn1c/asn1c.115
-rw-r--r--asn1c/asn1c.c30
-rw-r--r--asn1c/tests/check-25.c4
-rw-r--r--asn1c/tests/check-70.c8
-rw-r--r--libasn1compiler/asn1c_C.c709
-rw-r--r--libasn1compiler/asn1c_constraint.c2
-rw-r--r--libasn1compiler/asn1c_fdeps.c27
-rw-r--r--libasn1compiler/asn1c_save.c68
-rw-r--r--libasn1compiler/asn1compiler.h10
-rw-r--r--libasn1fix/asn1fix_constr.c12
-rw-r--r--libasn1fix/asn1fix_retrieve.c1
-rw-r--r--libasn1fix/asn1fix_tags.c56
-rw-r--r--libasn1fix/asn1fix_tags.h3
-rw-r--r--skeletons/ANY.c2
-rw-r--r--skeletons/BIT_STRING.c6
-rw-r--r--skeletons/BMPString.c4
-rw-r--r--skeletons/BOOLEAN.c38
-rw-r--r--skeletons/BOOLEAN.h1
-rw-r--r--skeletons/ENUMERATED.c24
-rw-r--r--skeletons/ENUMERATED.h4
-rw-r--r--skeletons/GeneralString.c2
-rw-r--r--skeletons/GeneralizedTime.c2
-rw-r--r--skeletons/GraphicString.c2
-rw-r--r--skeletons/IA5String.c2
-rw-r--r--skeletons/INTEGER.c101
-rw-r--r--skeletons/INTEGER.h3
-rw-r--r--skeletons/ISO646String.c2
-rw-r--r--skeletons/NULL.c37
-rw-r--r--skeletons/NULL.h1
-rw-r--r--skeletons/NativeEnumerated.c58
-rw-r--r--skeletons/NativeEnumerated.h1
-rw-r--r--skeletons/NativeInteger.c75
-rw-r--r--skeletons/NativeInteger.h1
-rw-r--r--skeletons/NativeReal.c4
-rw-r--r--skeletons/NumericString.c2
-rw-r--r--skeletons/OBJECT_IDENTIFIER.c6
-rw-r--r--skeletons/OCTET_STRING.c131
-rw-r--r--skeletons/OCTET_STRING.h1
-rw-r--r--skeletons/ObjectDescriptor.c2
-rw-r--r--skeletons/PrintableString.c2
-rw-r--r--skeletons/README10
-rw-r--r--skeletons/REAL.c6
-rw-r--r--skeletons/RELATIVE-OID.c6
-rw-r--r--skeletons/T61String.c2
-rw-r--r--skeletons/TeletexString.c2
-rw-r--r--skeletons/UTCTime.c2
-rw-r--r--skeletons/UTF8String.c2
-rw-r--r--skeletons/UniversalString.c4
-rw-r--r--skeletons/VideotexString.c2
-rw-r--r--skeletons/VisibleString.c2
-rw-r--r--skeletons/asn-decoder-template.c63
-rw-r--r--skeletons/asn_codecs.h14
-rw-r--r--skeletons/asn_codecs_prim.c4
-rw-r--r--skeletons/constr_CHOICE.c95
-rw-r--r--skeletons/constr_CHOICE.h9
-rw-r--r--skeletons/constr_SEQUENCE.c138
-rw-r--r--skeletons/constr_SEQUENCE.h13
-rw-r--r--skeletons/constr_SEQUENCE_OF.c6
-rw-r--r--skeletons/constr_SEQUENCE_OF.h1
-rw-r--r--skeletons/constr_SET.c6
-rw-r--r--skeletons/constr_SET_OF.c94
-rw-r--r--skeletons/constr_SET_OF.h1
-rw-r--r--skeletons/constr_TYPE.h9
-rw-r--r--skeletons/file-dependencies8
-rw-r--r--skeletons/per_decoder.c2
-rw-r--r--skeletons/per_decoder.h55
-rw-r--r--skeletons/per_support.c148
-rw-r--r--skeletons/per_support.h54
-rw-r--r--skeletons/tests/Makefile.am3
-rw-r--r--skeletons/tests/Makefile.in23
-rw-r--r--skeletons/tests/check-INTEGER.c1
-rw-r--r--skeletons/tests/check-OCTET_STRING.c1
-rw-r--r--skeletons/tests/check-PER.c105
-rw-r--r--skeletons/tests/check-UTF8String.c1
-rw-r--r--skeletons/tests/check-length.c1
-rw-r--r--skeletons/xer_encoder.c4
-rw-r--r--skeletons/xer_support.c6
-rw-r--r--tests/19-param-OK.asn1.-P114
-rw-r--r--tests/30-set-OK.asn1.-P36
-rw-r--r--tests/31-set-of-OK.asn12
-rw-r--r--tests/31-set-of-OK.asn1.-EF2
-rw-r--r--tests/31-set-of-OK.asn1.-P346
-rw-r--r--tests/32-sequence-of-OK.asn1.-P65
-rw-r--r--tests/39-sequence-of-OK.asn1.-P80
-rw-r--r--tests/42-real-life-OK.asn1.-PR295
-rw-r--r--tests/43-recursion-OK.asn1.-P184
-rw-r--r--tests/44-choice-in-sequence-OK.asn1.-P84
-rw-r--r--tests/46-redefine-OK.asn1.-PR65
-rw-r--r--tests/47-set-ext-OK.asn1.-P94
-rw-r--r--tests/50-constraint-OK.asn119
-rw-r--r--tests/50-constraint-OK.asn1.-EFprint-constraintsbin7548 -> 9898 bytes
-rw-r--r--tests/50-constraint-OK.asn1.-P1230
-rw-r--r--tests/50-constraint-OK.asn1.-Pgen-PER4739
-rw-r--r--tests/59-choice-extended-OK.asn1.-P33
-rw-r--r--tests/60-any-OK.asn1.-P83
-rw-r--r--tests/65-multi-tag-OK.asn1.-P170
-rw-r--r--tests/65-multi-tag-OK.asn1.-Pfnative-types170
-rw-r--r--tests/66-ref-simple-OK.asn1.-P53
-rw-r--r--tests/69-reserved-words-OK.asn1.-P65
-rw-r--r--tests/70-xer-test-OK.asn1.-P542
-rw-r--r--tests/72-same-names-OK.asn1.-P268
-rw-r--r--tests/73-circular-OK.asn1.-P233
-rw-r--r--tests/84-param-tags-OK.asn1.-P186
-rw-r--r--tests/88-integer-enum-OK.asn1.-P19
-rw-r--r--tests/89-bit-string-enum-OK.asn1.-P15
-rw-r--r--tests/89-bit-string-enum-OK.asn1.-Pfcompound-names15
-rw-r--r--tests/90-cond-int-type-OK.asn1.-P342
-rw-r--r--tests/90-cond-int-type-OK.asn1.-Pfnative-types342
-rw-r--r--tests/90-cond-int-type-OK.asn1.-Pgen-PER2744
-rw-r--r--tests/91-cond-int-blessSize-OK.asn1.-Pfbless-SIZE95
-rw-r--r--tests/92-circular-loops-OK.asn1.-P474
-rw-r--r--tests/92-circular-loops-OK.asn1.-Pfindirect-choice474
-rw-r--r--tests/93-asn1c-controls-OK.asn1.-P104
-rw-r--r--tests/94-set-optionals-OK.asn1.-P50
-rw-r--r--tests/95-choice-per-order-OK.asn130
-rw-r--r--tests/95-choice-per-order-OK.asn1.-P284
-rw-r--r--tests/95-choice-per-order-OK.asn1.-Pgen-PER302
119 files changed, 14517 insertions, 2304 deletions
diff --git a/ChangeLog b/ChangeLog
index 742ae507..cbd8a34f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,11 @@
-0.9.20: 2005-Nov-07
+0.9.20: 2005-Nov-13
* SET OF CHOICE, SEQUENCE OF CHOICE and a certain named S/O types
are represented differently in XER. THIS IS AN ICOMPATIBLE CHANGE.
(Test case 70) (Severity: low; Security impact: low)
+ * PER implementation has started
+ * asn1c: Removed -ftypes88 command line option.
0.9.19: 2005-Oct-06
diff --git a/TODO b/TODO
index 058b1d61..d75352b9 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,6 @@
1. MAJOR:
-1.1 Support for PER encoding. Requires advanced subtype constraints support,
-which is already completed.
+1.1 Support for PER encoding. PER decoding is already supported.
1.2 Support for Information Object Classes.
Status: Support for parsing IOCs is mostly present.
@@ -12,7 +11,3 @@ which is already completed.
2.1 Support for EXTERNAL, EMBEDDED-PDV and CHARACTER STRING types.
Requires something from 1.2 (Information Object Classes).
-
-3. MINOR:
-
-3.1 Support for DEFAULT encoding and decoding, at least in INTEGER/ENUMERATED types.
diff --git a/asn1c/asn1c.1 b/asn1c/asn1c.1
index a4289355..3c07ec7f 100644
--- a/asn1c/asn1c.1
+++ b/asn1c/asn1c.1
@@ -4,7 +4,7 @@ asn1c \- ASN.1 Compiler
.SH SYNOPSIS
asn1c [\fB\-E\fR [\fB-F\fR] | \fB\-P\fR | \fB\-R\fR]
[\fB\-S\fR\fIdir\fR] [\fB-X\fR]
- [\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR...] [\fB\-p\fR\fIrint-\fR...]
+ [\fB\-W\fR\fIdebug-\fR...] [\fB\-f\fR\fIoption\fR] [\fB\-gen-\fR\fIoption\fR] [\fB\-print-\fR\fIoption\fR]
\fIinfile\fR...
.SH DESCRIPTION
asn1c compiles the ASN.1 specifications into the set of
@@ -25,7 +25,11 @@ and other encoding standards.
.br
\fB\-fall-defs-global \-fbless-SIZE \-fcompound-names \-findirect-choice
.BI "\-fknown-extern-type="<name>
-\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy \-ftypes88\fR
+\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy
+.TP
+\fICodecs Generation Options\fR
+.br
+.B \-gen-PER
.TP
\fIOutput Options\fR
.br
@@ -117,11 +121,10 @@ Enable unnamed unions in the definitions of target language's structures.
.TP
.B \-fskeletons-copy
Copy support files (skeletons) rather than symlink them.
+.SH CODECS GENERATION OPTIONS
.TP
-.B \-ftypes88
-Pretend to support only ASN.1:1988 embedded types. Certain reserved words,
-such as UniversalString and BMPString, become ordinary type references
-and may be redefined by the specification.
+.B \-gen-PER
+Generate Packed Encoding Rules (PER) support code.
.SH OUTPUT OPTIONS
.TP
.B \-print-constraints
diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
index ce1342f8..fa9773ce 100644
--- a/asn1c/asn1c.c
+++ b/asn1c/asn1c.c
@@ -62,7 +62,7 @@ main(int ac, char **av) {
/*
* Process command-line options.
*/
- while((ch = getopt(ac, av, "EFf:hLPp:RS:vW:X")) != -1)
+ while((ch = getopt(ac, av, "EFf:g:hLPp:RS:vW:X")) != -1)
switch(ch) {
case 'E':
print_arg__print_out = 1;
@@ -95,13 +95,19 @@ main(int ac, char **av) {
asn1_compiler_flags |= A1C_UNNAMED_UNIONS;
} else if(strcmp(optarg, "skeletons-copy") == 0) {
asn1_compiler_flags |= A1C_SKELETONS_COPY;
- } else if(strcmp(optarg, "types88") == 0) {
- asn1_parser_flags |= A1P_TYPES_RESTRICT_TO_1988;
} else {
fprintf(stderr, "-f%s: Invalid argument\n", optarg);
exit(EX_USAGE);
}
break;
+ case 'g':
+ if(strcmp(optarg, "en-PER") == 0) {
+ asn1_compiler_flags |= A1C_GEN_PER;
+ } else {
+ fprintf(stderr, "-g%s: Invalid argument\n", optarg);
+ exit(EX_USAGE);
+ }
+ break;
case 'h':
usage(av[0]);
case 'P':
@@ -109,7 +115,15 @@ main(int ac, char **av) {
asn1_compiler_flags &= ~A1C_NO_C99;
break;
case 'p':
- if(strcmp(optarg, "rint-constraints") == 0) {
+ if(strncmp(optarg, "du=", 3) == 0) {
+ char *pduname = optarg + 3;
+ if(strcmp(pduname, "auto")) {
+ fprintf(stderr, "-pdu=%s: expected -pdu=auto\n",
+ pduname);
+ exit(EX_USAGE);
+ }
+ asn1_compiler_flags |= A1C_PDU_AUTO;
+ } else if(strcmp(optarg, "rint-constraints") == 0) {
asn1_printer_flags |= APF_DEBUG_CONSTRAINTS;
} else if(strcmp(optarg, "rint-lines") == 0) {
asn1_printer_flags |= APF_LINE_COMMENTS;
@@ -250,7 +264,8 @@ main(int ac, char **av) {
/*
* Make sure the skeleton directory is out there.
*/
- if(skeletons_dir == NULL) {
+ if((asn1_compiler_flags & A1C_OMIT_SUPPORT_CODE) == 0
+ && skeletons_dir == NULL) {
struct stat sb;
skeletons_dir = DATADIR;
if((av[-optind][0] == '.' || av[-optind][1] == '/')
@@ -326,7 +341,10 @@ usage(const char *av0) {
" -fno-include-deps Do not generate courtesy #includes for dependencies\n"
" -funnamed-unions Enable unnamed unions in structures\n"
" -fskeletons-copy Force copying the support files\n"
-" -ftypes88 Pretend to support only ASN.1:1988 embedded types\n"
+"\n"
+
+" -gen-PER Generate PER support code\n"
+" -pdu=auto Generate PDU table (discover PDUs automatically)\n"
"\n"
" -print-constraints Explain subtype constraints (debug)\n"
diff --git a/asn1c/tests/check-25.c b/asn1c/tests/check-25.c
index 90db5d0a..38c3580f 100644
--- a/asn1c/tests/check-25.c
+++ b/asn1c/tests/check-25.c
@@ -102,8 +102,8 @@ check(int is_ok, uint8_t *buf, int size, size_t consumed) {
assert(rval.code == RC_OK);
assert(rval.consumed == consumed);
- assert(strcmp(t.e->buf, "xyz") == 0);
- assert(strcmp(t.f->buf, "love_it") == 0);
+ assert(strcmp((char *)t.e->buf, "xyz") == 0);
+ assert(strcmp((char *)t.f->buf, "love_it") == 0);
assert(t.g->size == 2);
assert(t.g->bits_unused == 2);
diff --git a/asn1c/tests/check-70.c b/asn1c/tests/check-70.c
index 403369e7..4b51065f 100644
--- a/asn1c/tests/check-70.c
+++ b/asn1c/tests/check-70.c
@@ -36,8 +36,12 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
b = buf + buf_offset;
bend = b + size;
fprintf(stderr, "=> [");
- for(; b < bend; b++)
- fprintf(stderr, "%c", *b);
+ for(; b < bend; b++) {
+ if(*b >= 32 && *b < 127 && *b != '%')
+ fprintf(stderr, "%c", *b);
+ else
+ fprintf(stderr, "%%02x", *b);
+ }
fprintf(stderr, "]:%ld\n", (long)size);
buf_offset += size;
return 0;
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c
index 4df99188..8bce9028 100644
--- a/libasn1compiler/asn1c_C.c
+++ b/libasn1compiler/asn1c_C.c
@@ -7,7 +7,8 @@
#include "asn1c_constraint.h"
#include "asn1c_out.h"
#include "asn1c_misc.h"
-#include <asn1fix_export.h> /* Stuff exported by libasn1fix */
+#include <asn1fix_crange.h> /* constraint groker from libasn1fix */
+#include <asn1fix_export.h> /* other exportables from libasn1fix */
typedef struct tag2el_s {
struct asn1p_type_tag_s el_tag;
@@ -35,16 +36,22 @@ static int asn1c_lang_C_type_SET_def(arg_t *arg);
static int asn1c_lang_C_type_CHOICE_def(arg_t *arg);
static int asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of);
static int _print_tag(arg_t *arg, struct asn1p_type_tag_s *tag_p);
-static int check_if_extensible(asn1p_expr_t *expr);
+static int compute_extensions_start(asn1p_expr_t *expr);
static int expr_break_recursion(arg_t *arg, asn1p_expr_t *expr);
static int expr_as_xmlvaluelist(arg_t *arg, asn1p_expr_t *expr);
static int expr_elements_count(arg_t *arg, asn1p_expr_t *expr);
+static int emit_single_member_PER_constraint(arg_t *arg, asn1cnst_range_t *range, char *type);
+static int emit_single_member_PER_constraints(arg_t *arg, asn1p_expr_t *expr);
+static int emit_members_PER_constraints(arg_t *arg);
static int emit_member_table(arg_t *arg, asn1p_expr_t *expr);
static int emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count, const char *opt_modifier);
static int emit_include_dependencies(arg_t *arg);
static asn1p_expr_t *terminal_structable(arg_t *arg, asn1p_expr_t *expr);
static int expr_defined_recursively(arg_t *arg, asn1p_expr_t *expr);
static int asn1c_recurse(arg_t *arg, asn1p_expr_t *expr, int (*callback)(arg_t *arg, void *key), void *key);
+static asn1p_expr_type_e expr_get_type(arg_t *arg, asn1p_expr_t *expr);
+static int try_inline_default(arg_t *arg, asn1p_expr_t *expr, int out);
+static int *compute_canonical_members_order(arg_t *arg, int el_count);
enum tvm_compat {
_TVM_SAME = 0, /* tags and all_tags are same */
@@ -78,8 +85,9 @@ static int emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode
} while(0)
/* MKID_safe() without checking for reserved keywords */
-#define MKID(id) asn1c_make_identifier(0, (id), 0)
-#define MKID_safe(id) asn1c_make_identifier(AMI_CHECK_RESERVED, (id), 0)
+#define MKID(id) ((id)?asn1c_make_identifier(0, (id), 0):"Member")
+#define MKID_safe(id) ((id)?asn1c_make_identifier(AMI_CHECK_RESERVED, \
+ (id), 0):"Member")
int
asn1c_lang_C_type_REAL(arg_t *arg) {
@@ -112,7 +120,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
asn1p_expr_t *v;
int el_count = expr_elements_count(arg, expr);
struct value2enum *v2e;
- int map_is_extensible = (expr->expr_type == ASN_BASIC_INTEGER);
+ int map_extensions = (expr->expr_type == ASN_BASIC_INTEGER);
int eidx;
v2e = alloca((el_count + 1) * sizeof(*v2e));
@@ -144,7 +152,8 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
OUT("\t/*\n");
OUT("\t * Enumeration is extensible\n");
OUT("\t */\n");
- map_is_extensible = 1;
+ if(!map_extensions)
+ map_extensions = eidx + 1;
break;
default:
return -1;
@@ -168,7 +177,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
*/
REDIR(OT_STAT_DEFS);
- OUT("static asn_INTEGER_enum_map_t asn_MAP_%s_%d_value2enum[] = {\n",
+ OUT("static asn_INTEGER_enum_map_t asn_MAP_%s_value2enum_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byValue);
for(eidx = 0; eidx < el_count; eidx++) {
@@ -178,11 +187,11 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
(long)strlen(v2e[eidx].name), v2e[eidx].name,
(eidx + 1 < el_count) ? "," : "");
}
- if(map_is_extensible)
+ if(map_extensions)
OUT("\t/* This list is extensible */\n");
OUT("};\n");
- OUT("static unsigned int asn_MAP_%s_%d_enum2value[] = {\n",
+ OUT("static unsigned int asn_MAP_%s_enum2value_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
qsort(v2e, el_count, sizeof(v2e[0]), compar_enumMap_byName);
for(eidx = 0; eidx < el_count; eidx++) {
@@ -191,25 +200,29 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
(eidx + 1 < el_count) ? "," : "",
v2e[eidx].name, v2e[eidx].value);
}
- if(map_is_extensible)
+ if(map_extensions)
OUT("\t/* This list is extensible */\n");
OUT("};\n");
- OUT("static asn_INTEGER_specifics_t asn_SPC_%s_%d_specs = {\n",
+ OUT("static asn_INTEGER_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
INDENT(+1);
- OUT("asn_MAP_%s_%d_value2enum,\t"
+ OUT("asn_MAP_%s_value2enum_%d,\t"
"/* \"tag\" => N; sorted by tag */\n",
MKID(expr->Identifier),
expr->_type_unique_index);
- OUT("asn_MAP_%s_%d_enum2value,\t"
+ OUT("asn_MAP_%s_enum2value_%d,\t"
"/* N => \"tag\"; sorted by N */\n",
MKID(expr->Identifier),
expr->_type_unique_index);
OUT("%d,\t/* Number of elements in the maps */\n",
el_count);
- OUT("%d,\t/* Enumeration is %sextensible */\n",
- map_is_extensible, map_is_extensible ? "": "not ");
+ if(map_extensions) {
+ OUT("%d,\t/* Extensions before this member */\n",
+ map_extensions);
+ } else {
+ OUT("0,\t/* Enumeration is not extensible */\n");
+ }
if(expr->expr_type == ASN_BASIC_ENUMERATED)
OUT("1\t/* Strict enumeration */\n");
else
@@ -277,7 +290,8 @@ asn1c_lang_C_type_SEQUENCE(arg_t *arg) {
if(v->expr_type == A1TC_EXTENSIBLE)
if(comp_mode < 3) comp_mode++;
if(comp_mode == 1)
- v->marker.flags |= EM_OMITABLE;
+ v->marker.flags |= EM_OMITABLE | EM_INDIRECT;
+ try_inline_default(arg, v, 1);
EMBED(v);
}
@@ -304,6 +318,8 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
int tags_count;
int all_tags_count;
enum tvm_compat tv_mode;
+ int roms_count; /* Root optional members */
+ int aoms_count; /* Additions optional members */
/*
* Fetch every inner tag from the tag to elements map.
@@ -320,15 +336,19 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
REDIR(OT_STAT_DEFS);
/*
- * Print out the table according to which the parsing is performed.
+ * Print out the table according to which parsing is performed.
*/
if(expr_elements_count(arg, expr)) {
int comp_mode = 0; /* {root,ext=1,root,root,...} */
+ if(emit_members_PER_constraints(arg))
+ return -1;
OUT("static asn_TYPE_member_t asn_MBR_%s_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
elements = 0;
+ roms_count = 0;
+ aoms_count = 0;
INDENTED(TQ_FOR(v, &(expr->members), next) {
if(v->expr_type == A1TC_EXTENSIBLE) {
if((++comp_mode) == 1)
@@ -337,14 +357,62 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
ext_stop = elements - 1;
continue;
}
- if(comp_mode == 1)
- v->marker.flags |= EM_OMITABLE;
+ if(v->marker.flags & EM_OMITABLE)
+ comp_mode == 1 ? ++aoms_count : ++roms_count;
emit_member_table(arg, v);
elements++;
});
OUT("};\n");
+
+ if((roms_count + aoms_count) && (arg->flags & A1C_GEN_PER)) {
+ int elm = 0;
+ int comma = 0;
+ comp_mode = 0;
+ OUT("static int asn_MAP_%s_oms_%d[] = {",
+ MKID(expr->Identifier),
+ expr->_type_unique_index);
+ TQ_FOR(v, &(expr->members), next) {
+ if(v->expr_type == A1TC_EXTENSIBLE) {
+ ++comp_mode;
+ continue;
+ }
+ if((v->marker.flags & EM_OMITABLE)
+ && comp_mode != 1) {
+ if(!comma) comma++;
+ else OUT(",");
+ OUT(" %d", elm);
+ }
+ ++elm;
+ }
+ elm = 0;
+ comp_mode = 0;
+ TQ_FOR(v, &(expr->members), next) {
+ if(v->expr_type == A1TC_EXTENSIBLE) {
+ ++comp_mode;
+ continue;
+ }
+ if((v->marker.flags & EM_OMITABLE)
+ && comp_mode == 1) {
+ if(!comma) comma++;
+ else OUT(",");
+ OUT(" %d", elm);
+ }
+ ++elm;
+ }
+ OUT(" };\n");
+ if(roms_count > 65536)
+ FATAL("Too many optional elements in %s "
+ "at line %d!",
+ arg->expr->Identifier,
+ arg->expr->_lineno);
+ } else {
+ roms_count = 0;
+ aoms_count = 0;
+ }
} else {
elements = 0;
+ roms_count = 0;
+ aoms_count = 0;
}
/*
@@ -357,26 +425,35 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
*/
emit_tag2member_map(arg, tag2el, tag2el_count, 0);
- OUT("static asn_SEQUENCE_specifics_t asn_SPC_%s_%d_specs = {\n",
+ OUT("static asn_SEQUENCE_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
- INDENTED(
- OUT("sizeof(struct "); out_name_chain(arg, ONC_avoid_keywords); OUT("),\n");
- OUT("offsetof(struct "); out_name_chain(arg, ONC_avoid_keywords); OUT(", _asn_ctx),\n");
+ INDENT(+1);
+ OUT("sizeof(struct ");
+ out_name_chain(arg, ONC_avoid_keywords); OUT("),\n");
+ OUT("offsetof(struct ");
+ out_name_chain(arg, ONC_avoid_keywords); OUT(", _asn_ctx),\n");
- if(tag2el_count) {
- OUT("asn_MAP_%s_%d_tag2el,\n",
- MKID(expr->Identifier),
- expr->_type_unique_index);
- OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
- } else {
- OUT("0,\t/* No top level tags */\n");
- OUT("0,\t/* No tags in the map */\n");
- }
- OUT("%d,\t/* Start extensions */\n",
+ if(tag2el_count) {
+ OUT("asn_MAP_%s_tag2el_%d,\n",
+ MKID(expr->Identifier),
+ expr->_type_unique_index);
+ OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
+ } else {
+ OUT("0,\t/* No top level tags */\n");
+ OUT("0,\t/* No tags in the map */\n");
+ }
+ if(roms_count + aoms_count) {
+ OUT("asn_MAP_%s_oms_%d,\t/* Optional members */\n",
+ MKID(expr->Identifier), expr->_type_unique_index);
+ OUT("%d, %d,\t/* Root/Additions */\n", roms_count, aoms_count);
+ } else {
+ OUT("0, 0, 0,\t/* Optional elements (not needed) */\n");
+ }
+ OUT("%d,\t/* Start extensions */\n",
ext_start);
- OUT("%d\t/* Stop extensions */\n",
+ OUT("%d\t/* Stop extensions */\n",
(ext_stop<ext_start)?elements+1:ext_stop, ext_stop);
- );
+ INDENT(-1);
OUT("};\n");
/*
@@ -430,15 +507,16 @@ asn1c_lang_C_type_SET(arg_t *arg) {
out_name_chain(arg, ONC_avoid_keywords);
OUT(" {\n");
} else {
- OUT("typedef struct %s {\n", MKID_safe(expr->Identifier));
+ OUT("typedef struct %s {\n",
+ MKID_safe(expr->Identifier));
}
TQ_FOR(v, &(expr->members), next) {
- if(v->expr_type == A1TC_EXTENSIBLE) {
+ if(v->expr_type == A1TC_EXTENSIBLE)
if(comp_mode < 3) comp_mode++;
- }
if(comp_mode == 1)
- v->marker.flags |= EM_OMITABLE;
+ v->marker.flags |= EM_OMITABLE | EM_INDIRECT;
+ try_inline_default(arg, v, 1);
EMBED(v);
}
@@ -498,11 +576,13 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
REDIR(OT_STAT_DEFS);
/*
- * Print out the table according to which the parsing is performed.
+ * Print out the table according to which parsing is performed.
*/
if(expr_elements_count(arg, expr)) {
int comp_mode = 0; /* {root,ext=1,root,root,...} */
+ if(emit_members_PER_constraints(arg))
+ return -1;
OUT("static asn_TYPE_member_t asn_MBR_%s_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
@@ -511,8 +591,6 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
if(v->expr_type == A1TC_EXTENSIBLE) {
if(comp_mode < 3) comp_mode++;
} else {
- if(comp_mode == 1)
- v->marker.flags |= EM_OMITABLE;
emit_member_table(arg, v);
elements++;
}
@@ -537,7 +615,7 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
/*
* Emit a map of mandatory elements.
*/
- OUT("static uint8_t asn_MAP_%s_%d_mmap",
+ OUT("static uint8_t asn_MAP_%s_mmap_%d",
MKID(expr->Identifier), expr->_type_unique_index);
p = MKID_safe(expr->Identifier);
OUT("[(%d + (8 * sizeof(unsigned int)) - 1) / 8]", elements);
@@ -565,7 +643,7 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
OUT("\n");
OUT("};\n");
- OUT("static asn_SET_specifics_t asn_SPC_%s_%d_specs = {\n",
+ OUT("static asn_SET_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
INDENTED(
OUT("sizeof(struct ");
@@ -578,19 +656,19 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
out_name_chain(arg, ONC_avoid_keywords);
OUT(", _presence_map),\n");
p = MKID(expr->Identifier);
- OUT("asn_MAP_%s_%d_tag2el,\n", p, expr->_type_unique_index);
+ OUT("asn_MAP_%s_tag2el_%d,\n", p, expr->_type_unique_index);
OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
if(tag2el_cxer)
- OUT("asn_MAP_%s_%d_tag2el_cxer,\n",
+ OUT("asn_MAP_%s_tag2el_cxer_%d,\n",
p, expr->_type_unique_index);
else
- OUT("asn_MAP_%s_%d_tag2el,\t/* Same as above */\n",
+ OUT("asn_MAP_%s_tag2el_%d,\t/* Same as above */\n",
p, expr->_type_unique_index);
OUT("%d,\t/* Count of tags in the CXER map */\n",
tag2el_cxer_count);
OUT("%d,\t/* Whether extensible */\n",
- check_if_extensible(expr));
- OUT("(unsigned int *)asn_MAP_%s_%d_mmap\t/* Mandatory elements map */\n",
+ compute_extensions_start(expr) == -1 ? 0 : 1);
+ OUT("(unsigned int *)asn_MAP_%s_mmap_%d\t/* Mandatory elements map */\n",
p, expr->_type_unique_index);
);
OUT("};\n");
@@ -690,7 +768,7 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
enum tvm_compat tv_mode;
/*
- * Print out the table according to which the parsing is performed.
+ * Print out the table according to which parsing is performed.
*/
if(seq_of) {
GEN_INCLUDE("constr_SEQUENCE_OF");
@@ -703,8 +781,10 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
REDIR(OT_STAT_DEFS);
/*
- * Print out the table according to which the parsing is performed.
+ * Print out the table according to which parsing is performed.
*/
+ if(emit_members_PER_constraints(arg))
+ return -1;
OUT("static asn_TYPE_member_t asn_MBR_%s_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
INDENT(+1);
@@ -725,7 +805,7 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
*/
tv_mode = emit_tags_vectors(arg, expr, &tags_count, &all_tags_count);
- OUT("static asn_SET_OF_specifics_t asn_SPC_%s_%d_specs = {\n",
+ OUT("static asn_SET_OF_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
INDENTED(
OUT("sizeof(struct ");
@@ -828,6 +908,7 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
int tags_count;
int all_tags_count;
enum tvm_compat tv_mode;
+ int *cmap = 0;
/*
* Fetch every inner tag from the tag to elements map.
@@ -844,10 +925,12 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
REDIR(OT_STAT_DEFS);
/*
- * Print out the table according to which the parsing is performed.
+ * Print out the table according to which parsing is performed.
*/
if(expr_elements_count(arg, expr)) {
+ if(emit_members_PER_constraints(arg))
+ return -1;
OUT("static asn_TYPE_member_t asn_MBR_%s_%d[] = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
@@ -863,6 +946,22 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
elements = 0;
}
+ /* Create a canonical elements map */
+ if(elements && (arg->flags & A1C_GEN_PER)) {
+ int i;
+ cmap = compute_canonical_members_order(arg, elements);
+ if(cmap) {
+ OUT("static int asn_MAP_%s_cmap_%d[] = {",
+ MKID(expr->Identifier),
+ expr->_type_unique_index);
+ for(i = 0; i < elements; i++) {
+ if(i) OUT(",");
+ OUT(" %d", cmap[i]);
+ }
+ OUT(" };\n");
+ free(cmap);
+ }
+ }
if(arg->embed) {
/*
@@ -880,7 +979,7 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
*/
emit_tag2member_map(arg, tag2el, tag2el_count, 0);
- OUT("static asn_CHOICE_specifics_t asn_SPC_%s_%d_specs = {\n",
+ OUT("static asn_CHOICE_specifics_t asn_SPC_%s_specs_%d = {\n",
MKID(expr->Identifier), expr->_type_unique_index);
INDENTED(
OUT("sizeof(struct ");
@@ -895,11 +994,16 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
OUT("sizeof(((struct ");
out_name_chain(arg, ONC_avoid_keywords);
OUT(" *)0)->present),\n");
- OUT("asn_MAP_%s_%d_tag2el,\n",
+ OUT("asn_MAP_%s_tag2el_%d,\n",
MKID(expr->Identifier), expr->_type_unique_index);
OUT("%d,\t/* Count of tags in the map */\n", tag2el_count);
- OUT("%d\t/* Whether extensible */\n",
- check_if_extensible(expr));
+ if(C99_MODE) OUT(".canonical_order = ");
+ if(cmap) OUT("asn_MAP_%s_cmap_%d,\t/* Canonically sorted */\n",
+ MKID(expr->Identifier), expr->_type_unique_index);
+ else OUT("0,\n");
+ if(C99_MODE) OUT(".ext_start = ");
+ OUT("%d\t/* Extensions start */\n",
+ compute_extensions_start(expr));
);
OUT("};\n");
@@ -989,11 +1093,13 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
if(!expr->_anonymous_type) {
OUT("%s", (expr->marker.flags&EM_INDIRECT)?"\t*":"\t ");
OUT("%s", MKID_safe(expr->Identifier));
- if((expr->marker.flags & EM_DEFAULT) == EM_DEFAULT)
+ if((expr->marker.flags & (EM_DEFAULT & ~EM_INDIRECT))
+ == (EM_DEFAULT & ~EM_INDIRECT))
OUT("\t/* DEFAULT %s */",
asn1f_printable_value(
expr->marker.default_value));
- else if((expr->marker.flags & EM_OPTIONAL) == EM_OPTIONAL)
+ else if((expr->marker.flags & EM_OPTIONAL)
+ == EM_OPTIONAL)
OUT("\t/* OPTIONAL */");
}
@@ -1113,6 +1219,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("td->der_encoder = asn_DEF_%s.der_encoder;\n", type_name);
OUT("td->xer_decoder = asn_DEF_%s.xer_decoder;\n", type_name);
OUT("td->xer_encoder = asn_DEF_%s.xer_encoder;\n", type_name);
+ OUT("td->uper_decoder = asn_DEF_%s.uper_decoder;\n", type_name);
if(!terminal && !tags_count) {
OUT("/* The next four lines are here because of -fknown-extern-type */\n");
OUT("td->tags = asn_DEF_%s.tags;\n", type_name);
@@ -1121,6 +1228,9 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("td->all_tags_count = asn_DEF_%s.all_tags_count;\n",type_name);
OUT("/* End of these lines */\n");
}
+ OUT("if(!td->per_constraints)\n");
+ OUT("\ttd->per_constraints = asn_DEF_%s.per_constraints;\n",
+ type_name);
OUT("td->elements = asn_DEF_%s.elements;\n", type_name);
OUT("td->elements_count = asn_DEF_%s.elements_count;\n", type_name);
if(etd_spec != ETD_NO_SPECIFICS) {
@@ -1230,6 +1340,23 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("}\n");
OUT("\n");
+ if(arg->flags & A1C_GEN_PER) {
+ p = MKID(expr->Identifier);
+ if(HIDE_INNER_DEFS) OUT("static ");
+ OUT("asn_dec_rval_t\n");
+ OUT("%s", p);
+ if(HIDE_INNER_DEFS) OUT("_%d", expr->_type_unique_index);
+ OUT("_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,\n");
+ INDENTED(
+ OUT("\tasn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {\n");
+ OUT("%s_%d_inherit_TYPE_descriptor(td);\n",
+ p, expr->_type_unique_index);
+ OUT("return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);\n");
+ );
+ OUT("}\n");
+ OUT("\n");
+ }
+
REDIR(OT_FUNC_DECLS);
p = MKID(expr->Identifier);
@@ -1246,6 +1373,8 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("der_type_encoder_f %s_encode_der;\n", p);
OUT("xer_type_decoder_f %s_decode_xer;\n", p);
OUT("xer_type_encoder_f %s_encode_xer;\n", p);
+ if(arg->flags & A1C_GEN_PER)
+ OUT("per_type_decoder_f %s_decode_uper;\n", p);
}
REDIR(OT_TYPE_DECLS);
@@ -1264,12 +1393,16 @@ asn1c_lang_C_type_EXTENSIBLE(arg_t *arg) {
return 0;
}
-static int check_if_extensible(asn1p_expr_t *expr) {
+static int
+compute_extensions_start(asn1p_expr_t *expr) {
asn1p_expr_t *v;
+ int eidx = 0;
TQ_FOR(v, &(expr->members), next) {
- if(v->expr_type == A1TC_EXTENSIBLE) return 1;
+ if(v->expr_type == A1TC_EXTENSIBLE)
+ return eidx;
+ eidx++;
}
- return 0;
+ return -1;
}
static int
@@ -1414,7 +1547,7 @@ _add_tag2el_member(arg_t *arg, tag2el_t **tag2el, int *count, int el_no, fte_e f
assert(el_no >= 0);
ret = asn1f_fetch_outmost_tag(arg->asn, arg->expr->module,
- arg->expr, &tag, 1);
+ arg->expr, &tag, AFT_IMAGINARY_ANY);
if(ret == 0) {
tag2el_t *te;
int new_count = (*count) + 1;
@@ -1486,9 +1619,9 @@ emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count, const char *
if(!tag2el_count) return 0; /* No top level tags */
- OUT("static asn_TYPE_tag2member_t asn_MAP_%s_%d_tag2el%s[] = {\n",
- MKID(expr->Identifier), expr->_type_unique_index,
- opt_modifier?opt_modifier:"");
+ OUT("static asn_TYPE_tag2member_t asn_MAP_%s_tag2el%s_%d[] = {\n",
+ MKID(expr->Identifier), opt_modifier?opt_modifier:"",
+ expr->_type_unique_index);
for(i = 0; i < tag2el_count; i++) {
OUT(" { ");
_print_tag(arg, &tag2el[i].el_tag);
@@ -1551,9 +1684,9 @@ emit_tags_vectors(arg_t *arg, asn1p_expr_t *expr, int *tags_count_r, int *all_ta
}
#define EMIT_TAGS_TABLE(name, tags, tags_count) do { \
- OUT("static ber_tlv_tag_t asn_DEF_%s_%d%s_tags[] = {\n",\
- MKID(expr->Identifier), \
- expr->_type_unique_index, name); \
+ OUT("static ber_tlv_tag_t asn_DEF_%s%s_tags_%d[] = {\n",\
+ MKID(expr->Identifier), name, \
+ expr->_type_unique_index); \
INDENT(+1); \
/* Print the array of collected tags */ \
for(i = 0; i < tags_count; i++) { \
@@ -1608,6 +1741,246 @@ expr_elements_count(arg_t *arg, asn1p_expr_t *expr) {
return elements;
}
+static asn1p_expr_type_e
+expr_get_type(arg_t *arg, asn1p_expr_t *expr) {
+ asn1p_expr_t *terminal;
+ terminal = asn1f_find_terminal_type_ex(arg->asn, expr);
+ if(terminal) return terminal->expr_type;
+ return A1TC_INVALID;
+}
+
+static int
+emit_single_member_PER_constraint(arg_t *arg, asn1cnst_range_t *range, char *type) {
+ if(!range || range->incompatible || range->not_PER_visible) {
+ OUT("{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 }");
+ return 0;
+ }
+
+ if(range->left.type == ARE_VALUE) {
+ if(range->right.type == ARE_VALUE) {
+ asn1c_integer_t cover = 1;
+ asn1c_integer_t r = 1 + range->right.value
+ - range->left.value;
+ int rbits, ebits;
+
+ if(range->empty_constraint)
+ r = 0;
+
+ /* Compute real constraint */
+ for(rbits = 0; rbits < (8 * sizeof(r)); rbits++) {
+ if(r <= cover)
+ break;
+ cover *= 2; /* Can't do shifting */
+ if(cover < 0) {
+ FATAL("Constraint at line %d too wide "
+ "for %d-bits integer type",
+ arg->expr->_lineno,
+ sizeof(r) * 8);
+ rbits = sizeof(r);
+ break;
+ }
+ }
+
+ if(1) {
+ /* X.691, #10.9.4.1 */
+ for(ebits = 0; ebits <= 16; ebits++)
+ if(r <= 1 << ebits) break;
+ if(ebits == 17
+ || range->right.value >= 65536)
+ ebits = -1;
+ } else {
+ /* X.691, #10.5.7.1 */
+ for(ebits = 0; ebits <= 8; ebits++)
+ if(r <= 1 << ebits) break;
+ if(ebits == 9) {
+ if(r <= 65536)
+ ebits = 16;
+ else
+ ebits = -1;
+ }
+ }
+ OUT("{ APC_CONSTRAINED%s,%s% d, % d, ",
+ range->extensible
+ ? " | APC_EXTENSIBLE" : "",
+ range->extensible ? " " : "\t", rbits, ebits);
+ } else {
+ if(range->extensible) {
+ OUT("{ APC_SEMI_CONSTRAINED | APC_EXTENSIBLE, "
+ "-1, ");
+ } else {
+ OUT("{ APC_SEMI_CONSTRAINED,\t-1, -1, ");
+ }
+ }
+ OUT("% " PRIdASN ", % " PRIdASN " }",
+ range->left.value, range->right.value);
+ } else {
+ OUT("{ APC_UNCONSTRAINED,\t-1, -1, 0, 0 }");
+ }
+
+ /*
+ * Print some courtesy debug information.
+ */
+ if(range->left.type == ARE_VALUE
+ || range->right.type == ARE_VALUE) {
+ OUT("\t/* ");
+ if(type) OUT("(%s", type);
+ OUT("(");
+ if(range->left.type == ARE_VALUE)
+ OUT("%" PRIdASN, range->left.value);
+ else
+ OUT("MIN");
+ OUT("..");
+ if(range->right.type == ARE_VALUE)
+ OUT("%" PRIdASN, range->right.value);
+ else
+ OUT("MAX");
+ if(range->extensible) OUT(",...");
+ if(type) OUT(")");
+ OUT(") */");
+ }
+
+ return 0;
+}
+
+static int
+emit_single_member_PER_constraints(arg_t *arg, asn1p_expr_t *expr) {
+ asn1cnst_range_t *range;
+ asn1p_expr_type_e etype;
+
+ etype = expr_get_type(arg, expr);
+
+ INDENT(+1);
+
+ /*
+ * ENUMERATED and CHOICE are special.
+ */
+ if(etype == ASN_BASIC_ENUMERATED
+ || etype == ASN_CONSTR_CHOICE) {
+ asn1cnst_range_t tmprng;
+ asn1p_expr_t *v;
+ int extensible = 0;
+ int eidx = -1;
+
+ expr = asn1f_find_terminal_type_ex(arg->asn, expr);
+ assert(expr);
+
+ TQ_FOR(v, &(expr->members), next) {
+ if(v->expr_type == A1TC_EXTENSIBLE) {
+ extensible++;
+ break;
+ }
+ eidx++;
+ }
+
+ memset(&tmprng, 0, sizeof (tmprng));
+ tmprng.extensible = extensible;
+ if(eidx < 0) tmprng.empty_constraint = 1;
+ tmprng.left.type = ARE_VALUE;
+ tmprng.left.value = 0;
+ tmprng.right.type = ARE_VALUE;
+ tmprng.right.value = eidx < 0 ? 0 : eidx;
+ if(emit_single_member_PER_constraint(arg, &tmprng, 0))
+ return -1;
+ } else {
+ range = asn1constraint_compute_PER_range(etype,
+ expr->combined_constraints, ACT_EL_RANGE,
+ 0, 0, 0);
+ if(emit_single_member_PER_constraint(arg, range, 0))
+ return -1;
+ asn1constraint_range_free(range);
+ }
+ OUT(",\n");
+
+ range = asn1constraint_compute_PER_range(etype,
+ expr->combined_constraints, ACT_CT_SIZE, 0, 0, 0);
+ if(emit_single_member_PER_constraint(arg, range, "SIZE"))
+ return -1;
+ asn1constraint_range_free(range);
+ OUT("\n");
+
+ INDENT(-1);
+
+ return 0;
+}
+
+static int
+emit_members_PER_constraints(arg_t *arg) {
+ asn1p_expr_t *expr = arg->expr;
+ asn1p_expr_t *v;
+
+ if(!(arg->flags & A1C_GEN_PER))
+ return 0;
+
+ TQ_FOR(v, &(expr->members), next) {
+ if(v->constraints
+ || v->expr_type == ASN_BASIC_ENUMERATED
+ || v->expr_type == ASN_CONSTR_CHOICE) {
+ OUT("static asn_per_constraints_t "
+ "asn_PER_memb_%s_constr_%d = {\n",
+ MKID(v->Identifier), v->_type_unique_index);
+ if(emit_single_member_PER_constraints(arg, v))
+ return -1;
+ OUT("};\n");
+ }
+ }
+
+ return 0;
+}
+
+static int
+try_inline_default(arg_t *arg, asn1p_expr_t *expr, int out) {
+ int save_target = arg->target->target;
+ asn1p_expr_type_e etype = expr_get_type(arg, expr);
+ int fits_long = 0;
+
+ switch(etype) {
+ case ASN_BASIC_BOOLEAN:
+ fits_long = 1;
+ case ASN_BASIC_INTEGER:
+ case ASN_BASIC_ENUMERATED:
+ if(expr->marker.default_value == NULL
+ || expr->marker.default_value->type != ATV_INTEGER)
+ break;
+ if(!fits_long)
+ fits_long = asn1c_type_fits_long(arg, expr)!=FL_NOTFIT;
+ if(fits_long && !expr->marker.default_value->value.v_integer)
+ expr->marker.flags &= ~EM_INDIRECT;
+ if(!out) return 1;
+ REDIR(OT_STAT_DEFS);
+ OUT("static int asn_DFL_%d_set_%" PRIdASN "(void **sptr) {\n",
+ expr->_type_unique_index,
+ expr->marker.default_value->value.v_integer);
+ INDENT(+1);
+ OUT("%s *st = *sptr;\n", asn1c_type_name(arg, expr, TNF_CTYPE));
+ OUT("\n");
+ OUT("if(!st) {\n");
+ OUT("\tst = (*sptr = CALLOC(1, sizeof(*st)));\n");
+ OUT("\tif(!st) return -1;\n");
+ OUT("}\n");
+ OUT("\n");
+ OUT("/* Install default value %" PRIdASN " */\n",
+ expr->marker.default_value->value.v_integer);
+ if(fits_long) {
+ OUT("*st = %" PRIdASN ";\n",
+ expr->marker.default_value->value.v_integer);
+ OUT("return 0;\n");
+ } else {
+ OUT("return asn_long2INTEGER(st, %" PRIdASN ");\n",
+ expr->marker.default_value->value.v_integer);
+ }
+ INDENT(-1);
+ OUT("}\n");
+ REDIR(save_target);
+ return 1;
+ case ASN_BASIC_NULL:
+ //expr->marker.flags &= ~EM_INDIRECT;
+ return 0;
+ default:
+ break;
+ }
+ return 0;
+}
+
static int
emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
int save_target;
@@ -1618,7 +1991,8 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
char *p;
if(asn1f_fetch_outmost_tag(arg->asn,
- expr->module, expr, &outmost_tag_s, 1)) {
+ expr->module, expr, &outmost_tag_s,
+ AFT_IMAGINARY_ANY)) {
outmost_tag = 0;
} else {
outmost_tag = &outmost_tag_s;
@@ -1702,20 +2076,41 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
if(expr->_anonymous_type
&& !strcmp(expr->Identifier, "Member"))
id = asn1c_type_name(arg, expr, TNF_SAFE);
- OUT("memb_%s_%d_constraint,\n", id,
+ OUT("memb_%s_constraint_%d,\n", id,
arg->expr->_type_unique_index);
}
} else {
OUT("0,\t/* Defer constraints checking to the member type */\n");
}
+ if(C99_MODE) OUT(".per_constraints = ");
+ if(arg->flags & A1C_GEN_PER) {
+ if(expr->constraints
+ || expr->expr_type == ASN_BASIC_ENUMERATED
+ || expr->expr_type == ASN_CONSTR_CHOICE) {
+ OUT("&asn_PER_memb_%s_constr_%d,\n",
+ MKID(expr->Identifier),
+ expr->_type_unique_index);
+ } else {
+ OUT("0,\t/* No PER visible constraints */\n");
+ }
+ } else {
+ OUT("0,\t/* PER is not compiled, use -gen-PER */\n");
+ }
+ if(C99_MODE) OUT(".default_value = ");
+ if(try_inline_default(arg, expr, 0)) {
+ OUT("asn_DFL_%d_set_%" PRIdASN
+ ",\t/* DEFAULT %" PRIdASN " */\n",
+ expr->_type_unique_index,
+ expr->marker.default_value->value.v_integer,
+ expr->marker.default_value->value.v_integer);
+ } else {
+ OUT("0,\n");
+ }
if(C99_MODE) OUT(".name = ");
- if(1) {
- if(expr->_anonymous_type && !strcmp(expr->Identifier, "Member"))
- OUT("\"\"\n");
- else
- OUT("\"%s\"\n", expr->Identifier);
+ if(expr->_anonymous_type && !strcmp(expr->Identifier, "Member")) {
+ OUT("\"\"\n");
} else {
- OUT("\"%s\"\n", expr->_anonymous_type ? "" : expr->Identifier);
+ OUT("\"%s\"\n", expr->Identifier);
}
OUT("},\n");
INDENT(-1);
@@ -1731,7 +2126,7 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
else
p = MKID(expr->Identifier);
OUT("static int\n");
- OUT("memb_%s_%d_constraint(asn_TYPE_descriptor_t *td, const void *sptr,\n", p, arg->expr->_type_unique_index);
+ OUT("memb_%s_constraint_%d(asn_TYPE_descriptor_t *td, const void *sptr,\n", p, arg->expr->_type_unique_index);
INDENT(+1);
OUT("\t\tasn_app_consume_bytes_f *app_errlog, void *app_key) {\n");
tmp_arg = *arg;
@@ -1755,21 +2150,41 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
static int
emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_count, int all_tags_count, int elements_count, enum etd_spec spec) {
int using_type_name = 0;
- char *p;
+ char *p = MKID(expr->Identifier);
+
+ if((arg->flags & A1C_GEN_PER)
+ && (expr->constraints
+ || expr->expr_type == ASN_BASIC_ENUMERATED
+ || expr->expr_type == ASN_CONSTR_CHOICE)
+ ) {
+ OUT("static asn_per_constraints_t asn_PER_%s_constr_%d = {\n",
+ p, expr->_type_unique_index);
+ if(emit_single_member_PER_constraints(arg, expr))
+ return -1;
+ OUT("};\n");
+ }
if(HIDE_INNER_DEFS)
OUT("static /* Use -fall-defs-global to expose */\n");
- OUT("asn_TYPE_descriptor_t asn_DEF_%s", MKID(expr->Identifier));
+ OUT("asn_TYPE_descriptor_t asn_DEF_%s", p);
if(HIDE_INNER_DEFS) OUT("_%d", expr->_type_unique_index);
OUT(" = {\n");
- p = MKID(expr->Identifier);
INDENT(+1);
- OUT("\"%s\",\n", expr->_anonymous_type?"":expr->Identifier);
- OUT("\"%s\",\n", expr->_anonymous_type?"":expr->Identifier);
+
+ if(expr->_anonymous_type) {
+ p = ASN_EXPR_TYPE2STR(expr->expr_type);
+ OUT("\"%s\",\n", p?p:"");
+ OUT("\"%s\",\n", MKID(p?p:""));
+ } else {
+ OUT("\"%s\",\n", expr->Identifier);
+ OUT("\"%s\",\n", expr->Identifier);
+ }
if(expr->expr_type & ASN_CONSTR_MASK) {
using_type_name = 1;
p = asn1c_type_name(arg, arg->expr, TNF_SAFE);
+ } else {
+ p = MKID(expr->Identifier);
}
#define FUNCREF(foo) do { \
@@ -1786,6 +2201,10 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
FUNCREF(encode_der);
FUNCREF(decode_xer);
FUNCREF(encode_xer);
+ if(arg->flags & A1C_GEN_PER)
+ FUNCREF(decode_uper);
+ else
+ OUT("0,\t/* No PER decoder, -gen-PER to enable */\n");
if(expr->expr_type == ASN_CONSTR_CHOICE) {
OUT("CHOICE_outmost_tag,\n");
@@ -1795,11 +2214,11 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
p = MKID(expr->Identifier);
if(tags_count) {
- OUT("asn_DEF_%s_%d_tags,\n",
+ OUT("asn_DEF_%s_tags_%d,\n",
p, expr->_type_unique_index);
- OUT("sizeof(asn_DEF_%s_%d_tags)\n",
+ OUT("sizeof(asn_DEF_%s_tags_%d)\n",
p, expr->_type_unique_index);
- OUT("\t/sizeof(asn_DEF_%s_%d_tags[0])",
+ OUT("\t/sizeof(asn_DEF_%s_tags_%d[0])",
p, expr->_type_unique_index);
if(tv_mode == _TVM_SUBSET
&& tags_count != all_tags_count)
@@ -1811,24 +2230,37 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
}
if(all_tags_count && tv_mode == _TVM_DIFFERENT) {
- OUT("asn_DEF_%s_%d_all_tags,\n",
+ OUT("asn_DEF_%s_all_tags_%d,\n",
p, expr->_type_unique_index);
- OUT("sizeof(asn_DEF_%s_%d_all_tags)\n",
+ OUT("sizeof(asn_DEF_%s_all_tags_%d)\n",
p, expr->_type_unique_index);
- OUT("\t/sizeof(asn_DEF_%s_%d_all_tags[0]), /* %d */\n",
+ OUT("\t/sizeof(asn_DEF_%s_all_tags_%d[0]), /* %d */\n",
p, expr->_type_unique_index, all_tags_count);
} else if(all_tags_count) {
- OUT("asn_DEF_%s_%d_tags,\t/* Same as above */\n",
+ OUT("asn_DEF_%s_tags_%d,\t/* Same as above */\n",
p, expr->_type_unique_index);
- OUT("sizeof(asn_DEF_%s_%d_tags)\n",
+ OUT("sizeof(asn_DEF_%s_tags_%d)\n",
p, expr->_type_unique_index);
- OUT("\t/sizeof(asn_DEF_%s_%d_tags[0]), /* %d */\n",
+ OUT("\t/sizeof(asn_DEF_%s_tags_%d[0]), /* %d */\n",
p, expr->_type_unique_index, all_tags_count);
} else {
OUT("0,\t/* No tags (pointer) */\n");
OUT("0,\t/* No tags (count) */\n");
}
+ if(arg->flags & A1C_GEN_PER) {
+ if(expr->constraints
+ || expr->expr_type == ASN_BASIC_ENUMERATED
+ || expr->expr_type == ASN_CONSTR_CHOICE) {
+ OUT("&asn_PER_%s_constr_%d,\n",
+ p, expr->_type_unique_index);
+ } else {
+ OUT("0,\t/* No PER visible constraints */\n");
+ }
+ } else {
+ OUT("0,\t/* No PER visible constraints */\n");
+ }
+
if(elements_count) {
OUT("asn_MBR_%s_%d,\n", p, expr->_type_unique_index);
if(expr->expr_type == ASN_CONSTR_SEQUENCE_OF
@@ -1852,7 +2284,7 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
OUT("0\t/* No specifics */\n");
break;
case ETD_HAS_SPECIFICS:
- OUT("&asn_SPC_%s_%d_specs\t/* Additional specs */\n",
+ OUT("&asn_SPC_%s_specs_%d\t/* Additional specs */\n",
p, expr->_type_unique_index);
}
INDENT(-1);
@@ -1864,13 +2296,10 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
static int
expr_as_xmlvaluelist(arg_t *arg, asn1p_expr_t *expr) {
- expr = asn1f_find_terminal_type_ex(arg->asn, expr);
- if(!expr) return 0;
-
/*
* X.680, 25.5, Table 5
*/
- switch(expr->expr_type) {
+ switch(expr_get_type(arg, expr)) {
case ASN_BASIC_BOOLEAN:
case ASN_BASIC_ENUMERATED:
case ASN_BASIC_NULL:
@@ -1966,19 +2395,15 @@ emit_include_dependencies(arg_t *arg) {
*/
static int
expr_break_recursion(arg_t *arg, asn1p_expr_t *expr) {
- asn1p_expr_t *terminal;
int ret;
if(expr->marker.flags & EM_UNRECURSE)
return 1; /* Already broken */
- terminal = asn1f_find_terminal_type_ex(arg->asn, expr);
-
/* -findirect-choice compiles members of CHOICE as indirect pointers */
if((arg->flags & A1C_INDIRECT_CHOICE)
&& arg->expr->expr_type == ASN_CONSTR_CHOICE
- && terminal
- && (terminal->expr_type & ASN_CONSTR_MASK)
+ && (expr_get_type(arg, expr) & ASN_CONSTR_MASK)
) {
/* Break cross-reference */
expr->marker.flags |= EM_INDIRECT | EM_UNRECURSE;
@@ -2094,3 +2519,83 @@ expr_defined_recursively(arg_t *arg, asn1p_expr_t *expr) {
/* Look inside the terminal type if it mentions the parent expression */
return asn1c_recurse(arg, terminal, check_is_refer_to, topmost);
}
+
+struct canonical_map_element {
+ int eidx;
+ asn1p_expr_t *expr;
+};
+static int compar_cameo(const void *ap, const void *bp);
+static arg_t *cameo_arg;
+static int *
+compute_canonical_members_order(arg_t *arg, int el_count) {
+ struct canonical_map_element *cmap;
+ int *rmap;
+ asn1p_expr_t *v;
+ int eidx = 0;
+ int ext_start = -1;
+ int nextmax = -1;
+ int already_sorted = 1;
+
+ cmap = calloc(el_count, sizeof *cmap);
+ assert(cmap);
+
+ TQ_FOR(v, &(arg->expr->members), next) {
+ if(v->expr_type != A1TC_EXTENSIBLE) {
+ cmap[eidx].eidx = eidx;
+ cmap[eidx].expr = v;
+ eidx++;
+ } else if(ext_start == -1)
+ ext_start = eidx;
+ }
+
+ cameo_arg = arg;
+ if(ext_start == -1) {
+ /* Sort the whole thing */
+ qsort(cmap, el_count, sizeof(*cmap), compar_cameo);
+ } else {
+ /* Sort root and extensions independently */
+ qsort(cmap, ext_start, sizeof(*cmap), compar_cameo);
+ qsort(cmap + ext_start, el_count - ext_start,
+ sizeof(*cmap), compar_cameo);
+ }
+
+ /* move data back to a simpler map */
+ rmap = calloc(el_count, sizeof *rmap);
+ assert(rmap);
+ for(eidx = 0; eidx < el_count; eidx++) {
+ rmap[eidx] = cmap[eidx].eidx;
+ if(rmap[eidx] <= nextmax)
+ already_sorted = 0;
+ else
+ nextmax = rmap[eidx];
+ }
+ free(cmap);
+
+ if(already_sorted) { free(rmap); rmap = 0; }
+ return rmap;
+}
+static int compar_cameo(const void *ap, const void *bp) {
+ const struct canonical_map_element *a = (const void *)ap;
+ const struct canonical_map_element *b = (const void *)bp;
+ struct asn1p_type_tag_s atag, btag;
+ arg_t *arg = cameo_arg;
+
+ if(asn1f_fetch_outmost_tag(arg->asn, a->expr->module, a->expr,
+ &atag, AFT_IMAGINARY_ANY | AFT_CANON_CHOICE))
+ return 1;
+
+ if(asn1f_fetch_outmost_tag(arg->asn, b->expr->module, b->expr,
+ &btag, AFT_IMAGINARY_ANY | AFT_CANON_CHOICE))
+ return -1;
+
+ if(atag.tag_class < btag.tag_class)
+ return -1;
+ if(atag.tag_class > btag.tag_class)
+ return 1;
+ if(atag.tag_value < btag.tag_value)
+ return -1;
+ if(atag.tag_value > btag.tag_value)
+ return 1;
+ return 0;
+
+}
diff --git a/libasn1compiler/asn1c_constraint.c b/libasn1compiler/asn1c_constraint.c
index 8af5e368..5388bb3d 100644
--- a/libasn1compiler/asn1c_constraint.c
+++ b/libasn1compiler/asn1c_constraint.c
@@ -4,7 +4,7 @@
#include "asn1c_out.h"
#include <asn1fix_crange.h> /* constraint groker from libasn1fix */
-#include <asn1fix_export.h> /* other exportable stuff from libasn1fix */
+#include <asn1fix_export.h> /* other exportables from libasn1fix */
static int asn1c_emit_constraint_tables(arg_t *arg, int got_size);
static int emit_alphabet_check_loop(arg_t *arg, asn1cnst_range_t *range);
diff --git a/libasn1compiler/asn1c_fdeps.c b/libasn1compiler/asn1c_fdeps.c
index 0066f51a..80ba2f68 100644
--- a/libasn1compiler/asn1c_fdeps.c
+++ b/libasn1compiler/asn1c_fdeps.c
@@ -66,7 +66,12 @@ asn1c_read_file_dependencies(arg_t *arg, const char *datadir) {
asn1c_fdeps_t *cur;
char buf[4096];
FILE *f;
- int hit_COMMON_FILES = 0;
+ enum {
+ SS_DYNAMIC, /* Dynamic list of dependencies */
+ SS_CODEC_PER, /* Use contents only if -gen-PER */
+ SS_COMMON_FILES, /* Section for dependencies */
+ SS_IGNORE /* Ignore contents of this section */
+ } special_section = SS_DYNAMIC;
(void)arg;
@@ -91,17 +96,27 @@ asn1c_read_file_dependencies(arg_t *arg, const char *datadir) {
for(p = strtok(buf, " \t\r\n"); p;
p = strtok(NULL, " \t\r\n")) {
asn1c_fdeps_t *d;
+
/*
- * If hit "COMMON-FILES:", treat everything else
- * as a huge dependency.
+ * Special "prefix" section.
*/
- if(strcmp(p, "COMMON-FILES:") == 0) {
- hit_COMMON_FILES = 1;
+ if(strchr(p, ':')) {
+ special_section = SS_IGNORE;
+ if(strcmp(p, "COMMON-FILES:") == 0) {
+ special_section = SS_COMMON_FILES;
+ } else if((arg->flags & A1C_GEN_PER)
+ && strcmp(p, "CODEC-PER:") == 0) {
+ special_section = SS_CODEC_PER;
+ }
break;
}
+
+ if(special_section == SS_IGNORE)
+ continue;
+
d = asn1c_new_dep(p);
assert(d);
- d->used_somewhere = hit_COMMON_FILES;
+ d->used_somewhere = special_section;
if(asn1c_dep_add(cur, d) == 1)
cur = d;
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index d35db940..dca0cf1b 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -11,6 +11,7 @@ static int asn1c_print_streams(arg_t *arg);
static int asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *);
static int asn1c_copy_over(arg_t *arg, char *path);
static int identical_files(const char *fname1, const char *fname2);
+static int generate_pdu_collection_file(arg_t *arg);
int
asn1c_save_compiled_output(arg_t *arg, const char *datadir,
@@ -18,7 +19,7 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
asn1c_fdeps_t *deps = 0;
asn1c_fdeps_t *dlist;
asn1p_module_t *mod;
- FILE *mkf;
+ FILE *mkf; /* Makefile.am.sample */
int i;
deps = asn1c_read_file_dependencies(arg, datadir);
@@ -108,6 +109,12 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
}
}
+ if(arg->flags & A1C_PDU_AUTO) {
+ fprintf(mkf, "ASN_MODULE_SOURCES+=pdu_collection.c\n");
+ if(generate_pdu_collection_file(arg))
+ return -1;
+ }
+
fprintf(mkf, "\n\n"
"lib_LTLIBRARIES=libsomething.la\n"
"libsomething_la_SOURCES="
@@ -438,3 +445,62 @@ asn1c_copy_over(arg_t *arg, char *path) {
return 1;
}
+
+static int
+generate_pdu_collection_file(arg_t *arg) {
+ asn1p_module_t *mod;
+ FILE *fp;
+
+ fp = asn1c_open_file("pdu_collection", ".c", 0);
+ if(fp == NULL) {
+ perror("pdu_collection.c");
+ return -1;
+ }
+
+ fprintf(fp,
+ "/*\n"
+ " * Generated by asn1c-" VERSION " (http://lionet.info/asn1c)\n"
+ " */\n\n");
+ fprintf(fp, "struct asn_TYPE_descriptor_s;\t"
+ "/* Forward declaration */\n\n");
+
+ TQ_FOR(mod, &(arg->asn->modules), mod_next) {
+ TQ_FOR(arg->expr, &(mod->members), next) {
+ if(arg->expr->_type_referenced
+ || !asn1_lang_map[arg->expr->meta_type]
+ [arg->expr->expr_type].type_cb)
+ continue;
+ fprintf(fp, "extern struct asn_TYPE_descriptor_s "
+ "asn_DEF_%s;\n",
+ asn1c_make_identifier(0, arg->expr->Identifier,
+ NULL));
+ }
+ }
+
+ fprintf(fp, "\n\n");
+ fprintf(fp, "struct asn_TYPE_descriptor_s *asn_pdu_collection[] = {\n");
+ TQ_FOR(mod, &(arg->asn->modules), mod_next) {
+ int mod_printed = 0;
+ TQ_FOR(arg->expr, &(mod->members), next) {
+ if(arg->expr->_type_referenced
+ || !asn1_lang_map[arg->expr->meta_type]
+ [arg->expr->expr_type].type_cb)
+ continue;
+ if(!mod_printed++)
+ fprintf(fp, "\t/* From module %s in %s */\n",
+ arg->expr->module->ModuleName,
+ arg->expr->module->source_file_name);
+ fprintf(fp, "\t&asn_DEF_%s,\t\n",
+ asn1c_make_identifier(0, arg->expr->Identifier,
+ NULL));
+ }
+ }
+
+ fprintf(fp, "\t0\n};\n\n");
+
+ fclose(fp);
+ fprintf(stderr, "Generated pdu_collection.c\n");
+
+ return 0;
+}
+
diff --git a/libasn1compiler/asn1compiler.h b/libasn1compiler/asn1compiler.h
index 847300ff..e33628f8 100644
--- a/libasn1compiler/asn1compiler.h
+++ b/libasn1compiler/asn1compiler.h
@@ -56,6 +56,16 @@ enum asn1c_flags {
* Copy support files rather than symlink them.
*/
A1C_SKELETONS_COPY = 0x0800,
+ /*
+ * -gen-PER
+ * Generate PER support code
+ */
+ A1C_GEN_PER = 0x1000,
+ /*
+ * -pdu=auto
+ * Generate PDU table
+ */
+ A1C_PDU_AUTO = 0x2000
};
/*
diff --git a/libasn1fix/asn1fix_constr.c b/libasn1fix/asn1fix_constr.c
index 7adbcaca..ea2fcf1f 100644
--- a/libasn1fix/asn1fix_constr.c
+++ b/libasn1fix/asn1fix_constr.c
@@ -1,7 +1,5 @@
#include "asn1fix_internal.h"
-#define AFT_MAGIC_ANY 1 /* _fetch_tag() flag */
-
static int _asn1f_check_if_tag_must_be_explicit(arg_t *arg, asn1p_expr_t *v);
static int _asn1f_compare_tags(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b);
static int _asn1f_fix_type_tag(arg_t *arg, asn1p_expr_t *expr);
@@ -337,6 +335,7 @@ asn1f_check_constr_tags_distinct(arg_t *arg) {
case ASN_CONSTR_SEQUENCE:
case ASN_CONSTR_SET:
case ASN_CONSTR_CHOICE:
+ DEBUG("Checking tags of members of constructed types");
break;
default:
return 0;
@@ -353,6 +352,8 @@ asn1f_check_constr_tags_distinct(arg_t *arg) {
if(expr->expr_type != ASN_CONSTR_SEQUENCE || v->marker.flags) {
asn1p_expr_t *nv;
for(nv = v; (nv = TQ_NEXT(nv, next));) {
+ DEBUG("S/C comparing tags %s s. %s",
+ v->Identifier, nv->Identifier);
if(_asn1f_compare_tags(arg, v, nv))
r_value = -1;
if(expr->expr_type == ASN_CONSTR_SEQUENCE
@@ -404,12 +405,15 @@ _asn1f_compare_tags(arg_t *arg, asn1p_expr_t *a, asn1p_expr_t *b) {
int ra, rb;
int ret;
- ra = asn1f_fetch_outmost_tag(arg->asn, arg->mod, a, &ta, AFT_MAGIC_ANY);
- rb = asn1f_fetch_outmost_tag(arg->asn, arg->mod, b, &tb, AFT_MAGIC_ANY);
+ ra = asn1f_fetch_outmost_tag(arg->asn, arg->mod, a,
+ &ta, AFT_IMAGINARY_ANY);
+ rb = asn1f_fetch_outmost_tag(arg->asn, arg->mod, b,
+ &tb, AFT_IMAGINARY_ANY);
/*
* If both tags are explicitly or implicitly given, use them.
*/
+ DEBUG("Fetching outmost tags: %d, %d", ra, rb);
if(ra == 0 && rb == 0) {
/*
* Simple case: fetched both tags.
diff --git a/libasn1fix/asn1fix_retrieve.c b/libasn1fix/asn1fix_retrieve.c
index 730c8618..42368582 100644
--- a/libasn1fix/asn1fix_retrieve.c
+++ b/libasn1fix/asn1fix_retrieve.c
@@ -370,6 +370,7 @@ asn1f_find_terminal_thing(arg_t *arg, asn1p_expr_t *expr, enum ftt_what what) {
return NULL;
}
+ tc->_type_referenced = 1;
tc->_mark |= TM_RECURSION;
WITH_MODULE(tc->module,
expr = asn1f_find_terminal_thing(arg, tc, what));
diff --git a/libasn1fix/asn1fix_tags.c b/libasn1fix/asn1fix_tags.c
index ff662cc3..dfda4410 100644
--- a/libasn1fix/asn1fix_tags.c
+++ b/libasn1fix/asn1fix_tags.c
@@ -18,6 +18,9 @@
if((flags & AFT_FETCH_OUTMOST)) return count; \
} while(0)
+/* X.691, #22.2 */
+static int asn1f_fetch_minimal_choice_root_tag(arg_t *arg, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags);
+
static int
asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int skip, enum asn1f_aft_flags_e flags) {
asn1p_expr_t *expr = arg->expr;
@@ -44,9 +47,13 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
if(expr->expr_type == ASN_TYPE_ANY
&& (flags & AFT_IMAGINARY_ANY))
tt.tag_value = -1;
- else if(expr->expr_type == ASN_CONSTR_CHOICE)
- return count ? count : -1;
- else
+ else if(expr->expr_type != ASN_CONSTR_CHOICE)
+ return -1;
+ else if(count) return count;
+ else if((flags & AFT_CANON_CHOICE) == 0)
+ return -1;
+ else if(asn1f_fetch_minimal_choice_root_tag(arg,
+ &tt, flags))
return -1;
}
ADD_TAG(skip, tt);
@@ -55,6 +62,7 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
if(expr->meta_type == AMT_TYPEREF) {
asn1p_expr_t *nexpr;
+ DEBUG("Following the reference %s", expr->Identifier);
nexpr = asn1f_lookup_symbol(arg, expr->module, expr->reference);
if(nexpr == NULL) {
if(errno != EEXIST) /* -fknown-extern-type */
@@ -87,18 +95,52 @@ asn1f_fetch_tags_impl(arg_t *arg, struct asn1p_type_tag_s **tags, int count, int
return count;
}
+ DEBUG("No tags discovered for type %d", expr->expr_type);
+
return -1;
}
+static int
+asn1f_fetch_minimal_choice_root_tag(arg_t *arg, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags) {
+ struct asn1p_type_tag_s min_tag;
+ asn1p_expr_t *v;
+
+ memset(&min_tag, 0, sizeof(min_tag));
+ min_tag.tag_class = TC_PRIVATE + 1;
+
+ TQ_FOR(v, &(arg->expr->members), next) {
+ arg_t tmparg = *arg;
+ struct asn1p_type_tag_s *tags = 0;
+ int count;
+
+ if(v->expr_type == A1TC_EXTENSIBLE)
+ break; /* Search only within extension root */
+
+ tmparg.expr = v;
+ count = asn1f_fetch_tags_impl(&tmparg, &tags, 0, 0, flags);
+ if(count <= 0) continue;
+
+ if(tags[0].tag_class < min_tag.tag_class)
+ min_tag = tags[0];
+ else if(tags[0].tag_class == min_tag.tag_class
+ && tags[0].tag_value < min_tag.tag_value)
+ min_tag = tags[0];
+ free(tags);
+ }
+
+ if(min_tag.tag_class == TC_PRIVATE + 1)
+ return -1;
+ else
+ *tag = min_tag;
+ return 0;
+}
int
-asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, int _aft_imaginary_any) {
+asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e flags) {
struct asn1p_type_tag_s *tags;
- enum asn1f_aft_flags_e flags;
int count;
- flags = AFT_FETCH_OUTMOST;
- flags |= AFT_IMAGINARY_ANY * _aft_imaginary_any;
+ flags |= AFT_FETCH_OUTMOST;
count = asn1f_fetch_tags(asn, mod, expr, &tags, flags);
if(count <= 0) return count;
diff --git a/libasn1fix/asn1fix_tags.h b/libasn1fix/asn1fix_tags.h
index a4c31ad9..0fbbefec 100644
--- a/libasn1fix/asn1fix_tags.h
+++ b/libasn1fix/asn1fix_tags.h
@@ -5,6 +5,7 @@ enum asn1f_aft_flags_e {
AFT_IMAGINARY_ANY = 0x01, /* Treat ANY tag as [IMAGINARY ANY] */
AFT_FETCH_OUTMOST = 0x02, /* Fetch only outmost tag */
AFT_FULL_COLLECT = 0x04, /* Collect all tags */
+ AFT_CANON_CHOICE = 0x08, /* Fetch the minimal CHOICE root tag */
};
/*
@@ -24,6 +25,6 @@ int asn1f_fetch_tags(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr,
* Type3 ::= SEQUENCE { ... }
* Will yield [2] for Type1.
*/
-int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, int _aft_imaginary_any);
+int asn1f_fetch_outmost_tag(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag, enum asn1f_aft_flags_e);
#endif /* _ASN1FIX_TAGS_H_ */
diff --git a/skeletons/ANY.c b/skeletons/ANY.c
index 73702444..b1e35bf0 100644
--- a/skeletons/ANY.c
+++ b/skeletons/ANY.c
@@ -21,8 +21,10 @@ asn_TYPE_descriptor_t asn_DEF_ANY = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
ANY_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
0, 0, 0, 0,
+ 0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_ANY_specs,
};
diff --git a/skeletons/BIT_STRING.c b/skeletons/BIT_STRING.c
index 8c83d689..900f41db 100644
--- a/skeletons/BIT_STRING.c
+++ b/skeletons/BIT_STRING.c
@@ -27,6 +27,7 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_binary,
BIT_STRING_encode_xer,
+ OCTET_STRING_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_BIT_STRING_tags,
sizeof(asn_DEF_BIT_STRING_tags)
@@ -34,6 +35,7 @@ asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
asn_DEF_BIT_STRING_tags, /* Same as above */
sizeof(asn_DEF_BIT_STRING_tags)
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_BIT_STRING_specs
};
@@ -124,9 +126,7 @@ BIT_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
diff --git a/skeletons/BMPString.c b/skeletons/BMPString.c
index f3308bf7..10fd05e0 100644
--- a/skeletons/BMPString.c
+++ b/skeletons/BMPString.c
@@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_BMPString = {
OCTET_STRING_encode_der,
BMPString_decode_xer, /* Convert from UTF-8 */
BMPString_encode_xer, /* Convert to UTF-8 */
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_BMPString_tags,
sizeof(asn_DEF_BMPString_tags)
@@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_BMPString = {
asn_DEF_BMPString_tags,
sizeof(asn_DEF_BMPString_tags)
/ sizeof(asn_DEF_BMPString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -156,7 +158,7 @@ BMPString_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = BMPString__dump(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- return er;
+ _ASN_ENCODED_OK(er);
}
int
diff --git a/skeletons/BOOLEAN.c b/skeletons/BOOLEAN.c
index 360b6643..84e57858 100644
--- a/skeletons/BOOLEAN.c
+++ b/skeletons/BOOLEAN.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@@ -22,11 +22,13 @@ asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
BOOLEAN_encode_der,
BOOLEAN_decode_xer,
BOOLEAN_encode_xer,
+ BOOLEAN_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_BOOLEAN_tags,
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
asn_DEF_BOOLEAN_tags, /* Same as above */
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -126,7 +128,7 @@ BOOLEAN_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
erval.encoded += 1;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
@@ -196,7 +198,7 @@ BOOLEAN_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = 8;
}
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@@ -234,3 +236,33 @@ BOOLEAN_free(asn_TYPE_descriptor_t *td, void *ptr, int contents_only) {
}
}
+asn_dec_rval_t
+BOOLEAN_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_dec_rval_t rv;
+ BOOLEAN_t *st = (BOOLEAN_t *)*sptr;
+
+ (void)opt_codec_ctx;
+ (void)constraints;
+
+ if(!st) {
+ st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st)));
+ if(!st) _ASN_DECODE_FAILED;
+ }
+
+ /*
+ * Extract a single bit
+ */
+ switch(per_get_few_bits(pd, 1)) {
+ case 1: *st = 1; break;
+ case 0: *st = 0; break;
+ case -1: default: _ASN_DECODE_FAILED;
+ }
+
+ ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE");
+
+ rv.code = RC_OK;
+ rv.consumed = 1;
+ return rv;
+}
+
diff --git a/skeletons/BOOLEAN.h b/skeletons/BOOLEAN.h
index ec4dbac8..1cf19803 100644
--- a/skeletons/BOOLEAN.h
+++ b/skeletons/BOOLEAN.h
@@ -26,6 +26,7 @@ ber_type_decoder_f BOOLEAN_decode_ber;
der_type_encoder_f BOOLEAN_encode_der;
xer_type_decoder_f BOOLEAN_decode_xer;
xer_type_encoder_f BOOLEAN_encode_xer;
+per_type_decoder_f BOOLEAN_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/ENUMERATED.c b/skeletons/ENUMERATED.c
index 12d4f6eb..c51f9265 100644
--- a/skeletons/ENUMERATED.c
+++ b/skeletons/ENUMERATED.c
@@ -1,9 +1,10 @@
/*-
- * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
#include <ENUMERATED.h>
+#include <NativeEnumerated.h>
#include <asn_codecs_prim.h> /* Encoder and decoder of a primitive type */
/*
@@ -22,12 +23,33 @@ asn_TYPE_descriptor_t asn_DEF_ENUMERATED = {
INTEGER_encode_der, /* Implemented in terms of INTEGER */
INTEGER_decode_xer, /* This is temporary! */
INTEGER_encode_xer,
+ ENUMERATED_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_ENUMERATED_tags,
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
asn_DEF_ENUMERATED_tags, /* Same as above */
sizeof(asn_DEF_ENUMERATED_tags) / sizeof(asn_DEF_ENUMERATED_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
+asn_dec_rval_t
+ENUMERATED_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_dec_rval_t rval;
+ ENUMERATED_t *st = (ENUMERATED_t *)*sptr;
+ long value, *vptr = &value;
+
+ if(!st) {
+ st = (ENUMERATED_t *)(*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) _ASN_DECODE_FAILED;
+ }
+
+ rval = NativeEnumerated_decode_uper(opt_codec_ctx, td, constraints,
+ (void **)&vptr, pd);
+ if(rval.code == RC_OK)
+ if(asn_long2INTEGER(st, value))
+ rval.code = RC_FAIL;
+ return rval;
+}
diff --git a/skeletons/ENUMERATED.h b/skeletons/ENUMERATED.h
index 53cc273e..e65a15af 100644
--- a/skeletons/ENUMERATED.h
+++ b/skeletons/ENUMERATED.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _ENUMERATED_H_
@@ -15,6 +15,8 @@ typedef INTEGER_t ENUMERATED_t; /* Implemented via INTEGER */
extern asn_TYPE_descriptor_t asn_DEF_ENUMERATED;
+per_type_decoder_f ENUMERATED_decode_uper;
+
#ifdef __cplusplus
}
#endif
diff --git a/skeletons/GeneralString.c b/skeletons/GeneralString.c
index e4ea6f8a..c1a8823e 100644
--- a/skeletons/GeneralString.c
+++ b/skeletons/GeneralString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GeneralString_tags,
sizeof(asn_DEF_GeneralString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralString = {
asn_DEF_GeneralString_tags,
sizeof(asn_DEF_GeneralString_tags)
/ sizeof(asn_DEF_GeneralString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index 9103455d..aabe66d6 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -128,6 +128,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
GeneralizedTime_encode_der,
OCTET_STRING_decode_xer_utf8,
GeneralizedTime_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GeneralizedTime_tags,
sizeof(asn_DEF_GeneralizedTime_tags)
@@ -135,6 +136,7 @@ asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
asn_DEF_GeneralizedTime_tags,
sizeof(asn_DEF_GeneralizedTime_tags)
/ sizeof(asn_DEF_GeneralizedTime_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/GraphicString.c b/skeletons/GraphicString.c
index c5d4a30b..0c3ad47c 100644
--- a/skeletons/GraphicString.c
+++ b/skeletons/GraphicString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_GraphicString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer, /* Can't expect it to be ASCII/UTF8 */
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_GraphicString_tags,
sizeof(asn_DEF_GraphicString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_GraphicString = {
asn_DEF_GraphicString_tags,
sizeof(asn_DEF_GraphicString_tags)
/ sizeof(asn_DEF_GraphicString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/IA5String.c b/skeletons/IA5String.c
index c4da875a..a4d7ff84 100644
--- a/skeletons/IA5String.c
+++ b/skeletons/IA5String.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_IA5String_tags,
sizeof(asn_DEF_IA5String_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_IA5String = {
asn_DEF_IA5String_tags,
sizeof(asn_DEF_IA5String_tags)
/ sizeof(asn_DEF_IA5String_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c
index d2a66b5d..dbb14859 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -24,11 +24,13 @@ asn_TYPE_descriptor_t asn_DEF_INTEGER = {
INTEGER_encode_der,
INTEGER_decode_xer,
INTEGER_encode_xer,
+ INTEGER_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_INTEGER_tags,
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
asn_DEF_INTEGER_tags, /* Same as above */
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -430,9 +432,102 @@ INTEGER_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = INTEGER__dump(td, st, cb, app_key, 1);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
+}
+
+asn_dec_rval_t
+INTEGER_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_dec_rval_t rval = { RC_OK, 0 };
+ INTEGER_t *st = (INTEGER_t *)*sptr;
+ asn_per_constraint_t *ct;
+ int repeat;
+
+ (void)opt_codec_ctx;
+
+ if(!st) {
+ st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) _ASN_DECODE_FAILED;
+ }
+
+ if(!constraints) constraints = td->per_constraints;
+ ct = constraints ? &constraints->value : 0;
+
+ if(ct && ct->flags & APC_EXTENSIBLE) {
+ int inext = per_get_few_bits(pd, 1);
+ if(inext < 0) _ASN_DECODE_FAILED;
+ if(inext) ct = 0;
+ }
+
+ FREEMEM(st->buf);
+ if(ct) {
+ if(ct->flags & APC_SEMI_CONSTRAINED) {
+ st->buf = (uint8_t *)CALLOC(1, 2);
+ if(!st->buf) _ASN_DECODE_FAILED;
+ st->size = 1;
+ } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) {
+ size_t size = (ct->range_bits + 7) >> 3;
+ st->buf = (uint8_t *)MALLOC(1 + size + 1);
+ if(!st->buf) _ASN_DECODE_FAILED;
+ st->size = size;
+ } else {
+ st->size = 0;
+ }
+ } else {
+ st->size = 0;
+ }
+
+ /* X.691, #12.2.2 */
+ if(ct && ct->flags != APC_UNCONSTRAINED) {
+ /* #10.5.6 */
+ ASN_DEBUG("Integer with range %d bits", ct->range_bits);
+ if(ct->range_bits >= 0) {
+ long value = per_get_few_bits(pd, ct->range_bits);
+ if(value < 0) _ASN_DECODE_FAILED;
+ ASN_DEBUG("Got value %ld + low %ld",
+ value, ct->lower_bound);
+ value += ct->lower_bound;
+ if(asn_long2INTEGER(st, value))
+ _ASN_DECODE_FAILED;
+ return rval;
+ }
+ } else {
+ ASN_DEBUG("Decoding unconstrained integer %s", td->name);
+ }
+
+ /* X.691, #12.2.3, #12.2.4 */
+ do {
+ ssize_t len;
+ void *p;
+ int ret;
+
+ /* Get the PER length */
+ len = uper_get_length(pd, -1, &repeat);
+ if(len < 0) _ASN_DECODE_FAILED;
+
+ p = REALLOC(st->buf, st->size + len + 1);
+ if(!p) _ASN_DECODE_FAILED;
+ st->buf = (uint8_t *)p;
+
+ ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len);
+ if(ret < 0) _ASN_DECODE_FAILED;
+ st->size += len;
+ } while(repeat);
+ st->buf[st->size] = 0; /* JIC */
+
+ /* #12.2.3 */
+ if(ct && ct->lower_bound) {
+ /*
+ * TODO: replace by in-place arithmetics.
+ */
+ long value;
+ if(asn_INTEGER2long(st, &value))
+ _ASN_DECODE_FAILED;
+ if(asn_long2INTEGER(st, value + ct->lower_bound))
+ _ASN_DECODE_FAILED;
+ }
+
+ return rval;
}
int
diff --git a/skeletons/INTEGER.h b/skeletons/INTEGER.h
index 165c055f..410fbe90 100644
--- a/skeletons/INTEGER.h
+++ b/skeletons/INTEGER.h
@@ -28,7 +28,7 @@ typedef struct asn_INTEGER_specifics_s {
asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */
unsigned int *enum2value; /* "tag" => N; sorted by tag */
int map_count; /* Elements in either map */
- int extensible; /* This map is extensible */
+ int extension; /* This map is extensible */
int strict_enumeration; /* Enumeration set is fixed */
} asn_INTEGER_specifics_t;
@@ -37,6 +37,7 @@ ber_type_decoder_f INTEGER_decode_ber;
der_type_encoder_f INTEGER_encode_der;
xer_type_decoder_f INTEGER_decode_xer;
xer_type_encoder_f INTEGER_encode_xer;
+per_type_decoder_f INTEGER_decode_uper;
/***********************************
* Some handy conversion routines. *
diff --git a/skeletons/ISO646String.c b/skeletons/ISO646String.c
index 035734b5..829af328 100644
--- a/skeletons/ISO646String.c
+++ b/skeletons/ISO646String.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_ISO646String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_ISO646String_tags,
sizeof(asn_DEF_ISO646String_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_ISO646String = {
asn_DEF_ISO646String_tags,
sizeof(asn_DEF_ISO646String_tags)
/ sizeof(asn_DEF_ISO646String_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/NULL.c b/skeletons/NULL.c
index 5b0351e3..504be954 100644
--- a/skeletons/NULL.c
+++ b/skeletons/NULL.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@@ -23,11 +23,13 @@ asn_TYPE_descriptor_t asn_DEF_NULL = {
NULL_encode_der, /* Special handling of DER encoding */
NULL_decode_xer,
NULL_encode_xer,
+ NULL_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_NULL_tags,
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
asn_DEF_NULL_tags, /* Same as above */
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -44,7 +46,7 @@ NULL_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
erval.structure_ptr = ptr;
}
- return erval;
+ _ASN_ENCODED_OK(erval);
}
asn_enc_rval_t
@@ -62,8 +64,7 @@ NULL_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
/* XMLNullValue is empty */
er.encoded = 0;
-
- return er;
+ _ASN_ENCODED_OK(er);
}
@@ -101,3 +102,31 @@ NULL_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
return (cb("<absent>", 8, app_key) < 0) ? -1 : 0;
}
}
+
+asn_dec_rval_t
+NULL_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_dec_rval_t rv;
+
+ (void)opt_codec_ctx;
+ (void)td;
+ (void)constraints;
+ (void)pd;
+
+ if(!*sptr) {
+ *sptr = MALLOC(sizeof(NULL_t));
+ if(*sptr) {
+ *(NULL_t *)*sptr = 0;
+ } else {
+ _ASN_DECODE_FAILED;
+ }
+ }
+
+ /*
+ * NULL type does not have content octets.
+ */
+
+ rv.code = RC_OK;
+ rv.consumed = 0;
+ return rv;
+}
diff --git a/skeletons/NULL.h b/skeletons/NULL.h
index 28a3630e..7126e1df 100644
--- a/skeletons/NULL.h
+++ b/skeletons/NULL.h
@@ -23,6 +23,7 @@ asn_struct_print_f NULL_print;
der_type_encoder_f NULL_encode_der;
xer_type_decoder_f NULL_decode_xer;
xer_type_encoder_f NULL_encode_xer;
+per_type_decoder_f NULL_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/NativeEnumerated.c b/skeletons/NativeEnumerated.c
index fb77e06d..e130749f 100644
--- a/skeletons/NativeEnumerated.c
+++ b/skeletons/NativeEnumerated.c
@@ -28,11 +28,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = {
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeEnumerated_encode_xer,
+ NativeEnumerated_decode_uper,
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeEnumerated_tags,
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
asn_DEF_NativeEnumerated_tags, /* Same as above */
sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -59,13 +61,65 @@ NativeEnumerated_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = snprintf(src, srcsize, "<%s/>", el->enum_name);
assert(er.encoded > 0 && (size_t)er.encoded < srcsize);
if(cb(src, er.encoded, app_key) < 0) _ASN_ENCODE_FAILED;
- return er;
+ _ASN_ENCODED_OK(er);
} else {
ASN_DEBUG("ASN.1 forbids dealing with "
"unknown value of ENUMERATED type");
_ASN_ENCODE_FAILED;
}
+}
+
+asn_dec_rval_t
+NativeEnumerated_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_INTEGER_specifics_t *specs = (asn_INTEGER_specifics_t *)td->specifics;
+ asn_dec_rval_t rval = { RC_OK, 0 };
+ long *native = (long *)*sptr;
+ asn_per_constraint_t *ct;
+ long value;
+
+ (void)opt_codec_ctx;
+
+ if(constraints) ct = &constraints->value;
+ else if(td->per_constraints) ct = &td->per_constraints->value;
+ else _ASN_DECODE_FAILED; /* Mandatory! */
+ if(!specs) _ASN_DECODE_FAILED;
+
+ if(!native) {
+ native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
+ if(!native) _ASN_DECODE_FAILED;
+ }
+
+ ASN_DEBUG("Decoding %s as NativeEnumerated", td->name);
+
+ if(ct->flags & APC_EXTENSIBLE) {
+ int inext = per_get_few_bits(pd, 1);
+ if(inext < 0) _ASN_DECODE_FAILED;
+ if(inext) ct = 0;
+ }
+
+ if(ct && ct->range_bits >= 0) {
+ value = per_get_few_bits(pd, ct->range_bits);
+ if(value < 0) _ASN_DECODE_FAILED;
+ if(value >= (specs->extension
+ ? specs->extension - 1 : specs->map_count))
+ _ASN_DECODE_FAILED;
+ } else {
+ if(!specs->extension)
+ _ASN_DECODE_FAILED;
+ /*
+ * X.691, #10.6: normally small non-negative whole number;
+ */
+ value = uper_get_nsnnwn(pd);
+ if(value < 0) _ASN_DECODE_FAILED;
+ value += specs->extension - 1;
+ if(value >= specs->map_count)
+ _ASN_DECODE_FAILED;
+ }
+
+ *native = specs->value2enum[value].nat_value;
+ ASN_DEBUG("Decoded %s = %ld", td->name, *native);
- return er;
+ return rval;
}
diff --git a/skeletons/NativeEnumerated.h b/skeletons/NativeEnumerated.h
index 7e2bb1b9..5792beed 100644
--- a/skeletons/NativeEnumerated.h
+++ b/skeletons/NativeEnumerated.h
@@ -21,6 +21,7 @@ extern "C" {
extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated;
xer_type_encoder_f NativeEnumerated_encode_xer;
+per_type_decoder_f NativeEnumerated_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/NativeInteger.c b/skeletons/NativeInteger.c
index 96c78756..2e44eaa6 100644
--- a/skeletons/NativeInteger.c
+++ b/skeletons/NativeInteger.c
@@ -28,11 +28,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeInteger = {
NativeInteger_encode_der,
NativeInteger_decode_xer,
NativeInteger_encode_xer,
+ NativeInteger_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeInteger_tags,
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
asn_DEF_NativeInteger_tags, /* Same as above */
sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -108,18 +110,6 @@ NativeInteger_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
}
*native = l;
-
- /*
- * Note that native integer size might be other than long.
- * This expression hopefully will be optimized away
- * by compiler.
- */
- if(sizeof(*native) != sizeof(long) && ((long)*native != l)) {
- *native = 0; /* Safe value */
- rval.code = RC_FAIL;
- rval.consumed = 0;
- return rval;
- }
}
rval.code = RC_OK;
@@ -176,38 +166,25 @@ NativeInteger_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname,
const void *buf_ptr, size_t size) {
asn_dec_rval_t rval;
- INTEGER_t *st = 0;
+ INTEGER_t st;
void *st_ptr = (void *)&st;
long *native = (long *)*sptr;
if(!native) {
- *sptr = CALLOC(1, sizeof(int));
- native = (long *)*sptr;
- if(!native) {
- rval.code = RC_FAIL;
- rval.consumed = 0;
- return rval;
- }
+ native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
+ if(!native) _ASN_DECODE_FAILED;
}
- rval = INTEGER_decode_xer(opt_codec_ctx, td, (void **)st_ptr,
+ memset(&st, 0, sizeof(st));
+ rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr,
opt_mname, buf_ptr, size);
if(rval.code == RC_OK) {
long l;
- if(asn_INTEGER2long(st, &l)) {
+ if(asn_INTEGER2long(&st, &l)) {
rval.code = RC_FAIL;
rval.consumed = 0;
} else {
*native = l;
-
- /* Native type might be shorter than long */
- if(sizeof(*native) != sizeof(long)
- && ((long)*native != l)) {
- *native = 0; /* Safe value */
- rval.code = RC_FAIL;
- rval.consumed = 0;
- return rval;
- }
}
} else {
/*
@@ -217,7 +194,7 @@ NativeInteger_decode_xer(asn_codec_ctx_t *opt_codec_ctx,
*/
rval.consumed = 0;
}
- asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, st, 0);
+ asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, &st, 1);
return rval;
}
@@ -240,7 +217,39 @@ NativeInteger_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
|| cb(scratch, er.encoded, app_key) < 0)
_ASN_ENCODE_FAILED;
- return er;
+ _ASN_ENCODED_OK(er);
+}
+
+asn_dec_rval_t
+NativeInteger_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
+ asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+
+ asn_dec_rval_t rval;
+ long *native = (long *)*sptr;
+ INTEGER_t tmpint;
+ void *tmpintptr = &tmpint;
+
+ (void)opt_codec_ctx;
+ ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name);
+
+ if(!native) {
+ native = (long *)(*sptr = CALLOC(1, sizeof(*native)));
+ if(!native) _ASN_DECODE_FAILED;
+ }
+
+ memset(&tmpint, 0, sizeof tmpint);
+ rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints,
+ &tmpintptr, pd);
+ if(rval.code == RC_OK)
+ if(asn_INTEGER2long(&tmpint, native))
+ rval.code = RC_FAIL;
+ else
+ ASN_DEBUG("NativeInteger %s got value %ld",
+ td->name, *native);
+ asn_DEF_INTEGER.free_struct(&asn_DEF_INTEGER, &tmpint, 1);
+
+ return rval;
}
/*
diff --git a/skeletons/NativeInteger.h b/skeletons/NativeInteger.h
index f38fd477..e2ce22e9 100644
--- a/skeletons/NativeInteger.h
+++ b/skeletons/NativeInteger.h
@@ -27,6 +27,7 @@ ber_type_decoder_f NativeInteger_decode_ber;
der_type_encoder_f NativeInteger_encode_der;
xer_type_decoder_f NativeInteger_decode_xer;
xer_type_encoder_f NativeInteger_encode_xer;
+per_type_decoder_f NativeInteger_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/NativeReal.c b/skeletons/NativeReal.c
index f7755db1..9b303681 100644
--- a/skeletons/NativeReal.c
+++ b/skeletons/NativeReal.c
@@ -29,11 +29,13 @@ asn_TYPE_descriptor_t asn_DEF_NativeReal = {
NativeReal_encode_der,
NativeReal_decode_xer,
NativeReal_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_NativeReal_tags,
sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]),
asn_DEF_NativeReal_tags, /* Same as above */
sizeof(asn_DEF_NativeReal_tags) / sizeof(asn_DEF_NativeReal_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -206,7 +208,7 @@ NativeReal_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = REAL__dump(*Dbl, flags & XER_F_CANONICAL, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- return er;
+ _ASN_ENCODED_OK(er);
}
/*
diff --git a/skeletons/NumericString.c b/skeletons/NumericString.c
index 39404c25..e3302c6a 100644
--- a/skeletons/NumericString.c
+++ b/skeletons/NumericString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_NumericString_tags,
sizeof(asn_DEF_NumericString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_NumericString = {
asn_DEF_NumericString_tags,
sizeof(asn_DEF_NumericString_tags)
/ sizeof(asn_DEF_NumericString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/OBJECT_IDENTIFIER.c b/skeletons/OBJECT_IDENTIFIER.c
index e815d480..0c45e4d9 100644
--- a/skeletons/OBJECT_IDENTIFIER.c
+++ b/skeletons/OBJECT_IDENTIFIER.c
@@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
der_encode_primitive,
OBJECT_IDENTIFIER_decode_xer,
OBJECT_IDENTIFIER_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_OBJECT_IDENTIFIER_tags,
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
@@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
/ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -332,9 +334,7 @@ OBJECT_IDENTIFIER_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
}
int
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index 447b2425..fe29f83f 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -19,6 +19,9 @@ static asn_OCTET_STRING_specifics_t asn_DEF_OCTET_STRING_specs = {
offsetof(OCTET_STRING_t, _asn_ctx),
0
};
+static asn_per_constraint_t asn_DEF_OCTET_STRING_constraint = {
+ APC_SEMI_CONSTRAINED, -1, 0, 0, 0
+};
asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
"OCTET STRING", /* Canonical name */
"OCTET_STRING", /* XML tag name */
@@ -29,6 +32,7 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
+ OCTET_STRING_decode_uper, /* Unaligned PER decoder */
0, /* Use generic outmost tag fetcher */
asn_DEF_OCTET_STRING_tags,
sizeof(asn_DEF_OCTET_STRING_tags)
@@ -36,6 +40,7 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
asn_DEF_OCTET_STRING_tags, /* Same as above */
sizeof(asn_DEF_OCTET_STRING_tags)
/ sizeof(asn_DEF_OCTET_STRING_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
&asn_DEF_OCTET_STRING_specs
};
@@ -61,9 +66,10 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
#undef RETURN
#define RETURN(_code) do { \
- rval.code = _code; \
- rval.consumed = consumed_myself; \
- return rval; \
+ asn_dec_rval_t tmprval; \
+ tmprval.code = _code; \
+ tmprval.consumed = consumed_myself; \
+ return tmprval; \
} while(0)
#undef APPEND
@@ -167,11 +173,11 @@ _new_stack() {
asn_dec_rval_t
OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
asn_TYPE_descriptor_t *td,
- void **os_structure, const void *buf_ptr, size_t size, int tag_mode) {
+ void **sptr, const void *buf_ptr, size_t size, int tag_mode) {
asn_OCTET_STRING_specifics_t *specs = td->specifics
? (asn_OCTET_STRING_specifics_t *)td->specifics
: &asn_DEF_OCTET_STRING_specs;
- BIT_STRING_t *st = (BIT_STRING_t *)*os_structure;
+ BIT_STRING_t *st = (BIT_STRING_t *)*sptr;
asn_dec_rval_t rval;
asn_struct_ctx_t *ctx;
ssize_t consumed_myself = 0;
@@ -190,10 +196,8 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx,
* Create the string if does not exist.
*/
if(st == NULL) {
- *os_structure = CALLOC(1, specs->struct_size);
- st = (BIT_STRING_t *)*os_structure;
- if(st == NULL)
- RETURN(RC_FAIL);
+ st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
+ if(st == NULL) RETURN(RC_FAIL);
}
/* Restore parsing context */
@@ -549,9 +553,7 @@ OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(!cb) {
er.encoded += (type_variant == _TT_BIT_STRING) + st->size;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
}
/*
@@ -574,9 +576,7 @@ OCTET_STRING_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
}
er.encoded += st->size;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@@ -639,9 +639,7 @@ OCTET_STRING_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
}
}
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@@ -781,9 +779,7 @@ OCTET_STRING_encode_xer_utf8(asn_TYPE_descriptor_t *td, void *sptr,
_ASN_ENCODE_FAILED;
er.encoded = encoded_len;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
}
/*
@@ -1200,6 +1196,99 @@ OCTET_STRING_decode_xer_utf8(asn_codec_ctx_t *opt_codec_ctx,
OCTET_STRING__convert_entrefs);
}
+asn_dec_rval_t
+OCTET_STRING_decode_uper(asn_codec_ctx_t *opt_codec_ctx,
+ asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints,
+ void **sptr, asn_per_data_t *pd) {
+
+ asn_OCTET_STRING_specifics_t *specs = td->specifics
+ ? (asn_OCTET_STRING_specifics_t *)td->specifics
+ : &asn_DEF_OCTET_STRING_specs;
+ asn_per_constraint_t *ct = constraints ? &constraints->size
+ : (td->per_constraints
+ ? &td->per_constraints->size
+ : &asn_DEF_OCTET_STRING_constraint);
+ asn_dec_rval_t rval = { RC_OK, 0 };
+ BIT_STRING_t *st = (BIT_STRING_t *)*sptr;
+ ssize_t consumed_myself = 0;
+ int repeat;
+ int unit_bits = (specs->subvariant != 1) * 7 + 1;
+
+ (void)opt_codec_ctx;
+
+ /*
+ * Allocate the string.
+ */
+ if(!st) {
+ st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size));
+ if(!st) RETURN(RC_FAIL);
+ }
+
+ if(ct->flags & APC_EXTENSIBLE) {
+ int inext = per_get_few_bits(pd, 1);
+ if(inext < 0) RETURN(RC_FAIL);
+ if(inext) ct = &asn_DEF_OCTET_STRING_constraint;
+ consumed_myself = 0;
+ }
+
+ if(ct->effective_bits >= 0
+ && (!st->buf || st->size < ct->upper_bound)) {
+ FREEMEM(st->buf);
+ if(unit_bits == 1) {
+ st->size = (ct->upper_bound + 7) >> 3;
+ } else {
+ st->size = ct->upper_bound;
+ }
+ st->buf = (uint8_t *)MALLOC(st->size + 1);
+ if(!st->buf) { st->size = 0; RETURN(RC_FAIL); }
+ }
+
+ /* X.691, #16.5: zero-length encoding */
+ /* X.691, #16.6: short fixed length encoding (up to 2 octets) */
+ /* X.691, #16.7: long fixed length encoding (up to 64K octets) */
+ if(ct->effective_bits == 0) {
+ int ret = per_get_many_bits(pd, st->buf, 0,
+ unit_bits * ct->upper_bound);
+ if(ret < 0) RETURN(RC_FAIL);
+ consumed_myself += unit_bits * ct->upper_bound;
+ st->buf[st->size] = 0;
+ if(unit_bits == 1 && (ct->upper_bound & 0x7))
+ st->bits_unused = 8 - (ct->upper_bound & 0x7);
+ RETURN(RC_OK);
+ }
+
+ st->size = 0;
+ do {
+ ssize_t len_bytes;
+ ssize_t len_bits;
+ void *p;
+ int ret;
+
+ /* Get the PER length */
+ len_bits = uper_get_length(pd, ct->effective_bits, &repeat);
+ if(len_bits < 0) RETURN(RC_FAIL);
+
+ if(unit_bits == 1) {
+ len_bytes = (len_bits + 7) >> 3;
+ if(len_bits & 0x7)
+ st->bits_unused = 8 - (len_bits & 0x7);
+ /* len_bits be multiple of 16K if repeat is set */
+ } else {
+ len_bytes = len_bits;
+ len_bits = len_bytes << 3;
+ }
+ p = REALLOC(st->buf, st->size + len_bytes + 1);
+ if(!p) RETURN(RC_FAIL);
+ st->buf = (uint8_t *)p;
+
+ ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits);
+ if(ret < 0) RETURN(RC_FAIL);
+ st->size += len_bytes;
+ } while(repeat);
+ st->buf[st->size] = 0; /* nul-terminate */
+
+ return rval;
+}
int
OCTET_STRING_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
diff --git a/skeletons/OCTET_STRING.h b/skeletons/OCTET_STRING.h
index 94c19a0b..22bd6272 100644
--- a/skeletons/OCTET_STRING.h
+++ b/skeletons/OCTET_STRING.h
@@ -30,6 +30,7 @@ xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */
xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */
xer_type_encoder_f OCTET_STRING_encode_xer;
xer_type_encoder_f OCTET_STRING_encode_xer_utf8;
+per_type_decoder_f OCTET_STRING_decode_uper;
/******************************
* Handy conversion routines. *
diff --git a/skeletons/ObjectDescriptor.c b/skeletons/ObjectDescriptor.c
index 9f52147e..37f51e8c 100644
--- a/skeletons/ObjectDescriptor.c
+++ b/skeletons/ObjectDescriptor.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_ObjectDescriptor_tags,
sizeof(asn_DEF_ObjectDescriptor_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_ObjectDescriptor = {
asn_DEF_ObjectDescriptor_tags,
sizeof(asn_DEF_ObjectDescriptor_tags)
/ sizeof(asn_DEF_ObjectDescriptor_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/PrintableString.c b/skeletons/PrintableString.c
index bc48c0f8..57f65731 100644
--- a/skeletons/PrintableString.c
+++ b/skeletons/PrintableString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_PrintableString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_PrintableString_tags,
sizeof(asn_DEF_PrintableString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_PrintableString = {
asn_DEF_PrintableString_tags,
sizeof(asn_DEF_PrintableString_tags)
/ sizeof(asn_DEF_PrintableString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/README b/skeletons/README
index 29dbae63..92201ed9 100644
--- a/skeletons/README
+++ b/skeletons/README
@@ -1,6 +1,4 @@
-
-Here are the canonical encoder/decoder algorithms that work with the tables
-constructed by the compiler. The compiler itself does not generate code,
-it just creates those tables and then copies (links) over these files
-which contain generic algorithms.
-
+This directory contains encoder/decoder code for various encoding rules
+(PER, DER, BER, XER) that work with the tables constructed by the compiler.
+The compiler itself does not generate much code. It creates parsing tables
+and then copies (links) over these files which contain generic codecs.
diff --git a/skeletons/REAL.c b/skeletons/REAL.c
index c4801538..689b05ec 100644
--- a/skeletons/REAL.c
+++ b/skeletons/REAL.c
@@ -42,11 +42,13 @@ asn_TYPE_descriptor_t asn_DEF_REAL = {
der_encode_primitive,
REAL_decode_xer,
REAL_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_REAL_tags,
sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]),
asn_DEF_REAL_tags, /* Same as above */
sizeof(asn_DEF_REAL_tags) / sizeof(asn_DEF_REAL_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -257,9 +259,7 @@ REAL_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = REAL__dump(d, flags & XER_F_CANONICAL, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
}
diff --git a/skeletons/RELATIVE-OID.c b/skeletons/RELATIVE-OID.c
index 2b32315e..74511b7b 100644
--- a/skeletons/RELATIVE-OID.c
+++ b/skeletons/RELATIVE-OID.c
@@ -25,6 +25,7 @@ asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
der_encode_primitive,
RELATIVE_OID_decode_xer,
RELATIVE_OID_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_RELATIVE_OID_tags,
sizeof(asn_DEF_RELATIVE_OID_tags)
@@ -32,6 +33,7 @@ asn_TYPE_descriptor_t asn_DEF_RELATIVE_OID = {
asn_DEF_RELATIVE_OID_tags, /* Same as above */
sizeof(asn_DEF_RELATIVE_OID_tags)
/ sizeof(asn_DEF_RELATIVE_OID_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -156,9 +158,7 @@ RELATIVE_OID_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = RELATIVE_OID__dump_body(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
}
int
diff --git a/skeletons/T61String.c b/skeletons/T61String.c
index a37c176e..4157a6b2 100644
--- a/skeletons/T61String.c
+++ b/skeletons/T61String.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_T61String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_T61String_tags,
sizeof(asn_DEF_T61String_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_T61String = {
asn_DEF_T61String_tags,
sizeof(asn_DEF_T61String_tags)
/ sizeof(asn_DEF_T61String_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/TeletexString.c b/skeletons/TeletexString.c
index 47aad419..11f57033 100644
--- a/skeletons/TeletexString.c
+++ b/skeletons/TeletexString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_TeletexString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_TeletexString_tags,
sizeof(asn_DEF_TeletexString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_TeletexString = {
asn_DEF_TeletexString_tags,
sizeof(asn_DEF_TeletexString_tags)
/ sizeof(asn_DEF_TeletexString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/UTCTime.c b/skeletons/UTCTime.c
index c2079fbd..9032dbd6 100644
--- a/skeletons/UTCTime.c
+++ b/skeletons/UTCTime.c
@@ -28,6 +28,7 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_decode_xer_utf8,
UTCTime_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UTCTime_tags,
sizeof(asn_DEF_UTCTime_tags)
@@ -35,6 +36,7 @@ asn_TYPE_descriptor_t asn_DEF_UTCTime = {
asn_DEF_UTCTime_tags,
sizeof(asn_DEF_UTCTime_tags)
/ sizeof(asn_DEF_UTCTime_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/UTF8String.c b/skeletons/UTF8String.c
index 64b3a712..5d0334f9 100644
--- a/skeletons/UTF8String.c
+++ b/skeletons/UTF8String.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_UTF8String = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UTF8String_tags,
sizeof(asn_DEF_UTF8String_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_UTF8String = {
asn_DEF_UTF8String_tags,
sizeof(asn_DEF_UTF8String_tags)
/ sizeof(asn_DEF_UTF8String_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/UniversalString.c b/skeletons/UniversalString.c
index 938bf07b..0fab915f 100644
--- a/skeletons/UniversalString.c
+++ b/skeletons/UniversalString.c
@@ -23,6 +23,7 @@ asn_TYPE_descriptor_t asn_DEF_UniversalString = {
OCTET_STRING_encode_der,
UniversalString_decode_xer, /* Convert from UTF-8 */
UniversalString_encode_xer, /* Convert into UTF-8 */
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_UniversalString_tags,
sizeof(asn_DEF_UniversalString_tags)
@@ -30,6 +31,7 @@ asn_TYPE_descriptor_t asn_DEF_UniversalString = {
asn_DEF_UniversalString_tags,
sizeof(asn_DEF_UniversalString_tags)
/ sizeof(asn_DEF_UniversalString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -167,7 +169,7 @@ UniversalString_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = UniversalString__dump(st, cb, app_key);
if(er.encoded < 0) _ASN_ENCODE_FAILED;
- return er;
+ _ASN_ENCODED_OK(er);
}
int
diff --git a/skeletons/VideotexString.c b/skeletons/VideotexString.c
index 2a2baa81..c51c31aa 100644
--- a/skeletons/VideotexString.c
+++ b/skeletons/VideotexString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_VideotexString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_hex,
OCTET_STRING_encode_xer,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_VideotexString_tags,
sizeof(asn_DEF_VideotexString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_VideotexString = {
asn_DEF_VideotexString_tags,
sizeof(asn_DEF_VideotexString_tags)
/ sizeof(asn_DEF_VideotexString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/VisibleString.c b/skeletons/VisibleString.c
index 30f29455..2a88169d 100644
--- a/skeletons/VisibleString.c
+++ b/skeletons/VisibleString.c
@@ -22,6 +22,7 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
OCTET_STRING_encode_der,
OCTET_STRING_decode_xer_utf8,
OCTET_STRING_encode_xer_utf8,
+ 0,
0, /* Use generic outmost tag fetcher */
asn_DEF_VisibleString_tags,
sizeof(asn_DEF_VisibleString_tags)
@@ -29,6 +30,7 @@ asn_TYPE_descriptor_t asn_DEF_VisibleString = {
asn_DEF_VisibleString_tags,
sizeof(asn_DEF_VisibleString_tags)
/ sizeof(asn_DEF_VisibleString_tags[0]),
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/skeletons/asn-decoder-template.c b/skeletons/asn-decoder-template.c
index 348c3731..c50d8b9c 100644
--- a/skeletons/asn-decoder-template.c
+++ b/skeletons/asn-decoder-template.c
@@ -21,7 +21,9 @@
#include <asn_application.h>
extern asn_TYPE_descriptor_t asn_DEF; /* ASN.1 type to be decoded */
-static asn_TYPE_descriptor_t *pduType = &asn_DEF;
+#ifdef ASN_PDU_COLLECTION /* Generated by asn1c: -pdu=... */
+extern asn_TYPE_descriptor_t *asn_pdu_collection[];
+#endif
/*
* Open file and parse its contens.
@@ -37,7 +39,8 @@ static int opt_stack; /* -s */
/* Input data format selector */
static enum input_format {
INP_BER, /* -iber: BER input */
- INP_XER /* -ixer: XER input */
+ INP_XER, /* -ixer: XER input */
+ INP_PER /* -iper: Unaligned PER input */
} iform; /* -i<format> */
/* Output data format selector */
@@ -56,19 +59,26 @@ static enum output_format {
int
main(int ac, char **av) {
+ static asn_TYPE_descriptor_t *pduType = &asn_DEF;
ssize_t suggested_bufsize = 8192; /* close or equal to stdio buffer */
int number_of_iterations = 1;
int num;
int ch;
+ /* Figure out if Unaligned PER needs to be default */
+ if(pduType->uper_decoder)
+ iform = INP_PER;
+
/*
* Pocess the command-line argments.
*/
- while((ch = getopt(ac, av, "i:o:b:cdn:hs:")) != -1)
+ while((ch = getopt(ac, av, "i:o:b:cdn:p:hs:")) != -1)
switch(ch) {
case 'i':
if(optarg[0] == 'b') { iform = INP_BER; break; }
if(optarg[0] == 'x') { iform = INP_XER; break; }
+ if(pduType->uper_decoder
+ && optarg[0] == 'p') { iform = INP_PER; break; }
fprintf(stderr, "-i<format>: '%s': improper format selector",
optarg);
exit(EX_UNAVAILABLE);
@@ -80,6 +90,21 @@ main(int ac, char **av) {
fprintf(stderr, "-o<format>: '%s': improper format selector",
optarg);
exit(EX_UNAVAILABLE);
+ case 'p':
+#ifdef ASN_PDU_COLLECTION
+ {
+ asn_TYPE_descriptor_t **pdu = asn_pdu_collection;
+ if(optarg[0] < 'A' || optarg[0] > 'Z') {
+ fprintf(stderr, "Available PDU types:\n");
+ for(; *pdu; pdu++) printf("%s\n", (*pdu)->name);
+ exit(0);
+ }
+ while(*pdu && strcmp((*pdu)->name, optarg)) pdu++;
+ if(*pdu) { pduType = *pdu; break; }
+ }
+#endif /* ASN_PDU_COLLECTION */
+ fprintf(stderr, "-p %s: Unrecognized PDU\n", optarg);
+ exit(EX_UNAVAILABLE);
case 'b':
suggested_bufsize = atoi(optarg);
if(suggested_bufsize < 1
@@ -115,21 +140,32 @@ main(int ac, char **av) {
break;
case 'h':
default:
+ fprintf(stderr, "Usage: %s [options] <data.ber> ...\n", av[0]);
+ fprintf(stderr, "Where options are:\n");
+ if(pduType->uper_decoder)
+ fprintf(stderr,
+ " -iper (I) Input is in Unaligned PER (Packed Encoding Rules)\n");
+ fprintf(stderr,
+ " -iber %s Input is in BER (Basic Encoding Rules)\n",
+ iform == INP_PER ? " " : "(I)");
fprintf(stderr,
- "Usage: %s [options] <data.ber> ...\n"
- "Where options are:\n"
- " -iber (I) Input is in BER (Basic Encoding Rules)\n"
" -ixer Input is in XER (XML Encoding Rules)\n"
" -oder Output in DER (Distinguished Encoding Rules)\n"
" -oxer (O) Output in XER (XML Encoding Rules)\n"
" -otext Output in plain semi-structured text (dump)\n"
- " -onull Verify (decode) input, but do not output\n"
+ " -onull Verify (decode) input, but do not output\n");
+#ifdef ASN_PDU_COLLECTION
+ fprintf(stderr,
+ " -p <PDU> Specify PDU type to decode\n"
+ " -p list List available PDUs\n");
+#endif /* ASN_PDU_COLLECTION */
+ fprintf(stderr,
" -b <size> Set the i/o buffer size (default is %ld)\n"
" -c Check ASN.1 constraints after decoding\n"
" -d Enable debugging (-dd is even better)\n"
" -n <num> Process files <num> times\n"
" -s <size> Set the stack usage limit\n"
- , av[0], (long)suggested_bufsize);
+ , (long)suggested_bufsize);
exit(EX_USAGE);
}
@@ -210,7 +246,8 @@ main(int ac, char **av) {
/* Dump the buffer */
static int write_out(const void *buffer, size_t size, void *key) {
- return (fwrite(buffer, 1, size, key) == size) ? 0 : -1;
+ FILE *fp = (FILE *)key;
+ return (fwrite(buffer, 1, size, fp) == size) ? 0 : -1;
}
static char *buffer;
@@ -302,6 +339,7 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
rval.consumed = 0;
while((rd = fread(fbuf, 1, fbuf_size, fp)) || !feof(fp)) {
+ asn_per_data_t pd;
char *i_bptr;
size_t i_size;
@@ -330,6 +368,13 @@ static void *data_decode_from_file(asn_TYPE_descriptor_t *pduType, const char *f
rval = xer_decode(opt_codec_ctx, pduType,
(void **)&structure, i_bptr, i_size);
break;
+ case INP_PER:
+ pd.buffer = (uint8_t *)i_bptr;
+ pd.nboff = 0;
+ pd.nbits = i_size * 8;
+ rval = pduType->uper_decoder(opt_codec_ctx, pduType, 0,
+ (void **)&structure, &pd);
+ break;
}
DEBUG("decode(%ld) consumed %ld, code %d",
(long)buf_len, (long)rval.consumed, rval.code);
diff --git a/skeletons/asn_codecs.h b/skeletons/asn_codecs.h
index 9250adab..f25a7975 100644
--- a/skeletons/asn_codecs.h
+++ b/skeletons/asn_codecs.h
@@ -1,5 +1,6 @@
/*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _ASN_CODECS_H_
@@ -61,6 +62,11 @@ typedef struct asn_enc_rval_s {
tmp_error.structure_ptr = sptr; \
return tmp_error; \
} while(0)
+#define _ASN_ENCODED_OK(rval) do { \
+ rval.structure_ptr = 0; \
+ rval.failed_type = 0; \
+ return rval; \
+} while(0)
/*
* Type of the return value of the decoding functions (ber_decode, xer_decode)
@@ -79,6 +85,12 @@ typedef struct asn_dec_rval_s {
enum asn_dec_rval_code_e code; /* Result code */
size_t consumed; /* Number of bytes consumed */
} asn_dec_rval_t;
+#define _ASN_DECODE_FAILED do { \
+ asn_dec_rval_t tmp_error; \
+ tmp_error.code = RC_FAIL; \
+ tmp_error.consumed = 0; \
+ return tmp_error; \
+} while(0)
#ifdef __cplusplus
}
diff --git a/skeletons/asn_codecs_prim.c b/skeletons/asn_codecs_prim.c
index b599bdfa..97dc22af 100644
--- a/skeletons/asn_codecs_prim.c
+++ b/skeletons/asn_codecs_prim.c
@@ -119,9 +119,7 @@ der_encode_primitive(asn_TYPE_descriptor_t *td, void *sptr,
}
erval.encoded += st->size;
- erval.structure_ptr = 0;
- erval.failed_type = 0;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
void
diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c
index 6ab4a0bd..d3738df3 100644
--- a/skeletons/constr_CHOICE.c
+++ b/skeletons/constr_CHOICE.c
@@ -118,7 +118,7 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
ssize_t consumed_myself = 0; /* Consumed bytes from ptr */
ASN_DEBUG("Decoding %s as CHOICE", td->name);
-
+
/*
* Create the target structure if it is not present already.
*/
@@ -196,7 +196,7 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
NEXT_PHASE(ctx);
ctx->step = t2m->el_no;
break;
- } else if(specs->extensible == 0) {
+ } else if(specs->ext_start == -1) {
ASN_DEBUG("Unexpected tag %s "
"in non-extensible CHOICE %s",
ber_tlv_tag_string(tlv_tag), td->name);
@@ -252,16 +252,16 @@ CHOICE_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
memb_ptr = (char *)st + elm->memb_offset;
memb_ptr2 = &memb_ptr;
}
+ /* Set presence to be able to free it properly at any time */
+ _set_present_idx(st, specs->pres_offset,
+ specs->pres_size, ctx->step + 1);
/*
* Invoke the member fetch routine according to member's type
*/
rval = elm->type->ber_decoder(opt_codec_ctx, elm->type,
- memb_ptr2, ptr, LEFT,
- elm->tag_mode);
+ memb_ptr2, ptr, LEFT, elm->tag_mode);
switch(rval.code) {
case RC_OK:
- _set_present_idx(st, specs->pres_offset,
- specs->pres_size, ctx->step + 1);
break;
case RC_WMORE: /* More data expected */
if(!SIZE_VIOLATION) {
@@ -377,7 +377,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(present == 0 && td->elements_count == 0) {
/* The CHOICE is empty?! */
erval.encoded = 0;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
_ASN_ENCODE_FAILED;
}
@@ -391,7 +391,7 @@ CHOICE_encode_der(asn_TYPE_descriptor_t *td, void *sptr,
if(memb_ptr == 0) {
if(elm->optional) {
erval.encoded = 0;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
/* Mandatory element absent */
_ASN_ENCODE_FAILED;
@@ -729,7 +729,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
continue;
/* It is expected extension */
- if(specs->extensible) {
+ if(specs->ext_start != -1) {
ASN_DEBUG("Got anticipated extension");
/*
* Check for (XCT_BOTH or XCT_UNKNOWN_BO)
@@ -810,11 +810,86 @@ CHOICE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!(flags & XER_F_CANONICAL)) _i_ASN_TEXT_INDENT(1, ilevel - 1);
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
+asn_dec_rval_t
+CHOICE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_CHOICE_specifics_t *specs = (asn_CHOICE_specifics_t *)td->specifics;
+ asn_dec_rval_t rv;
+ asn_per_constraint_t *ct;
+ asn_TYPE_member_t *elm; /* CHOICE's element */
+ void *memb_ptr;
+ void **memb_ptr2;
+ void *st = *sptr;
+ int value;
+
+ /*
+ * Create the target structure if it is not present already.
+ */
+ if(!st) {
+ st = *sptr = CALLOC(1, specs->struct_size);
+ if(!st) _ASN_DECODE_FAILED;
+ }
+
+ if(constraints) ct = &constraints->value;
+ else if(td->per_constraints) ct = &td->per_constraints->value;
+ else ct = 0;
+
+ if(ct && ct->flags & APC_EXTENSIBLE) {
+ value = per_get_few_bits(pd, 1);
+ if(value < 0) _ASN_DECODE_FAILED;
+ if(value) ct = 0; /* Not restricted */
+ }
+
+ if(ct && ct->range_bits >= 0) {
+ value = per_get_few_bits(pd, ct->range_bits);
+ if(value < 0) _ASN_DECODE_FAILED;
+ if(value > ct->upper_bound)
+ _ASN_DECODE_FAILED;
+ ASN_DEBUG("CHOICE %s got index %d in range %d",
+ td->name, value, ct->range_bits);
+ } else {
+ if(specs->ext_start == -1)
+ _ASN_DECODE_FAILED;
+ value = uper_get_nsnnwn(pd);
+ if(value < 0) _ASN_DECODE_FAILED;
+ value += specs->ext_start;
+ if(value >= td->elements_count)
+ _ASN_DECODE_FAILED;
+ ASN_DEBUG("NOT IMPLEMENTED YET");
+ _ASN_DECODE_FAILED;
+ }
+
+ /* Adjust if canonical order is different from natural order */
+ if(specs->canonical_order)
+ value = specs->canonical_order[value];
+
+ /* Set presence to be able to free it later */
+ _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1);
+
+ elm = &td->elements[value];
+ if(elm->flags & ATF_POINTER) {
+ /* Member is a pointer to another structure */
+ memb_ptr2 = (void **)((char *)st + elm->memb_offset);
+ } else {
+ memb_ptr = (char *)st + elm->memb_offset;
+ memb_ptr2 = &memb_ptr;
+ }
+ ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name);
+
+ rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
+ elm->per_constraints, memb_ptr2, pd);
+ if(rv.code != RC_OK)
+ ASN_DEBUG("Failed to decode %s in %s (CHOICE)",
+ elm->name, td->name);
+ return rv;
+}
+
+
int
CHOICE_print(asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_app_consume_bytes_f *cb, void *app_key) {
diff --git a/skeletons/constr_CHOICE.h b/skeletons/constr_CHOICE.h
index 859c5329..6276d7e4 100644
--- a/skeletons/constr_CHOICE.h
+++ b/skeletons/constr_CHOICE.h
@@ -1,5 +1,6 @@
/*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _CONSTR_CHOICE_H_
@@ -26,10 +27,13 @@ typedef struct asn_CHOICE_specifics_s {
asn_TYPE_tag2member_t *tag2el;
int tag2el_count;
+ /* Canonical ordering of CHOICE elements, for PER */
+ int *canonical_order;
+
/*
* Extensions-related stuff.
*/
- int extensible; /* Whether CHOICE is extensible */
+ int ext_start; /* First member of extensions, or -1 */
} asn_CHOICE_specifics_t;
/*
@@ -42,6 +46,7 @@ ber_type_decoder_f CHOICE_decode_ber;
der_type_encoder_f CHOICE_encode_der;
xer_type_decoder_f CHOICE_decode_xer;
xer_type_encoder_f CHOICE_encode_xer;
+per_type_decoder_f CHOICE_decode_uper;
asn_outmost_tag_f CHOICE_outmost_tag;
#ifdef __cplusplus
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index 7dcb5da1..e3dfd1d4 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -551,7 +551,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
_ASN_ENCODE_FAILED;
erval.encoded = computed_size + ret;
- if(!cb) return erval;
+ if(!cb) _ASN_ENCODED_OK(erval);
/*
* Encode all members.
@@ -583,7 +583,7 @@ SEQUENCE_encode_der(asn_TYPE_descriptor_t *td,
*/
_ASN_ENCODE_FAILED;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
@@ -883,7 +883,7 @@ SEQUENCE_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
@@ -1014,3 +1014,135 @@ SEQUENCE_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return 0;
}
+
+asn_dec_rval_t
+SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_SEQUENCE_specifics_t *specs = (asn_SEQUENCE_specifics_t *)td->specifics;
+ void *st = *sptr; /* Target structure. */
+ int extpresent = 0; /* Extension additions are present */
+ uint8_t *opres; /* Presence of optional root members */
+ asn_per_data_t opmd;
+ asn_dec_rval_t rv;
+ int edx;
+
+ (void)constraints;
+
+ if(!st) {
+ st = *sptr = CALLOC(1, specs->struct_size);
+ if(!st) _ASN_DECODE_FAILED;
+ }
+
+ ASN_DEBUG("Decoding %s as SEQUENCE (UPER)", td->name);
+
+ /* Handle extensions */
+ if(specs->ext_before >= 0) {
+ extpresent = per_get_few_bits(pd, 1);
+ if(extpresent < 0) _ASN_DECODE_FAILED;
+ }
+
+ /* Prepare a place and read-in the presence bitmap */
+ if(specs->roms_count) {
+ opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1);
+ if(!opres) _ASN_DECODE_FAILED;
+ /* Get the presence map */
+ if(per_get_many_bits(pd, opres, 0, specs->roms_count)) {
+ FREEMEM(opres);
+ _ASN_DECODE_FAILED;
+ }
+ opmd.buffer = opres;
+ opmd.nboff = 0;
+ opmd.nbits = specs->roms_count;
+ ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)",
+ td->name, specs->roms_count, *opres);
+ } else {
+ opres = 0;
+ memset(&opmd, 0, sizeof opmd);
+ }
+
+ /*
+ * Get the sequence ROOT elements.
+ */
+ for(edx = 0; edx < ((specs->ext_before < 0)
+ ? td->elements_count : specs->ext_before + 1); edx++) {
+ asn_TYPE_member_t *elm = &td->elements[edx];
+ void *memb_ptr; /* Pointer to the member */
+ void **memb_ptr2; /* Pointer to that pointer */
+
+ /* Fetch the pointer to this member */
+ if(elm->flags & ATF_POINTER) {
+ memb_ptr2 = (void **)((char *)st + elm->memb_offset);
+ } else {
+ memb_ptr = (char *)st + elm->memb_offset;
+ memb_ptr2 = &memb_ptr;
+ }
+
+ /* Deal with optionality */
+ if(elm->optional) {
+ int present = per_get_few_bits(&opmd, 1);
+ ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)",
+ td->name, elm->name, present,
+ (int)opmd.nboff, (int)opmd.nbits);
+ if(present == 0) {
+ /* This element is not present */
+ if(elm->default_value) {
+ /* Fill-in DEFAULT */
+ if(elm->default_value(memb_ptr2)) {
+ FREEMEM(opres);
+ _ASN_DECODE_FAILED;
+ }
+ }
+ /* The member is just not present */
+ continue;
+ }
+ /* Fall through */
+ }
+
+ /* Fetch the member from the stream */
+ ASN_DEBUG("Decoding member %s in %s", elm->name, td->name);
+ rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
+ elm->per_constraints, memb_ptr2, pd);
+ if(rv.code != RC_OK) {
+ ASN_DEBUG("Failed decode %s in %s",
+ elm->name, td->name);
+ FREEMEM(opres);
+ return rv;
+ }
+ }
+
+ /*
+ * Deal with extensions.
+ */
+ if(extpresent) {
+ ASN_DEBUG("Extensibility for %s: NOT IMPLEMENTED", td->name);
+ _ASN_DECODE_FAILED;
+ } else {
+ for(edx = specs->roms_count; edx < specs->roms_count
+ + specs->aoms_count; edx++) {
+ asn_TYPE_member_t *elm = &td->elements[edx];
+ void *memb_ptr; /* Pointer to the member */
+ void **memb_ptr2; /* Pointer to that pointer */
+
+ if(!elm->default_value) continue;
+
+ /* Fetch the pointer to this member */
+ if(elm->flags & ATF_POINTER) {
+ memb_ptr2 = (void **)((char *)st + elm->memb_offset);
+ } else {
+ memb_ptr = (char *)st + elm->memb_offset;
+ memb_ptr2 = &memb_ptr;
+ }
+
+ /* Set default value */
+ if(elm->default_value(memb_ptr2)) {
+ FREEMEM(opres);
+ _ASN_DECODE_FAILED;
+ }
+ }
+ }
+
+ rv.consumed = 0;
+ rv.code = RC_OK;
+ return rv;
+}
+
diff --git a/skeletons/constr_SEQUENCE.h b/skeletons/constr_SEQUENCE.h
index ab8a8ec1..b4ee47f9 100644
--- a/skeletons/constr_SEQUENCE.h
+++ b/skeletons/constr_SEQUENCE.h
@@ -25,10 +25,18 @@ typedef struct asn_SEQUENCE_specifics_s {
int tag2el_count;
/*
+ * Optional members of the extensions root (roms) or additions (aoms).
+ * Meaningful for PER.
+ */
+ int *oms; /* Optional MemberS */
+ int roms_count; /* Root optional members count */
+ int aoms_count; /* Additions optional members count */
+
+ /*
* Description of an extensions group.
*/
- int ext_after; /* Extensions start after this member */
- int ext_before; /* Extensions stop before this member */
+ int ext_after; /* Extensions start after this member */
+ int ext_before; /* Extensions stop before this member */
} asn_SEQUENCE_specifics_t;
@@ -42,6 +50,7 @@ ber_type_decoder_f SEQUENCE_decode_ber;
der_type_encoder_f SEQUENCE_encode_der;
xer_type_decoder_f SEQUENCE_decode_xer;
xer_type_encoder_f SEQUENCE_encode_xer;
+per_type_decoder_f SEQUENCE_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/constr_SEQUENCE_OF.c b/skeletons/constr_SEQUENCE_OF.c
index 12233a6c..3ddd5a39 100644
--- a/skeletons/constr_SEQUENCE_OF.c
+++ b/skeletons/constr_SEQUENCE_OF.c
@@ -51,9 +51,7 @@ SEQUENCE_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
computed_size += encoding_size;
if(!cb) {
erval.encoded = computed_size;
- erval.structure_ptr = 0;
- erval.failed_type = 0;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name);
@@ -136,7 +134,7 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
diff --git a/skeletons/constr_SEQUENCE_OF.h b/skeletons/constr_SEQUENCE_OF.h
index 94b04cdc..32078cb3 100644
--- a/skeletons/constr_SEQUENCE_OF.h
+++ b/skeletons/constr_SEQUENCE_OF.h
@@ -21,6 +21,7 @@ extern "C" {
#define SEQUENCE_OF_constraint SET_OF_constraint
#define SEQUENCE_OF_decode_ber SET_OF_decode_ber
#define SEQUENCE_OF_decode_xer SET_OF_decode_xer
+#define SEQUENCE_OF_decode_uper SET_OF_decode_uper
der_type_encoder_f SEQUENCE_OF_encode_der;
xer_type_encoder_f SEQUENCE_OF_encode_xer;
diff --git a/skeletons/constr_SET.c b/skeletons/constr_SET.c
index f99d66f4..e83abd78 100644
--- a/skeletons/constr_SET.c
+++ b/skeletons/constr_SET.c
@@ -536,7 +536,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
if(ret == -1) _ASN_ENCODE_FAILED;
er.encoded = computed_size + ret;
- if(!cb) return er;
+ if(!cb) _ASN_ENCODED_OK(er);
/*
* Encode all members.
@@ -570,7 +570,7 @@ SET_encode_der(asn_TYPE_descriptor_t *td,
_ASN_ENCODE_FAILED;
}
- return er;
+ _ASN_ENCODED_OK(er);
}
#undef XER_ADVANCE
@@ -857,7 +857,7 @@ SET_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
diff --git a/skeletons/constr_SET_OF.c b/skeletons/constr_SET_OF.c
index bd25b3d8..251da390 100644
--- a/skeletons/constr_SET_OF.c
+++ b/skeletons/constr_SET_OF.c
@@ -1,5 +1,6 @@
/*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#include <asn_internal.h>
@@ -356,7 +357,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
if(!cb) {
erval.encoded = computed_size;
- return erval;
+ _ASN_ENCODED_OK(erval);
}
/*
@@ -448,7 +449,7 @@ SET_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
erval.encoded = computed_size;
}
- return erval;
+ _ASN_ENCODED_OK(erval);
}
#undef XER_ADVANCE
@@ -748,7 +749,7 @@ cleanup:
}
free(encs);
}
- return er;
+ _ASN_ENCODED_OK(er);
}
int
@@ -850,3 +851,88 @@ SET_OF_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
return 0;
}
+
+asn_dec_rval_t
+SET_OF_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) {
+ asn_dec_rval_t rv;
+ asn_SET_OF_specifics_t *specs = (asn_SET_OF_specifics_t *)td->specifics;
+ asn_TYPE_member_t *elm = td->elements; /* Single one */
+ void *st = *sptr;
+ asn_anonymous_set_ *list;
+ asn_per_constraint_t *ct;
+ int repeat = 0;
+ ssize_t nelems;
+
+ /*
+ * Create the target structure if it is not present already.
+ */
+ if(!st) {
+ st = *sptr = CALLOC(1, specs->struct_size);
+ if(!st) _ASN_DECODE_FAILED;
+ }
+ list = _A_SET_FROM_VOID(st);
+
+ /* Figure out which constraints to use */
+ if(constraints) ct = &constraints->size;
+ else if(td->per_constraints) ct = &td->per_constraints->size;
+ else ct = 0;
+
+ if(ct && ct->flags & APC_EXTENSIBLE) {
+ int value = per_get_few_bits(pd, 1);
+ if(value < 0) _ASN_DECODE_FAILED;
+ if(value) ct = 0; /* Not restricted! */
+ }
+
+ if(ct && ct->effective_bits >= 0) {
+ /* X.691, #19.5: No length determinant */
+ nelems = per_get_few_bits(pd, ct->effective_bits);
+ ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s",
+ (long)nelems, ct->lower_bound, td->name);
+ if(nelems < 0) _ASN_DECODE_FAILED;
+ nelems += ct->lower_bound;
+ } else {
+ nelems = -1;
+ }
+
+ do {
+ int i;
+ if(nelems < 0) {
+ nelems = uper_get_length(pd,
+ ct ? ct->effective_bits : -1, &repeat);
+ ASN_DEBUG("Got to decode %d elements (eff %d)",
+ nelems, ct ? ct->effective_bits : -1);
+ if(nelems < 0) _ASN_DECODE_FAILED;
+ }
+
+ for(i = 0; i < nelems; i++) {
+ void *ptr = 0;
+ ASN_DEBUG("SET OF %s decoding", elm->type->name);
+ rv = elm->type->uper_decoder(opt_codec_ctx, elm->type,
+ elm->per_constraints, &ptr, pd);
+ ASN_DEBUG("%s SET OF %s decoded %d, %p",
+ td->name, elm->type->name, rv.code, ptr);
+ if(rv.code == RC_OK) {
+ if(ASN_SET_ADD(list, ptr) == 0)
+ continue;
+ ASN_DEBUG("Failed to add element into %s",
+ td->name);
+ /* Fall through */
+ } else {
+ ASN_DEBUG("Failed decoding %s of %s (SET OF)",
+ elm->type->name, td->name);
+ }
+ if(ptr) elm->type->free_struct(elm->type, ptr, 0);
+ _ASN_DECODE_FAILED;
+ }
+
+ nelems = -1; /* Allow uper_get_length() */
+ } while(repeat);
+
+ ASN_DEBUG("Decoded %s as SET OF", td->name);
+
+ rv.code = RC_OK;
+ rv.consumed = 0;
+ return rv;
+}
+
diff --git a/skeletons/constr_SET_OF.h b/skeletons/constr_SET_OF.h
index 410be26b..14209316 100644
--- a/skeletons/constr_SET_OF.h
+++ b/skeletons/constr_SET_OF.h
@@ -32,6 +32,7 @@ ber_type_decoder_f SET_OF_decode_ber;
der_type_encoder_f SET_OF_encode_der;
xer_type_decoder_f SET_OF_decode_xer;
xer_type_encoder_f SET_OF_encode_xer;
+per_type_decoder_f SET_OF_decode_uper;
#ifdef __cplusplus
}
diff --git a/skeletons/constr_TYPE.h b/skeletons/constr_TYPE.h
index 90b6578c..37d21f6d 100644
--- a/skeletons/constr_TYPE.h
+++ b/skeletons/constr_TYPE.h
@@ -1,5 +1,6 @@
/*-
- * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>.
+ * All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
@@ -38,6 +39,7 @@ typedef struct asn_struct_ctx_s {
#include <der_encoder.h> /* Distinguished Encoding Rules encoder */
#include <xer_decoder.h> /* Decoder of XER (XML, text) */
#include <xer_encoder.h> /* Encoder into XER (XML, text) */
+#include <per_decoder.h> /* Packet Encoding Rules decoder */
#include <constraints.h> /* Subtype constraints support */
/*
@@ -91,6 +93,7 @@ typedef struct asn_TYPE_descriptor_s {
der_type_encoder_f *der_encoder; /* Canonical DER encoder */
xer_type_decoder_f *xer_decoder; /* Generic XER decoder */
xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */
+ per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */
/***********************************************************************
* Internally useful members. Not to be used by applications directly. *
@@ -105,6 +108,8 @@ typedef struct asn_TYPE_descriptor_s {
ber_tlv_tag_t *all_tags;/* Every tag for BER/containment */
int all_tags_count; /* Number of tags */
+ asn_per_constraints_t *per_constraints; /* PER compiled constraints */
+
/*
* An ASN.1 production type members (members of SEQUENCE, SET, CHOICE).
*/
@@ -135,6 +140,8 @@ typedef struct asn_TYPE_member_s {
int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */
asn_TYPE_descriptor_t *type; /* Member type descriptor */
asn_constr_check_f *memb_constraints; /* Constraints validator */
+ asn_per_constraints_t *per_constraints; /* PER compiled constraints */
+ int (*default_value)(void **sptr); /* DEFAULT <value> */
char *name; /* ASN.1 identifier of the element */
} asn_TYPE_member_t;
diff --git a/skeletons/file-dependencies b/skeletons/file-dependencies
index ce9c0010..87e96098 100644
--- a/skeletons/file-dependencies
+++ b/skeletons/file-dependencies
@@ -9,7 +9,7 @@
ANY.h ANY.c
BMPString.h BMPString.c UTF8String.h
BOOLEAN.h BOOLEAN.c
-ENUMERATED.h ENUMERATED.c INTEGER.h
+ENUMERATED.h ENUMERATED.c INTEGER.h NativeEnumerated.h
GeneralString.h GeneralString.c
GeneralizedTime.h GeneralizedTime.c
GraphicString.h GraphicString.c
@@ -58,4 +58,10 @@ constraints.h constraints.c # Subtype constraints support
xer_support.h xer_support.c # XML parsing
xer_decoder.h xer_decoder.c # XER decoding support
xer_encoder.h xer_encoder.c # XER encoding support
+per_decoder.h per_support.h # PER declarations, just in case
#asn-decoder-template.c # Template for quick decoder creation
+
+CODEC-PER: # THIS IS A SPECIAL SECTION
+per_support.h per_support.c # PER parsing
+per_decoder.h per_decoder.c # PER decoding support
+
diff --git a/skeletons/per_decoder.c b/skeletons/per_decoder.c
new file mode 100644
index 00000000..55c04cb5
--- /dev/null
+++ b/skeletons/per_decoder.c
@@ -0,0 +1,2 @@
+#include <asn_application.h>
+#include <per_decoder.h>
diff --git a/skeletons/per_decoder.h b/skeletons/per_decoder.h
new file mode 100644
index 00000000..6303b3cf
--- /dev/null
+++ b/skeletons/per_decoder.h
@@ -0,0 +1,55 @@
+/*-
+ * Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Redistribution and modifications are permitted subject to BSD license.
+ */
+#ifndef _PER_DECODER_H_
+#define _PER_DECODER_H_
+
+#include <asn_application.h>
+#include <per_support.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Pre-computed PER constraints.
+ */
+ enum asn_per_constraint_flags {
+ APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */
+ APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */
+ APC_CONSTRAINED = 0x2, /* Fully constrained */
+ APC_EXTENSIBLE = 0x4 /* May have extension */
+ };
+typedef struct asn_per_constraint_s {
+
+ enum asn_per_constraint_flags flags;
+ int range_bits; /* Full number of bits in the range */
+ int effective_bits; /* Effective bits */
+ long lower_bound; /* "lb" value */
+ long upper_bound; /* "ub" value */
+} asn_per_constraint_t;
+typedef struct asn_per_constraints_s {
+ asn_per_constraint_t value;
+ asn_per_constraint_t size;
+} asn_per_constraints_t;
+
+
+struct asn_TYPE_descriptor_s; /* Forward declaration */
+
+/*
+ * Type of the type-specific PER decoder function.
+ */
+typedef asn_dec_rval_t (per_type_decoder_f)(asn_codec_ctx_t *opt_codec_ctx,
+ struct asn_TYPE_descriptor_s *type_descriptor,
+ asn_per_constraints_t *constraints,
+ void **struct_ptr,
+ asn_per_data_t *per_data
+ );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PER_DECODER_H_ */
diff --git a/skeletons/per_support.c b/skeletons/per_support.c
new file mode 100644
index 00000000..506ca780
--- /dev/null
+++ b/skeletons/per_support.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Redistribution and modifications are permitted subject to BSD license.
+ */
+#include <asn_system.h>
+#include <per_support.h>
+
+/*
+ * Extract a small number of bits (<= 24) from the specified PER data pointer.
+ */
+int32_t
+per_get_few_bits(asn_per_data_t *pd, int nbits) {
+ size_t off; /* Next after last bit offset */
+ uint32_t accum;
+ uint8_t *buf;
+
+ if(nbits < 0 || pd->nboff + nbits > pd->nbits)
+ return -1;
+ if(nbits == 0)
+ return 0;
+
+ /*
+ * Normalize position indicator.
+ */
+ if(pd->nboff >= 8) {
+ pd->buffer += (pd->nboff >> 3);
+ pd->nbits -= (pd->nboff & ~0x07);
+ pd->nboff &= 0x07;
+ }
+ off = (pd->nboff += nbits);
+ buf = pd->buffer;
+
+ /*
+ * Extract specified number of bits.
+ */
+ if(off <= 8)
+ accum = (buf[0]) >> (8 - off);
+ else if(off <= 16)
+ accum = ((buf[0] << 8) + buf[1]) >> (16 - off);
+ else if(off <= 24)
+ accum = ((buf[0] << 16) + (buf[1] << 8) + buf[2]) >> (24 - off);
+ else if(off <= 31)
+ accum = ((buf[0] << 24) + (buf[1] << 16)
+ + (buf[2] << 8) + (buf[3])) >> (32 - off);
+ else {
+ pd->nboff -= nbits; /* Oops, revert back */
+ return -1;
+ }
+
+ return (accum & ((1 << nbits) - 1));
+}
+
+/*
+ * Extract a large number of bits from the specified PER data pointer.
+ */
+int
+per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int alright, int nbits) {
+ int32_t value;
+
+ if(alright && (nbits & 7)) {
+ /* Perform right alignment of a first few bits */
+ value = per_get_few_bits(pd, nbits & 0x07);
+ if(value < 0) return -1;
+ *dst++ = value; /* value is already right-aligned */
+ nbits &= ~7;
+ }
+
+ while(nbits) {
+ if(nbits >= 24) {
+ value = per_get_few_bits(pd, 24);
+ if(value < 0) return -1;
+ *(dst++) = value >> 16;
+ *(dst++) = value >> 8;
+ *(dst++) = value;
+ nbits -= 24;
+ } else {
+ value = per_get_few_bits(pd, nbits);
+ if(value < 0) return -1;
+ if(nbits & 7) { /* implies alright */
+ value <<= 8 - (nbits & 7),
+ nbits += 8 - (nbits & 7);
+ if(nbits > 24)
+ *dst++ = value >> 24;
+ }
+ if(nbits > 16)
+ *dst++ = value >> 16;
+ if(nbits > 8)
+ *dst++ = value >> 8;
+ *dst++ = value;
+ break;
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * Get the length "n" from the stream.
+ */
+ssize_t
+uper_get_length(asn_per_data_t *pd, int ebits, int *repeat) {
+ ssize_t value;
+
+ *repeat = 0;
+
+ if(ebits >= 0) return per_get_few_bits(pd, ebits);
+
+ value = per_get_few_bits(pd, 8);
+ if(value < 0) return -1;
+ if((value & 128) == 0) /* #10.9.3.6 */
+ return (value & 0x7F);
+ if((value & 64) == 0) { /* #10.9.3.7 */
+ value = ((value & 63) << 8) | per_get_few_bits(pd, 8);
+ if(value < 0) return -1;
+ return value;
+ }
+ value &= 63; /* this is "m" from X.691, #10.9.3.8 */
+ if(value < 1 || value > 4)
+ return -1;
+ *repeat = 1;
+ return (16384 * value);
+}
+
+/*
+ * Get the normally small non-negative whole number.
+ * X.691, #10.6
+ */
+ssize_t
+uper_get_nsnnwn(asn_per_data_t *pd) {
+ ssize_t value;
+
+ value = per_get_few_bits(pd, 7);
+ if(value & 64) { /* implicit (value < 0) */
+ value &= 63;
+ value <<= 2;
+ value |= per_get_few_bits(pd, 2);
+ if(value & 128) /* implicit (value < 0) */
+ return -1;
+ if(value == 0)
+ return 0;
+ if(value >= 3)
+ return -1;
+ value = per_get_few_bits(pd, 8 * value);
+ return value;
+ }
+
+ return value;
+}
diff --git a/skeletons/per_support.h b/skeletons/per_support.h
new file mode 100644
index 00000000..25c92566
--- /dev/null
+++ b/skeletons/per_support.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Redistribution and modifications are permitted subject to BSD license.
+ */
+#ifndef _PER_SUPPORT_H_
+#define _PER_SUPPORT_H_
+
+#include <asn_system.h> /* Platform-specific types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This structure describes a position inside a PER bit stream.
+ */
+typedef struct asn_per_data_s {
+ uint8_t *buffer; /* Pointer to the octet stream */
+ size_t nboff; /* Bit offset to the meaningful bit */
+ size_t nbits; /* Number of bits in the stream */
+} asn_per_data_t;
+
+/*
+ * Extract a small number of bits (<= 24) from the specified PER data pointer.
+ * This function returns -1 if the specified number of bits could not be
+ * extracted due to EOD or other conditions.
+ */
+int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits);
+
+/*
+ * Extract a large number of bits from the specified PER data pointer.
+ * This function returns -1 if the specified number of bits could not be
+ * extracted due to EOD or other conditions.
+ */
+int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align,
+ int get_nbits);
+
+/*
+ * Get the length "n" from the Unaligned PER stream.
+ */
+ssize_t uper_get_length(asn_per_data_t *pd,
+ int effective_bound_bits,
+ int *repeat);
+
+/*
+ * Get the normally small non-negative whole number.
+ */
+ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PER_SUPPORT_H_ */
diff --git a/skeletons/tests/Makefile.am b/skeletons/tests/Makefile.am
index c374438d..a664a6f6 100644
--- a/skeletons/tests/Makefile.am
+++ b/skeletons/tests/Makefile.am
@@ -10,7 +10,8 @@ check_PROGRAMS = \
check-UTCTime \
check-INTEGER \
check-REAL \
- check-XER
+ check-XER \
+ check-PER
LDADD = -lm
diff --git a/skeletons/tests/Makefile.in b/skeletons/tests/Makefile.in
index f5a3c689..d0f980f2 100644
--- a/skeletons/tests/Makefile.in
+++ b/skeletons/tests/Makefile.in
@@ -13,7 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c check-OIDs.c check-REAL.c check-UTCTime.c check-UTF8String.c check-XER.c check-ber_tlv_tag.c check-length.c
+SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c check-OIDs.c check-PER.c check-REAL.c check-UTCTime.c check-UTF8String.c check-XER.c check-ber_tlv_tag.c check-length.c
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -40,7 +40,7 @@ check_PROGRAMS = check-ber_tlv_tag$(EXEEXT) check-length$(EXEEXT) \
check-OIDs$(EXEEXT) check-GeneralizedTime$(EXEEXT) \
check-OCTET_STRING$(EXEEXT) check-UTF8String$(EXEEXT) \
check-UTCTime$(EXEEXT) check-INTEGER$(EXEEXT) \
- check-REAL$(EXEEXT) check-XER$(EXEEXT)
+ check-REAL$(EXEEXT) check-XER$(EXEEXT) check-PER$(EXEEXT)
subdir = skeletons/tests
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -66,6 +66,10 @@ check_OIDs_SOURCES = check-OIDs.c
check_OIDs_OBJECTS = check-OIDs.$(OBJEXT)
check_OIDs_LDADD = $(LDADD)
check_OIDs_DEPENDENCIES =
+check_PER_SOURCES = check-PER.c
+check_PER_OBJECTS = check-PER.$(OBJEXT)
+check_PER_LDADD = $(LDADD)
+check_PER_DEPENDENCIES =
check_REAL_SOURCES = check-REAL.c
check_REAL_OBJECTS = check-REAL.$(OBJEXT)
check_REAL_LDADD = $(LDADD)
@@ -96,7 +100,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/check-GeneralizedTime.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-INTEGER.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-OCTET_STRING.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/check-OIDs.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check-OIDs.Po ./$(DEPDIR)/check-PER.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-REAL.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-UTCTime.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/check-UTF8String.Po \
@@ -112,12 +116,13 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = check-GeneralizedTime.c check-INTEGER.c check-OCTET_STRING.c \
- check-OIDs.c check-REAL.c check-UTCTime.c check-UTF8String.c \
- check-XER.c check-ber_tlv_tag.c check-length.c
-DIST_SOURCES = check-GeneralizedTime.c check-INTEGER.c \
- check-OCTET_STRING.c check-OIDs.c check-REAL.c check-UTCTime.c \
+ check-OIDs.c check-PER.c check-REAL.c check-UTCTime.c \
check-UTF8String.c check-XER.c check-ber_tlv_tag.c \
check-length.c
+DIST_SOURCES = check-GeneralizedTime.c check-INTEGER.c \
+ check-OCTET_STRING.c check-OIDs.c check-PER.c check-REAL.c \
+ check-UTCTime.c check-UTF8String.c check-XER.c \
+ check-ber_tlv_tag.c check-length.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -285,6 +290,9 @@ check-OCTET_STRING$(EXEEXT): $(check_OCTET_STRING_OBJECTS) $(check_OCTET_STRING_
check-OIDs$(EXEEXT): $(check_OIDs_OBJECTS) $(check_OIDs_DEPENDENCIES)
@rm -f check-OIDs$(EXEEXT)
$(LINK) $(check_OIDs_LDFLAGS) $(check_OIDs_OBJECTS) $(check_OIDs_LDADD) $(LIBS)
+check-PER$(EXEEXT): $(check_PER_OBJECTS) $(check_PER_DEPENDENCIES)
+ @rm -f check-PER$(EXEEXT)
+ $(LINK) $(check_PER_LDFLAGS) $(check_PER_OBJECTS) $(check_PER_LDADD) $(LIBS)
check-REAL$(EXEEXT): $(check_REAL_OBJECTS) $(check_REAL_DEPENDENCIES)
@rm -f check-REAL$(EXEEXT)
$(LINK) $(check_REAL_LDFLAGS) $(check_REAL_OBJECTS) $(check_REAL_LDADD) $(LIBS)
@@ -314,6 +322,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-INTEGER.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-OCTET_STRING.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-OIDs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-PER.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-REAL.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-UTCTime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check-UTF8String.Po@am__quote@
diff --git a/skeletons/tests/check-INTEGER.c b/skeletons/tests/check-INTEGER.c
index bb692c50..fccce287 100644
--- a/skeletons/tests/check-INTEGER.c
+++ b/skeletons/tests/check-INTEGER.c
@@ -6,6 +6,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
+#include <per_support.c>
#include <constraints.c>
static char *shared_scratch_start;
diff --git a/skeletons/tests/check-OCTET_STRING.c b/skeletons/tests/check-OCTET_STRING.c
index 51f6eb3b..b3e298f1 100644
--- a/skeletons/tests/check-OCTET_STRING.c
+++ b/skeletons/tests/check-OCTET_STRING.c
@@ -3,6 +3,7 @@
#include <BIT_STRING.c>
#include <xer_decoder.c>
#include <xer_support.c>
+#include <per_support.c>
#include <ber_decoder.c>
#include <ber_tlv_length.c>
#include <ber_tlv_tag.c>
diff --git a/skeletons/tests/check-PER.c b/skeletons/tests/check-PER.c
new file mode 100644
index 00000000..94f5fe42
--- /dev/null
+++ b/skeletons/tests/check-PER.c
@@ -0,0 +1,105 @@
+#include <per_support.c>
+#include <assert.h>
+
+int
+main() {
+ uint8_t buf[] = { 0xB7, 0x19, 0x2F, 0xEE, 0xAD };
+ uint8_t tmpbuf[10];
+ int32_t z;
+ asn_per_data_t pos;
+
+ pos.buffer = buf;
+ pos.nboff = 0;
+ pos.nbits = sizeof(buf) * 8;
+
+ z = per_get_few_bits(&pos, 32);
+ assert(z == -1);
+
+ z = per_get_few_bits(&pos, 0);
+ assert(z == 0);
+ assert(pos.nboff == 0);
+
+ z = per_get_few_bits(&pos, 1);
+ assert(z == 1);
+ assert(pos.nboff == 1);
+
+ z = per_get_few_bits(&pos, 2);
+ assert(z == 1);
+ assert(pos.nboff == 3);
+
+ z = per_get_few_bits(&pos, 2);
+ assert(z == 2);
+ assert(pos.nboff == 5);
+
+ z = per_get_few_bits(&pos, 3);
+ assert(z == 7);
+ assert(pos.nboff == 8);
+ assert(pos.nbits == sizeof(buf) * 8);
+
+ z = per_get_few_bits(&pos, 8);
+ assert(z == 0x19);
+ assert(pos.nboff == 8);
+ assert(pos.nbits == (sizeof(buf) - 1) * 8);
+
+ z = per_get_few_bits(&pos, 1);
+ assert(z == 0);
+ assert(pos.nboff == 1);
+ assert(pos.nbits == (sizeof(buf) - 2) * 8);
+
+ z = per_get_few_bits(&pos, 3);
+ assert(z == 2);
+ assert(pos.nboff == 4);
+ assert(pos.nbits == (sizeof(buf) - 2) * 8);
+
+ z = per_get_few_bits(&pos, 8);
+ assert(z == 254);
+ assert(pos.nboff == 12);
+
+ pos.buffer = buf;
+ pos.nboff = 2;
+ pos.nbits = sizeof(buf) * 8;
+ z = per_get_few_bits(&pos, 24);
+ assert(z == 14443711);
+
+ pos.buffer = buf;
+ pos.nboff = 0;
+ pos.nbits = sizeof(buf) * 8;
+ z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8);
+ assert(z == 0);
+ assert(buf[0] == tmpbuf[0]);
+ assert(buf[1] == tmpbuf[1]);
+ assert(buf[2] == tmpbuf[2]);
+ assert(buf[3] == tmpbuf[3]);
+ assert(buf[4] == tmpbuf[4]);
+
+ pos.buffer = buf;
+ pos.nboff = 1;
+ pos.nbits = sizeof(buf) * 8;
+ z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8);
+ assert(z == -1);
+
+ pos.buffer = buf;
+ pos.nboff = 1;
+ pos.nbits = sizeof(buf) * 8;
+ z = per_get_many_bits(&pos, tmpbuf, 0, sizeof(buf) * 8 - 1);
+ assert(z == 0);
+ assert(tmpbuf[0] == 110);
+ assert(tmpbuf[1] == 50);
+ assert(tmpbuf[2] == 95);
+ assert(tmpbuf[3] == 221);
+ assert(tmpbuf[4] == 90);
+
+ pos.buffer = buf;
+ pos.nboff = 1;
+ pos.nbits = sizeof(buf) * 8;
+ z = per_get_many_bits(&pos, tmpbuf, 1, sizeof(buf) * 8 - 1);
+ assert(z == 0);
+ assert(tmpbuf[0] == 55);
+ assert(tmpbuf[0] != buf[0]);
+ assert(tmpbuf[1] == buf[1]);
+ assert(tmpbuf[2] == buf[2]);
+ assert(tmpbuf[3] == buf[3]);
+ assert(tmpbuf[4] == buf[4]);
+
+ return 0;
+}
diff --git a/skeletons/tests/check-UTF8String.c b/skeletons/tests/check-UTF8String.c
index 10592a19..8a90b242 100644
--- a/skeletons/tests/check-UTF8String.c
+++ b/skeletons/tests/check-UTF8String.c
@@ -6,6 +6,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
+#include <per_support.c>
#include <constraints.c>
#include <sys/time.h>
diff --git a/skeletons/tests/check-length.c b/skeletons/tests/check-length.c
index 9a6d8d67..cf104050 100644
--- a/skeletons/tests/check-length.c
+++ b/skeletons/tests/check-length.c
@@ -4,6 +4,7 @@
#include <der_encoder.c>
#include <xer_decoder.c>
#include <xer_support.c>
+#include <per_support.c>
#include <constraints.c>
#undef ADVANCE
#undef RETURN
diff --git a/skeletons/xer_encoder.c b/skeletons/xer_encoder.c
index 3ee62cb8..aa7cf040 100644
--- a/skeletons/xer_encoder.c
+++ b/skeletons/xer_encoder.c
@@ -32,9 +32,7 @@ xer_encode(asn_TYPE_descriptor_t *td, void *sptr,
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
- er.structure_ptr = 0;
- er.failed_type = 0;
- return er;
+ _ASN_ENCODED_OK(er);
cb_failed:
_ASN_ENCODE_FAILED;
}
diff --git a/skeletons/xer_support.c b/skeletons/xer_support.c
index 1d0b42c5..9e34e692 100644
--- a/skeletons/xer_support.c
+++ b/skeletons/xer_support.c
@@ -4,11 +4,7 @@
* All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-
+#include <asn_system.h>
#include <xer_support.h>
/* Parser states */
diff --git a/tests/19-param-OK.asn1.-P b/tests/19-param-OK.asn1.-P
index 8ffd6179..321e71a2 100644
--- a/tests/19-param-OK.asn1.-P
+++ b/tests/19-param-OK.asn1.-P
@@ -32,7 +32,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Certificate;
/*** <<< CODE [Certificate] >>> ***/
static int
-memb_signature_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_signature_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
@@ -71,6 +71,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "version"
},
{ ATF_NOFLAGS, 0, offsetof(struct toBeSigned, signature),
@@ -78,6 +80,8 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "signature"
},
{ ATF_NOFLAGS, 0, offsetof(struct toBeSigned, issuer),
@@ -85,22 +89,25 @@ static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Name,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "issuer"
},
};
-static ber_tlv_tag_t asn_DEF_toBeSigned_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_toBeSigned_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_toBeSigned_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_toBeSigned_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* version at 21 */
{ (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* signature at 22 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* issuer at 24 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_specs_2 = {
sizeof(struct toBeSigned),
offsetof(struct toBeSigned, _asn_ctx),
- asn_MAP_toBeSigned_2_tag2el,
+ asn_MAP_toBeSigned_tag2el_2,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -115,16 +122,18 @@ asn_TYPE_descriptor_t asn_DEF_toBeSigned_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_toBeSigned_2_tags,
- sizeof(asn_DEF_toBeSigned_2_tags)
- /sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */
- asn_DEF_toBeSigned_2_tags, /* Same as above */
- sizeof(asn_DEF_toBeSigned_2_tags)
- /sizeof(asn_DEF_toBeSigned_2_tags[0]), /* 1 */
+ asn_DEF_toBeSigned_tags_2,
+ sizeof(asn_DEF_toBeSigned_tags_2)
+ /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
+ asn_DEF_toBeSigned_tags_2, /* Same as above */
+ sizeof(asn_DEF_toBeSigned_tags_2)
+ /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_toBeSigned_2,
3, /* Elements count */
- &asn_SPC_toBeSigned_2_specs /* Additional specs */
+ &asn_SPC_toBeSigned_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
@@ -133,6 +142,8 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
.tag_mode = 0,
.type = &asn_DEF_toBeSigned_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "toBeSigned"
},
{ ATF_NOFLAGS, 0, offsetof(struct Certificate, algorithm),
@@ -140,29 +151,34 @@ static asn_TYPE_member_t asn_MBR_Certificate_1[] = {
.tag_mode = 0,
.type = &asn_DEF_OBJECT_IDENTIFIER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "algorithm"
},
{ ATF_NOFLAGS, 0, offsetof(struct Certificate, signature),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
- .memb_constraints = memb_signature_1_constraint,
+ .memb_constraints = memb_signature_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "signature"
},
};
-static ber_tlv_tag_t asn_DEF_Certificate_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Certificate_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Certificate_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Certificate_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 2, 0, 0 }, /* signature at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* algorithm at 16 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* toBeSigned at 21 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Certificate_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Certificate_specs_1 = {
sizeof(struct Certificate),
offsetof(struct Certificate, _asn_ctx),
- asn_MAP_Certificate_1_tag2el,
+ asn_MAP_Certificate_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -176,16 +192,18 @@ asn_TYPE_descriptor_t asn_DEF_Certificate = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Certificate_1_tags,
- sizeof(asn_DEF_Certificate_1_tags)
- /sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */
- asn_DEF_Certificate_1_tags, /* Same as above */
- sizeof(asn_DEF_Certificate_1_tags)
- /sizeof(asn_DEF_Certificate_1_tags[0]), /* 1 */
+ asn_DEF_Certificate_tags_1,
+ sizeof(asn_DEF_Certificate_tags_1)
+ /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
+ asn_DEF_Certificate_tags_1, /* Same as above */
+ sizeof(asn_DEF_Certificate_tags_1)
+ /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Certificate_1,
3, /* Elements count */
- &asn_SPC_Certificate_1_specs /* Additional specs */
+ &asn_SPC_Certificate_specs_1 /* Additional specs */
};
@@ -223,13 +241,15 @@ static asn_TYPE_member_t asn_MBR_Name_1[] = {
.tag_mode = 0,
.type = &asn_DEF_RelativeDistinguishedName,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Name_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Name_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Name_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = {
sizeof(struct Name),
offsetof(struct Name, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -244,16 +264,18 @@ asn_TYPE_descriptor_t asn_DEF_Name = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Name_1_tags,
- sizeof(asn_DEF_Name_1_tags)
- /sizeof(asn_DEF_Name_1_tags[0]), /* 1 */
- asn_DEF_Name_1_tags, /* Same as above */
- sizeof(asn_DEF_Name_1_tags)
- /sizeof(asn_DEF_Name_1_tags[0]), /* 1 */
+ asn_DEF_Name_tags_1,
+ sizeof(asn_DEF_Name_tags_1)
+ /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
+ asn_DEF_Name_tags_1, /* Same as above */
+ sizeof(asn_DEF_Name_tags_1)
+ /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Name_1,
1, /* Single element */
- &asn_SPC_Name_1_specs /* Additional specs */
+ &asn_SPC_Name_specs_1 /* Additional specs */
};
@@ -307,7 +329,7 @@ static int check_permitted_alphabet_2(const void *sptr) {
/*** <<< CODE [RelativeDistinguishedName] >>> ***/
static int
-memb_IA5String_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_IA5String_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const IA5String_t *st = (const IA5String_t *)sptr;
@@ -338,14 +360,16 @@ static asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
.tag_mode = 0,
.type = &asn_DEF_IA5String,
- .memb_constraints = memb_IA5String_1_constraint,
+ .memb_constraints = memb_IA5String_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = {
sizeof(struct RelativeDistinguishedName),
offsetof(struct RelativeDistinguishedName, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -360,15 +384,17 @@ asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_RelativeDistinguishedName_1_tags,
- sizeof(asn_DEF_RelativeDistinguishedName_1_tags)
- /sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */
- asn_DEF_RelativeDistinguishedName_1_tags, /* Same as above */
- sizeof(asn_DEF_RelativeDistinguishedName_1_tags)
- /sizeof(asn_DEF_RelativeDistinguishedName_1_tags[0]), /* 1 */
+ asn_DEF_RelativeDistinguishedName_tags_1,
+ sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
+ /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
+ asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */
+ sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
+ /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_RelativeDistinguishedName_1,
1, /* Single element */
- &asn_SPC_RelativeDistinguishedName_1_specs /* Additional specs */
+ &asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */
};
diff --git a/tests/30-set-OK.asn1.-P b/tests/30-set-OK.asn1.-P
index 439f0de4..65250884 100644
--- a/tests/30-set-OK.asn1.-P
+++ b/tests/30-set-OK.asn1.-P
@@ -49,6 +49,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, s),
@@ -56,6 +58,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "s"
},
{ ATF_POINTER, 1, offsetof(struct T, b),
@@ -63,30 +67,32 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 1, 0, 0 }, /* s at 16 */
{ (ASN_TAG_CLASS_APPLICATION | (3 << 2)), 0, 0, 0 }, /* i at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* b at 18 */
};
-static uint8_t asn_MAP_T_1_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_T_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6) | (0 << 5)
};
-static asn_SET_specifics_t asn_SPC_T_1_specs = {
+static asn_SET_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
offsetof(struct T, _presence_map),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
3, /* Count of tags in the map */
- asn_MAP_T_1_tag2el, /* Same as above */
+ asn_MAP_T_tag2el_1, /* Same as above */
3, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_T_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_T_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
@@ -98,15 +104,17 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
3, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
diff --git a/tests/31-set-of-OK.asn1 b/tests/31-set-of-OK.asn1
index c8fa51eb..ddfe51c7 100644
--- a/tests/31-set-of-OK.asn1
+++ b/tests/31-set-of-OK.asn1
@@ -37,4 +37,6 @@ BEGIN
-- not to the SET OF's embedded SEQUENCE!
}
+ SSS ::= SEQUENCE OF SET OF SEQUENCE OF BIT STRING
+
END
diff --git a/tests/31-set-of-OK.asn1.-EF b/tests/31-set-of-OK.asn1.-EF
index f97ce2a3..bf6f99d8 100644
--- a/tests/31-set-of-OK.asn1.-EF
+++ b/tests/31-set-of-OK.asn1.-EF
@@ -23,4 +23,6 @@ Stuff ::= SET {
}
}
+SSS ::= SEQUENCE OF SET OF SEQUENCE OF BIT STRING
+
END
diff --git a/tests/31-set-of-OK.asn1.-P b/tests/31-set-of-OK.asn1.-P
index d1e5c82e..23cf7f0d 100644
--- a/tests/31-set-of-OK.asn1.-P
+++ b/tests/31-set-of-OK.asn1.-P
@@ -33,13 +33,15 @@ static asn_TYPE_member_t asn_MBR_Forest_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Tree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Forest_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Forest_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Forest_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Forest_specs_1 = {
sizeof(struct Forest),
offsetof(struct Forest, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -54,16 +56,18 @@ asn_TYPE_descriptor_t asn_DEF_Forest = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Forest_1_tags,
- sizeof(asn_DEF_Forest_1_tags)
- /sizeof(asn_DEF_Forest_1_tags[0]), /* 1 */
- asn_DEF_Forest_1_tags, /* Same as above */
- sizeof(asn_DEF_Forest_1_tags)
- /sizeof(asn_DEF_Forest_1_tags[0]), /* 1 */
+ asn_DEF_Forest_tags_1,
+ sizeof(asn_DEF_Forest_tags_1)
+ /sizeof(asn_DEF_Forest_tags_1[0]), /* 1 */
+ asn_DEF_Forest_tags_1, /* Same as above */
+ sizeof(asn_DEF_Forest_tags_1)
+ /sizeof(asn_DEF_Forest_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Forest_1,
1, /* Single element */
- &asn_SPC_Forest_1_specs /* Additional specs */
+ &asn_SPC_Forest_specs_1 /* Additional specs */
};
@@ -94,6 +98,8 @@ static asn_TYPE_member_t asn_MBR_Tree_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "height"
},
{ ATF_NOFLAGS, 0, offsetof(struct Tree, width),
@@ -101,21 +107,24 @@ static asn_TYPE_member_t asn_MBR_Tree_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "width"
},
};
-static ber_tlv_tag_t asn_DEF_Tree_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Tree_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Tree_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Tree_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* height at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* width at 19 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Tree_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Tree_specs_1 = {
sizeof(struct Tree),
offsetof(struct Tree, _asn_ctx),
- asn_MAP_Tree_1_tag2el,
+ asn_MAP_Tree_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -129,16 +138,18 @@ asn_TYPE_descriptor_t asn_DEF_Tree = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Tree_1_tags,
- sizeof(asn_DEF_Tree_1_tags)
- /sizeof(asn_DEF_Tree_1_tags[0]), /* 1 */
- asn_DEF_Tree_1_tags, /* Same as above */
- sizeof(asn_DEF_Tree_1_tags)
- /sizeof(asn_DEF_Tree_1_tags[0]), /* 1 */
+ asn_DEF_Tree_tags_1,
+ sizeof(asn_DEF_Tree_tags_1)
+ /sizeof(asn_DEF_Tree_tags_1[0]), /* 1 */
+ asn_DEF_Tree_tags_1, /* Same as above */
+ sizeof(asn_DEF_Tree_tags_1)
+ /sizeof(asn_DEF_Tree_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Tree_1,
2, /* Elements count */
- &asn_SPC_Tree_1_specs /* Additional specs */
+ &asn_SPC_Tree_specs_1 /* Additional specs */
};
@@ -236,14 +247,16 @@ static asn_TYPE_member_t asn_MBR_trees_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Forest,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_trees_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_trees_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_trees_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_trees_specs_2 = {
sizeof(struct trees),
offsetof(struct trees, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -259,16 +272,18 @@ asn_TYPE_descriptor_t asn_DEF_trees_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_trees_2_tags,
- sizeof(asn_DEF_trees_2_tags)
- /sizeof(asn_DEF_trees_2_tags[0]) - 1, /* 1 */
- asn_DEF_trees_2_tags, /* Same as above */
- sizeof(asn_DEF_trees_2_tags)
- /sizeof(asn_DEF_trees_2_tags[0]), /* 2 */
+ asn_DEF_trees_tags_2,
+ sizeof(asn_DEF_trees_tags_2)
+ /sizeof(asn_DEF_trees_tags_2[0]) - 1, /* 1 */
+ asn_DEF_trees_tags_2, /* Same as above */
+ sizeof(asn_DEF_trees_tags_2)
+ /sizeof(asn_DEF_trees_tags_2[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_trees_2,
1, /* Single element */
- &asn_SPC_trees_2_specs /* Additional specs */
+ &asn_SPC_trees_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Member_5[] = {
@@ -277,27 +292,30 @@ static asn_TYPE_member_t asn_MBR_Member_5[] = {
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "cup-of-coffee"
},
};
-static ber_tlv_tag_t asn_DEF_Member_5_tags[] = {
+static ber_tlv_tag_t asn_DEF_Member_tags_5[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Member_5_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_5[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* cup-of-coffee at 32 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Member_5_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_5 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
- asn_MAP_Member_5_tag2el,
+ asn_MAP_Member_tag2el_5,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
2 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_5 = {
- "",
- "",
+ "SEQUENCE",
+ "SEQUENCE",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
@@ -305,16 +323,18 @@ asn_TYPE_descriptor_t asn_DEF_Member_5 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Member_5_tags,
- sizeof(asn_DEF_Member_5_tags)
- /sizeof(asn_DEF_Member_5_tags[0]), /* 1 */
- asn_DEF_Member_5_tags, /* Same as above */
- sizeof(asn_DEF_Member_5_tags)
- /sizeof(asn_DEF_Member_5_tags[0]), /* 1 */
+ asn_DEF_Member_tags_5,
+ sizeof(asn_DEF_Member_tags_5)
+ /sizeof(asn_DEF_Member_tags_5[0]), /* 1 */
+ asn_DEF_Member_tags_5, /* Same as above */
+ sizeof(asn_DEF_Member_tags_5)
+ /sizeof(asn_DEF_Member_tags_5[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Member_5,
1, /* Elements count */
- &asn_SPC_Member_5_specs /* Additional specs */
+ &asn_SPC_Member_specs_5 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_anything_4[] = {
@@ -323,14 +343,16 @@ static asn_TYPE_member_t asn_MBR_anything_4[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_5,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_anything_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_anything_tags_4[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_anything_4_specs = {
+static asn_SET_OF_specifics_t asn_SPC_anything_specs_4 = {
sizeof(struct anything),
offsetof(struct anything, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -346,16 +368,18 @@ asn_TYPE_descriptor_t asn_DEF_anything_4 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_anything_4_tags,
- sizeof(asn_DEF_anything_4_tags)
- /sizeof(asn_DEF_anything_4_tags[0]) - 1, /* 1 */
- asn_DEF_anything_4_tags, /* Same as above */
- sizeof(asn_DEF_anything_4_tags)
- /sizeof(asn_DEF_anything_4_tags[0]), /* 2 */
+ asn_DEF_anything_tags_4,
+ sizeof(asn_DEF_anything_tags_4)
+ /sizeof(asn_DEF_anything_tags_4[0]) - 1, /* 1 */
+ asn_DEF_anything_tags_4, /* Same as above */
+ sizeof(asn_DEF_anything_tags_4)
+ /sizeof(asn_DEF_anything_tags_4[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_anything_4,
1, /* Single element */
- &asn_SPC_anything_4_specs /* Additional specs */
+ &asn_SPC_anything_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_other_9[] = {
@@ -364,6 +388,8 @@ static asn_TYPE_member_t asn_MBR_other_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct other, choice.b),
@@ -371,21 +397,24 @@ static asn_TYPE_member_t asn_MBR_other_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static asn_TYPE_tag2member_t asn_MAP_other_9_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_other_tag2el_9[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 26 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 } /* b at 28 */
};
-static asn_CHOICE_specifics_t asn_SPC_other_9_specs = {
+static asn_CHOICE_specifics_t asn_SPC_other_specs_9 = {
sizeof(struct other),
offsetof(struct other, _asn_ctx),
offsetof(struct other, present),
sizeof(((struct other *)0)->present),
- asn_MAP_other_9_tag2el,
+ asn_MAP_other_tag2el_9,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_other_9 = {
@@ -398,14 +427,16 @@ asn_TYPE_descriptor_t asn_DEF_other_9 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_other_9,
2, /* Elements count */
- &asn_SPC_other_9_specs /* Additional specs */
+ &asn_SPC_other_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
@@ -414,6 +445,8 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_trees_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "trees"
},
{ ATF_POINTER, 2, offsetof(struct Stuff, anything),
@@ -421,6 +454,8 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_anything_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "anything"
},
{ ATF_POINTER, 1, offsetof(struct Stuff, other),
@@ -428,36 +463,38 @@ static asn_TYPE_member_t asn_MBR_Stuff_1[] = {
.tag_mode = 0,
.type = &asn_DEF_other_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "other"
},
};
-static ber_tlv_tag_t asn_DEF_Stuff_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Stuff_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Stuff_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Stuff_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* a at 26 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* b at 28 */
};
-static asn_TYPE_tag2member_t asn_MAP_Stuff_1_tag2el_cxer[] = {
+static asn_TYPE_tag2member_t asn_MAP_Stuff_tag2el_cxer_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* trees at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* anything at 34 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 } /* a at 26 */
};
-static uint8_t asn_MAP_Stuff_1_mmap[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Stuff_mmap_1[(3 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7) | (0 << 6) | (0 << 5)
};
-static asn_SET_specifics_t asn_SPC_Stuff_1_specs = {
+static asn_SET_specifics_t asn_SPC_Stuff_specs_1 = {
sizeof(struct Stuff),
offsetof(struct Stuff, _asn_ctx),
offsetof(struct Stuff, _presence_map),
- asn_MAP_Stuff_1_tag2el,
+ asn_MAP_Stuff_tag2el_1,
4, /* Count of tags in the map */
- asn_MAP_Stuff_1_tag2el_cxer,
+ asn_MAP_Stuff_tag2el_cxer_1,
3, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_Stuff_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Stuff_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Stuff = {
"Stuff",
@@ -469,15 +506,182 @@ asn_TYPE_descriptor_t asn_DEF_Stuff = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Stuff_1_tags,
- sizeof(asn_DEF_Stuff_1_tags)
- /sizeof(asn_DEF_Stuff_1_tags[0]), /* 1 */
- asn_DEF_Stuff_1_tags, /* Same as above */
- sizeof(asn_DEF_Stuff_1_tags)
- /sizeof(asn_DEF_Stuff_1_tags[0]), /* 1 */
+ asn_DEF_Stuff_tags_1,
+ sizeof(asn_DEF_Stuff_tags_1)
+ /sizeof(asn_DEF_Stuff_tags_1[0]), /* 1 */
+ asn_DEF_Stuff_tags_1, /* Same as above */
+ sizeof(asn_DEF_Stuff_tags_1)
+ /sizeof(asn_DEF_Stuff_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Stuff_1,
3, /* Elements count */
- &asn_SPC_Stuff_1_specs /* Additional specs */
+ &asn_SPC_Stuff_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [SSS] >>> ***/
+
+#include <asn_SEQUENCE_OF.h>
+#include <asn_SET_OF.h>
+#include <BIT_STRING.h>
+#include <constr_SEQUENCE_OF.h>
+#include <constr_SET_OF.h>
+
+/*** <<< TYPE-DECLS [SSS] >>> ***/
+
+typedef struct SSS {
+ A_SEQUENCE_OF(struct Member {
+ A_SET_OF(struct Member {
+ A_SEQUENCE_OF(BIT_STRING_t) list;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+ } ) list;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+ } ) list;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} SSS_t;
+
+/*** <<< FUNC-DECLS [SSS] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_SSS;
+
+/*** <<< STAT-DEFS [SSS] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_Member_3[] = {
+ { ATF_POINTER, 0, 0,
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BIT_STRING,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = ""
+ },
+};
+static ber_tlv_tag_t asn_DEF_Member_tags_3[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SET_OF_specifics_t asn_SPC_Member_specs_3 = {
+ sizeof(struct Member),
+ offsetof(struct Member, _asn_ctx),
+ 0, /* XER encoding is XMLDelimitedItemList */
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_Member_3 = {
+ "SEQUENCE OF",
+ "SEQUENCE_OF",
+ SEQUENCE_OF_free,
+ SEQUENCE_OF_print,
+ SEQUENCE_OF_constraint,
+ SEQUENCE_OF_decode_ber,
+ SEQUENCE_OF_encode_der,
+ SEQUENCE_OF_decode_xer,
+ SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Member_tags_3,
+ sizeof(asn_DEF_Member_tags_3)
+ /sizeof(asn_DEF_Member_tags_3[0]), /* 1 */
+ asn_DEF_Member_tags_3, /* Same as above */
+ sizeof(asn_DEF_Member_tags_3)
+ /sizeof(asn_DEF_Member_tags_3[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_Member_3,
+ 1, /* Single element */
+ &asn_SPC_Member_specs_3 /* Additional specs */
+};
+
+static asn_TYPE_member_t asn_MBR_Member_2[] = {
+ { ATF_POINTER, 0, 0,
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Member_3,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = ""
+ },
+};
+static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
+};
+static asn_SET_OF_specifics_t asn_SPC_Member_specs_2 = {
+ sizeof(struct Member),
+ offsetof(struct Member, _asn_ctx),
+ 0, /* XER encoding is XMLDelimitedItemList */
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_Member_2 = {
+ "SET OF",
+ "SET_OF",
+ SET_OF_free,
+ SET_OF_print,
+ SET_OF_constraint,
+ SET_OF_decode_ber,
+ SET_OF_encode_der,
+ SET_OF_decode_xer,
+ SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Member_tags_2,
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ asn_DEF_Member_tags_2, /* Same as above */
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_Member_2,
+ 1, /* Single element */
+ &asn_SPC_Member_specs_2 /* Additional specs */
+};
+
+static asn_TYPE_member_t asn_MBR_SSS_1[] = {
+ { ATF_POINTER, 0, 0,
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Member_2,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = ""
+ },
+};
+static ber_tlv_tag_t asn_DEF_SSS_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SET_OF_specifics_t asn_SPC_SSS_specs_1 = {
+ sizeof(struct SSS),
+ offsetof(struct SSS, _asn_ctx),
+ 0, /* XER encoding is XMLDelimitedItemList */
+};
+asn_TYPE_descriptor_t asn_DEF_SSS = {
+ "SSS",
+ "SSS",
+ SEQUENCE_OF_free,
+ SEQUENCE_OF_print,
+ SEQUENCE_OF_constraint,
+ SEQUENCE_OF_decode_ber,
+ SEQUENCE_OF_encode_der,
+ SEQUENCE_OF_decode_xer,
+ SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_SSS_tags_1,
+ sizeof(asn_DEF_SSS_tags_1)
+ /sizeof(asn_DEF_SSS_tags_1[0]), /* 1 */
+ asn_DEF_SSS_tags_1, /* Same as above */
+ sizeof(asn_DEF_SSS_tags_1)
+ /sizeof(asn_DEF_SSS_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_SSS_1,
+ 1, /* Single element */
+ &asn_SPC_SSS_specs_1 /* Additional specs */
};
diff --git a/tests/32-sequence-of-OK.asn1.-P b/tests/32-sequence-of-OK.asn1.-P
index 3e2354bd..fd34d5f4 100644
--- a/tests/32-sequence-of-OK.asn1.-P
+++ b/tests/32-sequence-of-OK.asn1.-P
@@ -33,13 +33,15 @@ static asn_TYPE_member_t asn_MBR_Programming_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Fault,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Programming_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Programming_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Programming_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Programming_specs_1 = {
sizeof(struct Programming),
offsetof(struct Programming, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -54,16 +56,18 @@ asn_TYPE_descriptor_t asn_DEF_Programming = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Programming_1_tags,
- sizeof(asn_DEF_Programming_1_tags)
- /sizeof(asn_DEF_Programming_1_tags[0]), /* 1 */
- asn_DEF_Programming_1_tags, /* Same as above */
- sizeof(asn_DEF_Programming_1_tags)
- /sizeof(asn_DEF_Programming_1_tags[0]), /* 1 */
+ asn_DEF_Programming_tags_1,
+ sizeof(asn_DEF_Programming_tags_1)
+ /sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
+ asn_DEF_Programming_tags_1, /* Same as above */
+ sizeof(asn_DEF_Programming_tags_1)
+ /sizeof(asn_DEF_Programming_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Programming_1,
1, /* Single element */
- &asn_SPC_Programming_1_specs /* Additional specs */
+ &asn_SPC_Programming_specs_1 /* Additional specs */
};
@@ -101,13 +105,15 @@ static asn_TYPE_member_t asn_MBR_Fault_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Error,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Fault_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Fault_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Fault_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Fault_specs_1 = {
sizeof(struct Fault),
offsetof(struct Fault, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -122,16 +128,18 @@ asn_TYPE_descriptor_t asn_DEF_Fault = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Fault_1_tags,
- sizeof(asn_DEF_Fault_1_tags)
- /sizeof(asn_DEF_Fault_1_tags[0]), /* 1 */
- asn_DEF_Fault_1_tags, /* Same as above */
- sizeof(asn_DEF_Fault_1_tags)
- /sizeof(asn_DEF_Fault_1_tags[0]), /* 1 */
+ asn_DEF_Fault_tags_1,
+ sizeof(asn_DEF_Fault_tags_1)
+ /sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
+ asn_DEF_Fault_tags_1, /* Same as above */
+ sizeof(asn_DEF_Fault_tags_1)
+ /sizeof(asn_DEF_Fault_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Fault_1,
1, /* Single element */
- &asn_SPC_Fault_1_specs /* Additional specs */
+ &asn_SPC_Fault_specs_1 /* Additional specs */
};
@@ -157,14 +165,15 @@ extern asn_TYPE_descriptor_t asn_DEF_Error;
/*** <<< STAT-DEFS [Error] >>> ***/
-static ber_tlv_tag_t asn_DEF_Error_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Error_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SEQUENCE_specifics_t asn_SPC_Error_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Error_specs_1 = {
sizeof(struct Error),
offsetof(struct Error, _asn_ctx),
0, /* No top level tags */
0, /* No tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -178,14 +187,16 @@ asn_TYPE_descriptor_t asn_DEF_Error = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Error_1_tags,
- sizeof(asn_DEF_Error_1_tags)
- /sizeof(asn_DEF_Error_1_tags[0]), /* 1 */
- asn_DEF_Error_1_tags, /* Same as above */
- sizeof(asn_DEF_Error_1_tags)
- /sizeof(asn_DEF_Error_1_tags[0]), /* 1 */
+ asn_DEF_Error_tags_1,
+ sizeof(asn_DEF_Error_tags_1)
+ /sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
+ asn_DEF_Error_tags_1, /* Same as above */
+ sizeof(asn_DEF_Error_tags_1)
+ /sizeof(asn_DEF_Error_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
- &asn_SPC_Error_1_specs /* Additional specs */
+ &asn_SPC_Error_specs_1 /* Additional specs */
};
diff --git a/tests/39-sequence-of-OK.asn1.-P b/tests/39-sequence-of-OK.asn1.-P
index 6339c4bf..0e4691cf 100644
--- a/tests/39-sequence-of-OK.asn1.-P
+++ b/tests/39-sequence-of-OK.asn1.-P
@@ -41,13 +41,15 @@ static asn_TYPE_member_t asn_MBR_collection_3[] = {
.tag_mode = 0,
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_collection_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_collection_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_collection_3_specs = {
+static asn_SET_OF_specifics_t asn_SPC_collection_specs_3 = {
sizeof(struct collection),
offsetof(struct collection, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -63,16 +65,18 @@ asn_TYPE_descriptor_t asn_DEF_collection_3 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_collection_3_tags,
- sizeof(asn_DEF_collection_3_tags)
- /sizeof(asn_DEF_collection_3_tags[0]), /* 1 */
- asn_DEF_collection_3_tags, /* Same as above */
- sizeof(asn_DEF_collection_3_tags)
- /sizeof(asn_DEF_collection_3_tags[0]), /* 1 */
+ asn_DEF_collection_tags_3,
+ sizeof(asn_DEF_collection_tags_3)
+ /sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
+ asn_DEF_collection_tags_3, /* Same as above */
+ sizeof(asn_DEF_collection_tags_3)
+ /sizeof(asn_DEF_collection_tags_3[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_collection_3,
1, /* Single element */
- &asn_SPC_collection_3_specs /* Additional specs */
+ &asn_SPC_collection_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_T_1[] = {
@@ -81,6 +85,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "int"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, collection),
@@ -88,21 +94,24 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_collection_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "collection"
},
};
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* collection at 17 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -116,16 +125,18 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
2, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
@@ -157,6 +168,8 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "flag"
},
{ ATF_NOFLAGS, 0, offsetof(struct T2, str),
@@ -164,21 +177,24 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "str"
},
};
-static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* flag at 20 */
{ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)), 1, 0, 0 } /* str at 21 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T2_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
- asn_MAP_T2_1_tag2el,
+ asn_MAP_T2_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -192,15 +208,17 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T2_1_tags,
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
- asn_DEF_T2_1_tags, /* Same as above */
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
+ asn_DEF_T2_tags_1,
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ asn_DEF_T2_tags_1, /* Same as above */
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T2_1,
2, /* Elements count */
- &asn_SPC_T2_1_specs /* Additional specs */
+ &asn_SPC_T2_specs_1 /* Additional specs */
};
diff --git a/tests/42-real-life-OK.asn1.-PR b/tests/42-real-life-OK.asn1.-PR
index cd462631..4c41f533 100644
--- a/tests/42-real-life-OK.asn1.-PR
+++ b/tests/42-real-life-OK.asn1.-PR
@@ -40,7 +40,7 @@ extern asn_TYPE_descriptor_t asn_DEF_LogLine;
/*** <<< CODE [LogLine] >>> ***/
static int
-memb_varsets_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_varsets_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
size_t size;
@@ -74,13 +74,15 @@ static asn_TYPE_member_t asn_MBR_varsets_3[] = {
.tag_mode = 0,
.type = &asn_DEF_VariablePartSet,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_varsets_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_varsets_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_varsets_3_specs = {
+static asn_SET_OF_specifics_t asn_SPC_varsets_specs_3 = {
sizeof(struct varsets),
offsetof(struct varsets, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -96,16 +98,18 @@ asn_TYPE_descriptor_t asn_DEF_varsets_3 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_varsets_3_tags,
- sizeof(asn_DEF_varsets_3_tags)
- /sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
- asn_DEF_varsets_3_tags, /* Same as above */
- sizeof(asn_DEF_varsets_3_tags)
- /sizeof(asn_DEF_varsets_3_tags[0]), /* 1 */
+ asn_DEF_varsets_tags_3,
+ sizeof(asn_DEF_varsets_tags_3)
+ /sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */
+ asn_DEF_varsets_tags_3, /* Same as above */
+ sizeof(asn_DEF_varsets_tags_3)
+ /sizeof(asn_DEF_varsets_tags_3[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_varsets_3,
1, /* Single element */
- &asn_SPC_varsets_3_specs /* Additional specs */
+ &asn_SPC_varsets_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_LogLine_1[] = {
@@ -114,28 +118,33 @@ static asn_TYPE_member_t asn_MBR_LogLine_1[] = {
.tag_mode = 0,
.type = &asn_DEF_IA5String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "line-digest"
},
{ ATF_NOFLAGS, 0, offsetof(struct LogLine, varsets),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
.type = &asn_DEF_varsets_3,
- .memb_constraints = memb_varsets_1_constraint,
+ .memb_constraints = memb_varsets_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "varsets"
},
};
-static ber_tlv_tag_t asn_DEF_LogLine_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_LogLine_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_LogLine_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_LogLine_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* varsets at 25 */
{ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)), 0, 0, 0 } /* line-digest at 23 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_LogLine_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_LogLine_specs_1 = {
sizeof(struct LogLine),
offsetof(struct LogLine, _asn_ctx),
- asn_MAP_LogLine_1_tag2el,
+ asn_MAP_LogLine_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@@ -149,16 +158,18 @@ asn_TYPE_descriptor_t asn_DEF_LogLine = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_LogLine_1_tags,
- sizeof(asn_DEF_LogLine_1_tags)
- /sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
- asn_DEF_LogLine_1_tags, /* Same as above */
- sizeof(asn_DEF_LogLine_1_tags)
- /sizeof(asn_DEF_LogLine_1_tags[0]), /* 1 */
+ asn_DEF_LogLine_tags_1,
+ sizeof(asn_DEF_LogLine_tags_1)
+ /sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */
+ asn_DEF_LogLine_tags_1, /* Same as above */
+ sizeof(asn_DEF_LogLine_tags_1)
+ /sizeof(asn_DEF_LogLine_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_LogLine_1,
2, /* Elements count */
- &asn_SPC_LogLine_1_specs /* Additional specs */
+ &asn_SPC_LogLine_specs_1 /* Additional specs */
};
@@ -203,7 +214,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePartSet;
/*** <<< CODE [VariablePartSet] >>> ***/
static int
-memb_vparts_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_vparts_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
if(!sptr) {
@@ -230,13 +241,15 @@ static asn_TYPE_member_t asn_MBR_vparts_2[] = {
.tag_mode = 0,
.type = &asn_DEF_VariablePart,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_vparts_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_vparts_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_vparts_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_vparts_specs_2 = {
sizeof(struct vparts),
offsetof(struct vparts, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -252,16 +265,18 @@ asn_TYPE_descriptor_t asn_DEF_vparts_2 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_vparts_2_tags,
- sizeof(asn_DEF_vparts_2_tags)
- /sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
- asn_DEF_vparts_2_tags, /* Same as above */
- sizeof(asn_DEF_vparts_2_tags)
- /sizeof(asn_DEF_vparts_2_tags[0]), /* 1 */
+ asn_DEF_vparts_tags_2,
+ sizeof(asn_DEF_vparts_tags_2)
+ /sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */
+ asn_DEF_vparts_tags_2, /* Same as above */
+ sizeof(asn_DEF_vparts_tags_2)
+ /sizeof(asn_DEF_vparts_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_vparts_2,
1, /* Single element */
- &asn_SPC_vparts_2_specs /* Additional specs */
+ &asn_SPC_vparts_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
@@ -269,7 +284,9 @@ static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
.tag_mode = 0,
.type = &asn_DEF_vparts_2,
- .memb_constraints = memb_vparts_1_constraint,
+ .memb_constraints = memb_vparts_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "vparts"
},
{ ATF_NOFLAGS, 0, offsetof(struct VariablePartSet, resolution),
@@ -277,21 +294,24 @@ static asn_TYPE_member_t asn_MBR_VariablePartSet_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ActionItem,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "resolution"
},
};
-static ber_tlv_tag_t asn_DEF_VariablePartSet_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_VariablePartSet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_VariablePartSet_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* vparts at 33 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* resolution at 35 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_VariablePartSet_specs_1 = {
sizeof(struct VariablePartSet),
offsetof(struct VariablePartSet, _asn_ctx),
- asn_MAP_VariablePartSet_1_tag2el,
+ asn_MAP_VariablePartSet_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@@ -305,16 +325,18 @@ asn_TYPE_descriptor_t asn_DEF_VariablePartSet = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_VariablePartSet_1_tags,
- sizeof(asn_DEF_VariablePartSet_1_tags)
- /sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
- asn_DEF_VariablePartSet_1_tags, /* Same as above */
- sizeof(asn_DEF_VariablePartSet_1_tags)
- /sizeof(asn_DEF_VariablePartSet_1_tags[0]), /* 1 */
+ asn_DEF_VariablePartSet_tags_1,
+ sizeof(asn_DEF_VariablePartSet_tags_1)
+ /sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */
+ asn_DEF_VariablePartSet_tags_1, /* Same as above */
+ sizeof(asn_DEF_VariablePartSet_tags_1)
+ /sizeof(asn_DEF_VariablePartSet_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_VariablePartSet_1,
2, /* Elements count */
- &asn_SPC_VariablePartSet_1_specs /* Additional specs */
+ &asn_SPC_VariablePartSet_specs_1 /* Additional specs */
};
@@ -374,7 +396,7 @@ extern asn_TYPE_descriptor_t asn_DEF_VariablePart;
/*** <<< CODE [VariablePart] >>> ***/
static int
-memb_vset_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_vset_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
size_t size;
@@ -408,13 +430,15 @@ static asn_TYPE_member_t asn_MBR_vset_2[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_vset_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_vset_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_vset_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_vset_specs_2 = {
sizeof(struct vset),
offsetof(struct vset, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -430,16 +454,18 @@ asn_TYPE_descriptor_t asn_DEF_vset_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_vset_2_tags,
- sizeof(asn_DEF_vset_2_tags)
- /sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
- asn_DEF_vset_2_tags, /* Same as above */
- sizeof(asn_DEF_vset_2_tags)
- /sizeof(asn_DEF_vset_2_tags[0]), /* 1 */
+ asn_DEF_vset_tags_2,
+ sizeof(asn_DEF_vset_tags_2)
+ /sizeof(asn_DEF_vset_tags_2[0]), /* 1 */
+ asn_DEF_vset_tags_2, /* Same as above */
+ sizeof(asn_DEF_vset_tags_2)
+ /sizeof(asn_DEF_vset_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_vset_2,
1, /* Single element */
- &asn_SPC_vset_2_specs /* Additional specs */
+ &asn_SPC_vset_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_vrange_4[] = {
@@ -448,6 +474,8 @@ static asn_TYPE_member_t asn_MBR_vrange_4[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "from"
},
{ ATF_NOFLAGS, 0, offsetof(struct vrange, to),
@@ -455,21 +483,24 @@ static asn_TYPE_member_t asn_MBR_vrange_4[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "to"
},
};
-static ber_tlv_tag_t asn_DEF_vrange_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_vrange_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_vrange_4_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_vrange_tag2el_4[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 0, 0, 1 }, /* from at 45 */
{ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2)), 1, -1, 0 } /* to at 46 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_vrange_4_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_vrange_specs_4 = {
sizeof(struct vrange),
offsetof(struct vrange, _asn_ctx),
- asn_MAP_vrange_4_tag2el,
+ asn_MAP_vrange_tag2el_4,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@@ -484,16 +515,18 @@ asn_TYPE_descriptor_t asn_DEF_vrange_4 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_vrange_4_tags,
- sizeof(asn_DEF_vrange_4_tags)
- /sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
- asn_DEF_vrange_4_tags, /* Same as above */
- sizeof(asn_DEF_vrange_4_tags)
- /sizeof(asn_DEF_vrange_4_tags[0]), /* 1 */
+ asn_DEF_vrange_tags_4,
+ sizeof(asn_DEF_vrange_tags_4)
+ /sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */
+ asn_DEF_vrange_tags_4, /* Same as above */
+ sizeof(asn_DEF_vrange_tags_4)
+ /sizeof(asn_DEF_vrange_tags_4[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_vrange_4,
2, /* Elements count */
- &asn_SPC_vrange_4_specs /* Additional specs */
+ &asn_SPC_vrange_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
@@ -501,7 +534,9 @@ static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
.tag_mode = 0,
.type = &asn_DEF_vset_2,
- .memb_constraints = memb_vset_1_constraint,
+ .memb_constraints = memb_vset_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "vset"
},
{ ATF_NOFLAGS, 0, offsetof(struct VariablePart, choice.vrange),
@@ -509,21 +544,24 @@ static asn_TYPE_member_t asn_MBR_VariablePart_1[] = {
.tag_mode = 0,
.type = &asn_DEF_vrange_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "vrange"
},
};
-static asn_TYPE_tag2member_t asn_MAP_VariablePart_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_VariablePart_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* vset at 42 */
};
-static asn_CHOICE_specifics_t asn_SPC_VariablePart_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_VariablePart_specs_1 = {
sizeof(struct VariablePart),
offsetof(struct VariablePart, _asn_ctx),
offsetof(struct VariablePart, present),
sizeof(((struct VariablePart *)0)->present),
- asn_MAP_VariablePart_1_tag2el,
+ asn_MAP_VariablePart_tag2el_1,
2, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 2 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_VariablePart = {
"VariablePart",
@@ -535,14 +573,16 @@ asn_TYPE_descriptor_t asn_DEF_VariablePart = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_VariablePart_1,
2, /* Elements count */
- &asn_SPC_VariablePart_1_specs /* Additional specs */
+ &asn_SPC_VariablePart_specs_1 /* Additional specs */
};
@@ -622,6 +662,9 @@ accept_as_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -674,26 +717,26 @@ accept_as_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [ActionItem] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_accept_as_2_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_accept_as_value2enum_2[] = {
{ 0, 7, "unknown" },
{ 1, 4, "safe" },
{ 2, 6, "unsafe" }
/* This list is extensible */
};
-static unsigned int asn_MAP_accept_as_2_enum2value[] = {
+static unsigned int asn_MAP_accept_as_enum2value_2[] = {
1, /* safe(1) */
0, /* unknown(0) */
2 /* unsafe(2) */
/* This list is extensible */
};
-static asn_INTEGER_specifics_t asn_SPC_accept_as_2_specs = {
- asn_MAP_accept_as_2_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_accept_as_2_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_accept_as_specs_2 = {
+ asn_MAP_accept_as_value2enum_2, /* "tag" => N; sorted by tag */
+ asn_MAP_accept_as_enum2value_2, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
- 1, /* Enumeration is extensible */
+ 4, /* Extensions before this member */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_accept_as_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_accept_as_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
@@ -707,15 +750,17 @@ asn_TYPE_descriptor_t asn_DEF_accept_as_2 = {
accept_as_2_encode_der,
accept_as_2_decode_xer,
accept_as_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_accept_as_2_tags,
- sizeof(asn_DEF_accept_as_2_tags)
- /sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
- asn_DEF_accept_as_2_tags, /* Same as above */
- sizeof(asn_DEF_accept_as_2_tags)
- /sizeof(asn_DEF_accept_as_2_tags[0]), /* 1 */
+ asn_DEF_accept_as_tags_2,
+ sizeof(asn_DEF_accept_as_tags_2)
+ /sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */
+ asn_DEF_accept_as_tags_2, /* Same as above */
+ sizeof(asn_DEF_accept_as_tags_2)
+ /sizeof(asn_DEF_accept_as_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_accept_as_2_specs /* Additional specs */
+ &asn_SPC_accept_as_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_email_9[] = {
@@ -724,13 +769,15 @@ static asn_TYPE_member_t asn_MBR_email_9[] = {
.tag_mode = 0,
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_email_9_tags[] = {
+static ber_tlv_tag_t asn_DEF_email_tags_9[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_email_9_specs = {
+static asn_SET_OF_specifics_t asn_SPC_email_specs_9 = {
sizeof(struct email),
offsetof(struct email, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -746,16 +793,18 @@ asn_TYPE_descriptor_t asn_DEF_email_9 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_email_9_tags,
- sizeof(asn_DEF_email_9_tags)
- /sizeof(asn_DEF_email_9_tags[0]), /* 1 */
- asn_DEF_email_9_tags, /* Same as above */
- sizeof(asn_DEF_email_9_tags)
- /sizeof(asn_DEF_email_9_tags[0]), /* 1 */
+ asn_DEF_email_tags_9,
+ sizeof(asn_DEF_email_tags_9)
+ /sizeof(asn_DEF_email_tags_9[0]), /* 1 */
+ asn_DEF_email_tags_9, /* Same as above */
+ sizeof(asn_DEF_email_tags_9)
+ /sizeof(asn_DEF_email_tags_9[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_email_9,
1, /* Single element */
- &asn_SPC_email_9_specs /* Additional specs */
+ &asn_SPC_email_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_notify_7[] = {
@@ -764,6 +813,8 @@ static asn_TYPE_member_t asn_MBR_notify_7[] = {
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "critical"
},
{ ATF_NOFLAGS, 0, offsetof(struct notify, email),
@@ -771,21 +822,24 @@ static asn_TYPE_member_t asn_MBR_notify_7[] = {
.tag_mode = 0,
.type = &asn_DEF_email_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "email"
},
};
-static ber_tlv_tag_t asn_DEF_notify_7_tags[] = {
+static ber_tlv_tag_t asn_DEF_notify_tags_7[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_notify_7_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_notify_tag2el_7[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 }, /* critical at 61 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* email at 62 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_notify_7_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_notify_specs_7 = {
sizeof(struct notify),
offsetof(struct notify, _asn_ctx),
- asn_MAP_notify_7_tag2el,
+ asn_MAP_notify_tag2el_7,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@@ -800,16 +854,18 @@ asn_TYPE_descriptor_t asn_DEF_notify_7 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_notify_7_tags,
- sizeof(asn_DEF_notify_7_tags)
- /sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
- asn_DEF_notify_7_tags, /* Same as above */
- sizeof(asn_DEF_notify_7_tags)
- /sizeof(asn_DEF_notify_7_tags[0]), /* 1 */
+ asn_DEF_notify_tags_7,
+ sizeof(asn_DEF_notify_tags_7)
+ /sizeof(asn_DEF_notify_tags_7[0]), /* 1 */
+ asn_DEF_notify_tags_7, /* Same as above */
+ sizeof(asn_DEF_notify_tags_7)
+ /sizeof(asn_DEF_notify_tags_7[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_notify_7,
2, /* Elements count */
- &asn_SPC_notify_7_specs /* Additional specs */
+ &asn_SPC_notify_specs_7 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
@@ -818,6 +874,8 @@ static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
.tag_mode = 0,
.type = &asn_DEF_accept_as_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "accept-as"
},
{ ATF_POINTER, 1, offsetof(struct ActionItem, notify),
@@ -825,21 +883,24 @@ static asn_TYPE_member_t asn_MBR_ActionItem_1[] = {
.tag_mode = 0,
.type = &asn_DEF_notify_7,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "notify"
},
};
-static ber_tlv_tag_t asn_DEF_ActionItem_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ActionItem_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ActionItem_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ActionItem_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 }, /* accept-as at 55 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 } /* notify at 61 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_ActionItem_specs_1 = {
sizeof(struct ActionItem),
offsetof(struct ActionItem, _asn_ctx),
- asn_MAP_ActionItem_1_tag2el,
+ asn_MAP_ActionItem_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
3 /* Stop extensions */
};
@@ -853,15 +914,17 @@ asn_TYPE_descriptor_t asn_DEF_ActionItem = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ActionItem_1_tags,
- sizeof(asn_DEF_ActionItem_1_tags)
- /sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
- asn_DEF_ActionItem_1_tags, /* Same as above */
- sizeof(asn_DEF_ActionItem_1_tags)
- /sizeof(asn_DEF_ActionItem_1_tags[0]), /* 1 */
+ asn_DEF_ActionItem_tags_1,
+ sizeof(asn_DEF_ActionItem_tags_1)
+ /sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */
+ asn_DEF_ActionItem_tags_1, /* Same as above */
+ sizeof(asn_DEF_ActionItem_tags_1)
+ /sizeof(asn_DEF_ActionItem_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ActionItem_1,
2, /* Elements count */
- &asn_SPC_ActionItem_1_specs /* Additional specs */
+ &asn_SPC_ActionItem_specs_1 /* Additional specs */
};
diff --git a/tests/43-recursion-OK.asn1.-P b/tests/43-recursion-OK.asn1.-P
index a3480364..2c4f3c77 100644
--- a/tests/43-recursion-OK.asn1.-P
+++ b/tests/43-recursion-OK.asn1.-P
@@ -50,13 +50,15 @@ static asn_TYPE_member_t asn_MBR_t_member1_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_t_member1_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_t_member1_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_t_member1_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_t_member1_specs_2 = {
sizeof(struct t_member1),
offsetof(struct t_member1, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -72,16 +74,18 @@ asn_TYPE_descriptor_t asn_DEF_t_member1_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_t_member1_2_tags,
- sizeof(asn_DEF_t_member1_2_tags)
- /sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
- asn_DEF_t_member1_2_tags, /* Same as above */
- sizeof(asn_DEF_t_member1_2_tags)
- /sizeof(asn_DEF_t_member1_2_tags[0]), /* 1 */
+ asn_DEF_t_member1_tags_2,
+ sizeof(asn_DEF_t_member1_tags_2)
+ /sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */
+ asn_DEF_t_member1_tags_2, /* Same as above */
+ sizeof(asn_DEF_t_member1_tags_2)
+ /sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_t_member1_2,
1, /* Single element */
- &asn_SPC_t_member1_2_specs /* Additional specs */
+ &asn_SPC_t_member1_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_t_member2_4[] = {
@@ -90,13 +94,15 @@ static asn_TYPE_member_t asn_MBR_t_member2_4[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_t_member2_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_t_member2_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_t_member2_4_specs = {
+static asn_SET_OF_specifics_t asn_SPC_t_member2_specs_4 = {
sizeof(struct t_member2),
offsetof(struct t_member2, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -112,16 +118,18 @@ asn_TYPE_descriptor_t asn_DEF_t_member2_4 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_t_member2_4_tags,
- sizeof(asn_DEF_t_member2_4_tags)
- /sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
- asn_DEF_t_member2_4_tags, /* Same as above */
- sizeof(asn_DEF_t_member2_4_tags)
- /sizeof(asn_DEF_t_member2_4_tags[0]), /* 1 */
+ asn_DEF_t_member2_tags_4,
+ sizeof(asn_DEF_t_member2_tags_4)
+ /sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */
+ asn_DEF_t_member2_tags_4, /* Same as above */
+ sizeof(asn_DEF_t_member2_tags_4)
+ /sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_t_member2_4,
1, /* Single element */
- &asn_SPC_t_member2_4_specs /* Additional specs */
+ &asn_SPC_t_member2_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
@@ -130,6 +138,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_t_member1_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t-member1"
},
{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2),
@@ -137,6 +147,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_t_member2_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t-member2"
},
{ ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3),
@@ -144,6 +156,8 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t-member3"
},
{ ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4),
@@ -151,23 +165,26 @@ static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t-member4"
},
};
-static ber_tlv_tag_t asn_DEF_Test_structure_1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 at 19 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 at 16 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 at 17 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 at 15 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1 = {
sizeof(struct Test_structure_1),
offsetof(struct Test_structure_1, _asn_ctx),
- asn_MAP_Test_structure_1_1_tag2el,
+ asn_MAP_Test_structure_1_tag2el_1,
4, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -181,16 +198,18 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_1 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Test_structure_1_1_tags,
- sizeof(asn_DEF_Test_structure_1_1_tags)
- /sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
- asn_DEF_Test_structure_1_1_tags, /* Same as above */
- sizeof(asn_DEF_Test_structure_1_1_tags)
- /sizeof(asn_DEF_Test_structure_1_1_tags[0]), /* 1 */
+ asn_DEF_Test_structure_1_tags_1,
+ sizeof(asn_DEF_Test_structure_1_tags_1)
+ /sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */
+ asn_DEF_Test_structure_1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Test_structure_1_tags_1)
+ /sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Test_structure_1_1,
4, /* Elements count */
- &asn_SPC_Test_structure_1_1_specs /* Additional specs */
+ &asn_SPC_Test_structure_1_specs_1 /* Additional specs */
};
@@ -251,14 +270,16 @@ static asn_TYPE_member_t asn_MBR_or_3[] = {
.tag_mode = 0,
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_or_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_or_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_or_3_specs = {
+static asn_SET_OF_specifics_t asn_SPC_or_specs_3 = {
sizeof(struct or),
offsetof(struct or, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -274,16 +295,18 @@ asn_TYPE_descriptor_t asn_DEF_or_3 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_or_3_tags,
- sizeof(asn_DEF_or_3_tags)
- /sizeof(asn_DEF_or_3_tags[0]) - 1, /* 1 */
- asn_DEF_or_3_tags, /* Same as above */
- sizeof(asn_DEF_or_3_tags)
- /sizeof(asn_DEF_or_3_tags[0]), /* 2 */
+ asn_DEF_or_tags_3,
+ sizeof(asn_DEF_or_tags_3)
+ /sizeof(asn_DEF_or_tags_3[0]) - 1, /* 1 */
+ asn_DEF_or_tags_3, /* Same as above */
+ sizeof(asn_DEF_or_tags_3)
+ /sizeof(asn_DEF_or_tags_3[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_or_3,
1, /* Single element */
- &asn_SPC_or_3_specs /* Additional specs */
+ &asn_SPC_or_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
@@ -292,6 +315,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "and"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.or),
@@ -299,6 +324,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_or_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "or"
},
{ ATF_POINTER, 0, offsetof(struct Choice_1, choice.not),
@@ -306,6 +333,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice_1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "not"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other),
@@ -313,23 +342,26 @@ static asn_TYPE_member_t asn_MBR_Choice_1_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "other"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice_1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and at 22 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other at 26 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice_1_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1 = {
sizeof(struct Choice_1),
offsetof(struct Choice_1, _asn_ctx),
offsetof(struct Choice_1, present),
sizeof(((struct Choice_1 *)0)->present),
- asn_MAP_Choice_1_1_tag2el,
+ asn_MAP_Choice_1_tag2el_1,
4, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
"Choice-1",
@@ -341,14 +373,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice_1 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice_1_1,
4, /* Elements count */
- &asn_SPC_Choice_1_1_specs /* Additional specs */
+ &asn_SPC_Choice_1_specs_1 /* Additional specs */
};
@@ -399,28 +433,30 @@ static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m1"
},
};
-static ber_tlv_tag_t asn_DEF_Test_structure_2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 28 */
};
-static uint8_t asn_MAP_Test_structure_2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Test_structure_2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
-static asn_SET_specifics_t asn_SPC_Test_structure_2_1_specs = {
+static asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1 = {
sizeof(struct Test_structure_2),
offsetof(struct Test_structure_2, _asn_ctx),
offsetof(struct Test_structure_2, _presence_map),
- asn_MAP_Test_structure_2_1_tag2el,
+ asn_MAP_Test_structure_2_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_Test_structure_2_1_tag2el, /* Same as above */
+ asn_MAP_Test_structure_2_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_Test_structure_2_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Test_structure_2_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
"Test-structure-2",
@@ -432,16 +468,18 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Test_structure_2_1_tags,
- sizeof(asn_DEF_Test_structure_2_1_tags)
- /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
- asn_DEF_Test_structure_2_1_tags, /* Same as above */
- sizeof(asn_DEF_Test_structure_2_1_tags)
- /sizeof(asn_DEF_Test_structure_2_1_tags[0]), /* 1 */
+ asn_DEF_Test_structure_2_tags_1,
+ sizeof(asn_DEF_Test_structure_2_tags_1)
+ /sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */
+ asn_DEF_Test_structure_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Test_structure_2_tags_1)
+ /sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Test_structure_2_1,
1, /* Elements count */
- &asn_SPC_Test_structure_2_1_specs /* Additional specs */
+ &asn_SPC_Test_structure_2_specs_1 /* Additional specs */
};
@@ -492,28 +530,30 @@ static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Test_structure_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m1"
},
};
-static ber_tlv_tag_t asn_DEF_Test_structure_3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Test_structure_3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Test_structure_3_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 at 29 */
};
-static uint8_t asn_MAP_Test_structure_3_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Test_structure_3_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7)
};
-static asn_SET_specifics_t asn_SPC_Test_structure_3_1_specs = {
+static asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1 = {
sizeof(struct Test_structure_3),
offsetof(struct Test_structure_3, _asn_ctx),
offsetof(struct Test_structure_3, _presence_map),
- asn_MAP_Test_structure_3_1_tag2el,
+ asn_MAP_Test_structure_3_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_Test_structure_3_1_tag2el, /* Same as above */
+ asn_MAP_Test_structure_3_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_Test_structure_3_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Test_structure_3_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
"Test-structure-3",
@@ -525,15 +565,17 @@ asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Test_structure_3_1_tags,
- sizeof(asn_DEF_Test_structure_3_1_tags)
- /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
- asn_DEF_Test_structure_3_1_tags, /* Same as above */
- sizeof(asn_DEF_Test_structure_3_1_tags)
- /sizeof(asn_DEF_Test_structure_3_1_tags[0]), /* 1 */
+ asn_DEF_Test_structure_3_tags_1,
+ sizeof(asn_DEF_Test_structure_3_tags_1)
+ /sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */
+ asn_DEF_Test_structure_3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Test_structure_3_tags_1)
+ /sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Test_structure_3_1,
1, /* Elements count */
- &asn_SPC_Test_structure_3_1_specs /* Additional specs */
+ &asn_SPC_Test_structure_3_specs_1 /* Additional specs */
};
diff --git a/tests/44-choice-in-sequence-OK.asn1.-P b/tests/44-choice-in-sequence-OK.asn1.-P
index 28578eef..01214071 100644
--- a/tests/44-choice-in-sequence-OK.asn1.-P
+++ b/tests/44-choice-in-sequence-OK.asn1.-P
@@ -76,6 +76,8 @@ static asn_TYPE_member_t asn_MBR_e_6[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "f"
},
{ ATF_NOFLAGS, 0, offsetof(struct e, choice.g),
@@ -83,21 +85,24 @@ static asn_TYPE_member_t asn_MBR_e_6[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
};
-static asn_TYPE_tag2member_t asn_MAP_e_6_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_e_tag2el_6[] = {
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 0, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 } /* g at 21 */
};
-static asn_CHOICE_specifics_t asn_SPC_e_6_specs = {
+static asn_CHOICE_specifics_t asn_SPC_e_specs_6 = {
sizeof(struct e),
offsetof(struct e, _asn_ctx),
offsetof(struct e, present),
sizeof(((struct e *)0)->present),
- asn_MAP_e_6_tag2el,
+ asn_MAP_e_tag2el_6,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_e_6 = {
@@ -110,14 +115,16 @@ asn_TYPE_descriptor_t asn_DEF_e_6 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_e_6,
2, /* Elements count */
- &asn_SPC_e_6_specs /* Additional specs */
+ &asn_SPC_e_specs_6 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_h_9[] = {
@@ -126,6 +133,8 @@ static asn_TYPE_member_t asn_MBR_h_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
{ ATF_NOFLAGS, 0, offsetof(struct h, choice.j),
@@ -133,21 +142,24 @@ static asn_TYPE_member_t asn_MBR_h_9[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "j"
},
};
-static asn_TYPE_tag2member_t asn_MAP_h_9_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_h_tag2el_9[] = {
{ (ASN_TAG_CLASS_PRIVATE | (1 << 2)), 0, 0, 0 }, /* i at 24 */
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 1, 0, 0 } /* j at 25 */
};
-static asn_CHOICE_specifics_t asn_SPC_h_9_specs = {
+static asn_CHOICE_specifics_t asn_SPC_h_specs_9 = {
sizeof(struct h),
offsetof(struct h, _asn_ctx),
offsetof(struct h, present),
sizeof(((struct h *)0)->present),
- asn_MAP_h_9_tag2el,
+ asn_MAP_h_tag2el_9,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_h_9 = {
@@ -160,14 +172,16 @@ asn_TYPE_descriptor_t asn_DEF_h_9 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_h_9,
2, /* Elements count */
- &asn_SPC_h_9_specs /* Additional specs */
+ &asn_SPC_h_specs_9 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_b_3[] = {
@@ -176,6 +190,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "c"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.d),
@@ -183,6 +199,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "d"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.e),
@@ -190,6 +208,8 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = 0,
.type = &asn_DEF_e_6,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "e"
},
{ ATF_NOFLAGS, 0, offsetof(struct b, choice.h),
@@ -197,24 +217,27 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_h_9,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "h"
},
};
-static asn_TYPE_tag2member_t asn_MAP_b_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = {
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 0, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
{ (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 2, 0, 0 }, /* f at 20 */
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 2, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 3, 0, 0 } /* h at 24 */
};
-static asn_CHOICE_specifics_t asn_SPC_b_3_specs = {
+static asn_CHOICE_specifics_t asn_SPC_b_specs_3 = {
sizeof(struct b),
offsetof(struct b, _asn_ctx),
offsetof(struct b, present),
sizeof(((struct b *)0)->present),
- asn_MAP_b_3_tag2el,
+ asn_MAP_b_tag2el_3,
5, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_b_3 = {
@@ -227,14 +250,16 @@ asn_TYPE_descriptor_t asn_DEF_b_3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_b_3,
4, /* Elements count */
- &asn_SPC_b_3_specs /* Additional specs */
+ &asn_SPC_b_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_T_1[] = {
@@ -243,6 +268,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, b),
@@ -250,14 +277,16 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_b_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_PRIVATE | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_PRIVATE | (2 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_PRIVATE | (5 << 2)), 1, 0, 0 }, /* c at 17 */
{ (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 1, 0, 0 }, /* d at 18 */
@@ -265,11 +294,12 @@ static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
{ (ASN_TAG_CLASS_PRIVATE | (8 << 2)), 1, 0, 0 }, /* g at 21 */
{ (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 1, 0, 0 } /* h at 24 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
6, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -283,15 +313,17 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]) - 1, /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 2 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
2, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
diff --git a/tests/46-redefine-OK.asn1.-PR b/tests/46-redefine-OK.asn1.-PR
index 9521de29..449707e2 100644
--- a/tests/46-redefine-OK.asn1.-PR
+++ b/tests/46-redefine-OK.asn1.-PR
@@ -40,6 +40,9 @@ PrimitiveType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_OCTET_STRING.der_encoder;
td->xer_decoder = asn_DEF_OCTET_STRING.xer_decoder;
td->xer_encoder = asn_DEF_OCTET_STRING.xer_encoder;
+ td->uper_decoder = asn_DEF_OCTET_STRING.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_OCTET_STRING.per_constraints;
td->elements = asn_DEF_OCTET_STRING.elements;
td->elements_count = asn_DEF_OCTET_STRING.elements_count;
td->specifics = asn_DEF_OCTET_STRING.specifics;
@@ -92,7 +95,7 @@ PrimitiveType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [PrimitiveType] >>> ***/
-static ber_tlv_tag_t asn_DEF_PrimitiveType_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_PrimitiveType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
@@ -105,13 +108,15 @@ asn_TYPE_descriptor_t asn_DEF_PrimitiveType = {
PrimitiveType_encode_der,
PrimitiveType_decode_xer,
PrimitiveType_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_PrimitiveType_1_tags,
- sizeof(asn_DEF_PrimitiveType_1_tags)
- /sizeof(asn_DEF_PrimitiveType_1_tags[0]), /* 1 */
- asn_DEF_PrimitiveType_1_tags, /* Same as above */
- sizeof(asn_DEF_PrimitiveType_1_tags)
- /sizeof(asn_DEF_PrimitiveType_1_tags[0]), /* 1 */
+ asn_DEF_PrimitiveType_tags_1,
+ sizeof(asn_DEF_PrimitiveType_tags_1)
+ /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
+ asn_DEF_PrimitiveType_tags_1, /* Same as above */
+ sizeof(asn_DEF_PrimitiveType_tags_1)
+ /sizeof(asn_DEF_PrimitiveType_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -143,20 +148,23 @@ static asn_TYPE_member_t asn_MBR_ConstructedType_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_PrimitiveType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "field"
},
};
-static ber_tlv_tag_t asn_DEF_ConstructedType_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ConstructedType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ConstructedType_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ConstructedType_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 0, 0, 0 } /* field at 18 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_ConstructedType_specs_1 = {
sizeof(struct ConstructedType),
offsetof(struct ConstructedType, _asn_ctx),
- asn_MAP_ConstructedType_1_tag2el,
+ asn_MAP_ConstructedType_tag2el_1,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -170,16 +178,18 @@ asn_TYPE_descriptor_t asn_DEF_ConstructedType = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ConstructedType_1_tags,
- sizeof(asn_DEF_ConstructedType_1_tags)
- /sizeof(asn_DEF_ConstructedType_1_tags[0]), /* 1 */
- asn_DEF_ConstructedType_1_tags, /* Same as above */
- sizeof(asn_DEF_ConstructedType_1_tags)
- /sizeof(asn_DEF_ConstructedType_1_tags[0]), /* 1 */
+ asn_DEF_ConstructedType_tags_1,
+ sizeof(asn_DEF_ConstructedType_tags_1)
+ /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
+ asn_DEF_ConstructedType_tags_1, /* Same as above */
+ sizeof(asn_DEF_ConstructedType_tags_1)
+ /sizeof(asn_DEF_ConstructedType_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ConstructedType_1,
1, /* Elements count */
- &asn_SPC_ConstructedType_1_specs /* Additional specs */
+ &asn_SPC_ConstructedType_specs_1 /* Additional specs */
};
@@ -224,6 +234,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ConstructedType.der_encoder;
td->xer_decoder = asn_DEF_ConstructedType.xer_decoder;
td->xer_encoder = asn_DEF_ConstructedType.xer_encoder;
+ td->uper_decoder = asn_DEF_ConstructedType.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ConstructedType.per_constraints;
td->elements = asn_DEF_ConstructedType.elements;
td->elements_count = asn_DEF_ConstructedType.elements_count;
td->specifics = asn_DEF_ConstructedType.specifics;
@@ -276,7 +289,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
@@ -290,13 +303,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]) - 1, /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 2 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]) - 1, /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
diff --git a/tests/47-set-ext-OK.asn1.-P b/tests/47-set-ext-OK.asn1.-P
index 6c04656f..16863b91 100644
--- a/tests/47-set-ext-OK.asn1.-P
+++ b/tests/47-set-ext-OK.asn1.-P
@@ -43,28 +43,30 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
};
-static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 14 */
};
-static uint8_t asn_MAP_T1_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_T1_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_T1_1_specs = {
+static asn_SET_specifics_t asn_SPC_T1_specs_1 = {
sizeof(struct T1),
offsetof(struct T1, _asn_ctx),
offsetof(struct T1, _presence_map),
- asn_MAP_T1_1_tag2el,
+ asn_MAP_T1_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_T1_1_tag2el, /* Same as above */
+ asn_MAP_T1_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_T1_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_T1_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T1 = {
"T1",
@@ -76,16 +78,18 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T1_1_tags,
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
- asn_DEF_T1_1_tags, /* Same as above */
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
+ asn_DEF_T1_tags_1,
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
+ asn_DEF_T1_tags_1, /* Same as above */
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T1_1,
1, /* Elements count */
- &asn_SPC_T1_1_specs /* Additional specs */
+ &asn_SPC_T1_specs_1 /* Additional specs */
};
@@ -133,28 +137,30 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
};
-static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
};
-static uint8_t asn_MAP_T2_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_T2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_T2_1_specs = {
+static asn_SET_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
offsetof(struct T2, _presence_map),
- asn_MAP_T2_1_tag2el,
+ asn_MAP_T2_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_T2_1_tag2el, /* Same as above */
+ asn_MAP_T2_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_T2_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_T2_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_T2 = {
"T2",
@@ -166,16 +172,18 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T2_1_tags,
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
- asn_DEF_T2_1_tags, /* Same as above */
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
+ asn_DEF_T2_tags_1,
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ asn_DEF_T2_tags_1, /* Same as above */
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T2_1,
1, /* Elements count */
- &asn_SPC_T2_1_specs /* Additional specs */
+ &asn_SPC_T2_specs_1 /* Additional specs */
};
@@ -220,20 +228,23 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
};
-static asn_TYPE_tag2member_t asn_MAP_T3_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T3_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 16 */
};
-static asn_CHOICE_specifics_t asn_SPC_T3_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_T3_specs_1 = {
sizeof(struct T3),
offsetof(struct T3, _asn_ctx),
offsetof(struct T3, present),
sizeof(((struct T3 *)0)->present),
- asn_MAP_T3_1_tag2el,
+ asn_MAP_T3_tag2el_1,
1, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T3 = {
"T3",
@@ -245,14 +256,16 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_T3_1,
1, /* Elements count */
- &asn_SPC_T3_1_specs /* Additional specs */
+ &asn_SPC_T3_specs_1 /* Additional specs */
};
@@ -297,20 +310,23 @@ static asn_TYPE_member_t asn_MBR_T4_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
};
-static asn_TYPE_tag2member_t asn_MAP_T4_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T4_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 17 */
};
-static asn_CHOICE_specifics_t asn_SPC_T4_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_T4_specs_1 = {
sizeof(struct T4),
offsetof(struct T4, _asn_ctx),
offsetof(struct T4, present),
sizeof(((struct T4 *)0)->present),
- asn_MAP_T4_1_tag2el,
+ asn_MAP_T4_tag2el_1,
1, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T4 = {
"T4",
@@ -322,13 +338,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_T4_1,
1, /* Elements count */
- &asn_SPC_T4_1_specs /* Additional specs */
+ &asn_SPC_T4_specs_1 /* Additional specs */
};
diff --git a/tests/50-constraint-OK.asn1 b/tests/50-constraint-OK.asn1
index 85997ea8..62c4fdff 100644
--- a/tests/50-constraint-OK.asn1
+++ b/tests/50-constraint-OK.asn1
@@ -16,7 +16,7 @@ BEGIN
Int1 ::= INTEGER
Int2 ::= Int1 (0..MAX) -- X.680-0207::41.4.4
Int3 ::= Int2 (MIN..ten) -- Means (0..10)
- Int4 ::= Int3 (5..MAX,...,1..4) -- Means (5..10,...,1..4)
+ Int4 ::= Int3 (5..MAX,...,1..4) -- Means (1..10,...)
Int5 ::= Int4 (MIN..5) -- Means (5)
-- Int6 ::= INTEGER (Int5) -- -- Not yet supported
@@ -52,6 +52,23 @@ BEGIN
VisibleIdentifier ::= Identifier
+ Sequence ::= SEQUENCE {
+ int1-c Int1 (-2..MAX) DEFAULT 3,
+ int4 [2] Int4,
+ int4-c Int4 (MIN..7),
+ bool BOOLEAN DEFAULT 1,
+ enum-c ENUMERATED { one(1), two(2), ..., three(3) },
+ ...,
+ int5-c Int5 (5) OPTIONAL,
+ ...,
+ null NULL OPTIONAL
+ }
+
+ SequenceOf ::= SEQUENCE (SIZE(1..2)) OF Sequence
+
+ Enum0 ::= ENUMERATED { one, two }
+ Enum1 ::= ENUMERATED { one, two } (one)
+
END
diff --git a/tests/50-constraint-OK.asn1.-EFprint-constraints b/tests/50-constraint-OK.asn1.-EFprint-constraints
index a3adae02..2ac12852 100644
--- a/tests/50-constraint-OK.asn1.-EFprint-constraints
+++ b/tests/50-constraint-OK.asn1.-EFprint-constraints
Binary files differ
diff --git a/tests/50-constraint-OK.asn1.-P b/tests/50-constraint-OK.asn1.-P
index a3724de5..18ed9402 100644
--- a/tests/50-constraint-OK.asn1.-P
+++ b/tests/50-constraint-OK.asn1.-P
@@ -40,6 +40,9 @@ Int1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -92,7 +95,7 @@ Int1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Int1] >>> ***/
-static ber_tlv_tag_t asn_DEF_Int1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int1 = {
@@ -105,13 +108,15 @@ asn_TYPE_descriptor_t asn_DEF_Int1 = {
Int1_encode_der,
Int1_decode_xer,
Int1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Int1_1_tags,
- sizeof(asn_DEF_Int1_1_tags)
- /sizeof(asn_DEF_Int1_1_tags[0]), /* 1 */
- asn_DEF_Int1_1_tags, /* Same as above */
- sizeof(asn_DEF_Int1_1_tags)
- /sizeof(asn_DEF_Int1_1_tags[0]), /* 1 */
+ asn_DEF_Int1_tags_1,
+ sizeof(asn_DEF_Int1_tags_1)
+ /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
+ asn_DEF_Int1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int1_tags_1)
+ /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -177,6 +182,9 @@ Int2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Int1.der_encoder;
td->xer_decoder = asn_DEF_Int1.xer_decoder;
td->xer_encoder = asn_DEF_Int1.xer_encoder;
+ td->uper_decoder = asn_DEF_Int1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int1.per_constraints;
td->elements = asn_DEF_Int1.elements;
td->elements_count = asn_DEF_Int1.elements_count;
td->specifics = asn_DEF_Int1.specifics;
@@ -229,7 +237,7 @@ Int2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Int2] >>> ***/
-static ber_tlv_tag_t asn_DEF_Int2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int2 = {
@@ -242,13 +250,15 @@ asn_TYPE_descriptor_t asn_DEF_Int2 = {
Int2_encode_der,
Int2_decode_xer,
Int2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Int2_1_tags,
- sizeof(asn_DEF_Int2_1_tags)
- /sizeof(asn_DEF_Int2_1_tags[0]), /* 1 */
- asn_DEF_Int2_1_tags, /* Same as above */
- sizeof(asn_DEF_Int2_1_tags)
- /sizeof(asn_DEF_Int2_1_tags[0]), /* 1 */
+ asn_DEF_Int2_tags_1,
+ sizeof(asn_DEF_Int2_tags_1)
+ /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
+ asn_DEF_Int2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int2_tags_1)
+ /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -318,6 +328,9 @@ Int3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Int2.der_encoder;
td->xer_decoder = asn_DEF_Int2.xer_decoder;
td->xer_encoder = asn_DEF_Int2.xer_encoder;
+ td->uper_decoder = asn_DEF_Int2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int2.per_constraints;
td->elements = asn_DEF_Int2.elements;
td->elements_count = asn_DEF_Int2.elements_count;
td->specifics = asn_DEF_Int2.specifics;
@@ -370,7 +383,7 @@ Int3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Int3] >>> ***/
-static ber_tlv_tag_t asn_DEF_Int3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int3 = {
@@ -383,13 +396,15 @@ asn_TYPE_descriptor_t asn_DEF_Int3 = {
Int3_encode_der,
Int3_decode_xer,
Int3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Int3_1_tags,
- sizeof(asn_DEF_Int3_1_tags)
- /sizeof(asn_DEF_Int3_1_tags[0]), /* 1 */
- asn_DEF_Int3_1_tags, /* Same as above */
- sizeof(asn_DEF_Int3_1_tags)
- /sizeof(asn_DEF_Int3_1_tags[0]), /* 1 */
+ asn_DEF_Int3_tags_1,
+ sizeof(asn_DEF_Int3_tags_1)
+ /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
+ asn_DEF_Int3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int3_tags_1)
+ /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -459,6 +474,9 @@ Int4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Int3.der_encoder;
td->xer_decoder = asn_DEF_Int3.xer_decoder;
td->xer_encoder = asn_DEF_Int3.xer_encoder;
+ td->uper_decoder = asn_DEF_Int3.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int3.per_constraints;
td->elements = asn_DEF_Int3.elements;
td->elements_count = asn_DEF_Int3.elements_count;
td->specifics = asn_DEF_Int3.specifics;
@@ -511,7 +529,7 @@ Int4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Int4] >>> ***/
-static ber_tlv_tag_t asn_DEF_Int4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int4 = {
@@ -524,13 +542,15 @@ asn_TYPE_descriptor_t asn_DEF_Int4 = {
Int4_encode_der,
Int4_decode_xer,
Int4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Int4_1_tags,
- sizeof(asn_DEF_Int4_1_tags)
- /sizeof(asn_DEF_Int4_1_tags[0]), /* 1 */
- asn_DEF_Int4_1_tags, /* Same as above */
- sizeof(asn_DEF_Int4_1_tags)
- /sizeof(asn_DEF_Int4_1_tags[0]), /* 1 */
+ asn_DEF_Int4_tags_1,
+ sizeof(asn_DEF_Int4_tags_1)
+ /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
+ asn_DEF_Int4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int4_tags_1)
+ /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -600,6 +620,9 @@ Int5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Int4.der_encoder;
td->xer_decoder = asn_DEF_Int4.xer_decoder;
td->xer_encoder = asn_DEF_Int4.xer_encoder;
+ td->uper_decoder = asn_DEF_Int4.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int4.per_constraints;
td->elements = asn_DEF_Int4.elements;
td->elements_count = asn_DEF_Int4.elements_count;
td->specifics = asn_DEF_Int4.specifics;
@@ -652,7 +675,7 @@ Int5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Int5] >>> ***/
-static ber_tlv_tag_t asn_DEF_Int5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Int5 = {
@@ -665,13 +688,15 @@ asn_TYPE_descriptor_t asn_DEF_Int5 = {
Int5_encode_der,
Int5_decode_xer,
Int5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Int5_1_tags,
- sizeof(asn_DEF_Int5_1_tags)
- /sizeof(asn_DEF_Int5_1_tags[0]), /* 1 */
- asn_DEF_Int5_1_tags, /* Same as above */
- sizeof(asn_DEF_Int5_1_tags)
- /sizeof(asn_DEF_Int5_1_tags[0]), /* 1 */
+ asn_DEF_Int5_tags_1,
+ sizeof(asn_DEF_Int5_tags_1)
+ /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
+ asn_DEF_Int5_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int5_tags_1)
+ /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -741,6 +766,9 @@ ExtensibleExtensions_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -793,7 +821,7 @@ ExtensibleExtensions_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
-static ber_tlv_tag_t asn_DEF_ExtensibleExtensions_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
@@ -806,13 +834,15 @@ asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
ExtensibleExtensions_encode_der,
ExtensibleExtensions_decode_xer,
ExtensibleExtensions_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ExtensibleExtensions_1_tags,
- sizeof(asn_DEF_ExtensibleExtensions_1_tags)
- /sizeof(asn_DEF_ExtensibleExtensions_1_tags[0]), /* 1 */
- asn_DEF_ExtensibleExtensions_1_tags, /* Same as above */
- sizeof(asn_DEF_ExtensibleExtensions_1_tags)
- /sizeof(asn_DEF_ExtensibleExtensions_1_tags[0]), /* 1 */
+ asn_DEF_ExtensibleExtensions_tags_1,
+ sizeof(asn_DEF_ExtensibleExtensions_tags_1)
+ /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
+ asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
+ sizeof(asn_DEF_ExtensibleExtensions_tags_1)
+ /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -859,6 +889,9 @@ Str1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_IA5String.der_encoder;
td->xer_decoder = asn_DEF_IA5String.xer_decoder;
td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
td->elements = asn_DEF_IA5String.elements;
td->elements_count = asn_DEF_IA5String.elements_count;
td->specifics = asn_DEF_IA5String.specifics;
@@ -911,7 +944,7 @@ Str1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Str1] >>> ***/
-static ber_tlv_tag_t asn_DEF_Str1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str1 = {
@@ -924,13 +957,15 @@ asn_TYPE_descriptor_t asn_DEF_Str1 = {
Str1_encode_der,
Str1_decode_xer,
Str1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Str1_1_tags,
- sizeof(asn_DEF_Str1_1_tags)
- /sizeof(asn_DEF_Str1_1_tags[0]), /* 1 */
- asn_DEF_Str1_1_tags, /* Same as above */
- sizeof(asn_DEF_Str1_1_tags)
- /sizeof(asn_DEF_Str1_1_tags[0]), /* 1 */
+ asn_DEF_Str1_tags_1,
+ sizeof(asn_DEF_Str1_tags_1)
+ /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
+ asn_DEF_Str1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str1_tags_1)
+ /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1012,6 +1047,9 @@ Str2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Str1.der_encoder;
td->xer_decoder = asn_DEF_Str1.xer_decoder;
td->xer_encoder = asn_DEF_Str1.xer_encoder;
+ td->uper_decoder = asn_DEF_Str1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Str1.per_constraints;
td->elements = asn_DEF_Str1.elements;
td->elements_count = asn_DEF_Str1.elements_count;
td->specifics = asn_DEF_Str1.specifics;
@@ -1064,7 +1102,7 @@ Str2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Str2] >>> ***/
-static ber_tlv_tag_t asn_DEF_Str2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str2 = {
@@ -1077,13 +1115,15 @@ asn_TYPE_descriptor_t asn_DEF_Str2 = {
Str2_encode_der,
Str2_decode_xer,
Str2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Str2_1_tags,
- sizeof(asn_DEF_Str2_1_tags)
- /sizeof(asn_DEF_Str2_1_tags[0]), /* 1 */
- asn_DEF_Str2_1_tags, /* Same as above */
- sizeof(asn_DEF_Str2_1_tags)
- /sizeof(asn_DEF_Str2_1_tags[0]), /* 1 */
+ asn_DEF_Str2_tags_1,
+ sizeof(asn_DEF_Str2_tags_1)
+ /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
+ asn_DEF_Str2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str2_tags_1)
+ /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1176,6 +1216,9 @@ Str3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Str2.der_encoder;
td->xer_decoder = asn_DEF_Str2.xer_decoder;
td->xer_encoder = asn_DEF_Str2.xer_encoder;
+ td->uper_decoder = asn_DEF_Str2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Str2.per_constraints;
td->elements = asn_DEF_Str2.elements;
td->elements_count = asn_DEF_Str2.elements_count;
td->specifics = asn_DEF_Str2.specifics;
@@ -1228,7 +1271,7 @@ Str3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Str3] >>> ***/
-static ber_tlv_tag_t asn_DEF_Str3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str3 = {
@@ -1241,13 +1284,15 @@ asn_TYPE_descriptor_t asn_DEF_Str3 = {
Str3_encode_der,
Str3_decode_xer,
Str3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Str3_1_tags,
- sizeof(asn_DEF_Str3_1_tags)
- /sizeof(asn_DEF_Str3_1_tags[0]), /* 1 */
- asn_DEF_Str3_1_tags, /* Same as above */
- sizeof(asn_DEF_Str3_1_tags)
- /sizeof(asn_DEF_Str3_1_tags[0]), /* 1 */
+ asn_DEF_Str3_tags_1,
+ sizeof(asn_DEF_Str3_tags_1)
+ /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
+ asn_DEF_Str3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str3_tags_1)
+ /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1326,6 +1371,9 @@ Str4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_IA5String.der_encoder;
td->xer_decoder = asn_DEF_IA5String.xer_decoder;
td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
td->elements = asn_DEF_IA5String.elements;
td->elements_count = asn_DEF_IA5String.elements_count;
td->specifics = asn_DEF_IA5String.specifics;
@@ -1378,7 +1426,7 @@ Str4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Str4] >>> ***/
-static ber_tlv_tag_t asn_DEF_Str4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Str4 = {
@@ -1391,13 +1439,15 @@ asn_TYPE_descriptor_t asn_DEF_Str4 = {
Str4_encode_der,
Str4_decode_xer,
Str4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Str4_1_tags,
- sizeof(asn_DEF_Str4_1_tags)
- /sizeof(asn_DEF_Str4_1_tags[0]), /* 1 */
- asn_DEF_Str4_1_tags, /* Same as above */
- sizeof(asn_DEF_Str4_1_tags)
- /sizeof(asn_DEF_Str4_1_tags[0]), /* 1 */
+ asn_DEF_Str4_tags_1,
+ sizeof(asn_DEF_Str4_tags_1)
+ /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
+ asn_DEF_Str4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str4_tags_1)
+ /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1476,6 +1526,9 @@ PER_Visible_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_IA5String.der_encoder;
td->xer_decoder = asn_DEF_IA5String.xer_decoder;
td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
td->elements = asn_DEF_IA5String.elements;
td->elements_count = asn_DEF_IA5String.elements_count;
td->specifics = asn_DEF_IA5String.specifics;
@@ -1528,7 +1581,7 @@ PER_Visible_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [PER-Visible] >>> ***/
-static ber_tlv_tag_t asn_DEF_PER_Visible_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
@@ -1541,13 +1594,15 @@ asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
PER_Visible_encode_der,
PER_Visible_decode_xer,
PER_Visible_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_PER_Visible_1_tags,
- sizeof(asn_DEF_PER_Visible_1_tags)
- /sizeof(asn_DEF_PER_Visible_1_tags[0]), /* 1 */
- asn_DEF_PER_Visible_1_tags, /* Same as above */
- sizeof(asn_DEF_PER_Visible_1_tags)
- /sizeof(asn_DEF_PER_Visible_1_tags[0]), /* 1 */
+ asn_DEF_PER_Visible_tags_1,
+ sizeof(asn_DEF_PER_Visible_tags_1)
+ /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
+ asn_DEF_PER_Visible_tags_1, /* Same as above */
+ sizeof(asn_DEF_PER_Visible_tags_1)
+ /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1626,6 +1681,9 @@ PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -1678,7 +1736,7 @@ PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
-static ber_tlv_tag_t asn_DEF_PER_Visible_2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
@@ -1691,13 +1749,15 @@ asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
PER_Visible_2_encode_der,
PER_Visible_2_decode_xer,
PER_Visible_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_PER_Visible_2_1_tags,
- sizeof(asn_DEF_PER_Visible_2_1_tags)
- /sizeof(asn_DEF_PER_Visible_2_1_tags[0]), /* 1 */
- asn_DEF_PER_Visible_2_1_tags, /* Same as above */
- sizeof(asn_DEF_PER_Visible_2_1_tags)
- /sizeof(asn_DEF_PER_Visible_2_1_tags[0]), /* 1 */
+ asn_DEF_PER_Visible_2_tags_1,
+ sizeof(asn_DEF_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
+ asn_DEF_PER_Visible_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1776,6 +1836,9 @@ Not_PER_Visible_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -1828,7 +1891,7 @@ Not_PER_Visible_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
-static ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
@@ -1841,13 +1904,15 @@ asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
Not_PER_Visible_1_encode_der,
Not_PER_Visible_1_decode_xer,
Not_PER_Visible_1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Not_PER_Visible_1_1_tags,
- sizeof(asn_DEF_Not_PER_Visible_1_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_1_1_tags[0]), /* 1 */
- asn_DEF_Not_PER_Visible_1_1_tags, /* Same as above */
- sizeof(asn_DEF_Not_PER_Visible_1_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_1_1_tags[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_1_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1926,6 +1991,9 @@ Not_PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -1978,7 +2046,7 @@ Not_PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
-static ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
@@ -1991,13 +2059,15 @@ asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
Not_PER_Visible_2_encode_der,
Not_PER_Visible_2_decode_xer,
Not_PER_Visible_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Not_PER_Visible_2_1_tags,
- sizeof(asn_DEF_Not_PER_Visible_2_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_2_1_tags[0]), /* 1 */
- asn_DEF_Not_PER_Visible_2_1_tags, /* Same as above */
- sizeof(asn_DEF_Not_PER_Visible_2_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_2_1_tags[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_2_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2076,6 +2146,9 @@ Not_PER_Visible_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -2128,7 +2201,7 @@ Not_PER_Visible_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
-static ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
@@ -2141,13 +2214,15 @@ asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
Not_PER_Visible_3_encode_der,
Not_PER_Visible_3_decode_xer,
Not_PER_Visible_3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Not_PER_Visible_3_1_tags,
- sizeof(asn_DEF_Not_PER_Visible_3_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_3_1_tags[0]), /* 1 */
- asn_DEF_Not_PER_Visible_3_1_tags, /* Same as above */
- sizeof(asn_DEF_Not_PER_Visible_3_1_tags)
- /sizeof(asn_DEF_Not_PER_Visible_3_1_tags[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_3_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2229,6 +2304,9 @@ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -2281,7 +2359,7 @@ SIZE_but_not_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
-static ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
@@ -2294,13 +2372,15 @@ asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
SIZE_but_not_FROM_encode_der,
SIZE_but_not_FROM_decode_xer,
SIZE_but_not_FROM_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SIZE_but_not_FROM_1_tags,
- sizeof(asn_DEF_SIZE_but_not_FROM_1_tags)
- /sizeof(asn_DEF_SIZE_but_not_FROM_1_tags[0]), /* 1 */
- asn_DEF_SIZE_but_not_FROM_1_tags, /* Same as above */
- sizeof(asn_DEF_SIZE_but_not_FROM_1_tags)
- /sizeof(asn_DEF_SIZE_but_not_FROM_1_tags[0]), /* 1 */
+ asn_DEF_SIZE_but_not_FROM_tags_1,
+ sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
+ asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2382,6 +2462,9 @@ SIZE_and_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -2434,7 +2517,7 @@ SIZE_and_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
-static ber_tlv_tag_t asn_DEF_SIZE_and_FROM_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
@@ -2447,13 +2530,15 @@ asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
SIZE_and_FROM_encode_der,
SIZE_and_FROM_decode_xer,
SIZE_and_FROM_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SIZE_and_FROM_1_tags,
- sizeof(asn_DEF_SIZE_and_FROM_1_tags)
- /sizeof(asn_DEF_SIZE_and_FROM_1_tags[0]), /* 1 */
- asn_DEF_SIZE_and_FROM_1_tags, /* Same as above */
- sizeof(asn_DEF_SIZE_and_FROM_1_tags)
- /sizeof(asn_DEF_SIZE_and_FROM_1_tags[0]), /* 1 */
+ asn_DEF_SIZE_and_FROM_tags_1,
+ sizeof(asn_DEF_SIZE_and_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
+ asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_SIZE_and_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2532,6 +2617,9 @@ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_PER_Visible.der_encoder;
td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
td->elements = asn_DEF_PER_Visible.elements;
td->elements_count = asn_DEF_PER_Visible.elements_count;
td->specifics = asn_DEF_PER_Visible.specifics;
@@ -2584,7 +2672,7 @@ Neither_SIZE_nor_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
-static ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
@@ -2597,13 +2685,15 @@ asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
Neither_SIZE_nor_FROM_encode_der,
Neither_SIZE_nor_FROM_decode_xer,
Neither_SIZE_nor_FROM_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Neither_SIZE_nor_FROM_1_tags,
- sizeof(asn_DEF_Neither_SIZE_nor_FROM_1_tags)
- /sizeof(asn_DEF_Neither_SIZE_nor_FROM_1_tags[0]), /* 1 */
- asn_DEF_Neither_SIZE_nor_FROM_1_tags, /* Same as above */
- sizeof(asn_DEF_Neither_SIZE_nor_FROM_1_tags)
- /sizeof(asn_DEF_Neither_SIZE_nor_FROM_1_tags[0]), /* 1 */
+ asn_DEF_Neither_SIZE_nor_FROM_tags_1,
+ sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
+ /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
+ asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
+ /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2676,6 +2766,9 @@ Utf8_4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_UTF8String.der_encoder;
td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
+ td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_UTF8String.per_constraints;
td->elements = asn_DEF_UTF8String.elements;
td->elements_count = asn_DEF_UTF8String.elements_count;
td->specifics = asn_DEF_UTF8String.specifics;
@@ -2728,7 +2821,7 @@ Utf8_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Utf8-4] >>> ***/
-static ber_tlv_tag_t asn_DEF_Utf8_4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
@@ -2741,13 +2834,15 @@ asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
Utf8_4_encode_der,
Utf8_4_decode_xer,
Utf8_4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Utf8_4_1_tags,
- sizeof(asn_DEF_Utf8_4_1_tags)
- /sizeof(asn_DEF_Utf8_4_1_tags[0]), /* 1 */
- asn_DEF_Utf8_4_1_tags, /* Same as above */
- sizeof(asn_DEF_Utf8_4_1_tags)
- /sizeof(asn_DEF_Utf8_4_1_tags[0]), /* 1 */
+ asn_DEF_Utf8_4_tags_1,
+ sizeof(asn_DEF_Utf8_4_tags_1)
+ /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_4_tags_1)
+ /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2848,6 +2943,9 @@ Utf8_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Utf8_2.der_encoder;
td->xer_decoder = asn_DEF_Utf8_2.xer_decoder;
td->xer_encoder = asn_DEF_Utf8_2.xer_encoder;
+ td->uper_decoder = asn_DEF_Utf8_2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Utf8_2.per_constraints;
td->elements = asn_DEF_Utf8_2.elements;
td->elements_count = asn_DEF_Utf8_2.elements_count;
td->specifics = asn_DEF_Utf8_2.specifics;
@@ -2900,7 +2998,7 @@ Utf8_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Utf8-3] >>> ***/
-static ber_tlv_tag_t asn_DEF_Utf8_3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
@@ -2913,13 +3011,15 @@ asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
Utf8_3_encode_der,
Utf8_3_decode_xer,
Utf8_3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Utf8_3_1_tags,
- sizeof(asn_DEF_Utf8_3_1_tags)
- /sizeof(asn_DEF_Utf8_3_1_tags[0]), /* 1 */
- asn_DEF_Utf8_3_1_tags, /* Same as above */
- sizeof(asn_DEF_Utf8_3_1_tags)
- /sizeof(asn_DEF_Utf8_3_1_tags[0]), /* 1 */
+ asn_DEF_Utf8_3_tags_1,
+ sizeof(asn_DEF_Utf8_3_tags_1)
+ /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_3_tags_1)
+ /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2990,6 +3090,9 @@ Utf8_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Utf8_1.der_encoder;
td->xer_decoder = asn_DEF_Utf8_1.xer_decoder;
td->xer_encoder = asn_DEF_Utf8_1.xer_encoder;
+ td->uper_decoder = asn_DEF_Utf8_1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Utf8_1.per_constraints;
td->elements = asn_DEF_Utf8_1.elements;
td->elements_count = asn_DEF_Utf8_1.elements_count;
td->specifics = asn_DEF_Utf8_1.specifics;
@@ -3042,7 +3145,7 @@ Utf8_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Utf8-2] >>> ***/
-static ber_tlv_tag_t asn_DEF_Utf8_2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
@@ -3055,13 +3158,15 @@ asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
Utf8_2_encode_der,
Utf8_2_decode_xer,
Utf8_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Utf8_2_1_tags,
- sizeof(asn_DEF_Utf8_2_1_tags)
- /sizeof(asn_DEF_Utf8_2_1_tags[0]), /* 1 */
- asn_DEF_Utf8_2_1_tags, /* Same as above */
- sizeof(asn_DEF_Utf8_2_1_tags)
- /sizeof(asn_DEF_Utf8_2_1_tags[0]), /* 1 */
+ asn_DEF_Utf8_2_tags_1,
+ sizeof(asn_DEF_Utf8_2_tags_1)
+ /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_2_tags_1)
+ /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -3108,6 +3213,9 @@ Utf8_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_UTF8String.der_encoder;
td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
+ td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_UTF8String.per_constraints;
td->elements = asn_DEF_UTF8String.elements;
td->elements_count = asn_DEF_UTF8String.elements_count;
td->specifics = asn_DEF_UTF8String.specifics;
@@ -3160,7 +3268,7 @@ Utf8_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Utf8-1] >>> ***/
-static ber_tlv_tag_t asn_DEF_Utf8_1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
@@ -3173,13 +3281,15 @@ asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
Utf8_1_encode_der,
Utf8_1_decode_xer,
Utf8_1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Utf8_1_1_tags,
- sizeof(asn_DEF_Utf8_1_1_tags)
- /sizeof(asn_DEF_Utf8_1_1_tags[0]), /* 1 */
- asn_DEF_Utf8_1_1_tags, /* Same as above */
- sizeof(asn_DEF_Utf8_1_1_tags)
- /sizeof(asn_DEF_Utf8_1_1_tags[0]), /* 1 */
+ asn_DEF_Utf8_1_tags_1,
+ sizeof(asn_DEF_Utf8_1_tags_1)
+ /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_1_tags_1)
+ /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -3273,6 +3383,9 @@ VisibleIdentifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Identifier.der_encoder;
td->xer_decoder = asn_DEF_Identifier.xer_decoder;
td->xer_encoder = asn_DEF_Identifier.xer_encoder;
+ td->uper_decoder = asn_DEF_Identifier.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Identifier.per_constraints;
td->elements = asn_DEF_Identifier.elements;
td->elements_count = asn_DEF_Identifier.elements_count;
td->specifics = asn_DEF_Identifier.specifics;
@@ -3325,7 +3438,7 @@ VisibleIdentifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
-static ber_tlv_tag_t asn_DEF_VisibleIdentifier_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
};
asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
@@ -3338,18 +3451,794 @@ asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
VisibleIdentifier_encode_der,
VisibleIdentifier_decode_xer,
VisibleIdentifier_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_VisibleIdentifier_1_tags,
- sizeof(asn_DEF_VisibleIdentifier_1_tags)
- /sizeof(asn_DEF_VisibleIdentifier_1_tags[0]), /* 1 */
- asn_DEF_VisibleIdentifier_1_tags, /* Same as above */
- sizeof(asn_DEF_VisibleIdentifier_1_tags)
- /sizeof(asn_DEF_VisibleIdentifier_1_tags[0]), /* 1 */
+ asn_DEF_VisibleIdentifier_tags_1,
+ sizeof(asn_DEF_VisibleIdentifier_tags_1)
+ /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
+ asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
+ sizeof(asn_DEF_VisibleIdentifier_tags_1)
+ /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
+/*** <<< INCLUDES [Sequence] >>> ***/
+
+#include <Int1.h>
+#include <Int4.h>
+#include <BOOLEAN.h>
+#include <ENUMERATED.h>
+#include <NULL.h>
+#include <Int5.h>
+#include <constr_SEQUENCE.h>
+
+/*** <<< DEPS [Sequence] >>> ***/
+
+typedef enum enum_c {
+ enum_c_one = 1,
+ enum_c_two = 2,
+ /*
+ * Enumeration is extensible
+ */
+ enum_c_three = 3
+} enum_c_e;
+
+/*** <<< TYPE-DECLS [Sequence] >>> ***/
+
+typedef struct Sequence {
+ Int1_t *int1_c /* DEFAULT 3 */;
+ Int4_t int4;
+ Int4_t int4_c;
+ BOOLEAN_t *bool /* DEFAULT 1 */;
+ ENUMERATED_t enum_c;
+ NULL_t *null /* OPTIONAL */;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+ Int5_t *int5_c /* OPTIONAL */;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Sequence_t;
+
+/*** <<< FUNC-DECLS [Sequence] >>> ***/
+
+/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
+extern asn_TYPE_descriptor_t asn_DEF_Sequence;
+
+/*** <<< CODE [Sequence] >>> ***/
+
+static int
+enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using ENUMERATED,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+enum_c_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_ENUMERATED.free_struct;
+ td->print_struct = asn_DEF_ENUMERATED.print_struct;
+ td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
+ td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
+ td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
+ td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
+ td->elements = asn_DEF_ENUMERATED.elements;
+ td->elements_count = asn_DEF_ENUMERATED.elements_count;
+ /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
+}
+
+static void
+enum_c_6_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+static int
+enum_c_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+static asn_dec_rval_t
+enum_c_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+static asn_enc_rval_t
+enum_c_6_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+static asn_dec_rval_t
+enum_c_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+static asn_enc_rval_t
+enum_c_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+static int
+memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int1_t *st = (const Int1_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= -2)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+static int
+memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int4_t *st = (const Int4_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 5 && value <= 7)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+static int
+memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int5_t *st = (const Int5_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value == 5)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+
+/*** <<< STAT-DEFS [Sequence] >>> ***/
+
+static int asn_DFL_2_set_3(void **sptr) {
+ Int1_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 3 */
+ return asn_long2INTEGER(st, 3);
+}
+static int asn_DFL_5_set_1(void **sptr) {
+ BOOLEAN_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 1 */
+ *st = 1;
+ return 0;
+}
+static asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
+ { 1, 3, "one" },
+ { 2, 3, "two" },
+ { 3, 5, "three" }
+ /* This list is extensible */
+};
+static unsigned int asn_MAP_enum_c_enum2value_6[] = {
+ 0, /* one(1) */
+ 2, /* three(3) */
+ 1 /* two(2) */
+ /* This list is extensible */
+};
+static asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
+ asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
+ asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
+ 3, /* Number of elements in the maps */
+ 3, /* Extensions before this member */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
+ "enum-c",
+ "enum-c",
+ enum_c_6_free,
+ enum_c_6_print,
+ enum_c_6_constraint,
+ enum_c_6_decode_ber,
+ enum_c_6_encode_der,
+ enum_c_6_decode_xer,
+ enum_c_6_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_enum_c_tags_6,
+ sizeof(asn_DEF_enum_c_tags_6)
+ /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
+ asn_DEF_enum_c_tags_6, /* Same as above */
+ sizeof(asn_DEF_enum_c_tags_6)
+ /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_enum_c_specs_6 /* Additional specs */
+};
+
+static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
+ { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int1,
+ .memb_constraints = memb_int1_c_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
+ .name = "int1-c"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_Int4,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "int4"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int4,
+ .memb_constraints = memb_int4_c_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "int4-c"
+ },
+ { ATF_POINTER, 1, offsetof(struct Sequence, bool),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BOOLEAN,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
+ .name = "bool"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_enum_c_6,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "enum-c"
+ },
+ { ATF_POINTER, 2, offsetof(struct Sequence, null),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_NULL,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "null"
+ },
+ { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int5,
+ .memb_constraints = memb_int5_c_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "int5-c"
+ },
+};
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 59 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c at 56 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c at 58 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c at 62 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null at 64 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c at 60 */
+ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 at 57 */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
+ sizeof(struct Sequence),
+ offsetof(struct Sequence, _asn_ctx),
+ asn_MAP_Sequence_tag2el_1,
+ 7, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
+ 5, /* Start extensions */
+ 8 /* Stop extensions */
+};
+asn_TYPE_descriptor_t asn_DEF_Sequence = {
+ "Sequence",
+ "Sequence",
+ SEQUENCE_free,
+ SEQUENCE_print,
+ SEQUENCE_constraint,
+ SEQUENCE_decode_ber,
+ SEQUENCE_encode_der,
+ SEQUENCE_decode_xer,
+ SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_Sequence_1,
+ 7, /* Elements count */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [SequenceOf] >>> ***/
+
+#include <asn_SEQUENCE_OF.h>
+#include <constr_SEQUENCE_OF.h>
+
+/*** <<< FWD-DECLS [SequenceOf] >>> ***/
+
+struct Sequence;
+
+/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
+
+typedef struct SequenceOf {
+ A_SEQUENCE_OF(struct Sequence) list;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} SequenceOf_t;
+
+/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
+
+/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
+
+#include <Sequence.h>
+
+/*** <<< STAT-DEFS [SequenceOf] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
+ { ATF_POINTER, 0, 0,
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Sequence,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = ""
+ },
+};
+static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
+ sizeof(struct SequenceOf),
+ offsetof(struct SequenceOf, _asn_ctx),
+ 0, /* XER encoding is XMLDelimitedItemList */
+};
+asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
+ "SequenceOf",
+ "SequenceOf",
+ SEQUENCE_OF_free,
+ SEQUENCE_OF_print,
+ SEQUENCE_OF_constraint,
+ SEQUENCE_OF_decode_ber,
+ SEQUENCE_OF_encode_der,
+ SEQUENCE_OF_decode_xer,
+ SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_SequenceOf_tags_1,
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ asn_DEF_SequenceOf_tags_1, /* Same as above */
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_SequenceOf_1,
+ 1, /* Single element */
+ &asn_SPC_SequenceOf_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Enum0] >>> ***/
+
+#include <ENUMERATED.h>
+
+/*** <<< DEPS [Enum0] >>> ***/
+
+typedef enum Enum0 {
+ Enum0_one = 0,
+ Enum0_two = 1
+} Enum0_e;
+
+/*** <<< TYPE-DECLS [Enum0] >>> ***/
+
+typedef ENUMERATED_t Enum0_t;
+
+/*** <<< FUNC-DECLS [Enum0] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Enum0;
+asn_struct_free_f Enum0_free;
+asn_struct_print_f Enum0_print;
+asn_constr_check_f Enum0_constraint;
+ber_type_decoder_f Enum0_decode_ber;
+der_type_encoder_f Enum0_encode_der;
+xer_type_decoder_f Enum0_decode_xer;
+xer_type_encoder_f Enum0_encode_xer;
+
+/*** <<< CODE [Enum0] >>> ***/
+
+int
+Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using ENUMERATED,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Enum0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_ENUMERATED.free_struct;
+ td->print_struct = asn_DEF_ENUMERATED.print_struct;
+ td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
+ td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
+ td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
+ td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
+ td->elements = asn_DEF_ENUMERATED.elements;
+ td->elements_count = asn_DEF_ENUMERATED.elements_count;
+ /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
+}
+
+void
+Enum0_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Enum0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Enum0_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Enum0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+
+/*** <<< STAT-DEFS [Enum0] >>> ***/
+
+static asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
+ { 0, 3, "one" },
+ { 1, 3, "two" }
+};
+static unsigned int asn_MAP_Enum0_enum2value_1[] = {
+ 0, /* one(0) */
+ 1 /* two(1) */
+};
+static asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
+ asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
+ 2, /* Number of elements in the maps */
+ 0, /* Enumeration is not extensible */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_Enum0 = {
+ "Enum0",
+ "Enum0",
+ Enum0_free,
+ Enum0_print,
+ Enum0_constraint,
+ Enum0_decode_ber,
+ Enum0_encode_der,
+ Enum0_decode_xer,
+ Enum0_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Enum0_tags_1,
+ sizeof(asn_DEF_Enum0_tags_1)
+ /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
+ asn_DEF_Enum0_tags_1, /* Same as above */
+ sizeof(asn_DEF_Enum0_tags_1)
+ /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_Enum0_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Enum1] >>> ***/
+
+#include <NativeEnumerated.h>
+
+/*** <<< DEPS [Enum1] >>> ***/
+
+typedef enum Enum1 {
+ Enum1_one = 0,
+ Enum1_two = 1
+} Enum1_e;
+
+/*** <<< TYPE-DECLS [Enum1] >>> ***/
+
+typedef long Enum1_t;
+
+/*** <<< FUNC-DECLS [Enum1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Enum1;
+asn_struct_free_f Enum1_free;
+asn_struct_print_f Enum1_print;
+asn_constr_check_f Enum1_constraint;
+ber_type_decoder_f Enum1_decode_ber;
+der_type_encoder_f Enum1_encode_der;
+xer_type_decoder_f Enum1_decode_xer;
+xer_type_encoder_f Enum1_encode_xer;
+
+/*** <<< CODE [Enum1] >>> ***/
+
+int
+Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if((value == 0)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeEnumerated,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Enum1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeEnumerated.free_struct;
+ td->print_struct = asn_DEF_NativeEnumerated.print_struct;
+ td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
+ td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
+ td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
+ td->elements = asn_DEF_NativeEnumerated.elements;
+ td->elements_count = asn_DEF_NativeEnumerated.elements_count;
+ /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
+}
+
+void
+Enum1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Enum1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Enum1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Enum1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+
+/*** <<< STAT-DEFS [Enum1] >>> ***/
+
+static asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
+ { 0, 3, "one" },
+ { 1, 3, "two" }
+};
+static unsigned int asn_MAP_Enum1_enum2value_1[] = {
+ 0, /* one(0) */
+ 1 /* two(1) */
+};
+static asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
+ asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
+ 2, /* Number of elements in the maps */
+ 0, /* Enumeration is not extensible */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_Enum1 = {
+ "Enum1",
+ "Enum1",
+ Enum1_free,
+ Enum1_print,
+ Enum1_constraint,
+ Enum1_decode_ber,
+ Enum1_encode_der,
+ Enum1_decode_xer,
+ Enum1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Enum1_tags_1,
+ sizeof(asn_DEF_Enum1_tags_1)
+ /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
+ asn_DEF_Enum1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Enum1_tags_1)
+ /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_Enum1_specs_1 /* Additional specs */
+};
+
+
/*** <<< INCLUDES [Identifier] >>> ***/
#include <VisibleString.h>
@@ -3438,6 +4327,9 @@ Identifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_VisibleString.der_encoder;
td->xer_decoder = asn_DEF_VisibleString.xer_decoder;
td->xer_encoder = asn_DEF_VisibleString.xer_encoder;
+ td->uper_decoder = asn_DEF_VisibleString.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_VisibleString.per_constraints;
td->elements = asn_DEF_VisibleString.elements;
td->elements_count = asn_DEF_VisibleString.elements_count;
td->specifics = asn_DEF_VisibleString.specifics;
@@ -3490,7 +4382,7 @@ Identifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [Identifier] >>> ***/
-static ber_tlv_tag_t asn_DEF_Identifier_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
};
asn_TYPE_descriptor_t asn_DEF_Identifier = {
@@ -3503,13 +4395,15 @@ asn_TYPE_descriptor_t asn_DEF_Identifier = {
Identifier_encode_der,
Identifier_decode_xer,
Identifier_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Identifier_1_tags,
- sizeof(asn_DEF_Identifier_1_tags)
- /sizeof(asn_DEF_Identifier_1_tags[0]), /* 1 */
- asn_DEF_Identifier_1_tags, /* Same as above */
- sizeof(asn_DEF_Identifier_1_tags)
- /sizeof(asn_DEF_Identifier_1_tags[0]), /* 1 */
+ asn_DEF_Identifier_tags_1,
+ sizeof(asn_DEF_Identifier_tags_1)
+ /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
+ asn_DEF_Identifier_tags_1, /* Same as above */
+ sizeof(asn_DEF_Identifier_tags_1)
+ /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/tests/50-constraint-OK.asn1.-Pgen-PER b/tests/50-constraint-OK.asn1.-Pgen-PER
new file mode 100644
index 00000000..a5c37ad4
--- /dev/null
+++ b/tests/50-constraint-OK.asn1.-Pgen-PER
@@ -0,0 +1,4739 @@
+
+/*** <<< INCLUDES [Int1] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [Int1] >>> ***/
+
+typedef INTEGER_t Int1_t;
+
+/*** <<< FUNC-DECLS [Int1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Int1;
+asn_struct_free_f Int1_free;
+asn_struct_print_f Int1_print;
+asn_constr_check_f Int1_constraint;
+ber_type_decoder_f Int1_decode_ber;
+der_type_encoder_f Int1_encode_der;
+xer_type_decoder_f Int1_decode_xer;
+xer_type_encoder_f Int1_encode_xer;
+per_type_decoder_f Int1_decode_uper;
+
+/*** <<< CODE [Int1] >>> ***/
+
+int
+Int1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_INTEGER.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Int1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+Int1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Int1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Int1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Int1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Int1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Int1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Int1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Int1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Int1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_Int1 = {
+ "Int1",
+ "Int1",
+ Int1_free,
+ Int1_print,
+ Int1_constraint,
+ Int1_decode_ber,
+ Int1_encode_der,
+ Int1_decode_xer,
+ Int1_encode_xer,
+ Int1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Int1_tags_1,
+ sizeof(asn_DEF_Int1_tags_1)
+ /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
+ asn_DEF_Int1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int1_tags_1)
+ /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Int2] >>> ***/
+
+#include <Int1.h>
+
+/*** <<< TYPE-DECLS [Int2] >>> ***/
+
+typedef Int1_t Int2_t;
+
+/*** <<< FUNC-DECLS [Int2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Int2;
+asn_struct_free_f Int2_free;
+asn_struct_print_f Int2_print;
+asn_constr_check_f Int2_constraint;
+ber_type_decoder_f Int2_decode_ber;
+der_type_encoder_f Int2_encode_der;
+xer_type_decoder_f Int2_decode_xer;
+xer_type_encoder_f Int2_encode_xer;
+per_type_decoder_f Int2_decode_uper;
+
+/*** <<< CODE [Int2] >>> ***/
+
+int
+Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int1_t *st = (const Int1_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ /* Check if the sign bit is present */
+ value = st->buf ? ((st->buf[0] & 0x80) ? -1 : 1) : 0;
+
+ if((value >= 0)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Int1,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Int2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Int1.free_struct;
+ td->print_struct = asn_DEF_Int1.print_struct;
+ td->ber_decoder = asn_DEF_Int1.ber_decoder;
+ td->der_encoder = asn_DEF_Int1.der_encoder;
+ td->xer_decoder = asn_DEF_Int1.xer_decoder;
+ td->xer_encoder = asn_DEF_Int1.xer_encoder;
+ td->uper_decoder = asn_DEF_Int1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int1.per_constraints;
+ td->elements = asn_DEF_Int1.elements;
+ td->elements_count = asn_DEF_Int1.elements_count;
+ td->specifics = asn_DEF_Int1.specifics;
+}
+
+void
+Int2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Int2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Int2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Int2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Int2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Int2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Int2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Int2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Int2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_Int2_constr_1 = {
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Int2 = {
+ "Int2",
+ "Int2",
+ Int2_free,
+ Int2_print,
+ Int2_constraint,
+ Int2_decode_ber,
+ Int2_encode_der,
+ Int2_decode_xer,
+ Int2_encode_xer,
+ Int2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Int2_tags_1,
+ sizeof(asn_DEF_Int2_tags_1)
+ /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
+ asn_DEF_Int2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int2_tags_1)
+ /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
+ &asn_PER_Int2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Int3] >>> ***/
+
+#include <Int2.h>
+
+/*** <<< TYPE-DECLS [Int3] >>> ***/
+
+typedef Int2_t Int3_t;
+
+/*** <<< FUNC-DECLS [Int3] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Int3;
+asn_struct_free_f Int3_free;
+asn_struct_print_f Int3_print;
+asn_constr_check_f Int3_constraint;
+ber_type_decoder_f Int3_decode_ber;
+der_type_encoder_f Int3_encode_der;
+xer_type_decoder_f Int3_decode_xer;
+xer_type_encoder_f Int3_encode_xer;
+per_type_decoder_f Int3_decode_uper;
+
+/*** <<< CODE [Int3] >>> ***/
+
+int
+Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int2_t *st = (const Int2_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 0 && value <= 10)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Int2,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Int3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Int2.free_struct;
+ td->print_struct = asn_DEF_Int2.print_struct;
+ td->ber_decoder = asn_DEF_Int2.ber_decoder;
+ td->der_encoder = asn_DEF_Int2.der_encoder;
+ td->xer_decoder = asn_DEF_Int2.xer_decoder;
+ td->xer_encoder = asn_DEF_Int2.xer_encoder;
+ td->uper_decoder = asn_DEF_Int2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int2.per_constraints;
+ td->elements = asn_DEF_Int2.elements;
+ td->elements_count = asn_DEF_Int2.elements_count;
+ td->specifics = asn_DEF_Int2.specifics;
+}
+
+void
+Int3_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Int3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Int3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Int3_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Int3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Int3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Int3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Int3_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Int3] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_Int3_constr_1 = {
+ { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Int3 = {
+ "Int3",
+ "Int3",
+ Int3_free,
+ Int3_print,
+ Int3_constraint,
+ Int3_decode_ber,
+ Int3_encode_der,
+ Int3_decode_xer,
+ Int3_encode_xer,
+ Int3_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Int3_tags_1,
+ sizeof(asn_DEF_Int3_tags_1)
+ /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
+ asn_DEF_Int3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int3_tags_1)
+ /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
+ &asn_PER_Int3_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Int4] >>> ***/
+
+#include <Int3.h>
+
+/*** <<< TYPE-DECLS [Int4] >>> ***/
+
+typedef Int3_t Int4_t;
+
+/*** <<< FUNC-DECLS [Int4] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Int4;
+asn_struct_free_f Int4_free;
+asn_struct_print_f Int4_print;
+asn_constr_check_f Int4_constraint;
+ber_type_decoder_f Int4_decode_ber;
+der_type_encoder_f Int4_encode_der;
+xer_type_decoder_f Int4_decode_xer;
+xer_type_encoder_f Int4_encode_xer;
+per_type_decoder_f Int4_decode_uper;
+
+/*** <<< CODE [Int4] >>> ***/
+
+int
+Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int3_t *st = (const Int3_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 1 && value <= 10)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Int3,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Int4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Int3.free_struct;
+ td->print_struct = asn_DEF_Int3.print_struct;
+ td->ber_decoder = asn_DEF_Int3.ber_decoder;
+ td->der_encoder = asn_DEF_Int3.der_encoder;
+ td->xer_decoder = asn_DEF_Int3.xer_decoder;
+ td->xer_encoder = asn_DEF_Int3.xer_encoder;
+ td->uper_decoder = asn_DEF_Int3.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int3.per_constraints;
+ td->elements = asn_DEF_Int3.elements;
+ td->elements_count = asn_DEF_Int3.elements_count;
+ td->specifics = asn_DEF_Int3.specifics;
+}
+
+void
+Int4_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Int4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Int4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Int4_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Int4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Int4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Int4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Int4_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Int4] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_Int4_constr_1 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Int4 = {
+ "Int4",
+ "Int4",
+ Int4_free,
+ Int4_print,
+ Int4_constraint,
+ Int4_decode_ber,
+ Int4_encode_der,
+ Int4_decode_xer,
+ Int4_encode_xer,
+ Int4_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Int4_tags_1,
+ sizeof(asn_DEF_Int4_tags_1)
+ /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
+ asn_DEF_Int4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int4_tags_1)
+ /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
+ &asn_PER_Int4_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Int5] >>> ***/
+
+#include <Int4.h>
+
+/*** <<< TYPE-DECLS [Int5] >>> ***/
+
+typedef Int4_t Int5_t;
+
+/*** <<< FUNC-DECLS [Int5] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Int5;
+asn_struct_free_f Int5_free;
+asn_struct_print_f Int5_print;
+asn_constr_check_f Int5_constraint;
+ber_type_decoder_f Int5_decode_ber;
+der_type_encoder_f Int5_encode_der;
+xer_type_decoder_f Int5_decode_xer;
+xer_type_encoder_f Int5_encode_xer;
+per_type_decoder_f Int5_decode_uper;
+
+/*** <<< CODE [Int5] >>> ***/
+
+int
+Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int4_t *st = (const Int4_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value == 5)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Int4,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Int5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Int4.free_struct;
+ td->print_struct = asn_DEF_Int4.print_struct;
+ td->ber_decoder = asn_DEF_Int4.ber_decoder;
+ td->der_encoder = asn_DEF_Int4.der_encoder;
+ td->xer_decoder = asn_DEF_Int4.xer_decoder;
+ td->xer_encoder = asn_DEF_Int4.xer_encoder;
+ td->uper_decoder = asn_DEF_Int4.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Int4.per_constraints;
+ td->elements = asn_DEF_Int4.elements;
+ td->elements_count = asn_DEF_Int4.elements_count;
+ td->specifics = asn_DEF_Int4.specifics;
+}
+
+void
+Int5_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Int5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Int5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Int5_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Int5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Int5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Int5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Int5_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Int5] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_Int5_constr_1 = {
+ { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Int5 = {
+ "Int5",
+ "Int5",
+ Int5_free,
+ Int5_print,
+ Int5_constraint,
+ Int5_decode_ber,
+ Int5_encode_der,
+ Int5_decode_xer,
+ Int5_encode_xer,
+ Int5_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Int5_tags_1,
+ sizeof(asn_DEF_Int5_tags_1)
+ /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
+ asn_DEF_Int5_tags_1, /* Same as above */
+ sizeof(asn_DEF_Int5_tags_1)
+ /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
+ &asn_PER_Int5_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
+
+typedef INTEGER_t ExtensibleExtensions_t;
+
+/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
+asn_struct_free_f ExtensibleExtensions_free;
+asn_struct_print_f ExtensibleExtensions_print;
+asn_constr_check_f ExtensibleExtensions_constraint;
+ber_type_decoder_f ExtensibleExtensions_decode_ber;
+der_type_encoder_f ExtensibleExtensions_encode_der;
+xer_type_decoder_f ExtensibleExtensions_decode_xer;
+xer_type_encoder_f ExtensibleExtensions_encode_xer;
+per_type_decoder_f ExtensibleExtensions_decode_uper;
+
+/*** <<< CODE [ExtensibleExtensions] >>> ***/
+
+int
+ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 1 && value <= 256)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+ExtensibleExtensions_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+ExtensibleExtensions_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+ExtensibleExtensions_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+ExtensibleExtensions_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+ExtensibleExtensions_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+ExtensibleExtensions_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+ExtensibleExtensions_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+ExtensibleExtensions_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_ExtensibleExtensions_constr_1 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 256 } /* (1..256,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
+ "ExtensibleExtensions",
+ "ExtensibleExtensions",
+ ExtensibleExtensions_free,
+ ExtensibleExtensions_print,
+ ExtensibleExtensions_constraint,
+ ExtensibleExtensions_decode_ber,
+ ExtensibleExtensions_encode_der,
+ ExtensibleExtensions_decode_xer,
+ ExtensibleExtensions_encode_xer,
+ ExtensibleExtensions_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_ExtensibleExtensions_tags_1,
+ sizeof(asn_DEF_ExtensibleExtensions_tags_1)
+ /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
+ asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
+ sizeof(asn_DEF_ExtensibleExtensions_tags_1)
+ /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
+ &asn_PER_ExtensibleExtensions_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Str1] >>> ***/
+
+#include <IA5String.h>
+
+/*** <<< TYPE-DECLS [Str1] >>> ***/
+
+typedef IA5String_t Str1_t;
+
+/*** <<< FUNC-DECLS [Str1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Str1;
+asn_struct_free_f Str1_free;
+asn_struct_print_f Str1_print;
+asn_constr_check_f Str1_constraint;
+ber_type_decoder_f Str1_decode_ber;
+der_type_encoder_f Str1_encode_der;
+xer_type_decoder_f Str1_decode_xer;
+xer_type_encoder_f Str1_encode_xer;
+per_type_decoder_f Str1_decode_uper;
+
+/*** <<< CODE [Str1] >>> ***/
+
+int
+Str1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_IA5String.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using IA5String,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Str1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_IA5String.free_struct;
+ td->print_struct = asn_DEF_IA5String.print_struct;
+ td->ber_decoder = asn_DEF_IA5String.ber_decoder;
+ td->der_encoder = asn_DEF_IA5String.der_encoder;
+ td->xer_decoder = asn_DEF_IA5String.xer_decoder;
+ td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
+ td->elements = asn_DEF_IA5String.elements;
+ td->elements_count = asn_DEF_IA5String.elements_count;
+ td->specifics = asn_DEF_IA5String.specifics;
+}
+
+void
+Str1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Str1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Str1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Str1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Str1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Str1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Str1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Str1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Str1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_Str1 = {
+ "Str1",
+ "Str1",
+ Str1_free,
+ Str1_print,
+ Str1_constraint,
+ Str1_decode_ber,
+ Str1_encode_der,
+ Str1_decode_xer,
+ Str1_encode_xer,
+ Str1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Str1_tags_1,
+ sizeof(asn_DEF_Str1_tags_1)
+ /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
+ asn_DEF_Str1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str1_tags_1)
+ /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Str2] >>> ***/
+
+#include <Str1.h>
+
+/*** <<< TYPE-DECLS [Str2] >>> ***/
+
+typedef Str1_t Str2_t;
+
+/*** <<< FUNC-DECLS [Str2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Str2;
+asn_struct_free_f Str2_free;
+asn_struct_print_f Str2_print;
+asn_constr_check_f Str2_constraint;
+ber_type_decoder_f Str2_decode_ber;
+der_type_encoder_f Str2_encode_der;
+xer_type_decoder_f Str2_decode_xer;
+xer_type_encoder_f Str2_encode_xer;
+per_type_decoder_f Str2_decode_uper;
+
+/*** <<< CTABLES [Str2] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv <= 127)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Str2] >>> ***/
+
+int
+Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Str1_t *st = (const Str1_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if(((size <= 20) || (size >= 25 && size <= 30))
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Str1,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Str2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Str1.free_struct;
+ td->print_struct = asn_DEF_Str1.print_struct;
+ td->ber_decoder = asn_DEF_Str1.ber_decoder;
+ td->der_encoder = asn_DEF_Str1.der_encoder;
+ td->xer_decoder = asn_DEF_Str1.xer_decoder;
+ td->xer_encoder = asn_DEF_Str1.xer_encoder;
+ td->uper_decoder = asn_DEF_Str1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Str1.per_constraints;
+ td->elements = asn_DEF_Str1.elements;
+ td->elements_count = asn_DEF_Str1.elements_count;
+ td->specifics = asn_DEF_Str1.specifics;
+}
+
+void
+Str2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Str2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Str2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Str2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Str2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Str2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Str2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Str2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Str2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Str2_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Str2 = {
+ "Str2",
+ "Str2",
+ Str2_free,
+ Str2_print,
+ Str2_constraint,
+ Str2_decode_ber,
+ Str2_encode_der,
+ Str2_decode_xer,
+ Str2_encode_xer,
+ Str2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Str2_tags_1,
+ sizeof(asn_DEF_Str2_tags_1)
+ /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
+ asn_DEF_Str2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str2_tags_1)
+ /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
+ &asn_PER_Str2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Str3] >>> ***/
+
+#include <Str2.h>
+
+/*** <<< TYPE-DECLS [Str3] >>> ***/
+
+typedef Str2_t Str3_t;
+
+/*** <<< FUNC-DECLS [Str3] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Str3;
+asn_struct_free_f Str3_free;
+asn_struct_print_f Str3_print;
+asn_constr_check_f Str3_constraint;
+ber_type_decoder_f Str3_decode_ber;
+der_type_encoder_f Str3_encode_der;
+xer_type_decoder_f Str3_decode_xer;
+xer_type_encoder_f Str3_encode_xer;
+per_type_decoder_f Str3_decode_uper;
+
+/*** <<< CTABLES [Str3] >>> ***/
+
+static int permitted_alphabet_table_1[256] = {
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, /* ABC */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, /* def */
+};
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ int *table = permitted_alphabet_table_1;
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!table[cv]) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Str3] >>> ***/
+
+int
+Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Str2_t *st = (const Str2_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Str2,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Str3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Str2.free_struct;
+ td->print_struct = asn_DEF_Str2.print_struct;
+ td->ber_decoder = asn_DEF_Str2.ber_decoder;
+ td->der_encoder = asn_DEF_Str2.der_encoder;
+ td->xer_decoder = asn_DEF_Str2.xer_decoder;
+ td->xer_encoder = asn_DEF_Str2.xer_encoder;
+ td->uper_decoder = asn_DEF_Str2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Str2.per_constraints;
+ td->elements = asn_DEF_Str2.elements;
+ td->elements_count = asn_DEF_Str2.elements_count;
+ td->specifics = asn_DEF_Str2.specifics;
+}
+
+void
+Str3_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Str3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Str3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Str3_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Str3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Str3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Str3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Str3_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Str3] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Str3_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Str3 = {
+ "Str3",
+ "Str3",
+ Str3_free,
+ Str3_print,
+ Str3_constraint,
+ Str3_decode_ber,
+ Str3_encode_der,
+ Str3_decode_xer,
+ Str3_encode_xer,
+ Str3_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Str3_tags_1,
+ sizeof(asn_DEF_Str3_tags_1)
+ /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
+ asn_DEF_Str3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str3_tags_1)
+ /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
+ &asn_PER_Str3_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Str4] >>> ***/
+
+#include <IA5String.h>
+
+/*** <<< TYPE-DECLS [Str4] >>> ***/
+
+typedef IA5String_t Str4_t;
+
+/*** <<< FUNC-DECLS [Str4] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Str4;
+asn_struct_free_f Str4_free;
+asn_struct_print_f Str4_print;
+asn_constr_check_f Str4_constraint;
+ber_type_decoder_f Str4_decode_ber;
+der_type_encoder_f Str4_encode_der;
+xer_type_decoder_f Str4_decode_xer;
+xer_type_encoder_f Str4_encode_xer;
+per_type_decoder_f Str4_decode_uper;
+
+/*** <<< CTABLES [Str4] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv <= 127)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Str4] >>> ***/
+
+int
+Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const IA5String_t *st = (const IA5String_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using IA5String,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Str4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_IA5String.free_struct;
+ td->print_struct = asn_DEF_IA5String.print_struct;
+ td->ber_decoder = asn_DEF_IA5String.ber_decoder;
+ td->der_encoder = asn_DEF_IA5String.der_encoder;
+ td->xer_decoder = asn_DEF_IA5String.xer_decoder;
+ td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
+ td->elements = asn_DEF_IA5String.elements;
+ td->elements_count = asn_DEF_IA5String.elements_count;
+ td->specifics = asn_DEF_IA5String.specifics;
+}
+
+void
+Str4_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Str4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Str4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Str4_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Str4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Str4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Str4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Str4_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Str4] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Str4_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Str4 = {
+ "Str4",
+ "Str4",
+ Str4_free,
+ Str4_print,
+ Str4_constraint,
+ Str4_decode_ber,
+ Str4_encode_der,
+ Str4_decode_xer,
+ Str4_encode_xer,
+ Str4_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Str4_tags_1,
+ sizeof(asn_DEF_Str4_tags_1)
+ /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
+ asn_DEF_Str4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Str4_tags_1)
+ /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
+ &asn_PER_Str4_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [PER-Visible] >>> ***/
+
+#include <IA5String.h>
+
+/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
+
+typedef IA5String_t PER_Visible_t;
+
+/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
+asn_struct_free_f PER_Visible_free;
+asn_struct_print_f PER_Visible_print;
+asn_constr_check_f PER_Visible_constraint;
+ber_type_decoder_f PER_Visible_decode_ber;
+der_type_encoder_f PER_Visible_encode_der;
+xer_type_decoder_f PER_Visible_decode_xer;
+xer_type_encoder_f PER_Visible_encode_xer;
+per_type_decoder_f PER_Visible_decode_uper;
+
+/*** <<< CTABLES [PER-Visible] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 70)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [PER-Visible] >>> ***/
+
+int
+PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const IA5String_t *st = (const IA5String_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using IA5String,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+PER_Visible_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_IA5String.free_struct;
+ td->print_struct = asn_DEF_IA5String.print_struct;
+ td->ber_decoder = asn_DEF_IA5String.ber_decoder;
+ td->der_encoder = asn_DEF_IA5String.der_encoder;
+ td->xer_decoder = asn_DEF_IA5String.xer_decoder;
+ td->xer_encoder = asn_DEF_IA5String.xer_encoder;
+ td->uper_decoder = asn_DEF_IA5String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_IA5String.per_constraints;
+ td->elements = asn_DEF_IA5String.elements;
+ td->elements_count = asn_DEF_IA5String.elements_count;
+ td->specifics = asn_DEF_IA5String.specifics;
+}
+
+void
+PER_Visible_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+PER_Visible_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+PER_Visible_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+PER_Visible_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ PER_Visible_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [PER-Visible] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_PER_Visible_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
+ "PER-Visible",
+ "PER-Visible",
+ PER_Visible_free,
+ PER_Visible_print,
+ PER_Visible_constraint,
+ PER_Visible_decode_ber,
+ PER_Visible_encode_der,
+ PER_Visible_decode_xer,
+ PER_Visible_encode_xer,
+ PER_Visible_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_PER_Visible_tags_1,
+ sizeof(asn_DEF_PER_Visible_tags_1)
+ /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
+ asn_DEF_PER_Visible_tags_1, /* Same as above */
+ sizeof(asn_DEF_PER_Visible_tags_1)
+ /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
+ &asn_PER_PER_Visible_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [PER-Visible-2] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
+
+typedef PER_Visible_t PER_Visible_2_t;
+
+/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
+asn_struct_free_f PER_Visible_2_free;
+asn_struct_print_f PER_Visible_2_print;
+asn_constr_check_f PER_Visible_2_constraint;
+ber_type_decoder_f PER_Visible_2_decode_ber;
+der_type_encoder_f PER_Visible_2_encode_der;
+xer_type_decoder_f PER_Visible_2_decode_xer;
+xer_type_encoder_f PER_Visible_2_encode_xer;
+per_type_decoder_f PER_Visible_2_decode_uper;
+
+/*** <<< CTABLES [PER-Visible-2] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 69 && cv <= 70)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [PER-Visible-2] >>> ***/
+
+int
+PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+PER_Visible_2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+PER_Visible_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_PER_Visible_2_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
+ "PER-Visible-2",
+ "PER-Visible-2",
+ PER_Visible_2_free,
+ PER_Visible_2_print,
+ PER_Visible_2_constraint,
+ PER_Visible_2_decode_ber,
+ PER_Visible_2_encode_der,
+ PER_Visible_2_decode_xer,
+ PER_Visible_2_encode_xer,
+ PER_Visible_2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_PER_Visible_2_tags_1,
+ sizeof(asn_DEF_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
+ asn_DEF_PER_Visible_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
+ &asn_PER_PER_Visible_2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
+
+typedef PER_Visible_t Not_PER_Visible_1_t;
+
+/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
+asn_struct_free_f Not_PER_Visible_1_free;
+asn_struct_print_f Not_PER_Visible_1_print;
+asn_constr_check_f Not_PER_Visible_1_constraint;
+ber_type_decoder_f Not_PER_Visible_1_decode_ber;
+der_type_encoder_f Not_PER_Visible_1_encode_der;
+xer_type_decoder_f Not_PER_Visible_1_decode_xer;
+xer_type_encoder_f Not_PER_Visible_1_encode_xer;
+per_type_decoder_f Not_PER_Visible_1_decode_uper;
+
+/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 70)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Not-PER-Visible-1] >>> ***/
+
+int
+Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Not_PER_Visible_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+Not_PER_Visible_1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Not_PER_Visible_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Not_PER_Visible_1_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
+ "Not-PER-Visible-1",
+ "Not-PER-Visible-1",
+ Not_PER_Visible_1_free,
+ Not_PER_Visible_1_print,
+ Not_PER_Visible_1_constraint,
+ Not_PER_Visible_1_decode_ber,
+ Not_PER_Visible_1_encode_der,
+ Not_PER_Visible_1_decode_xer,
+ Not_PER_Visible_1_encode_xer,
+ Not_PER_Visible_1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Not_PER_Visible_1_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
+ &asn_PER_Not_PER_Visible_1_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
+
+typedef PER_Visible_t Not_PER_Visible_2_t;
+
+/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
+asn_struct_free_f Not_PER_Visible_2_free;
+asn_struct_print_f Not_PER_Visible_2_print;
+asn_constr_check_f Not_PER_Visible_2_constraint;
+ber_type_decoder_f Not_PER_Visible_2_decode_ber;
+der_type_encoder_f Not_PER_Visible_2_encode_der;
+xer_type_decoder_f Not_PER_Visible_2_decode_xer;
+xer_type_encoder_f Not_PER_Visible_2_encode_xer;
+per_type_decoder_f Not_PER_Visible_2_decode_uper;
+
+/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 66)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Not-PER-Visible-2] >>> ***/
+
+int
+Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Not_PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+Not_PER_Visible_2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Not_PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Not_PER_Visible_2_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
+ "Not-PER-Visible-2",
+ "Not-PER-Visible-2",
+ Not_PER_Visible_2_free,
+ Not_PER_Visible_2_print,
+ Not_PER_Visible_2_constraint,
+ Not_PER_Visible_2_decode_ber,
+ Not_PER_Visible_2_encode_der,
+ Not_PER_Visible_2_decode_xer,
+ Not_PER_Visible_2_encode_xer,
+ Not_PER_Visible_2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Not_PER_Visible_2_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
+ &asn_PER_Not_PER_Visible_2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
+
+typedef PER_Visible_t Not_PER_Visible_3_t;
+
+/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
+asn_struct_free_f Not_PER_Visible_3_free;
+asn_struct_print_f Not_PER_Visible_3_print;
+asn_constr_check_f Not_PER_Visible_3_constraint;
+ber_type_decoder_f Not_PER_Visible_3_decode_ber;
+der_type_encoder_f Not_PER_Visible_3_encode_der;
+xer_type_decoder_f Not_PER_Visible_3_decode_xer;
+xer_type_encoder_f Not_PER_Visible_3_encode_xer;
+per_type_decoder_f Not_PER_Visible_3_decode_uper;
+
+/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 66)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Not-PER-Visible-3] >>> ***/
+
+int
+Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Not_PER_Visible_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+Not_PER_Visible_3_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Not_PER_Visible_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_3_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Not_PER_Visible_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Not_PER_Visible_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Not_PER_Visible_3_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
+ "Not-PER-Visible-3",
+ "Not-PER-Visible-3",
+ Not_PER_Visible_3_free,
+ Not_PER_Visible_3_print,
+ Not_PER_Visible_3_constraint,
+ Not_PER_Visible_3_decode_ber,
+ Not_PER_Visible_3_encode_der,
+ Not_PER_Visible_3_decode_xer,
+ Not_PER_Visible_3_encode_xer,
+ Not_PER_Visible_3_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Not_PER_Visible_3_tags_1,
+ sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
+ asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
+ /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
+ &asn_PER_Not_PER_Visible_3_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
+
+typedef PER_Visible_t SIZE_but_not_FROM_t;
+
+/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
+asn_struct_free_f SIZE_but_not_FROM_free;
+asn_struct_print_f SIZE_but_not_FROM_print;
+asn_constr_check_f SIZE_but_not_FROM_constraint;
+ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
+der_type_encoder_f SIZE_but_not_FROM_encode_der;
+xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
+xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
+per_type_decoder_f SIZE_but_not_FROM_decode_uper;
+
+/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 68)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
+
+int
+SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if((size >= 1 && size <= 4)
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+SIZE_but_not_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+SIZE_but_not_FROM_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+SIZE_but_not_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_but_not_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+SIZE_but_not_FROM_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_but_not_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+SIZE_but_not_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_but_not_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_SIZE_but_not_FROM_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */
+};
+asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
+ "SIZE-but-not-FROM",
+ "SIZE-but-not-FROM",
+ SIZE_but_not_FROM_free,
+ SIZE_but_not_FROM_print,
+ SIZE_but_not_FROM_constraint,
+ SIZE_but_not_FROM_decode_ber,
+ SIZE_but_not_FROM_encode_der,
+ SIZE_but_not_FROM_decode_xer,
+ SIZE_but_not_FROM_encode_xer,
+ SIZE_but_not_FROM_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_SIZE_but_not_FROM_tags_1,
+ sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
+ asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
+ &asn_PER_SIZE_but_not_FROM_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
+
+typedef PER_Visible_t SIZE_and_FROM_t;
+
+/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
+asn_struct_free_f SIZE_and_FROM_free;
+asn_struct_print_f SIZE_and_FROM_print;
+asn_constr_check_f SIZE_and_FROM_constraint;
+ber_type_decoder_f SIZE_and_FROM_decode_ber;
+der_type_encoder_f SIZE_and_FROM_encode_der;
+xer_type_decoder_f SIZE_and_FROM_decode_xer;
+xer_type_encoder_f SIZE_and_FROM_encode_xer;
+per_type_decoder_f SIZE_and_FROM_decode_uper;
+
+/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 68)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [SIZE-and-FROM] >>> ***/
+
+int
+SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if((size >= 1 && size <= 4)
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+SIZE_and_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+SIZE_and_FROM_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+SIZE_and_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_and_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+SIZE_and_FROM_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_and_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+SIZE_and_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+SIZE_and_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_SIZE_and_FROM_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */
+};
+asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
+ "SIZE-and-FROM",
+ "SIZE-and-FROM",
+ SIZE_and_FROM_free,
+ SIZE_and_FROM_print,
+ SIZE_and_FROM_constraint,
+ SIZE_and_FROM_decode_ber,
+ SIZE_and_FROM_encode_der,
+ SIZE_and_FROM_decode_xer,
+ SIZE_and_FROM_encode_xer,
+ SIZE_and_FROM_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_SIZE_and_FROM_tags_1,
+ sizeof(asn_DEF_SIZE_and_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
+ asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_SIZE_and_FROM_tags_1)
+ /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
+ &asn_PER_SIZE_and_FROM_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
+
+#include <PER-Visible.h>
+
+/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
+
+typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
+
+/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
+asn_struct_free_f Neither_SIZE_nor_FROM_free;
+asn_struct_print_f Neither_SIZE_nor_FROM_print;
+asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
+ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
+der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
+xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
+xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
+per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
+
+/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ /* The underlying type is IA5String */
+ const IA5String_t *st = (const IA5String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!(cv >= 65 && cv <= 70)) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
+
+int
+Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const PER_Visible_t *st = (const PER_Visible_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using PER_Visible,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_PER_Visible.free_struct;
+ td->print_struct = asn_DEF_PER_Visible.print_struct;
+ td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
+ td->der_encoder = asn_DEF_PER_Visible.der_encoder;
+ td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
+ td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
+ td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_PER_Visible.per_constraints;
+ td->elements = asn_DEF_PER_Visible.elements;
+ td->elements_count = asn_DEF_PER_Visible.elements_count;
+ td->specifics = asn_DEF_PER_Visible.specifics;
+}
+
+void
+Neither_SIZE_nor_FROM_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Neither_SIZE_nor_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Neither_SIZE_nor_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Neither_SIZE_nor_FROM_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Neither_SIZE_nor_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Neither_SIZE_nor_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Neither_SIZE_nor_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
+};
+static asn_per_constraints_t asn_PER_Neither_SIZE_nor_FROM_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
+ "Neither-SIZE-nor-FROM",
+ "Neither-SIZE-nor-FROM",
+ Neither_SIZE_nor_FROM_free,
+ Neither_SIZE_nor_FROM_print,
+ Neither_SIZE_nor_FROM_constraint,
+ Neither_SIZE_nor_FROM_decode_ber,
+ Neither_SIZE_nor_FROM_encode_der,
+ Neither_SIZE_nor_FROM_decode_xer,
+ Neither_SIZE_nor_FROM_encode_xer,
+ Neither_SIZE_nor_FROM_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Neither_SIZE_nor_FROM_tags_1,
+ sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
+ /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
+ asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
+ sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
+ /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
+ &asn_PER_Neither_SIZE_nor_FROM_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Utf8-4] >>> ***/
+
+#include <UTF8String.h>
+
+/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
+
+typedef UTF8String_t Utf8_4_t;
+
+/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
+asn_struct_free_f Utf8_4_free;
+asn_struct_print_f Utf8_4_print;
+asn_constr_check_f Utf8_4_constraint;
+ber_type_decoder_f Utf8_4_decode_ber;
+der_type_encoder_f Utf8_4_encode_der;
+xer_type_decoder_f Utf8_4_decode_xer;
+xer_type_encoder_f Utf8_4_encode_xer;
+per_type_decoder_f Utf8_4_decode_uper;
+
+/*** <<< CTABLES [Utf8-4] >>> ***/
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ if(UTF8String_length((const UTF8String_t *)sptr) < 0)
+ return -1; /* Alphabet (sic!) test failed. */
+
+ return 0;
+}
+
+
+/*** <<< CODE [Utf8-4] >>> ***/
+
+int
+Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const UTF8String_t *st = (const UTF8String_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(!check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using UTF8String,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Utf8_4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_UTF8String.free_struct;
+ td->print_struct = asn_DEF_UTF8String.print_struct;
+ td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
+ td->der_encoder = asn_DEF_UTF8String.der_encoder;
+ td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
+ td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
+ td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_UTF8String.per_constraints;
+ td->elements = asn_DEF_UTF8String.elements;
+ td->elements_count = asn_DEF_UTF8String.elements_count;
+ td->specifics = asn_DEF_UTF8String.specifics;
+}
+
+void
+Utf8_4_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Utf8_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Utf8_4_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Utf8_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Utf8_4_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Utf8-4] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
+};
+static asn_per_constraints_t asn_PER_Utf8_4_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
+ "Utf8-4",
+ "Utf8-4",
+ Utf8_4_free,
+ Utf8_4_print,
+ Utf8_4_constraint,
+ Utf8_4_decode_ber,
+ Utf8_4_encode_der,
+ Utf8_4_decode_xer,
+ Utf8_4_encode_xer,
+ Utf8_4_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Utf8_4_tags_1,
+ sizeof(asn_DEF_Utf8_4_tags_1)
+ /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_4_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_4_tags_1)
+ /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
+ &asn_PER_Utf8_4_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Utf8-3] >>> ***/
+
+#include <Utf8-2.h>
+
+/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
+
+typedef Utf8_2_t Utf8_3_t;
+
+/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
+asn_struct_free_f Utf8_3_free;
+asn_struct_print_f Utf8_3_print;
+asn_constr_check_f Utf8_3_constraint;
+ber_type_decoder_f Utf8_3_decode_ber;
+der_type_encoder_f Utf8_3_encode_der;
+xer_type_decoder_f Utf8_3_decode_xer;
+xer_type_encoder_f Utf8_3_encode_xer;
+per_type_decoder_f Utf8_3_decode_uper;
+
+/*** <<< CTABLES [Utf8-3] >>> ***/
+
+static int permitted_alphabet_table_1[128] = {
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* PQRSTUVWXYZ */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
+};
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ int *table = permitted_alphabet_table_1;
+ /* The underlying type is UTF8String */
+ const UTF8String_t *st = (const UTF8String_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(cv >= 0x80) return -1;
+ if(!table[cv]) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Utf8-3] >>> ***/
+
+int
+Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Utf8_2_t *st = (const Utf8_2_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = UTF8String_length(st);
+ if((ssize_t)size < 0) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: UTF-8: broken encoding (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((size >= 1 && size <= 2)
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Utf8_2,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Utf8_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Utf8_2.free_struct;
+ td->print_struct = asn_DEF_Utf8_2.print_struct;
+ td->ber_decoder = asn_DEF_Utf8_2.ber_decoder;
+ td->der_encoder = asn_DEF_Utf8_2.der_encoder;
+ td->xer_decoder = asn_DEF_Utf8_2.xer_decoder;
+ td->xer_encoder = asn_DEF_Utf8_2.xer_encoder;
+ td->uper_decoder = asn_DEF_Utf8_2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Utf8_2.per_constraints;
+ td->elements = asn_DEF_Utf8_2.elements;
+ td->elements_count = asn_DEF_Utf8_2.elements_count;
+ td->specifics = asn_DEF_Utf8_2.specifics;
+}
+
+void
+Utf8_3_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Utf8_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Utf8_3_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Utf8_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Utf8_3_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Utf8-3] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
+};
+static asn_per_constraints_t asn_PER_Utf8_3_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
+ "Utf8-3",
+ "Utf8-3",
+ Utf8_3_free,
+ Utf8_3_print,
+ Utf8_3_constraint,
+ Utf8_3_decode_ber,
+ Utf8_3_encode_der,
+ Utf8_3_decode_xer,
+ Utf8_3_encode_xer,
+ Utf8_3_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Utf8_3_tags_1,
+ sizeof(asn_DEF_Utf8_3_tags_1)
+ /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_3_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_3_tags_1)
+ /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
+ &asn_PER_Utf8_3_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Utf8-2] >>> ***/
+
+#include <Utf8-1.h>
+
+/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
+
+typedef Utf8_1_t Utf8_2_t;
+
+/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
+asn_struct_free_f Utf8_2_free;
+asn_struct_print_f Utf8_2_print;
+asn_constr_check_f Utf8_2_constraint;
+ber_type_decoder_f Utf8_2_decode_ber;
+der_type_encoder_f Utf8_2_encode_der;
+xer_type_decoder_f Utf8_2_decode_xer;
+xer_type_encoder_f Utf8_2_encode_xer;
+per_type_decoder_f Utf8_2_decode_uper;
+
+/*** <<< CODE [Utf8-2] >>> ***/
+
+int
+Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Utf8_1_t *st = (const Utf8_1_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = UTF8String_length(st);
+ if((ssize_t)size < 0) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: UTF-8: broken encoding (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((size >= 1 && size <= 2)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Utf8_1,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Utf8_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Utf8_1.free_struct;
+ td->print_struct = asn_DEF_Utf8_1.print_struct;
+ td->ber_decoder = asn_DEF_Utf8_1.ber_decoder;
+ td->der_encoder = asn_DEF_Utf8_1.der_encoder;
+ td->xer_decoder = asn_DEF_Utf8_1.xer_decoder;
+ td->xer_encoder = asn_DEF_Utf8_1.xer_encoder;
+ td->uper_decoder = asn_DEF_Utf8_1.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Utf8_1.per_constraints;
+ td->elements = asn_DEF_Utf8_1.elements;
+ td->elements_count = asn_DEF_Utf8_1.elements_count;
+ td->specifics = asn_DEF_Utf8_1.specifics;
+}
+
+void
+Utf8_2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Utf8_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Utf8_2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Utf8_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Utf8_2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Utf8-2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
+};
+static asn_per_constraints_t asn_PER_Utf8_2_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
+ "Utf8-2",
+ "Utf8-2",
+ Utf8_2_free,
+ Utf8_2_print,
+ Utf8_2_constraint,
+ Utf8_2_decode_ber,
+ Utf8_2_encode_der,
+ Utf8_2_decode_xer,
+ Utf8_2_encode_xer,
+ Utf8_2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Utf8_2_tags_1,
+ sizeof(asn_DEF_Utf8_2_tags_1)
+ /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_2_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_2_tags_1)
+ /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
+ &asn_PER_Utf8_2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Utf8-1] >>> ***/
+
+#include <UTF8String.h>
+
+/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
+
+typedef UTF8String_t Utf8_1_t;
+
+/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
+asn_struct_free_f Utf8_1_free;
+asn_struct_print_f Utf8_1_print;
+asn_constr_check_f Utf8_1_constraint;
+ber_type_decoder_f Utf8_1_decode_ber;
+der_type_encoder_f Utf8_1_encode_der;
+xer_type_decoder_f Utf8_1_decode_xer;
+xer_type_encoder_f Utf8_1_encode_xer;
+per_type_decoder_f Utf8_1_decode_uper;
+
+/*** <<< CODE [Utf8-1] >>> ***/
+
+int
+Utf8_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_UTF8String.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using UTF8String,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Utf8_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_UTF8String.free_struct;
+ td->print_struct = asn_DEF_UTF8String.print_struct;
+ td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
+ td->der_encoder = asn_DEF_UTF8String.der_encoder;
+ td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
+ td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
+ td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_UTF8String.per_constraints;
+ td->elements = asn_DEF_UTF8String.elements;
+ td->elements_count = asn_DEF_UTF8String.elements_count;
+ td->specifics = asn_DEF_UTF8String.specifics;
+}
+
+void
+Utf8_1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Utf8_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Utf8_1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Utf8_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Utf8_1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Utf8_1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Utf8-1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
+ "Utf8-1",
+ "Utf8-1",
+ Utf8_1_free,
+ Utf8_1_print,
+ Utf8_1_constraint,
+ Utf8_1_decode_ber,
+ Utf8_1_encode_der,
+ Utf8_1_decode_xer,
+ Utf8_1_encode_xer,
+ Utf8_1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Utf8_1_tags_1,
+ sizeof(asn_DEF_Utf8_1_tags_1)
+ /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
+ asn_DEF_Utf8_1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Utf8_1_tags_1)
+ /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
+
+#include <Identifier.h>
+
+/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
+
+typedef Identifier_t VisibleIdentifier_t;
+
+/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
+asn_struct_free_f VisibleIdentifier_free;
+asn_struct_print_f VisibleIdentifier_print;
+asn_constr_check_f VisibleIdentifier_constraint;
+ber_type_decoder_f VisibleIdentifier_decode_ber;
+der_type_encoder_f VisibleIdentifier_encode_der;
+xer_type_decoder_f VisibleIdentifier_decode_xer;
+xer_type_encoder_f VisibleIdentifier_encode_xer;
+per_type_decoder_f VisibleIdentifier_decode_uper;
+
+/*** <<< CTABLES [VisibleIdentifier] >>> ***/
+
+static int permitted_alphabet_table_1[256] = {
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
+1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
+};
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ int *table = permitted_alphabet_table_1;
+ /* The underlying type is VisibleString */
+ const VisibleString_t *st = (const VisibleString_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!table[cv]) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [VisibleIdentifier] >>> ***/
+
+int
+VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Identifier_t *st = (const Identifier_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if((size >= 1 && size <= 32)
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using Identifier,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+VisibleIdentifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_Identifier.free_struct;
+ td->print_struct = asn_DEF_Identifier.print_struct;
+ td->ber_decoder = asn_DEF_Identifier.ber_decoder;
+ td->der_encoder = asn_DEF_Identifier.der_encoder;
+ td->xer_decoder = asn_DEF_Identifier.xer_decoder;
+ td->xer_encoder = asn_DEF_Identifier.xer_encoder;
+ td->uper_decoder = asn_DEF_Identifier.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Identifier.per_constraints;
+ td->elements = asn_DEF_Identifier.elements;
+ td->elements_count = asn_DEF_Identifier.elements_count;
+ td->specifics = asn_DEF_Identifier.specifics;
+}
+
+void
+VisibleIdentifier_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+VisibleIdentifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+VisibleIdentifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+VisibleIdentifier_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+VisibleIdentifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+VisibleIdentifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+VisibleIdentifier_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ VisibleIdentifier_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
+ "VisibleIdentifier",
+ "VisibleIdentifier",
+ VisibleIdentifier_free,
+ VisibleIdentifier_print,
+ VisibleIdentifier_constraint,
+ VisibleIdentifier_decode_ber,
+ VisibleIdentifier_encode_der,
+ VisibleIdentifier_decode_xer,
+ VisibleIdentifier_encode_xer,
+ VisibleIdentifier_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_VisibleIdentifier_tags_1,
+ sizeof(asn_DEF_VisibleIdentifier_tags_1)
+ /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
+ asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
+ sizeof(asn_DEF_VisibleIdentifier_tags_1)
+ /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [Sequence] >>> ***/
+
+#include <Int1.h>
+#include <Int4.h>
+#include <BOOLEAN.h>
+#include <ENUMERATED.h>
+#include <NULL.h>
+#include <Int5.h>
+#include <constr_SEQUENCE.h>
+
+/*** <<< DEPS [Sequence] >>> ***/
+
+typedef enum enum_c {
+ enum_c_one = 1,
+ enum_c_two = 2,
+ /*
+ * Enumeration is extensible
+ */
+ enum_c_three = 3
+} enum_c_e;
+
+/*** <<< TYPE-DECLS [Sequence] >>> ***/
+
+typedef struct Sequence {
+ Int1_t *int1_c /* DEFAULT 3 */;
+ Int4_t int4;
+ Int4_t int4_c;
+ BOOLEAN_t *bool /* DEFAULT 1 */;
+ ENUMERATED_t enum_c;
+ NULL_t *null /* OPTIONAL */;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+ Int5_t *int5_c /* OPTIONAL */;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Sequence_t;
+
+/*** <<< FUNC-DECLS [Sequence] >>> ***/
+
+/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
+extern asn_TYPE_descriptor_t asn_DEF_Sequence;
+
+/*** <<< CODE [Sequence] >>> ***/
+
+static int
+enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using ENUMERATED,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+enum_c_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_ENUMERATED.free_struct;
+ td->print_struct = asn_DEF_ENUMERATED.print_struct;
+ td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
+ td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
+ td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
+ td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
+ td->elements = asn_DEF_ENUMERATED.elements;
+ td->elements_count = asn_DEF_ENUMERATED.elements_count;
+ /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
+}
+
+static void
+enum_c_6_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+static int
+enum_c_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+static asn_dec_rval_t
+enum_c_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+static asn_enc_rval_t
+enum_c_6_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+static asn_dec_rval_t
+enum_c_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+static asn_enc_rval_t
+enum_c_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+static asn_dec_rval_t
+enum_c_6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ enum_c_6_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+static int
+memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int1_t *st = (const Int1_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= -2)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+static int
+memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int4_t *st = (const Int4_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 5 && value <= 7)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+static int
+memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const Int5_t *st = (const Int5_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value == 5)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+
+/*** <<< STAT-DEFS [Sequence] >>> ***/
+
+static int asn_DFL_2_set_3(void **sptr) {
+ Int1_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 3 */
+ return asn_long2INTEGER(st, 3);
+}
+static int asn_DFL_5_set_1(void **sptr) {
+ BOOLEAN_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 1 */
+ *st = 1;
+ return 0;
+}
+static asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
+ { 1, 3, "one" },
+ { 2, 3, "two" },
+ { 3, 5, "three" }
+ /* This list is extensible */
+};
+static unsigned int asn_MAP_enum_c_enum2value_6[] = {
+ 0, /* one(1) */
+ 2, /* three(3) */
+ 1 /* two(2) */
+ /* This list is extensible */
+};
+static asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
+ asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
+ asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
+ 3, /* Number of elements in the maps */
+ 3, /* Extensions before this member */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+static asn_per_constraints_t asn_PER_enum_c_constr_6 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
+ "enum-c",
+ "enum-c",
+ enum_c_6_free,
+ enum_c_6_print,
+ enum_c_6_constraint,
+ enum_c_6_decode_ber,
+ enum_c_6_encode_der,
+ enum_c_6_decode_xer,
+ enum_c_6_encode_xer,
+ enum_c_6_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_enum_c_tags_6,
+ sizeof(asn_DEF_enum_c_tags_6)
+ /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
+ asn_DEF_enum_c_tags_6, /* Same as above */
+ sizeof(asn_DEF_enum_c_tags_6)
+ /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
+ &asn_PER_enum_c_constr_6,
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_enum_c_specs_6 /* Additional specs */
+};
+
+static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 = {
+ { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 = {
+ { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static asn_per_constraints_t asn_PER_memb_enum_c_constr_6 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 = {
+ { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
+ { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int1,
+ .memb_constraints = memb_int1_c_constraint_1,
+ .per_constraints = &asn_PER_memb_int1_c_constr_2,
+ .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
+ .name = "int1-c"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_Int4,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "int4"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int4,
+ .memb_constraints = memb_int4_c_constraint_1,
+ .per_constraints = &asn_PER_memb_int4_c_constr_4,
+ .default_value = 0,
+ .name = "int4-c"
+ },
+ { ATF_POINTER, 1, offsetof(struct Sequence, bool),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BOOLEAN,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
+ .name = "bool"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_enum_c_6,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = &asn_PER_memb_enum_c_constr_6,
+ .default_value = 0,
+ .name = "enum-c"
+ },
+ { ATF_POINTER, 2, offsetof(struct Sequence, null),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_NULL,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "null"
+ },
+ { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Int5,
+ .memb_constraints = memb_int5_c_constraint_1,
+ .per_constraints = &asn_PER_memb_int5_c_constr_13,
+ .default_value = 0,
+ .name = "int5-c"
+ },
+};
+static int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 59 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c at 56 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c at 58 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c at 62 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null at 64 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c at 60 */
+ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 at 57 */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
+ sizeof(struct Sequence),
+ offsetof(struct Sequence, _asn_ctx),
+ asn_MAP_Sequence_tag2el_1,
+ 7, /* Count of tags in the map */
+ asn_MAP_Sequence_oms_1, /* Optional members */
+ 3, 1, /* Root/Additions */
+ 5, /* Start extensions */
+ 8 /* Stop extensions */
+};
+asn_TYPE_descriptor_t asn_DEF_Sequence = {
+ "Sequence",
+ "Sequence",
+ SEQUENCE_free,
+ SEQUENCE_print,
+ SEQUENCE_constraint,
+ SEQUENCE_decode_ber,
+ SEQUENCE_encode_der,
+ SEQUENCE_decode_xer,
+ SEQUENCE_encode_xer,
+ SEQUENCE_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ asn_MBR_Sequence_1,
+ 7, /* Elements count */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [SequenceOf] >>> ***/
+
+#include <asn_SEQUENCE_OF.h>
+#include <constr_SEQUENCE_OF.h>
+
+/*** <<< FWD-DECLS [SequenceOf] >>> ***/
+
+struct Sequence;
+
+/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
+
+typedef struct SequenceOf {
+ A_SEQUENCE_OF(struct Sequence) list;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} SequenceOf_t;
+
+/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
+
+/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
+
+#include <Sequence.h>
+
+/*** <<< STAT-DEFS [SequenceOf] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
+ { ATF_POINTER, 0, 0,
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_Sequence,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = ""
+ },
+};
+static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
+ sizeof(struct SequenceOf),
+ offsetof(struct SequenceOf, _asn_ctx),
+ 0, /* XER encoding is XMLDelimitedItemList */
+};
+static asn_per_constraints_t asn_PER_SequenceOf_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */
+};
+asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
+ "SequenceOf",
+ "SequenceOf",
+ SEQUENCE_OF_free,
+ SEQUENCE_OF_print,
+ SEQUENCE_OF_constraint,
+ SEQUENCE_OF_decode_ber,
+ SEQUENCE_OF_encode_der,
+ SEQUENCE_OF_decode_xer,
+ SEQUENCE_OF_encode_xer,
+ SEQUENCE_OF_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_SequenceOf_tags_1,
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ asn_DEF_SequenceOf_tags_1, /* Same as above */
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ &asn_PER_SequenceOf_constr_1,
+ asn_MBR_SequenceOf_1,
+ 1, /* Single element */
+ &asn_SPC_SequenceOf_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Enum0] >>> ***/
+
+#include <ENUMERATED.h>
+
+/*** <<< DEPS [Enum0] >>> ***/
+
+typedef enum Enum0 {
+ Enum0_one = 0,
+ Enum0_two = 1
+} Enum0_e;
+
+/*** <<< TYPE-DECLS [Enum0] >>> ***/
+
+typedef ENUMERATED_t Enum0_t;
+
+/*** <<< FUNC-DECLS [Enum0] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Enum0;
+asn_struct_free_f Enum0_free;
+asn_struct_print_f Enum0_print;
+asn_constr_check_f Enum0_constraint;
+ber_type_decoder_f Enum0_decode_ber;
+der_type_encoder_f Enum0_encode_der;
+xer_type_decoder_f Enum0_decode_xer;
+xer_type_encoder_f Enum0_encode_xer;
+per_type_decoder_f Enum0_decode_uper;
+
+/*** <<< CODE [Enum0] >>> ***/
+
+int
+Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using ENUMERATED,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Enum0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_ENUMERATED.free_struct;
+ td->print_struct = asn_DEF_ENUMERATED.print_struct;
+ td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
+ td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
+ td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
+ td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
+ td->elements = asn_DEF_ENUMERATED.elements;
+ td->elements_count = asn_DEF_ENUMERATED.elements_count;
+ /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
+}
+
+void
+Enum0_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Enum0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Enum0_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Enum0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum0_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Enum0_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Enum0] >>> ***/
+
+static asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
+ { 0, 3, "one" },
+ { 1, 3, "two" }
+};
+static unsigned int asn_MAP_Enum0_enum2value_1[] = {
+ 0, /* one(0) */
+ 1 /* two(1) */
+};
+static asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
+ asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
+ 2, /* Number of elements in the maps */
+ 0, /* Enumeration is not extensible */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+static asn_per_constraints_t asn_PER_Enum0_constr_1 = {
+ { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Enum0 = {
+ "Enum0",
+ "Enum0",
+ Enum0_free,
+ Enum0_print,
+ Enum0_constraint,
+ Enum0_decode_ber,
+ Enum0_encode_der,
+ Enum0_decode_xer,
+ Enum0_encode_xer,
+ Enum0_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Enum0_tags_1,
+ sizeof(asn_DEF_Enum0_tags_1)
+ /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
+ asn_DEF_Enum0_tags_1, /* Same as above */
+ sizeof(asn_DEF_Enum0_tags_1)
+ /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
+ &asn_PER_Enum0_constr_1,
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_Enum0_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Enum1] >>> ***/
+
+#include <NativeEnumerated.h>
+
+/*** <<< DEPS [Enum1] >>> ***/
+
+typedef enum Enum1 {
+ Enum1_one = 0,
+ Enum1_two = 1
+} Enum1_e;
+
+/*** <<< TYPE-DECLS [Enum1] >>> ***/
+
+typedef long Enum1_t;
+
+/*** <<< FUNC-DECLS [Enum1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Enum1;
+asn_struct_free_f Enum1_free;
+asn_struct_print_f Enum1_print;
+asn_constr_check_f Enum1_constraint;
+ber_type_decoder_f Enum1_decode_ber;
+der_type_encoder_f Enum1_encode_der;
+xer_type_decoder_f Enum1_decode_xer;
+xer_type_encoder_f Enum1_encode_xer;
+per_type_decoder_f Enum1_decode_uper;
+
+/*** <<< CODE [Enum1] >>> ***/
+
+int
+Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if((value == 0)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeEnumerated,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Enum1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeEnumerated.free_struct;
+ td->print_struct = asn_DEF_NativeEnumerated.print_struct;
+ td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
+ td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
+ td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
+ td->elements = asn_DEF_NativeEnumerated.elements;
+ td->elements_count = asn_DEF_NativeEnumerated.elements_count;
+ /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
+}
+
+void
+Enum1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Enum1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Enum1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Enum1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Enum1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Enum1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Enum1] >>> ***/
+
+static asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
+ { 0, 3, "one" },
+ { 1, 3, "two" }
+};
+static unsigned int asn_MAP_Enum1_enum2value_1[] = {
+ 0, /* one(0) */
+ 1 /* two(1) */
+};
+static asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
+ asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
+ 2, /* Number of elements in the maps */
+ 0, /* Enumeration is not extensible */
+ 1 /* Strict enumeration */
+};
+static ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
+};
+static asn_per_constraints_t asn_PER_Enum1_constr_1 = {
+ { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Enum1 = {
+ "Enum1",
+ "Enum1",
+ Enum1_free,
+ Enum1_print,
+ Enum1_constraint,
+ Enum1_decode_ber,
+ Enum1_encode_der,
+ Enum1_decode_xer,
+ Enum1_encode_xer,
+ Enum1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Enum1_tags_1,
+ sizeof(asn_DEF_Enum1_tags_1)
+ /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
+ asn_DEF_Enum1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Enum1_tags_1)
+ /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
+ &asn_PER_Enum1_constr_1,
+ 0, 0, /* Defined elsewhere */
+ &asn_SPC_Enum1_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Identifier] >>> ***/
+
+#include <VisibleString.h>
+
+/*** <<< TYPE-DECLS [Identifier] >>> ***/
+
+typedef VisibleString_t Identifier_t;
+
+/*** <<< FUNC-DECLS [Identifier] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Identifier;
+asn_struct_free_f Identifier_free;
+asn_struct_print_f Identifier_print;
+asn_constr_check_f Identifier_constraint;
+ber_type_decoder_f Identifier_decode_ber;
+der_type_encoder_f Identifier_encode_der;
+xer_type_decoder_f Identifier_decode_xer;
+xer_type_encoder_f Identifier_encode_xer;
+per_type_decoder_f Identifier_decode_uper;
+
+/*** <<< CTABLES [Identifier] >>> ***/
+
+static int permitted_alphabet_table_1[256] = {
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
+0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
+1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
+0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
+1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
+};
+
+static int check_permitted_alphabet_1(const void *sptr) {
+ int *table = permitted_alphabet_table_1;
+ /* The underlying type is VisibleString */
+ const VisibleString_t *st = (const VisibleString_t *)sptr;
+ const uint8_t *ch = st->buf;
+ const uint8_t *end = ch + st->size;
+
+ for(; ch < end; ch++) {
+ uint8_t cv = *ch;
+ if(!table[cv]) return -1;
+ }
+ return 0;
+}
+
+
+/*** <<< CODE [Identifier] >>> ***/
+
+int
+Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const VisibleString_t *st = (const VisibleString_t *)sptr;
+ size_t size;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ size = st->size;
+
+ if((size >= 1 && size <= 32)
+ && !check_permitted_alphabet_1(st)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using VisibleString,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+Identifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_VisibleString.free_struct;
+ td->print_struct = asn_DEF_VisibleString.print_struct;
+ td->ber_decoder = asn_DEF_VisibleString.ber_decoder;
+ td->der_encoder = asn_DEF_VisibleString.der_encoder;
+ td->xer_decoder = asn_DEF_VisibleString.xer_decoder;
+ td->xer_encoder = asn_DEF_VisibleString.xer_encoder;
+ td->uper_decoder = asn_DEF_VisibleString.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_VisibleString.per_constraints;
+ td->elements = asn_DEF_VisibleString.elements;
+ td->elements_count = asn_DEF_VisibleString.elements_count;
+ td->specifics = asn_DEF_VisibleString.specifics;
+}
+
+void
+Identifier_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+Identifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+Identifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+Identifier_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+Identifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+Identifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+Identifier_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ Identifier_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [Identifier] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
+};
+static asn_per_constraints_t asn_PER_Identifier_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */
+};
+asn_TYPE_descriptor_t asn_DEF_Identifier = {
+ "Identifier",
+ "Identifier",
+ Identifier_free,
+ Identifier_print,
+ Identifier_constraint,
+ Identifier_decode_ber,
+ Identifier_encode_der,
+ Identifier_decode_xer,
+ Identifier_encode_xer,
+ Identifier_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_Identifier_tags_1,
+ sizeof(asn_DEF_Identifier_tags_1)
+ /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
+ asn_DEF_Identifier_tags_1, /* Same as above */
+ sizeof(asn_DEF_Identifier_tags_1)
+ /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
+ &asn_PER_Identifier_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
diff --git a/tests/59-choice-extended-OK.asn1.-P b/tests/59-choice-extended-OK.asn1.-P
index 2590eab1..ad44cdd7 100644
--- a/tests/59-choice-extended-OK.asn1.-P
+++ b/tests/59-choice-extended-OK.asn1.-P
@@ -52,6 +52,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.b),
@@ -59,6 +61,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 0, offsetof(struct Choice, choice.c),
@@ -66,25 +70,28 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Choice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "c"
},
};
-static ber_tlv_tag_t asn_DEF_Choice_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Choice_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 17 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c at 19 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
sizeof(struct Choice),
offsetof(struct Choice, _asn_ctx),
offsetof(struct Choice, present),
sizeof(((struct Choice *)0)->present),
- asn_MAP_Choice_1_tag2el,
+ asn_MAP_Choice_tag2el_1,
3, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice = {
"Choice",
@@ -96,15 +103,17 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
- asn_DEF_Choice_1_tags,
- sizeof(asn_DEF_Choice_1_tags)
- /sizeof(asn_DEF_Choice_1_tags[0]), /* 1 */
- asn_DEF_Choice_1_tags, /* Same as above */
- sizeof(asn_DEF_Choice_1_tags)
- /sizeof(asn_DEF_Choice_1_tags[0]), /* 1 */
+ asn_DEF_Choice_tags_1,
+ sizeof(asn_DEF_Choice_tags_1)
+ /sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
+ asn_DEF_Choice_tags_1, /* Same as above */
+ sizeof(asn_DEF_Choice_tags_1)
+ /sizeof(asn_DEF_Choice_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Choice_1,
3, /* Elements count */
- &asn_SPC_Choice_1_specs /* Additional specs */
+ &asn_SPC_Choice_specs_1 /* Additional specs */
};
diff --git a/tests/60-any-OK.asn1.-P b/tests/60-any-OK.asn1.-P
index 4d2f7e87..d385a4e1 100644
--- a/tests/60-any-OK.asn1.-P
+++ b/tests/60-any-OK.asn1.-P
@@ -27,6 +27,8 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T1, any),
@@ -34,20 +36,23 @@ static asn_TYPE_member_t asn_MBR_T1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "any"
},
};
-static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* i at 15 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T1_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = {
sizeof(struct T1),
offsetof(struct T1, _asn_ctx),
- asn_MAP_T1_1_tag2el,
+ asn_MAP_T1_tag2el_1,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -61,16 +66,18 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T1_1_tags,
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
- asn_DEF_T1_1_tags, /* Same as above */
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 1 */
+ asn_DEF_T1_tags_1,
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
+ asn_DEF_T1_tags_1, /* Same as above */
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T1_1,
2, /* Elements count */
- &asn_SPC_T1_1_specs /* Additional specs */
+ &asn_SPC_T1_specs_1 /* Additional specs */
};
@@ -102,6 +109,8 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "i"
},
{ ATF_POINTER, 1, offsetof(struct T2, any),
@@ -109,21 +118,24 @@ static asn_TYPE_member_t asn_MBR_T2_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "any"
},
};
-static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* i at 20 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* any at 21 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T2_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T2_specs_1 = {
sizeof(struct T2),
offsetof(struct T2, _asn_ctx),
- asn_MAP_T2_1_tag2el,
+ asn_MAP_T2_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -137,16 +149,18 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T2_1_tags,
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
- asn_DEF_T2_1_tags, /* Same as above */
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 1 */
+ asn_DEF_T2_tags_1,
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ asn_DEF_T2_tags_1, /* Same as above */
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T2_1,
2, /* Elements count */
- &asn_SPC_T2_1_specs /* Additional specs */
+ &asn_SPC_T2_specs_1 /* Additional specs */
};
@@ -177,6 +191,8 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "any1"
},
{ ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct T3, any2),
@@ -184,17 +200,20 @@ static asn_TYPE_member_t asn_MBR_T3_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ANY,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "any2"
},
};
-static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SEQUENCE_specifics_t asn_SPC_T3_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T3_specs_1 = {
sizeof(struct T3),
offsetof(struct T3, _asn_ctx),
0, /* No top level tags */
0, /* No tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -208,15 +227,17 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T3_1_tags,
- sizeof(asn_DEF_T3_1_tags)
- /sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
- asn_DEF_T3_1_tags, /* Same as above */
- sizeof(asn_DEF_T3_1_tags)
- /sizeof(asn_DEF_T3_1_tags[0]), /* 1 */
+ asn_DEF_T3_tags_1,
+ sizeof(asn_DEF_T3_tags_1)
+ /sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
+ asn_DEF_T3_tags_1, /* Same as above */
+ sizeof(asn_DEF_T3_tags_1)
+ /sizeof(asn_DEF_T3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T3_1,
2, /* Elements count */
- &asn_SPC_T3_1_specs /* Additional specs */
+ &asn_SPC_T3_specs_1 /* Additional specs */
};
diff --git a/tests/65-multi-tag-OK.asn1.-P b/tests/65-multi-tag-OK.asn1.-P
index 25a449d0..f4b39077 100644
--- a/tests/65-multi-tag-OK.asn1.-P
+++ b/tests/65-multi-tag-OK.asn1.-P
@@ -40,6 +40,9 @@ T1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T2.der_encoder;
td->xer_decoder = asn_DEF_T2.xer_decoder;
td->xer_encoder = asn_DEF_T2.xer_encoder;
+ td->uper_decoder = asn_DEF_T2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T2.per_constraints;
td->elements = asn_DEF_T2.elements;
td->elements_count = asn_DEF_T2.elements_count;
td->specifics = asn_DEF_T2.specifics;
@@ -92,13 +95,13 @@ T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T1] >>> ***/
-static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T1_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
@@ -116,13 +119,15 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
T1_encode_der,
T1_decode_xer,
T1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T1_1_tags,
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 4 */
- asn_DEF_T1_1_all_tags,
- sizeof(asn_DEF_T1_1_all_tags)
- /sizeof(asn_DEF_T1_1_all_tags[0]), /* 6 */
+ asn_DEF_T1_tags_1,
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 4 */
+ asn_DEF_T1_all_tags_1,
+ sizeof(asn_DEF_T1_all_tags_1)
+ /sizeof(asn_DEF_T1_all_tags_1[0]), /* 6 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -169,6 +174,9 @@ T2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T3.der_encoder;
td->xer_decoder = asn_DEF_T3.xer_decoder;
td->xer_encoder = asn_DEF_T3.xer_encoder;
+ td->uper_decoder = asn_DEF_T3.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T3.per_constraints;
td->elements = asn_DEF_T3.elements;
td->elements_count = asn_DEF_T3.elements_count;
td->specifics = asn_DEF_T3.specifics;
@@ -221,12 +229,12 @@ T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T2] >>> ***/
-static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T2_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
@@ -243,13 +251,15 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
T2_encode_der,
T2_decode_xer,
T2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T2_1_tags,
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 3 */
- asn_DEF_T2_1_all_tags,
- sizeof(asn_DEF_T2_1_all_tags)
- /sizeof(asn_DEF_T2_1_all_tags[0]), /* 5 */
+ asn_DEF_T2_tags_1,
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 3 */
+ asn_DEF_T2_all_tags_1,
+ sizeof(asn_DEF_T2_all_tags_1)
+ /sizeof(asn_DEF_T2_all_tags_1[0]), /* 5 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -296,6 +306,9 @@ T3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T4.der_encoder;
td->xer_decoder = asn_DEF_T4.xer_decoder;
td->xer_encoder = asn_DEF_T4.xer_encoder;
+ td->uper_decoder = asn_DEF_T4.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T4.per_constraints;
td->elements = asn_DEF_T4.elements;
td->elements_count = asn_DEF_T4.elements_count;
td->specifics = asn_DEF_T4.specifics;
@@ -348,11 +361,11 @@ T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T3] >>> ***/
-static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T3_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T3_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
@@ -368,13 +381,15 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
T3_encode_der,
T3_decode_xer,
T3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T3_1_tags,
- sizeof(asn_DEF_T3_1_tags)
- /sizeof(asn_DEF_T3_1_tags[0]), /* 2 */
- asn_DEF_T3_1_all_tags,
- sizeof(asn_DEF_T3_1_all_tags)
- /sizeof(asn_DEF_T3_1_all_tags[0]), /* 4 */
+ asn_DEF_T3_tags_1,
+ sizeof(asn_DEF_T3_tags_1)
+ /sizeof(asn_DEF_T3_tags_1[0]), /* 2 */
+ asn_DEF_T3_all_tags_1,
+ sizeof(asn_DEF_T3_all_tags_1)
+ /sizeof(asn_DEF_T3_all_tags_1[0]), /* 4 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -421,6 +436,9 @@ T4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T5.der_encoder;
td->xer_decoder = asn_DEF_T5.xer_decoder;
td->xer_encoder = asn_DEF_T5.xer_encoder;
+ td->uper_decoder = asn_DEF_T5.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T5.per_constraints;
td->elements = asn_DEF_T5.elements;
td->elements_count = asn_DEF_T5.elements_count;
td->specifics = asn_DEF_T5.specifics;
@@ -473,7 +491,7 @@ T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T4] >>> ***/
-static ber_tlv_tag_t asn_DEF_T4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T4_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
@@ -488,13 +506,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
T4_encode_der,
T4_decode_xer,
T4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T4_1_tags,
- sizeof(asn_DEF_T4_1_tags)
- /sizeof(asn_DEF_T4_1_tags[0]) - 1, /* 2 */
- asn_DEF_T4_1_tags, /* Same as above */
- sizeof(asn_DEF_T4_1_tags)
- /sizeof(asn_DEF_T4_1_tags[0]), /* 3 */
+ asn_DEF_T4_tags_1,
+ sizeof(asn_DEF_T4_tags_1)
+ /sizeof(asn_DEF_T4_tags_1[0]) - 1, /* 2 */
+ asn_DEF_T4_tags_1, /* Same as above */
+ sizeof(asn_DEF_T4_tags_1)
+ /sizeof(asn_DEF_T4_tags_1[0]), /* 3 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -541,6 +561,9 @@ T5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T6.der_encoder;
td->xer_decoder = asn_DEF_T6.xer_decoder;
td->xer_encoder = asn_DEF_T6.xer_encoder;
+ td->uper_decoder = asn_DEF_T6.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T6.per_constraints;
td->elements = asn_DEF_T6.elements;
td->elements_count = asn_DEF_T6.elements_count;
td->specifics = asn_DEF_T6.specifics;
@@ -593,7 +616,7 @@ T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T5] >>> ***/
-static ber_tlv_tag_t asn_DEF_T5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T5_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
@@ -607,13 +630,15 @@ asn_TYPE_descriptor_t asn_DEF_T5 = {
T5_encode_der,
T5_decode_xer,
T5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T5_1_tags,
- sizeof(asn_DEF_T5_1_tags)
- /sizeof(asn_DEF_T5_1_tags[0]) - 1, /* 1 */
- asn_DEF_T5_1_tags, /* Same as above */
- sizeof(asn_DEF_T5_1_tags)
- /sizeof(asn_DEF_T5_1_tags[0]), /* 2 */
+ asn_DEF_T5_tags_1,
+ sizeof(asn_DEF_T5_tags_1)
+ /sizeof(asn_DEF_T5_tags_1[0]) - 1, /* 1 */
+ asn_DEF_T5_tags_1, /* Same as above */
+ sizeof(asn_DEF_T5_tags_1)
+ /sizeof(asn_DEF_T5_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -660,6 +685,9 @@ T6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_REAL.der_encoder;
td->xer_decoder = asn_DEF_REAL.xer_decoder;
td->xer_encoder = asn_DEF_REAL.xer_encoder;
+ td->uper_decoder = asn_DEF_REAL.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_REAL.per_constraints;
td->elements = asn_DEF_REAL.elements;
td->elements_count = asn_DEF_REAL.elements_count;
td->specifics = asn_DEF_REAL.specifics;
@@ -712,7 +740,7 @@ T6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T6] >>> ***/
-static ber_tlv_tag_t asn_DEF_T6_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T6 = {
@@ -725,13 +753,15 @@ asn_TYPE_descriptor_t asn_DEF_T6 = {
T6_encode_der,
T6_decode_xer,
T6_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T6_1_tags,
- sizeof(asn_DEF_T6_1_tags)
- /sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
- asn_DEF_T6_1_tags, /* Same as above */
- sizeof(asn_DEF_T6_1_tags)
- /sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
+ asn_DEF_T6_tags_1,
+ sizeof(asn_DEF_T6_tags_1)
+ /sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
+ asn_DEF_T6_tags_1, /* Same as above */
+ sizeof(asn_DEF_T6_tags_1)
+ /sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -778,6 +808,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Ts.der_encoder;
td->xer_decoder = asn_DEF_Ts.xer_decoder;
td->xer_encoder = asn_DEF_Ts.xer_encoder;
+ td->uper_decoder = asn_DEF_Ts.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Ts.per_constraints;
td->elements = asn_DEF_Ts.elements;
td->elements_count = asn_DEF_Ts.elements_count;
td->specifics = asn_DEF_Ts.specifics;
@@ -830,7 +863,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
@@ -845,13 +878,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]) - 2, /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 3 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]) - 2, /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 3 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -886,6 +921,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m1"
},
{ ATF_POINTER, 1, offsetof(struct Ts, m2),
@@ -893,6 +930,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
@@ -900,23 +939,26 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m3"
},
};
-static ber_tlv_tag_t asn_DEF_Ts_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Ts_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Ts_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Ts_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 at 27 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Ts_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1 = {
sizeof(struct Ts),
offsetof(struct Ts, _asn_ctx),
- asn_MAP_Ts_1_tag2el,
+ asn_MAP_Ts_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -930,15 +972,17 @@ asn_TYPE_descriptor_t asn_DEF_Ts = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Ts_1_tags,
- sizeof(asn_DEF_Ts_1_tags)
- /sizeof(asn_DEF_Ts_1_tags[0]) - 1, /* 1 */
- asn_DEF_Ts_1_tags, /* Same as above */
- sizeof(asn_DEF_Ts_1_tags)
- /sizeof(asn_DEF_Ts_1_tags[0]), /* 2 */
+ asn_DEF_Ts_tags_1,
+ sizeof(asn_DEF_Ts_tags_1)
+ /sizeof(asn_DEF_Ts_tags_1[0]) - 1, /* 1 */
+ asn_DEF_Ts_tags_1, /* Same as above */
+ sizeof(asn_DEF_Ts_tags_1)
+ /sizeof(asn_DEF_Ts_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
- &asn_SPC_Ts_1_specs /* Additional specs */
+ &asn_SPC_Ts_specs_1 /* Additional specs */
};
diff --git a/tests/65-multi-tag-OK.asn1.-Pfnative-types b/tests/65-multi-tag-OK.asn1.-Pfnative-types
index 04a044e9..fd5b46fb 100644
--- a/tests/65-multi-tag-OK.asn1.-Pfnative-types
+++ b/tests/65-multi-tag-OK.asn1.-Pfnative-types
@@ -40,6 +40,9 @@ T1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T2.der_encoder;
td->xer_decoder = asn_DEF_T2.xer_decoder;
td->xer_encoder = asn_DEF_T2.xer_encoder;
+ td->uper_decoder = asn_DEF_T2.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T2.per_constraints;
td->elements = asn_DEF_T2.elements;
td->elements_count = asn_DEF_T2.elements_count;
td->specifics = asn_DEF_T2.specifics;
@@ -92,13 +95,13 @@ T1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T1] >>> ***/
-static ber_tlv_tag_t asn_DEF_T1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T1_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T1_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
@@ -116,13 +119,15 @@ asn_TYPE_descriptor_t asn_DEF_T1 = {
T1_encode_der,
T1_decode_xer,
T1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T1_1_tags,
- sizeof(asn_DEF_T1_1_tags)
- /sizeof(asn_DEF_T1_1_tags[0]), /* 4 */
- asn_DEF_T1_1_all_tags,
- sizeof(asn_DEF_T1_1_all_tags)
- /sizeof(asn_DEF_T1_1_all_tags[0]), /* 6 */
+ asn_DEF_T1_tags_1,
+ sizeof(asn_DEF_T1_tags_1)
+ /sizeof(asn_DEF_T1_tags_1[0]), /* 4 */
+ asn_DEF_T1_all_tags_1,
+ sizeof(asn_DEF_T1_all_tags_1)
+ /sizeof(asn_DEF_T1_all_tags_1[0]), /* 6 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -169,6 +174,9 @@ T2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T3.der_encoder;
td->xer_decoder = asn_DEF_T3.xer_decoder;
td->xer_encoder = asn_DEF_T3.xer_encoder;
+ td->uper_decoder = asn_DEF_T3.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T3.per_constraints;
td->elements = asn_DEF_T3.elements;
td->elements_count = asn_DEF_T3.elements_count;
td->specifics = asn_DEF_T3.specifics;
@@ -221,12 +229,12 @@ T2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T2] >>> ***/
-static ber_tlv_tag_t asn_DEF_T2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T2_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T2_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
@@ -243,13 +251,15 @@ asn_TYPE_descriptor_t asn_DEF_T2 = {
T2_encode_der,
T2_decode_xer,
T2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T2_1_tags,
- sizeof(asn_DEF_T2_1_tags)
- /sizeof(asn_DEF_T2_1_tags[0]), /* 3 */
- asn_DEF_T2_1_all_tags,
- sizeof(asn_DEF_T2_1_all_tags)
- /sizeof(asn_DEF_T2_1_all_tags[0]), /* 5 */
+ asn_DEF_T2_tags_1,
+ sizeof(asn_DEF_T2_tags_1)
+ /sizeof(asn_DEF_T2_tags_1[0]), /* 3 */
+ asn_DEF_T2_all_tags_1,
+ sizeof(asn_DEF_T2_all_tags_1)
+ /sizeof(asn_DEF_T2_all_tags_1[0]), /* 5 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -296,6 +306,9 @@ T3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T4.der_encoder;
td->xer_decoder = asn_DEF_T4.xer_decoder;
td->xer_encoder = asn_DEF_T4.xer_encoder;
+ td->uper_decoder = asn_DEF_T4.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T4.per_constraints;
td->elements = asn_DEF_T4.elements;
td->elements_count = asn_DEF_T4.elements_count;
td->specifics = asn_DEF_T4.specifics;
@@ -348,11 +361,11 @@ T3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T3] >>> ***/
-static ber_tlv_tag_t asn_DEF_T3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T3_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2))
};
-static ber_tlv_tag_t asn_DEF_T3_1_all_tags[] = {
+static ber_tlv_tag_t asn_DEF_T3_all_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
@@ -368,13 +381,15 @@ asn_TYPE_descriptor_t asn_DEF_T3 = {
T3_encode_der,
T3_decode_xer,
T3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T3_1_tags,
- sizeof(asn_DEF_T3_1_tags)
- /sizeof(asn_DEF_T3_1_tags[0]), /* 2 */
- asn_DEF_T3_1_all_tags,
- sizeof(asn_DEF_T3_1_all_tags)
- /sizeof(asn_DEF_T3_1_all_tags[0]), /* 4 */
+ asn_DEF_T3_tags_1,
+ sizeof(asn_DEF_T3_tags_1)
+ /sizeof(asn_DEF_T3_tags_1[0]), /* 2 */
+ asn_DEF_T3_all_tags_1,
+ sizeof(asn_DEF_T3_all_tags_1)
+ /sizeof(asn_DEF_T3_all_tags_1[0]), /* 4 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -421,6 +436,9 @@ T4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T5.der_encoder;
td->xer_decoder = asn_DEF_T5.xer_decoder;
td->xer_encoder = asn_DEF_T5.xer_encoder;
+ td->uper_decoder = asn_DEF_T5.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T5.per_constraints;
td->elements = asn_DEF_T5.elements;
td->elements_count = asn_DEF_T5.elements_count;
td->specifics = asn_DEF_T5.specifics;
@@ -473,7 +491,7 @@ T4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T4] >>> ***/
-static ber_tlv_tag_t asn_DEF_T4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T4_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
@@ -488,13 +506,15 @@ asn_TYPE_descriptor_t asn_DEF_T4 = {
T4_encode_der,
T4_decode_xer,
T4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T4_1_tags,
- sizeof(asn_DEF_T4_1_tags)
- /sizeof(asn_DEF_T4_1_tags[0]) - 1, /* 2 */
- asn_DEF_T4_1_tags, /* Same as above */
- sizeof(asn_DEF_T4_1_tags)
- /sizeof(asn_DEF_T4_1_tags[0]), /* 3 */
+ asn_DEF_T4_tags_1,
+ sizeof(asn_DEF_T4_tags_1)
+ /sizeof(asn_DEF_T4_tags_1[0]) - 1, /* 2 */
+ asn_DEF_T4_tags_1, /* Same as above */
+ sizeof(asn_DEF_T4_tags_1)
+ /sizeof(asn_DEF_T4_tags_1[0]), /* 3 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -541,6 +561,9 @@ T5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_T6.der_encoder;
td->xer_decoder = asn_DEF_T6.xer_decoder;
td->xer_encoder = asn_DEF_T6.xer_encoder;
+ td->uper_decoder = asn_DEF_T6.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_T6.per_constraints;
td->elements = asn_DEF_T6.elements;
td->elements_count = asn_DEF_T6.elements_count;
td->specifics = asn_DEF_T6.specifics;
@@ -593,7 +616,7 @@ T5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T5] >>> ***/
-static ber_tlv_tag_t asn_DEF_T5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T5_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
@@ -607,13 +630,15 @@ asn_TYPE_descriptor_t asn_DEF_T5 = {
T5_encode_der,
T5_decode_xer,
T5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T5_1_tags,
- sizeof(asn_DEF_T5_1_tags)
- /sizeof(asn_DEF_T5_1_tags[0]) - 1, /* 1 */
- asn_DEF_T5_1_tags, /* Same as above */
- sizeof(asn_DEF_T5_1_tags)
- /sizeof(asn_DEF_T5_1_tags[0]), /* 2 */
+ asn_DEF_T5_tags_1,
+ sizeof(asn_DEF_T5_tags_1)
+ /sizeof(asn_DEF_T5_tags_1[0]) - 1, /* 1 */
+ asn_DEF_T5_tags_1, /* Same as above */
+ sizeof(asn_DEF_T5_tags_1)
+ /sizeof(asn_DEF_T5_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -660,6 +685,9 @@ T6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeReal.der_encoder;
td->xer_decoder = asn_DEF_NativeReal.xer_decoder;
td->xer_encoder = asn_DEF_NativeReal.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeReal.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeReal.per_constraints;
td->elements = asn_DEF_NativeReal.elements;
td->elements_count = asn_DEF_NativeReal.elements_count;
td->specifics = asn_DEF_NativeReal.specifics;
@@ -712,7 +740,7 @@ T6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T6] >>> ***/
-static ber_tlv_tag_t asn_DEF_T6_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (9 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T6 = {
@@ -725,13 +753,15 @@ asn_TYPE_descriptor_t asn_DEF_T6 = {
T6_encode_der,
T6_decode_xer,
T6_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T6_1_tags,
- sizeof(asn_DEF_T6_1_tags)
- /sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
- asn_DEF_T6_1_tags, /* Same as above */
- sizeof(asn_DEF_T6_1_tags)
- /sizeof(asn_DEF_T6_1_tags[0]), /* 1 */
+ asn_DEF_T6_tags_1,
+ sizeof(asn_DEF_T6_tags_1)
+ /sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
+ asn_DEF_T6_tags_1, /* Same as above */
+ sizeof(asn_DEF_T6_tags_1)
+ /sizeof(asn_DEF_T6_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -778,6 +808,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Ts.der_encoder;
td->xer_decoder = asn_DEF_Ts.xer_decoder;
td->xer_encoder = asn_DEF_Ts.xer_encoder;
+ td->uper_decoder = asn_DEF_Ts.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Ts.per_constraints;
td->elements = asn_DEF_Ts.elements;
td->elements_count = asn_DEF_Ts.elements_count;
td->specifics = asn_DEF_Ts.specifics;
@@ -830,7 +863,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
@@ -845,13 +878,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]) - 2, /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 3 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]) - 2, /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 3 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -886,6 +921,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m1"
},
{ ATF_POINTER, 1, offsetof(struct Ts, m2),
@@ -893,6 +930,8 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ts, m3),
@@ -900,23 +939,26 @@ static asn_TYPE_member_t asn_MBR_Ts_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_T3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m3"
},
};
-static ber_tlv_tag_t asn_DEF_Ts_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Ts_tags_1[] = {
(ASN_TAG_CLASS_CONTEXT | (123 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Ts_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Ts_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* m1 at 24 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* m2 at 25 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 } /* m3 at 27 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Ts_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Ts_specs_1 = {
sizeof(struct Ts),
offsetof(struct Ts, _asn_ctx),
- asn_MAP_Ts_1_tag2el,
+ asn_MAP_Ts_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -930,15 +972,17 @@ asn_TYPE_descriptor_t asn_DEF_Ts = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Ts_1_tags,
- sizeof(asn_DEF_Ts_1_tags)
- /sizeof(asn_DEF_Ts_1_tags[0]) - 1, /* 1 */
- asn_DEF_Ts_1_tags, /* Same as above */
- sizeof(asn_DEF_Ts_1_tags)
- /sizeof(asn_DEF_Ts_1_tags[0]), /* 2 */
+ asn_DEF_Ts_tags_1,
+ sizeof(asn_DEF_Ts_tags_1)
+ /sizeof(asn_DEF_Ts_tags_1[0]) - 1, /* 1 */
+ asn_DEF_Ts_tags_1, /* Same as above */
+ sizeof(asn_DEF_Ts_tags_1)
+ /sizeof(asn_DEF_Ts_tags_1[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_Ts_1,
3, /* Elements count */
- &asn_SPC_Ts_1_specs /* Additional specs */
+ &asn_SPC_Ts_specs_1 /* Additional specs */
};
diff --git a/tests/66-ref-simple-OK.asn1.-P b/tests/66-ref-simple-OK.asn1.-P
index 121e6c86..1e6f4ed8 100644
--- a/tests/66-ref-simple-OK.asn1.-P
+++ b/tests/66-ref-simple-OK.asn1.-P
@@ -26,13 +26,15 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_SimpleType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "named"
},
};
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_T_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -47,16 +49,18 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
1, /* Single element */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
@@ -109,6 +113,9 @@ SimpleType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -161,24 +168,24 @@ SimpleType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SimpleType] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_SimpleType_1_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_SimpleType_value2enum_1[] = {
{ 0, 3, "one" },
{ 1, 3, "two" },
{ 2, 5, "three" }
};
-static unsigned int asn_MAP_SimpleType_1_enum2value[] = {
+static unsigned int asn_MAP_SimpleType_enum2value_1[] = {
0, /* one(0) */
2, /* three(2) */
1 /* two(1) */
};
-static asn_INTEGER_specifics_t asn_SPC_SimpleType_1_specs = {
- asn_MAP_SimpleType_1_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_SimpleType_1_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_SimpleType_specs_1 = {
+ asn_MAP_SimpleType_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_SimpleType_enum2value_1, /* N => "tag"; sorted by N */
3, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_SimpleType_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SimpleType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_SimpleType = {
@@ -191,14 +198,16 @@ asn_TYPE_descriptor_t asn_DEF_SimpleType = {
SimpleType_encode_der,
SimpleType_decode_xer,
SimpleType_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SimpleType_1_tags,
- sizeof(asn_DEF_SimpleType_1_tags)
- /sizeof(asn_DEF_SimpleType_1_tags[0]), /* 1 */
- asn_DEF_SimpleType_1_tags, /* Same as above */
- sizeof(asn_DEF_SimpleType_1_tags)
- /sizeof(asn_DEF_SimpleType_1_tags[0]), /* 1 */
+ asn_DEF_SimpleType_tags_1,
+ sizeof(asn_DEF_SimpleType_tags_1)
+ /sizeof(asn_DEF_SimpleType_tags_1[0]), /* 1 */
+ asn_DEF_SimpleType_tags_1, /* Same as above */
+ sizeof(asn_DEF_SimpleType_tags_1)
+ /sizeof(asn_DEF_SimpleType_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_SimpleType_1_specs /* Additional specs */
+ &asn_SPC_SimpleType_specs_1 /* Additional specs */
};
diff --git a/tests/69-reserved-words-OK.asn1.-P b/tests/69-reserved-words-OK.asn1.-P
index d7582cd1..897295d7 100644
--- a/tests/69-reserved-words-OK.asn1.-P
+++ b/tests/69-reserved-words-OK.asn1.-P
@@ -47,7 +47,7 @@ extern asn_TYPE_descriptor_t asn_DEF_T;
/*** <<< CODE [T] >>> ***/
static int
-memb_char_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_char_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
size_t size;
@@ -75,22 +75,22 @@ memb_char_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [T] >>> ***/
-static ber_tlv_tag_t asn_DEF_class_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_class_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static uint8_t asn_MAP_class_4_mmap[(0 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_class_mmap_4[(0 + (8 * sizeof(unsigned int)) - 1) / 8] = {
0
};
-static asn_SET_specifics_t asn_SPC_class_4_specs = {
+static asn_SET_specifics_t asn_SPC_class_specs_4 = {
sizeof(struct Class),
offsetof(struct Class, _asn_ctx),
offsetof(struct Class, _presence_map),
- asn_MAP_class_4_tag2el,
+ asn_MAP_class_tag2el_4,
0, /* Count of tags in the map */
- asn_MAP_class_4_tag2el, /* Same as above */
+ asn_MAP_class_tag2el_4, /* Same as above */
0, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_class_4_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_class_mmap_4 /* Mandatory elements map */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_class_4 = {
@@ -103,15 +103,17 @@ asn_TYPE_descriptor_t asn_DEF_class_4 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_class_4_tags,
- sizeof(asn_DEF_class_4_tags)
- /sizeof(asn_DEF_class_4_tags[0]), /* 1 */
- asn_DEF_class_4_tags, /* Same as above */
- sizeof(asn_DEF_class_4_tags)
- /sizeof(asn_DEF_class_4_tags[0]), /* 1 */
+ asn_DEF_class_tags_4,
+ sizeof(asn_DEF_class_tags_4)
+ /sizeof(asn_DEF_class_tags_4[0]), /* 1 */
+ asn_DEF_class_tags_4, /* Same as above */
+ sizeof(asn_DEF_class_tags_4)
+ /sizeof(asn_DEF_class_tags_4[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
- &asn_SPC_class_4_specs /* Additional specs */
+ &asn_SPC_class_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_T_1[] = {
@@ -120,13 +122,17 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "int"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, Char),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
.tag_mode = 0,
.type = &asn_DEF_OCTET_STRING,
- .memb_constraints = memb_char_1_constraint,
+ .memb_constraints = memb_char_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "char"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, Class),
@@ -134,6 +140,8 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_class_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "class"
},
{ ATF_NOFLAGS, 0, offsetof(struct T, Double),
@@ -141,23 +149,26 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_REAL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "double"
},
};
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* int at 15 */
{ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* char at 16 */
{ (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 3, 0, 0 }, /* double at 18 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 } /* class at 17 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_T_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
4, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -171,15 +182,17 @@ asn_TYPE_descriptor_t asn_DEF_T = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
4, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
diff --git a/tests/70-xer-test-OK.asn1.-P b/tests/70-xer-test-OK.asn1.-P
index 72483fd6..45d6a699 100644
--- a/tests/70-xer-test-OK.asn1.-P
+++ b/tests/70-xer-test-OK.asn1.-P
@@ -82,6 +82,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "sequence"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.set),
@@ -89,6 +91,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.sequenceOf),
@@ -96,6 +100,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SequenceOf,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "sequenceOf"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSet),
@@ -103,6 +109,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ExtensibleSet,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "extensibleSet"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence),
@@ -110,6 +118,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ExtensibleSequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "extensibleSequence"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.extensibleSequence2),
@@ -117,6 +127,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ExtensibleSequence2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "extensibleSequence2"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfNULL),
@@ -124,6 +136,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SetOfNULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "setOfNULL"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfREAL),
@@ -131,6 +145,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SetOfREAL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "setOfREAL"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfEnums),
@@ -138,6 +154,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SetOfEnums,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "setOfEnums"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfNULL),
@@ -145,6 +163,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NamedSetOfNULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "namedSetOfNULL"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfREAL),
@@ -152,6 +172,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NamedSetOfREAL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "namedSetOfREAL"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfEnums),
@@ -159,6 +181,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NamedSetOfEnums,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "namedSetOfEnums"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.seqOfZuka),
@@ -166,6 +190,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SeqOfZuka,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "seqOfZuka"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.setOfChoice),
@@ -173,6 +199,8 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_SetOfChoice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "setOfChoice"
},
{ ATF_NOFLAGS, 0, offsetof(struct PDU, choice.namedSetOfChoice),
@@ -180,10 +208,12 @@ static asn_TYPE_member_t asn_MBR_PDU_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NamedSetOfChoice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "namedSetOfChoice"
},
};
-static asn_TYPE_tag2member_t asn_MAP_PDU_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_PDU_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sequence at 19 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 20 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sequenceOf at 21 */
@@ -200,14 +230,15 @@ static asn_TYPE_tag2member_t asn_MAP_PDU_1_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* setOfChoice at 32 */
{ (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 } /* namedSetOfChoice at 33 */
};
-static asn_CHOICE_specifics_t asn_SPC_PDU_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_PDU_specs_1 = {
sizeof(struct PDU),
offsetof(struct PDU, _asn_ctx),
offsetof(struct PDU, present),
sizeof(((struct PDU *)0)->present),
- asn_MAP_PDU_1_tag2el,
+ asn_MAP_PDU_tag2el_1,
15, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 15 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_PDU = {
"PDU",
@@ -219,14 +250,16 @@ asn_TYPE_descriptor_t asn_DEF_PDU = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_PDU_1,
15, /* Elements count */
- &asn_SPC_PDU_1_specs /* Additional specs */
+ &asn_SPC_PDU_specs_1 /* Additional specs */
};
@@ -269,6 +302,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "integer"
},
{ ATF_POINTER, 2, offsetof(struct Sequence, sequence),
@@ -276,6 +311,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "sequence"
},
{ ATF_POINTER, 1, offsetof(struct Sequence, bits),
@@ -283,6 +320,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "bits"
},
{ ATF_NOFLAGS, 0, offsetof(struct Sequence, string),
@@ -290,23 +329,26 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "string"
},
};
-static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* integer at 38 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequence at 39 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* bits at 40 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* string at 41 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
sizeof(struct Sequence),
offsetof(struct Sequence, _asn_ctx),
- asn_MAP_Sequence_1_tag2el,
+ asn_MAP_Sequence_tag2el_1,
4, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -320,16 +362,18 @@ asn_TYPE_descriptor_t asn_DEF_Sequence = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Sequence_1_tags,
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
- asn_DEF_Sequence_1_tags, /* Same as above */
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Sequence_1,
4, /* Elements count */
- &asn_SPC_Sequence_1_specs /* Additional specs */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
};
@@ -376,6 +420,8 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_RELATIVE_OID,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "roid"
},
{ ATF_POINTER, 1, offsetof(struct Set, opaque),
@@ -383,29 +429,31 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_OCTET_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "opaque"
},
};
-static ber_tlv_tag_t asn_DEF_Set_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* roid at 45 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* opaque at 46 */
};
-static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (0 << 6)
};
-static asn_SET_specifics_t asn_SPC_Set_1_specs = {
+static asn_SET_specifics_t asn_SPC_Set_specs_1 = {
sizeof(struct Set),
offsetof(struct Set, _asn_ctx),
offsetof(struct Set, _presence_map),
- asn_MAP_Set_1_tag2el,
+ asn_MAP_Set_tag2el_1,
2, /* Count of tags in the map */
- asn_MAP_Set_1_tag2el, /* Same as above */
+ asn_MAP_Set_tag2el_1, /* Same as above */
2, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Set = {
"Set",
@@ -417,16 +465,18 @@ asn_TYPE_descriptor_t asn_DEF_Set = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Set_1_tags,
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
- asn_DEF_Set_1_tags, /* Same as above */
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
+ asn_DEF_Set_tags_1,
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ asn_DEF_Set_tags_1, /* Same as above */
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Set_1,
2, /* Elements count */
- &asn_SPC_Set_1_specs /* Additional specs */
+ &asn_SPC_Set_specs_1 /* Additional specs */
};
@@ -496,6 +546,9 @@ enum_4_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -548,22 +601,22 @@ enum_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [ExtensibleSet] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_enum_4_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_enum_value2enum_4[] = {
{ 0, 1, "b" },
{ 1, 1, "a" }
};
-static unsigned int asn_MAP_enum_4_enum2value[] = {
+static unsigned int asn_MAP_enum_enum2value_4[] = {
1, /* a(1) */
0 /* b(0) */
};
-static asn_INTEGER_specifics_t asn_SPC_enum_4_specs = {
- asn_MAP_enum_4_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_enum_4_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_enum_specs_4 = {
+ asn_MAP_enum_value2enum_4, /* "tag" => N; sorted by tag */
+ asn_MAP_enum_enum2value_4, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_enum_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_enum_tags_4[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
@@ -578,15 +631,17 @@ asn_TYPE_descriptor_t asn_DEF_enum_4 = {
enum_4_encode_der,
enum_4_decode_xer,
enum_4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_enum_4_tags,
- sizeof(asn_DEF_enum_4_tags)
- /sizeof(asn_DEF_enum_4_tags[0]) - 1, /* 1 */
- asn_DEF_enum_4_tags, /* Same as above */
- sizeof(asn_DEF_enum_4_tags)
- /sizeof(asn_DEF_enum_4_tags[0]), /* 2 */
+ asn_DEF_enum_tags_4,
+ sizeof(asn_DEF_enum_tags_4)
+ /sizeof(asn_DEF_enum_tags_4[0]) - 1, /* 1 */
+ asn_DEF_enum_tags_4, /* Same as above */
+ sizeof(asn_DEF_enum_tags_4)
+ /sizeof(asn_DEF_enum_tags_4[0]), /* 2 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_enum_4_specs /* Additional specs */
+ &asn_SPC_enum_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = {
@@ -595,6 +650,8 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "string"
},
{ ATF_POINTER, 1, offsetof(struct ExtensibleSet, Enum),
@@ -602,29 +659,31 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_enum_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "enum"
},
};
-static ber_tlv_tag_t asn_DEF_ExtensibleSet_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ExtensibleSet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ExtensibleSet_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 50 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* enum at 52 */
};
-static uint8_t asn_MAP_ExtensibleSet_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_ExtensibleSet_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(0 << 7) | (0 << 6)
};
-static asn_SET_specifics_t asn_SPC_ExtensibleSet_1_specs = {
+static asn_SET_specifics_t asn_SPC_ExtensibleSet_specs_1 = {
sizeof(struct ExtensibleSet),
offsetof(struct ExtensibleSet, _asn_ctx),
offsetof(struct ExtensibleSet, _presence_map),
- asn_MAP_ExtensibleSet_1_tag2el,
+ asn_MAP_ExtensibleSet_tag2el_1,
2, /* Count of tags in the map */
- asn_MAP_ExtensibleSet_1_tag2el, /* Same as above */
+ asn_MAP_ExtensibleSet_tag2el_1, /* Same as above */
2, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_ExtensibleSet_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_ExtensibleSet_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = {
"ExtensibleSet",
@@ -636,16 +695,18 @@ asn_TYPE_descriptor_t asn_DEF_ExtensibleSet = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ExtensibleSet_1_tags,
- sizeof(asn_DEF_ExtensibleSet_1_tags)
- /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */
- asn_DEF_ExtensibleSet_1_tags, /* Same as above */
- sizeof(asn_DEF_ExtensibleSet_1_tags)
- /sizeof(asn_DEF_ExtensibleSet_1_tags[0]), /* 1 */
+ asn_DEF_ExtensibleSet_tags_1,
+ sizeof(asn_DEF_ExtensibleSet_tags_1)
+ /sizeof(asn_DEF_ExtensibleSet_tags_1[0]), /* 1 */
+ asn_DEF_ExtensibleSet_tags_1, /* Same as above */
+ sizeof(asn_DEF_ExtensibleSet_tags_1)
+ /sizeof(asn_DEF_ExtensibleSet_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ExtensibleSet_1,
2, /* Elements count */
- &asn_SPC_ExtensibleSet_1_specs /* Additional specs */
+ &asn_SPC_ExtensibleSet_specs_1 /* Additional specs */
};
@@ -683,6 +744,8 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "string"
},
{ ATF_POINTER, 2, offsetof(struct ExtensibleSequence, integer),
@@ -690,6 +753,8 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "integer"
},
{ ATF_POINTER, 1, offsetof(struct ExtensibleSequence, gtime),
@@ -697,22 +762,25 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_GeneralizedTime,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "gtime"
},
};
-static ber_tlv_tag_t asn_DEF_ExtensibleSequence_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ExtensibleSequence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 56 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* integer at 58 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gtime at 59 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence_specs_1 = {
sizeof(struct ExtensibleSequence),
offsetof(struct ExtensibleSequence, _asn_ctx),
- asn_MAP_ExtensibleSequence_1_tag2el,
+ asn_MAP_ExtensibleSequence_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
4 /* Stop extensions */
};
@@ -726,16 +794,18 @@ asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ExtensibleSequence_1_tags,
- sizeof(asn_DEF_ExtensibleSequence_1_tags)
- /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */
- asn_DEF_ExtensibleSequence_1_tags, /* Same as above */
- sizeof(asn_DEF_ExtensibleSequence_1_tags)
- /sizeof(asn_DEF_ExtensibleSequence_1_tags[0]), /* 1 */
+ asn_DEF_ExtensibleSequence_tags_1,
+ sizeof(asn_DEF_ExtensibleSequence_tags_1)
+ /sizeof(asn_DEF_ExtensibleSequence_tags_1[0]), /* 1 */
+ asn_DEF_ExtensibleSequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_ExtensibleSequence_tags_1)
+ /sizeof(asn_DEF_ExtensibleSequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ExtensibleSequence_1,
3, /* Elements count */
- &asn_SPC_ExtensibleSequence_1_specs /* Additional specs */
+ &asn_SPC_ExtensibleSequence_specs_1 /* Additional specs */
};
@@ -771,6 +841,8 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSequence2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_UTF8String,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "string"
},
{ ATF_POINTER, 1, offsetof(struct ExtensibleSequence2, integer),
@@ -778,21 +850,24 @@ static asn_TYPE_member_t asn_MBR_ExtensibleSequence2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "integer"
},
};
-static ber_tlv_tag_t asn_DEF_ExtensibleSequence2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ExtensibleSequence2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ExtensibleSequence2_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* string at 63 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* integer at 65 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence2_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_ExtensibleSequence2_specs_1 = {
sizeof(struct ExtensibleSequence2),
offsetof(struct ExtensibleSequence2, _asn_ctx),
- asn_MAP_ExtensibleSequence2_1_tag2el,
+ asn_MAP_ExtensibleSequence2_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
0, /* Start extensions */
3 /* Stop extensions */
};
@@ -806,16 +881,18 @@ asn_TYPE_descriptor_t asn_DEF_ExtensibleSequence2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ExtensibleSequence2_1_tags,
- sizeof(asn_DEF_ExtensibleSequence2_1_tags)
- /sizeof(asn_DEF_ExtensibleSequence2_1_tags[0]), /* 1 */
- asn_DEF_ExtensibleSequence2_1_tags, /* Same as above */
- sizeof(asn_DEF_ExtensibleSequence2_1_tags)
- /sizeof(asn_DEF_ExtensibleSequence2_1_tags[0]), /* 1 */
+ asn_DEF_ExtensibleSequence2_tags_1,
+ sizeof(asn_DEF_ExtensibleSequence2_tags_1)
+ /sizeof(asn_DEF_ExtensibleSequence2_tags_1[0]), /* 1 */
+ asn_DEF_ExtensibleSequence2_tags_1, /* Same as above */
+ sizeof(asn_DEF_ExtensibleSequence2_tags_1)
+ /sizeof(asn_DEF_ExtensibleSequence2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ExtensibleSequence2_1,
2, /* Elements count */
- &asn_SPC_ExtensibleSequence2_1_specs /* Additional specs */
+ &asn_SPC_ExtensibleSequence2_specs_1 /* Additional specs */
};
@@ -846,13 +923,15 @@ static asn_TYPE_member_t asn_MBR_SetOfNULL_1[] = {
.tag_mode = 0,
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_SetOfNULL_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SetOfNULL_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SetOfNULL_specs_1 = {
sizeof(struct SetOfNULL),
offsetof(struct SetOfNULL, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -867,16 +946,18 @@ asn_TYPE_descriptor_t asn_DEF_SetOfNULL = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SetOfNULL_1_tags,
- sizeof(asn_DEF_SetOfNULL_1_tags)
- /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */
- asn_DEF_SetOfNULL_1_tags, /* Same as above */
- sizeof(asn_DEF_SetOfNULL_1_tags)
- /sizeof(asn_DEF_SetOfNULL_1_tags[0]), /* 1 */
+ asn_DEF_SetOfNULL_tags_1,
+ sizeof(asn_DEF_SetOfNULL_tags_1)
+ /sizeof(asn_DEF_SetOfNULL_tags_1[0]), /* 1 */
+ asn_DEF_SetOfNULL_tags_1, /* Same as above */
+ sizeof(asn_DEF_SetOfNULL_tags_1)
+ /sizeof(asn_DEF_SetOfNULL_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SetOfNULL_1,
1, /* Single element */
- &asn_SPC_SetOfNULL_1_specs /* Additional specs */
+ &asn_SPC_SetOfNULL_specs_1 /* Additional specs */
};
@@ -907,13 +988,15 @@ static asn_TYPE_member_t asn_MBR_SetOfREAL_1[] = {
.tag_mode = 0,
.type = &asn_DEF_REAL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_SetOfREAL_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SetOfREAL_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SetOfREAL_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SetOfREAL_specs_1 = {
sizeof(struct SetOfREAL),
offsetof(struct SetOfREAL, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -928,16 +1011,18 @@ asn_TYPE_descriptor_t asn_DEF_SetOfREAL = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SetOfREAL_1_tags,
- sizeof(asn_DEF_SetOfREAL_1_tags)
- /sizeof(asn_DEF_SetOfREAL_1_tags[0]), /* 1 */
- asn_DEF_SetOfREAL_1_tags, /* Same as above */
- sizeof(asn_DEF_SetOfREAL_1_tags)
- /sizeof(asn_DEF_SetOfREAL_1_tags[0]), /* 1 */
+ asn_DEF_SetOfREAL_tags_1,
+ sizeof(asn_DEF_SetOfREAL_tags_1)
+ /sizeof(asn_DEF_SetOfREAL_tags_1[0]), /* 1 */
+ asn_DEF_SetOfREAL_tags_1, /* Same as above */
+ sizeof(asn_DEF_SetOfREAL_tags_1)
+ /sizeof(asn_DEF_SetOfREAL_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SetOfREAL_1,
1, /* Single element */
- &asn_SPC_SetOfREAL_1_specs /* Additional specs */
+ &asn_SPC_SetOfREAL_specs_1 /* Additional specs */
};
@@ -990,6 +1075,9 @@ Member_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -1042,28 +1130,28 @@ Member_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [SetOfEnums] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_Member_2_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_Member_value2enum_2[] = {
{ 0, 3, "one" },
{ 1, 7, "oneMore" }
};
-static unsigned int asn_MAP_Member_2_enum2value[] = {
+static unsigned int asn_MAP_Member_enum2value_2[] = {
0, /* one(0) */
1 /* oneMore(1) */
};
-static asn_INTEGER_specifics_t asn_SPC_Member_2_specs = {
- asn_MAP_Member_2_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_Member_2_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_Member_specs_2 = {
+ asn_MAP_Member_value2enum_2, /* "tag" => N; sorted by tag */
+ asn_MAP_Member_enum2value_2, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_2 = {
- "",
- "",
+ "ENUMERATED",
+ "ENUMERATED",
Member_2_free,
Member_2_print,
Member_2_constraint,
@@ -1071,15 +1159,17 @@ asn_TYPE_descriptor_t asn_DEF_Member_2 = {
Member_2_encode_der,
Member_2_decode_xer,
Member_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Member_2_tags,
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
- asn_DEF_Member_2_tags, /* Same as above */
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
+ asn_DEF_Member_tags_2,
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ asn_DEF_Member_tags_2, /* Same as above */
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_Member_2_specs /* Additional specs */
+ &asn_SPC_Member_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = {
@@ -1088,13 +1178,15 @@ static asn_TYPE_member_t asn_MBR_SetOfEnums_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_SetOfEnums_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SetOfEnums_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SetOfEnums_specs_1 = {
sizeof(struct SetOfEnums),
offsetof(struct SetOfEnums, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -1109,16 +1201,18 @@ asn_TYPE_descriptor_t asn_DEF_SetOfEnums = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SetOfEnums_1_tags,
- sizeof(asn_DEF_SetOfEnums_1_tags)
- /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */
- asn_DEF_SetOfEnums_1_tags, /* Same as above */
- sizeof(asn_DEF_SetOfEnums_1_tags)
- /sizeof(asn_DEF_SetOfEnums_1_tags[0]), /* 1 */
+ asn_DEF_SetOfEnums_tags_1,
+ sizeof(asn_DEF_SetOfEnums_tags_1)
+ /sizeof(asn_DEF_SetOfEnums_tags_1[0]), /* 1 */
+ asn_DEF_SetOfEnums_tags_1, /* Same as above */
+ sizeof(asn_DEF_SetOfEnums_tags_1)
+ /sizeof(asn_DEF_SetOfEnums_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SetOfEnums_1,
1, /* Single element */
- &asn_SPC_SetOfEnums_1_specs /* Additional specs */
+ &asn_SPC_SetOfEnums_specs_1 /* Additional specs */
};
@@ -1149,13 +1243,15 @@ static asn_TYPE_member_t asn_MBR_NamedSetOfNULL_1[] = {
.tag_mode = 0,
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "y"
},
};
-static ber_tlv_tag_t asn_DEF_NamedSetOfNULL_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NamedSetOfNULL_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_NamedSetOfNULL_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_NamedSetOfNULL_specs_1 = {
sizeof(struct NamedSetOfNULL),
offsetof(struct NamedSetOfNULL, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -1170,16 +1266,18 @@ asn_TYPE_descriptor_t asn_DEF_NamedSetOfNULL = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NamedSetOfNULL_1_tags,
- sizeof(asn_DEF_NamedSetOfNULL_1_tags)
- /sizeof(asn_DEF_NamedSetOfNULL_1_tags[0]), /* 1 */
- asn_DEF_NamedSetOfNULL_1_tags, /* Same as above */
- sizeof(asn_DEF_NamedSetOfNULL_1_tags)
- /sizeof(asn_DEF_NamedSetOfNULL_1_tags[0]), /* 1 */
+ asn_DEF_NamedSetOfNULL_tags_1,
+ sizeof(asn_DEF_NamedSetOfNULL_tags_1)
+ /sizeof(asn_DEF_NamedSetOfNULL_tags_1[0]), /* 1 */
+ asn_DEF_NamedSetOfNULL_tags_1, /* Same as above */
+ sizeof(asn_DEF_NamedSetOfNULL_tags_1)
+ /sizeof(asn_DEF_NamedSetOfNULL_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_NamedSetOfNULL_1,
1, /* Single element */
- &asn_SPC_NamedSetOfNULL_1_specs /* Additional specs */
+ &asn_SPC_NamedSetOfNULL_specs_1 /* Additional specs */
};
@@ -1210,13 +1308,15 @@ static asn_TYPE_member_t asn_MBR_NamedSetOfREAL_1[] = {
.tag_mode = 0,
.type = &asn_DEF_REAL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "name"
},
};
-static ber_tlv_tag_t asn_DEF_NamedSetOfREAL_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NamedSetOfREAL_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_NamedSetOfREAL_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_NamedSetOfREAL_specs_1 = {
sizeof(struct NamedSetOfREAL),
offsetof(struct NamedSetOfREAL, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -1231,16 +1331,18 @@ asn_TYPE_descriptor_t asn_DEF_NamedSetOfREAL = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NamedSetOfREAL_1_tags,
- sizeof(asn_DEF_NamedSetOfREAL_1_tags)
- /sizeof(asn_DEF_NamedSetOfREAL_1_tags[0]), /* 1 */
- asn_DEF_NamedSetOfREAL_1_tags, /* Same as above */
- sizeof(asn_DEF_NamedSetOfREAL_1_tags)
- /sizeof(asn_DEF_NamedSetOfREAL_1_tags[0]), /* 1 */
+ asn_DEF_NamedSetOfREAL_tags_1,
+ sizeof(asn_DEF_NamedSetOfREAL_tags_1)
+ /sizeof(asn_DEF_NamedSetOfREAL_tags_1[0]), /* 1 */
+ asn_DEF_NamedSetOfREAL_tags_1, /* Same as above */
+ sizeof(asn_DEF_NamedSetOfREAL_tags_1)
+ /sizeof(asn_DEF_NamedSetOfREAL_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_NamedSetOfREAL_1,
1, /* Single element */
- &asn_SPC_NamedSetOfREAL_1_specs /* Additional specs */
+ &asn_SPC_NamedSetOfREAL_specs_1 /* Additional specs */
};
@@ -1293,6 +1395,9 @@ name_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -1345,28 +1450,28 @@ name_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NamedSetOfEnums] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_name_2_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_name_value2enum_2[] = {
{ 0, 3, "one" },
{ 1, 7, "oneMore" }
};
-static unsigned int asn_MAP_name_2_enum2value[] = {
+static unsigned int asn_MAP_name_enum2value_2[] = {
0, /* one(0) */
1 /* oneMore(1) */
};
-static asn_INTEGER_specifics_t asn_SPC_name_2_specs = {
- asn_MAP_name_2_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_name_2_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_name_specs_2 = {
+ asn_MAP_name_value2enum_2, /* "tag" => N; sorted by tag */
+ asn_MAP_name_enum2value_2, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_name_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_name_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_name_2 = {
- "",
- "",
+ "ENUMERATED",
+ "ENUMERATED",
name_2_free,
name_2_print,
name_2_constraint,
@@ -1374,15 +1479,17 @@ asn_TYPE_descriptor_t asn_DEF_name_2 = {
name_2_encode_der,
name_2_decode_xer,
name_2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_name_2_tags,
- sizeof(asn_DEF_name_2_tags)
- /sizeof(asn_DEF_name_2_tags[0]), /* 1 */
- asn_DEF_name_2_tags, /* Same as above */
- sizeof(asn_DEF_name_2_tags)
- /sizeof(asn_DEF_name_2_tags[0]), /* 1 */
+ asn_DEF_name_tags_2,
+ sizeof(asn_DEF_name_tags_2)
+ /sizeof(asn_DEF_name_tags_2[0]), /* 1 */
+ asn_DEF_name_tags_2, /* Same as above */
+ sizeof(asn_DEF_name_tags_2)
+ /sizeof(asn_DEF_name_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_name_2_specs /* Additional specs */
+ &asn_SPC_name_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_NamedSetOfEnums_1[] = {
@@ -1391,13 +1498,15 @@ static asn_TYPE_member_t asn_MBR_NamedSetOfEnums_1[] = {
.tag_mode = 0,
.type = &asn_DEF_name_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "name"
},
};
-static ber_tlv_tag_t asn_DEF_NamedSetOfEnums_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NamedSetOfEnums_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_NamedSetOfEnums_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_NamedSetOfEnums_specs_1 = {
sizeof(struct NamedSetOfEnums),
offsetof(struct NamedSetOfEnums, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -1412,16 +1521,18 @@ asn_TYPE_descriptor_t asn_DEF_NamedSetOfEnums = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NamedSetOfEnums_1_tags,
- sizeof(asn_DEF_NamedSetOfEnums_1_tags)
- /sizeof(asn_DEF_NamedSetOfEnums_1_tags[0]), /* 1 */
- asn_DEF_NamedSetOfEnums_1_tags, /* Same as above */
- sizeof(asn_DEF_NamedSetOfEnums_1_tags)
- /sizeof(asn_DEF_NamedSetOfEnums_1_tags[0]), /* 1 */
+ asn_DEF_NamedSetOfEnums_tags_1,
+ sizeof(asn_DEF_NamedSetOfEnums_tags_1)
+ /sizeof(asn_DEF_NamedSetOfEnums_tags_1[0]), /* 1 */
+ asn_DEF_NamedSetOfEnums_tags_1, /* Same as above */
+ sizeof(asn_DEF_NamedSetOfEnums_tags_1)
+ /sizeof(asn_DEF_NamedSetOfEnums_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_NamedSetOfEnums_1,
1, /* Single element */
- &asn_SPC_NamedSetOfEnums_1_specs /* Additional specs */
+ &asn_SPC_NamedSetOfEnums_specs_1 /* Additional specs */
};
@@ -1452,13 +1563,15 @@ static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "id"
},
};
-static ber_tlv_tag_t asn_DEF_SequenceOf_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SequenceOf_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
sizeof(struct SequenceOf),
offsetof(struct SequenceOf, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -1473,16 +1586,18 @@ asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SequenceOf_1_tags,
- sizeof(asn_DEF_SequenceOf_1_tags)
- /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */
- asn_DEF_SequenceOf_1_tags, /* Same as above */
- sizeof(asn_DEF_SequenceOf_1_tags)
- /sizeof(asn_DEF_SequenceOf_1_tags[0]), /* 1 */
+ asn_DEF_SequenceOf_tags_1,
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ asn_DEF_SequenceOf_tags_1, /* Same as above */
+ sizeof(asn_DEF_SequenceOf_tags_1)
+ /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SequenceOf_1,
1, /* Single element */
- &asn_SPC_SequenceOf_1_specs /* Additional specs */
+ &asn_SPC_SequenceOf_specs_1 /* Additional specs */
};
@@ -1513,13 +1628,15 @@ static asn_TYPE_member_t asn_MBR_SeqOfZuka_1[] = {
.tag_mode = 0,
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "zuka"
},
};
-static ber_tlv_tag_t asn_DEF_SeqOfZuka_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SeqOfZuka_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SeqOfZuka_specs_1 = {
sizeof(struct SeqOfZuka),
offsetof(struct SeqOfZuka, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -1534,16 +1651,18 @@ asn_TYPE_descriptor_t asn_DEF_SeqOfZuka = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SeqOfZuka_1_tags,
- sizeof(asn_DEF_SeqOfZuka_1_tags)
- /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */
- asn_DEF_SeqOfZuka_1_tags, /* Same as above */
- sizeof(asn_DEF_SeqOfZuka_1_tags)
- /sizeof(asn_DEF_SeqOfZuka_1_tags[0]), /* 1 */
+ asn_DEF_SeqOfZuka_tags_1,
+ sizeof(asn_DEF_SeqOfZuka_tags_1)
+ /sizeof(asn_DEF_SeqOfZuka_tags_1[0]), /* 1 */
+ asn_DEF_SeqOfZuka_tags_1, /* Same as above */
+ sizeof(asn_DEF_SeqOfZuka_tags_1)
+ /sizeof(asn_DEF_SeqOfZuka_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SeqOfZuka_1,
1, /* Single element */
- &asn_SPC_SeqOfZuka_1_specs /* Additional specs */
+ &asn_SPC_SeqOfZuka_specs_1 /* Additional specs */
};
@@ -1581,13 +1700,15 @@ static asn_TYPE_member_t asn_MBR_SetOfChoice_1[] = {
.tag_mode = 0,
.type = &asn_DEF_SimpleChoice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_SetOfChoice_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_SetOfChoice_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_SetOfChoice_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_SetOfChoice_specs_1 = {
sizeof(struct SetOfChoice),
offsetof(struct SetOfChoice, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -1602,16 +1723,18 @@ asn_TYPE_descriptor_t asn_DEF_SetOfChoice = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_SetOfChoice_1_tags,
- sizeof(asn_DEF_SetOfChoice_1_tags)
- /sizeof(asn_DEF_SetOfChoice_1_tags[0]), /* 1 */
- asn_DEF_SetOfChoice_1_tags, /* Same as above */
- sizeof(asn_DEF_SetOfChoice_1_tags)
- /sizeof(asn_DEF_SetOfChoice_1_tags[0]), /* 1 */
+ asn_DEF_SetOfChoice_tags_1,
+ sizeof(asn_DEF_SetOfChoice_tags_1)
+ /sizeof(asn_DEF_SetOfChoice_tags_1[0]), /* 1 */
+ asn_DEF_SetOfChoice_tags_1, /* Same as above */
+ sizeof(asn_DEF_SetOfChoice_tags_1)
+ /sizeof(asn_DEF_SetOfChoice_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_SetOfChoice_1,
1, /* Single element */
- &asn_SPC_SetOfChoice_1_specs /* Additional specs */
+ &asn_SPC_SetOfChoice_specs_1 /* Additional specs */
};
@@ -1649,13 +1772,15 @@ static asn_TYPE_member_t asn_MBR_NamedSetOfChoice_1[] = {
.tag_mode = 0,
.type = &asn_DEF_SimpleChoice,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "whatever"
},
};
-static ber_tlv_tag_t asn_DEF_NamedSetOfChoice_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NamedSetOfChoice_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_NamedSetOfChoice_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_NamedSetOfChoice_specs_1 = {
sizeof(struct NamedSetOfChoice),
offsetof(struct NamedSetOfChoice, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -1670,16 +1795,18 @@ asn_TYPE_descriptor_t asn_DEF_NamedSetOfChoice = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NamedSetOfChoice_1_tags,
- sizeof(asn_DEF_NamedSetOfChoice_1_tags)
- /sizeof(asn_DEF_NamedSetOfChoice_1_tags[0]), /* 1 */
- asn_DEF_NamedSetOfChoice_1_tags, /* Same as above */
- sizeof(asn_DEF_NamedSetOfChoice_1_tags)
- /sizeof(asn_DEF_NamedSetOfChoice_1_tags[0]), /* 1 */
+ asn_DEF_NamedSetOfChoice_tags_1,
+ sizeof(asn_DEF_NamedSetOfChoice_tags_1)
+ /sizeof(asn_DEF_NamedSetOfChoice_tags_1[0]), /* 1 */
+ asn_DEF_NamedSetOfChoice_tags_1, /* Same as above */
+ sizeof(asn_DEF_NamedSetOfChoice_tags_1)
+ /sizeof(asn_DEF_NamedSetOfChoice_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_NamedSetOfChoice_1,
1, /* Single element */
- &asn_SPC_NamedSetOfChoice_1_specs /* Additional specs */
+ &asn_SPC_NamedSetOfChoice_specs_1 /* Additional specs */
};
@@ -1722,6 +1849,8 @@ static asn_TYPE_member_t asn_MBR_SimpleChoice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NULL,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct SimpleChoice, choice.b),
@@ -1729,21 +1858,24 @@ static asn_TYPE_member_t asn_MBR_SimpleChoice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static asn_TYPE_tag2member_t asn_MAP_SimpleChoice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_SimpleChoice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 79 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* b at 79 */
};
-static asn_CHOICE_specifics_t asn_SPC_SimpleChoice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_SimpleChoice_specs_1 = {
sizeof(struct SimpleChoice),
offsetof(struct SimpleChoice, _asn_ctx),
offsetof(struct SimpleChoice, present),
sizeof(((struct SimpleChoice *)0)->present),
- asn_MAP_SimpleChoice_1_tag2el,
+ asn_MAP_SimpleChoice_tag2el_1,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_SimpleChoice = {
"SimpleChoice",
@@ -1755,13 +1887,15 @@ asn_TYPE_descriptor_t asn_DEF_SimpleChoice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_SimpleChoice_1,
2, /* Elements count */
- &asn_SPC_SimpleChoice_1_specs /* Additional specs */
+ &asn_SPC_SimpleChoice_specs_1 /* Additional specs */
};
diff --git a/tests/72-same-names-OK.asn1.-P b/tests/72-same-names-OK.asn1.-P
index b183aeb7..e4d210c0 100644
--- a/tests/72-same-names-OK.asn1.-P
+++ b/tests/72-same-names-OK.asn1.-P
@@ -34,6 +34,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Type1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t1"
},
{ ATF_NOFLAGS, 0, offsetof(struct Member, t2),
@@ -41,29 +43,32 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Type2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "t2"
},
};
-static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Member_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* t1 at 21 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 }, /* one-name at 37 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Member_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
- asn_MAP_Member_2_tag2el,
+ asn_MAP_Member_tag2el_2,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_2 = {
- "",
- "",
+ "SEQUENCE",
+ "SEQUENCE",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
@@ -71,16 +76,18 @@ asn_TYPE_descriptor_t asn_DEF_Member_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Member_2_tags,
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
- asn_DEF_Member_2_tags, /* Same as above */
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
+ asn_DEF_Member_tags_2,
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ asn_DEF_Member_tags_2, /* Same as above */
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Member_2,
2, /* Elements count */
- &asn_SPC_Member_2_specs /* Additional specs */
+ &asn_SPC_Member_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Type_1[] = {
@@ -89,13 +96,15 @@ static asn_TYPE_member_t asn_MBR_Type_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Type_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Type_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Type_specs_1 = {
sizeof(struct Type),
offsetof(struct Type, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -110,16 +119,18 @@ asn_TYPE_descriptor_t asn_DEF_Type = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Type_1_tags,
- sizeof(asn_DEF_Type_1_tags)
- /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
- asn_DEF_Type_1_tags, /* Same as above */
- sizeof(asn_DEF_Type_1_tags)
- /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
+ asn_DEF_Type_tags_1,
+ sizeof(asn_DEF_Type_tags_1)
+ /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
+ asn_DEF_Type_tags_1, /* Same as above */
+ sizeof(asn_DEF_Type_tags_1)
+ /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Type_1,
1, /* Single element */
- &asn_SPC_Type_1_specs /* Additional specs */
+ &asn_SPC_Type_specs_1 /* Additional specs */
};
@@ -171,6 +182,8 @@ static asn_TYPE_member_t asn_MBR_another_name_3[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct another_name, b),
@@ -178,21 +191,24 @@ static asn_TYPE_member_t asn_MBR_another_name_3[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_another_name_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_another_name_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* a at 27 */
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* b at 27 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_another_name_3_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
sizeof(struct another_name),
offsetof(struct another_name, _asn_ctx),
- asn_MAP_another_name_3_tag2el,
+ asn_MAP_another_name_tag2el_3,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -207,16 +223,18 @@ asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_another_name_3_tags,
- sizeof(asn_DEF_another_name_3_tags)
- /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
- asn_DEF_another_name_3_tags, /* Same as above */
- sizeof(asn_DEF_another_name_3_tags)
- /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
+ asn_DEF_another_name_tags_3,
+ sizeof(asn_DEF_another_name_tags_3)
+ /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
+ asn_DEF_another_name_tags_3, /* Same as above */
+ sizeof(asn_DEF_another_name_tags_3)
+ /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_another_name_3,
2, /* Elements count */
- &asn_SPC_another_name_3_specs /* Additional specs */
+ &asn_SPC_another_name_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_one_name_2[] = {
@@ -225,20 +243,23 @@ static asn_TYPE_member_t asn_MBR_one_name_2[] = {
.tag_mode = 0,
.type = &asn_DEF_another_name_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "another-name"
},
};
-static asn_TYPE_tag2member_t asn_MAP_one_name_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */
};
-static asn_CHOICE_specifics_t asn_SPC_one_name_2_specs = {
+static asn_CHOICE_specifics_t asn_SPC_one_name_specs_2 = {
sizeof(struct one_name),
offsetof(struct one_name, _asn_ctx),
offsetof(struct one_name, present),
sizeof(((struct one_name *)0)->present),
- asn_MAP_one_name_2_tag2el,
+ asn_MAP_one_name_tag2el_2,
1, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
@@ -251,14 +272,16 @@ asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_one_name_2,
1, /* Elements count */
- &asn_SPC_one_name_2_specs /* Additional specs */
+ &asn_SPC_one_name_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Type1_1[] = {
@@ -267,20 +290,23 @@ static asn_TYPE_member_t asn_MBR_Type1_1[] = {
.tag_mode = 0,
.type = &asn_DEF_one_name_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "one-name"
},
};
-static ber_tlv_tag_t asn_DEF_Type1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Type1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Type1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Type1_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 27 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Type1_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Type1_specs_1 = {
sizeof(struct Type1),
offsetof(struct Type1, _asn_ctx),
- asn_MAP_Type1_1_tag2el,
+ asn_MAP_Type1_tag2el_1,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -294,16 +320,18 @@ asn_TYPE_descriptor_t asn_DEF_Type1 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Type1_1_tags,
- sizeof(asn_DEF_Type1_1_tags)
- /sizeof(asn_DEF_Type1_1_tags[0]), /* 1 */
- asn_DEF_Type1_1_tags, /* Same as above */
- sizeof(asn_DEF_Type1_1_tags)
- /sizeof(asn_DEF_Type1_1_tags[0]), /* 1 */
+ asn_DEF_Type1_tags_1,
+ sizeof(asn_DEF_Type1_tags_1)
+ /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */
+ asn_DEF_Type1_tags_1, /* Same as above */
+ sizeof(asn_DEF_Type1_tags_1)
+ /sizeof(asn_DEF_Type1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Type1_1,
1, /* Elements count */
- &asn_SPC_Type1_1_specs /* Additional specs */
+ &asn_SPC_Type1_specs_1 /* Additional specs */
};
@@ -382,7 +410,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Type2;
/*** <<< CODE [Type2] >>> ***/
static int
-memb_a_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_a_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
@@ -413,7 +441,7 @@ memb_a_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
static int
-memb_a_8_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_a_constraint_8(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
size_t size;
@@ -451,7 +479,9 @@ static asn_TYPE_member_t asn_MBR_another_name_3[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
- .memb_constraints = memb_a_3_constraint,
+ .memb_constraints = memb_a_constraint_3,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct another_name, b),
@@ -459,21 +489,24 @@ static asn_TYPE_member_t asn_MBR_another_name_3[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_another_name_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_another_name_tags_3[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_another_name_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_3[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 36 */
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 34 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_another_name_3_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_3 = {
sizeof(struct another_name),
offsetof(struct another_name, _asn_ctx),
- asn_MAP_another_name_3_tag2el,
+ asn_MAP_another_name_tag2el_3,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -488,16 +521,18 @@ asn_TYPE_descriptor_t asn_DEF_another_name_3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_another_name_3_tags,
- sizeof(asn_DEF_another_name_3_tags)
- /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
- asn_DEF_another_name_3_tags, /* Same as above */
- sizeof(asn_DEF_another_name_3_tags)
- /sizeof(asn_DEF_another_name_3_tags[0]), /* 1 */
+ asn_DEF_another_name_tags_3,
+ sizeof(asn_DEF_another_name_tags_3)
+ /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
+ asn_DEF_another_name_tags_3, /* Same as above */
+ sizeof(asn_DEF_another_name_tags_3)
+ /sizeof(asn_DEF_another_name_tags_3[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_another_name_3,
2, /* Elements count */
- &asn_SPC_another_name_3_specs /* Additional specs */
+ &asn_SPC_another_name_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_one_name_2[] = {
@@ -506,20 +541,23 @@ static asn_TYPE_member_t asn_MBR_one_name_2[] = {
.tag_mode = 0,
.type = &asn_DEF_another_name_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "another-name"
},
};
-static ber_tlv_tag_t asn_DEF_one_name_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_one_name_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_one_name_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_one_name_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 34 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_one_name_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_one_name_specs_2 = {
sizeof(struct one_name),
offsetof(struct one_name, _asn_ctx),
- asn_MAP_one_name_2_tag2el,
+ asn_MAP_one_name_tag2el_2,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -534,16 +572,18 @@ asn_TYPE_descriptor_t asn_DEF_one_name_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_one_name_2_tags,
- sizeof(asn_DEF_one_name_2_tags)
- /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
- asn_DEF_one_name_2_tags, /* Same as above */
- sizeof(asn_DEF_one_name_2_tags)
- /sizeof(asn_DEF_one_name_2_tags[0]), /* 1 */
+ asn_DEF_one_name_tags_2,
+ sizeof(asn_DEF_one_name_tags_2)
+ /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */
+ asn_DEF_one_name_tags_2, /* Same as above */
+ sizeof(asn_DEF_one_name_tags_2)
+ /sizeof(asn_DEF_one_name_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_one_name_2,
1, /* Elements count */
- &asn_SPC_one_name_2_specs /* Additional specs */
+ &asn_SPC_one_name_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_another_name_8[] = {
@@ -551,7 +591,9 @@ static asn_TYPE_member_t asn_MBR_another_name_8[] = {
.tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
- .memb_constraints = memb_a_8_constraint,
+ .memb_constraints = memb_a_constraint_8,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct another_name, b),
@@ -559,21 +601,24 @@ static asn_TYPE_member_t asn_MBR_another_name_8[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_another_name_8_tags[] = {
+static ber_tlv_tag_t asn_DEF_another_name_tags_8[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_another_name_8_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_another_name_tag2el_8[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* b at 42 */
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* a at 40 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_another_name_8_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_another_name_specs_8 = {
sizeof(struct another_name),
offsetof(struct another_name, _asn_ctx),
- asn_MAP_another_name_8_tag2el,
+ asn_MAP_another_name_tag2el_8,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -588,16 +633,18 @@ asn_TYPE_descriptor_t asn_DEF_another_name_8 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_another_name_8_tags,
- sizeof(asn_DEF_another_name_8_tags)
- /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
- asn_DEF_another_name_8_tags, /* Same as above */
- sizeof(asn_DEF_another_name_8_tags)
- /sizeof(asn_DEF_another_name_8_tags[0]), /* 1 */
+ asn_DEF_another_name_tags_8,
+ sizeof(asn_DEF_another_name_tags_8)
+ /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */
+ asn_DEF_another_name_tags_8, /* Same as above */
+ sizeof(asn_DEF_another_name_tags_8)
+ /sizeof(asn_DEF_another_name_tags_8[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_another_name_8,
2, /* Elements count */
- &asn_SPC_another_name_8_specs /* Additional specs */
+ &asn_SPC_another_name_specs_8 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_two_name_7[] = {
@@ -606,28 +653,30 @@ static asn_TYPE_member_t asn_MBR_two_name_7[] = {
.tag_mode = 0,
.type = &asn_DEF_another_name_8,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "another-name"
},
};
-static ber_tlv_tag_t asn_DEF_two_name_7_tags[] = {
+static ber_tlv_tag_t asn_DEF_two_name_tags_7[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_two_name_7_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_two_name_tag2el_7[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* another-name at 40 */
};
-static uint8_t asn_MAP_two_name_7_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_two_name_mmap_7[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_two_name_7_specs = {
+static asn_SET_specifics_t asn_SPC_two_name_specs_7 = {
sizeof(struct two_name),
offsetof(struct two_name, _asn_ctx),
offsetof(struct two_name, _presence_map),
- asn_MAP_two_name_7_tag2el,
+ asn_MAP_two_name_tag2el_7,
1, /* Count of tags in the map */
- asn_MAP_two_name_7_tag2el, /* Same as above */
+ asn_MAP_two_name_tag2el_7, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_two_name_7_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_two_name_mmap_7 /* Mandatory elements map */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
@@ -640,16 +689,18 @@ asn_TYPE_descriptor_t asn_DEF_two_name_7 = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_two_name_7_tags,
- sizeof(asn_DEF_two_name_7_tags)
- /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
- asn_DEF_two_name_7_tags, /* Same as above */
- sizeof(asn_DEF_two_name_7_tags)
- /sizeof(asn_DEF_two_name_7_tags[0]), /* 1 */
+ asn_DEF_two_name_tags_7,
+ sizeof(asn_DEF_two_name_tags_7)
+ /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */
+ asn_DEF_two_name_tags_7, /* Same as above */
+ sizeof(asn_DEF_two_name_tags_7)
+ /sizeof(asn_DEF_two_name_tags_7[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_two_name_7,
1, /* Elements count */
- &asn_SPC_two_name_7_specs /* Additional specs */
+ &asn_SPC_two_name_specs_7 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Type2_1[] = {
@@ -658,6 +709,8 @@ static asn_TYPE_member_t asn_MBR_Type2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_one_name_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "one-name"
},
{ ATF_NOFLAGS, 0, offsetof(struct Type2, choice.two_name),
@@ -665,21 +718,24 @@ static asn_TYPE_member_t asn_MBR_Type2_1[] = {
.tag_mode = 0,
.type = &asn_DEF_two_name_7,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "two-name"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Type2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Type2_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* one-name at 37 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 1, 0, 0 } /* two-name at 43 */
};
-static asn_CHOICE_specifics_t asn_SPC_Type2_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Type2_specs_1 = {
sizeof(struct Type2),
offsetof(struct Type2, _asn_ctx),
offsetof(struct Type2, present),
sizeof(((struct Type2 *)0)->present),
- asn_MAP_Type2_1_tag2el,
+ asn_MAP_Type2_tag2el_1,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Type2 = {
"Type2",
@@ -691,13 +747,15 @@ asn_TYPE_descriptor_t asn_DEF_Type2 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Type2_1,
2, /* Elements count */
- &asn_SPC_Type2_1_specs /* Additional specs */
+ &asn_SPC_Type2_specs_1 /* Additional specs */
};
diff --git a/tests/73-circular-OK.asn1.-P b/tests/73-circular-OK.asn1.-P
index 596163da..4e29c9bb 100644
--- a/tests/73-circular-OK.asn1.-P
+++ b/tests/73-circular-OK.asn1.-P
@@ -39,13 +39,15 @@ static asn_TYPE_member_t asn_MBR_data_2[] = {
.tag_mode = 0,
.type = &asn_DEF_EpytRef,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_data_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_data_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_data_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_data_specs_2 = {
sizeof(struct data),
offsetof(struct data, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -61,16 +63,18 @@ asn_TYPE_descriptor_t asn_DEF_data_2 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_data_2_tags,
- sizeof(asn_DEF_data_2_tags)
- /sizeof(asn_DEF_data_2_tags[0]), /* 1 */
- asn_DEF_data_2_tags, /* Same as above */
- sizeof(asn_DEF_data_2_tags)
- /sizeof(asn_DEF_data_2_tags[0]), /* 1 */
+ asn_DEF_data_tags_2,
+ sizeof(asn_DEF_data_tags_2)
+ /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
+ asn_DEF_data_tags_2, /* Same as above */
+ sizeof(asn_DEF_data_tags_2)
+ /sizeof(asn_DEF_data_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_data_2,
1, /* Single element */
- &asn_SPC_data_2_specs /* Additional specs */
+ &asn_SPC_data_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Type_1[] = {
@@ -79,20 +83,23 @@ static asn_TYPE_member_t asn_MBR_Type_1[] = {
.tag_mode = 0,
.type = &asn_DEF_data_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "data"
},
};
-static ber_tlv_tag_t asn_DEF_Type_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Type_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Type_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Type_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data at 16 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Type_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1 = {
sizeof(struct Type),
offsetof(struct Type, _asn_ctx),
- asn_MAP_Type_1_tag2el,
+ asn_MAP_Type_tag2el_1,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -106,16 +113,18 @@ asn_TYPE_descriptor_t asn_DEF_Type = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Type_1_tags,
- sizeof(asn_DEF_Type_1_tags)
- /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
- asn_DEF_Type_1_tags, /* Same as above */
- sizeof(asn_DEF_Type_1_tags)
- /sizeof(asn_DEF_Type_1_tags[0]), /* 1 */
+ asn_DEF_Type_tags_1,
+ sizeof(asn_DEF_Type_tags_1)
+ /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
+ asn_DEF_Type_tags_1, /* Same as above */
+ sizeof(asn_DEF_Type_tags_1)
+ /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Type_1,
1, /* Elements count */
- &asn_SPC_Type_1_specs /* Additional specs */
+ &asn_SPC_Type_specs_1 /* Additional specs */
};
@@ -160,6 +169,9 @@ EpytRef_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Epyt.der_encoder;
td->xer_decoder = asn_DEF_Epyt.xer_decoder;
td->xer_encoder = asn_DEF_Epyt.xer_encoder;
+ td->uper_decoder = asn_DEF_Epyt.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Epyt.per_constraints;
td->elements = asn_DEF_Epyt.elements;
td->elements_count = asn_DEF_Epyt.elements_count;
td->specifics = asn_DEF_Epyt.specifics;
@@ -212,7 +224,7 @@ EpytRef_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [EpytRef] >>> ***/
-static ber_tlv_tag_t asn_DEF_EpytRef_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_EpytRef = {
@@ -225,13 +237,15 @@ asn_TYPE_descriptor_t asn_DEF_EpytRef = {
EpytRef_encode_der,
EpytRef_decode_xer,
EpytRef_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_EpytRef_1_tags,
- sizeof(asn_DEF_EpytRef_1_tags)
- /sizeof(asn_DEF_EpytRef_1_tags[0]), /* 1 */
- asn_DEF_EpytRef_1_tags, /* Same as above */
- sizeof(asn_DEF_EpytRef_1_tags)
- /sizeof(asn_DEF_EpytRef_1_tags[0]), /* 1 */
+ asn_DEF_EpytRef_tags_1,
+ sizeof(asn_DEF_EpytRef_tags_1)
+ /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
+ asn_DEF_EpytRef_tags_1, /* Same as above */
+ sizeof(asn_DEF_EpytRef_tags_1)
+ /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -281,13 +295,15 @@ static asn_TYPE_member_t asn_MBR_stype_2[] = {
.tag_mode = 0,
.type = &asn_DEF_Type,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_stype_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_stype_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_stype_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = {
sizeof(struct stype),
offsetof(struct stype, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -303,16 +319,18 @@ asn_TYPE_descriptor_t asn_DEF_stype_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_stype_2_tags,
- sizeof(asn_DEF_stype_2_tags)
- /sizeof(asn_DEF_stype_2_tags[0]), /* 1 */
- asn_DEF_stype_2_tags, /* Same as above */
- sizeof(asn_DEF_stype_2_tags)
- /sizeof(asn_DEF_stype_2_tags[0]), /* 1 */
+ asn_DEF_stype_tags_2,
+ sizeof(asn_DEF_stype_tags_2)
+ /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
+ asn_DEF_stype_tags_2, /* Same as above */
+ sizeof(asn_DEF_stype_tags_2)
+ /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_stype_2,
1, /* Single element */
- &asn_SPC_stype_2_specs /* Additional specs */
+ &asn_SPC_stype_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Epyt_1[] = {
@@ -321,6 +339,8 @@ static asn_TYPE_member_t asn_MBR_Epyt_1[] = {
.tag_mode = 0,
.type = &asn_DEF_stype_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "stype"
},
{ ATF_POINTER, 2, offsetof(struct Epyt, type),
@@ -328,6 +348,8 @@ static asn_TYPE_member_t asn_MBR_Epyt_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Type,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "type"
},
{ ATF_POINTER, 1, offsetof(struct Epyt, ypet),
@@ -335,22 +357,25 @@ static asn_TYPE_member_t asn_MBR_Epyt_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Ypet,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ypet"
},
};
-static ber_tlv_tag_t asn_DEF_Epyt_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Epyt_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type at 22 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype at 21 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet at 23 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Epyt_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = {
sizeof(struct Epyt),
offsetof(struct Epyt, _asn_ctx),
- asn_MAP_Epyt_1_tag2el,
+ asn_MAP_Epyt_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -364,16 +389,18 @@ asn_TYPE_descriptor_t asn_DEF_Epyt = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Epyt_1_tags,
- sizeof(asn_DEF_Epyt_1_tags)
- /sizeof(asn_DEF_Epyt_1_tags[0]), /* 1 */
- asn_DEF_Epyt_1_tags, /* Same as above */
- sizeof(asn_DEF_Epyt_1_tags)
- /sizeof(asn_DEF_Epyt_1_tags[0]), /* 1 */
+ asn_DEF_Epyt_tags_1,
+ sizeof(asn_DEF_Epyt_tags_1)
+ /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
+ asn_DEF_Epyt_tags_1, /* Same as above */
+ sizeof(asn_DEF_Epyt_tags_1)
+ /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Epyt_1,
3, /* Elements count */
- &asn_SPC_Epyt_1_specs /* Additional specs */
+ &asn_SPC_Epyt_specs_1 /* Additional specs */
};
@@ -466,7 +493,7 @@ static int check_permitted_alphabet_7(const void *sptr) {
/*** <<< CODE [Ypet] >>> ***/
static int
-memb_patest1_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const IA5String_t *st = (const IA5String_t *)sptr;
@@ -490,7 +517,7 @@ memb_patest1_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
static int
-memb_patest2_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_patest2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
const IA5String_t *st = (const IA5String_t *)sptr;
@@ -516,19 +543,32 @@ memb_patest2_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [Ypet] >>> ***/
+static int asn_DFL_3_set_7(void **sptr) {
+ INTEGER_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 7 */
+ return asn_long2INTEGER(st, 7);
+}
static asn_TYPE_member_t asn_MBR_senums_4[] = {
{ ATF_POINTER, 0, 0,
.tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
.tag_mode = 0,
.type = &asn_DEF_EnumType,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_senums_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_senums_tags_4[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_senums_4_specs = {
+static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = {
sizeof(struct senums),
offsetof(struct senums, _asn_ctx),
1, /* XER encoding is XMLValueList */
@@ -544,16 +584,18 @@ asn_TYPE_descriptor_t asn_DEF_senums_4 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_senums_4_tags,
- sizeof(asn_DEF_senums_4_tags)
- /sizeof(asn_DEF_senums_4_tags[0]), /* 1 */
- asn_DEF_senums_4_tags, /* Same as above */
- sizeof(asn_DEF_senums_4_tags)
- /sizeof(asn_DEF_senums_4_tags[0]), /* 1 */
+ asn_DEF_senums_tags_4,
+ sizeof(asn_DEF_senums_tags_4)
+ /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
+ asn_DEF_senums_tags_4, /* Same as above */
+ sizeof(asn_DEF_senums_tags_4)
+ /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_senums_4,
1, /* Single element */
- &asn_SPC_senums_4_specs /* Additional specs */
+ &asn_SPC_senums_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Ypet_1[] = {
@@ -562,6 +604,8 @@ static asn_TYPE_member_t asn_MBR_Ypet_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Epyt,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "epyt"
},
{ ATF_POINTER, 1, offsetof(struct Ypet, plain),
@@ -569,6 +613,8 @@ static asn_TYPE_member_t asn_MBR_Ypet_1[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = asn_DFL_3_set_7, /* DEFAULT 7 */
.name = "plain"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ypet, senums),
@@ -576,46 +622,52 @@ static asn_TYPE_member_t asn_MBR_Ypet_1[] = {
.tag_mode = 0,
.type = &asn_DEF_senums_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "senums"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1),
.tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_IA5String,
- .memb_constraints = memb_patest1_1_constraint,
+ .memb_constraints = memb_patest1_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "patest1"
},
{ ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2),
.tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_IA5String,
- .memb_constraints = memb_patest2_1_constraint,
+ .memb_constraints = memb_patest2_constraint_1,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "patest2"
},
};
-static ber_tlv_tag_t asn_DEF_Ypet_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Ypet_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain at 28 */
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt at 27 */
{ (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums at 29 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 at 30 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 at 31 */
};
-static uint8_t asn_MAP_Ypet_1_mmap[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3)
};
-static asn_SET_specifics_t asn_SPC_Ypet_1_specs = {
+static asn_SET_specifics_t asn_SPC_Ypet_specs_1 = {
sizeof(struct Ypet),
offsetof(struct Ypet, _asn_ctx),
offsetof(struct Ypet, _presence_map),
- asn_MAP_Ypet_1_tag2el,
+ asn_MAP_Ypet_tag2el_1,
5, /* Count of tags in the map */
- asn_MAP_Ypet_1_tag2el, /* Same as above */
+ asn_MAP_Ypet_tag2el_1, /* Same as above */
5, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_Ypet_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Ypet = {
"Ypet",
@@ -627,16 +679,18 @@ asn_TYPE_descriptor_t asn_DEF_Ypet = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Ypet_1_tags,
- sizeof(asn_DEF_Ypet_1_tags)
- /sizeof(asn_DEF_Ypet_1_tags[0]), /* 1 */
- asn_DEF_Ypet_1_tags, /* Same as above */
- sizeof(asn_DEF_Ypet_1_tags)
- /sizeof(asn_DEF_Ypet_1_tags[0]), /* 1 */
+ asn_DEF_Ypet_tags_1,
+ sizeof(asn_DEF_Ypet_tags_1)
+ /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
+ asn_DEF_Ypet_tags_1, /* Same as above */
+ sizeof(asn_DEF_Ypet_tags_1)
+ /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Ypet_1,
5, /* Elements count */
- &asn_SPC_Ypet_1_specs /* Additional specs */
+ &asn_SPC_Ypet_specs_1 /* Additional specs */
};
@@ -688,6 +742,9 @@ EnumType_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
+ td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
td->elements = asn_DEF_ENUMERATED.elements;
td->elements_count = asn_DEF_ENUMERATED.elements_count;
/* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
@@ -740,22 +797,22 @@ EnumType_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [EnumType] >>> ***/
-static asn_INTEGER_enum_map_t asn_MAP_EnumType_1_value2enum[] = {
+static asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = {
{ 0, 3, "one" },
{ 1, 3, "two" }
};
-static unsigned int asn_MAP_EnumType_1_enum2value[] = {
+static unsigned int asn_MAP_EnumType_enum2value_1[] = {
0, /* one(0) */
1 /* two(1) */
};
-static asn_INTEGER_specifics_t asn_SPC_EnumType_1_specs = {
- asn_MAP_EnumType_1_value2enum, /* "tag" => N; sorted by tag */
- asn_MAP_EnumType_1_enum2value, /* N => "tag"; sorted by N */
+static asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = {
+ asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */
+ asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */
2, /* Number of elements in the maps */
0, /* Enumeration is not extensible */
1 /* Strict enumeration */
};
-static ber_tlv_tag_t asn_DEF_EnumType_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_EnumType = {
@@ -768,14 +825,16 @@ asn_TYPE_descriptor_t asn_DEF_EnumType = {
EnumType_encode_der,
EnumType_decode_xer,
EnumType_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_EnumType_1_tags,
- sizeof(asn_DEF_EnumType_1_tags)
- /sizeof(asn_DEF_EnumType_1_tags[0]), /* 1 */
- asn_DEF_EnumType_1_tags, /* Same as above */
- sizeof(asn_DEF_EnumType_1_tags)
- /sizeof(asn_DEF_EnumType_1_tags[0]), /* 1 */
+ asn_DEF_EnumType_tags_1,
+ sizeof(asn_DEF_EnumType_tags_1)
+ /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
+ asn_DEF_EnumType_tags_1, /* Same as above */
+ sizeof(asn_DEF_EnumType_tags_1)
+ /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
- &asn_SPC_EnumType_1_specs /* Additional specs */
+ &asn_SPC_EnumType_specs_1 /* Additional specs */
};
diff --git a/tests/84-param-tags-OK.asn1.-P b/tests/84-param-tags-OK.asn1.-P
index 65987642..f7353dbf 100644
--- a/tests/84-param-tags-OK.asn1.-P
+++ b/tests/84-param-tags-OK.asn1.-P
@@ -20,13 +20,13 @@ typedef struct TestChoice {
TestChoice_PR present;
union TestChoice_u {
struct type1 {
- long *common /* DEFAULT 0 */;
+ long common /* DEFAULT 0 */;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} type1;
struct type2 {
- BOOLEAN_t *common /* DEFAULT 0 */;
+ BOOLEAN_t common /* DEFAULT 0 */;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
@@ -44,7 +44,7 @@ extern asn_TYPE_descriptor_t asn_DEF_TestChoice;
/*** <<< CODE [TestChoice] >>> ***/
static int
-memb_common_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_common_constraint_2(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
long value;
@@ -71,26 +71,41 @@ memb_common_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
/*** <<< STAT-DEFS [TestChoice] >>> ***/
+static int asn_DFL_3_set_0(void **sptr) {
+ long *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 0 */
+ *st = 0;
+ return 0;
+}
static asn_TYPE_member_t asn_MBR_type1_2[] = {
- { ATF_POINTER, 1, offsetof(struct type1, common),
+ { ATF_NOFLAGS, 1, offsetof(struct type1, common),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
.tag_mode = 0,
.type = &asn_DEF_NativeInteger,
- .memb_constraints = memb_common_2_constraint,
+ .memb_constraints = memb_common_constraint_2,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = asn_DFL_3_set_0, /* DEFAULT 0 */
.name = "common"
},
};
-static ber_tlv_tag_t asn_DEF_type1_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_type1_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_type1_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_type1_tag2el_2[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* common at 20 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_type1_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_type1_specs_2 = {
sizeof(struct type1),
offsetof(struct type1, _asn_ctx),
- asn_MAP_type1_2_tag2el,
+ asn_MAP_type1_tag2el_2,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -105,39 +120,56 @@ asn_TYPE_descriptor_t asn_DEF_type1_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_type1_2_tags,
- sizeof(asn_DEF_type1_2_tags)
- /sizeof(asn_DEF_type1_2_tags[0]), /* 1 */
- asn_DEF_type1_2_tags, /* Same as above */
- sizeof(asn_DEF_type1_2_tags)
- /sizeof(asn_DEF_type1_2_tags[0]), /* 1 */
+ asn_DEF_type1_tags_2,
+ sizeof(asn_DEF_type1_tags_2)
+ /sizeof(asn_DEF_type1_tags_2[0]), /* 1 */
+ asn_DEF_type1_tags_2, /* Same as above */
+ sizeof(asn_DEF_type1_tags_2)
+ /sizeof(asn_DEF_type1_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_type1_2,
1, /* Elements count */
- &asn_SPC_type1_2_specs /* Additional specs */
+ &asn_SPC_type1_specs_2 /* Additional specs */
};
+static int asn_DFL_5_set_0(void **sptr) {
+ BOOLEAN_t *st = *sptr;
+
+ if(!st) {
+ st = (*sptr = CALLOC(1, sizeof(*st)));
+ if(!st) return -1;
+ }
+
+ /* Install default value 0 */
+ *st = 0;
+ return 0;
+}
static asn_TYPE_member_t asn_MBR_type2_4[] = {
- { ATF_POINTER, 1, offsetof(struct type2, common),
+ { ATF_NOFLAGS, 1, offsetof(struct type2, common),
.tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
.tag_mode = 0,
.type = &asn_DEF_BOOLEAN,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = asn_DFL_5_set_0, /* DEFAULT 0 */
.name = "common"
},
};
-static ber_tlv_tag_t asn_DEF_type2_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_type2_tags_4[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_type2_4_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_type2_tag2el_4[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 0, 0, 0 } /* common at 21 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_type2_4_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_type2_specs_4 = {
sizeof(struct type2),
offsetof(struct type2, _asn_ctx),
- asn_MAP_type2_4_tag2el,
+ asn_MAP_type2_tag2el_4,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -152,16 +184,18 @@ asn_TYPE_descriptor_t asn_DEF_type2_4 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_type2_4_tags,
- sizeof(asn_DEF_type2_4_tags)
- /sizeof(asn_DEF_type2_4_tags[0]) - 1, /* 1 */
- asn_DEF_type2_4_tags, /* Same as above */
- sizeof(asn_DEF_type2_4_tags)
- /sizeof(asn_DEF_type2_4_tags[0]), /* 2 */
+ asn_DEF_type2_tags_4,
+ sizeof(asn_DEF_type2_tags_4)
+ /sizeof(asn_DEF_type2_tags_4[0]) - 1, /* 1 */
+ asn_DEF_type2_tags_4, /* Same as above */
+ sizeof(asn_DEF_type2_tags_4)
+ /sizeof(asn_DEF_type2_tags_4[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_type2_4,
1, /* Elements count */
- &asn_SPC_type2_4_specs /* Additional specs */
+ &asn_SPC_type2_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
@@ -170,6 +204,8 @@ static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
.tag_mode = 0,
.type = &asn_DEF_type1_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "type1"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestChoice, choice.type2),
@@ -177,21 +213,24 @@ static asn_TYPE_member_t asn_MBR_TestChoice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_type2_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "type2"
},
};
-static asn_TYPE_tag2member_t asn_MAP_TestChoice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_TestChoice_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* type1 at 16 */
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 } /* type2 at 16 */
};
-static asn_CHOICE_specifics_t asn_SPC_TestChoice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_TestChoice_specs_1 = {
sizeof(struct TestChoice),
offsetof(struct TestChoice, _asn_ctx),
offsetof(struct TestChoice, present),
sizeof(((struct TestChoice *)0)->present),
- asn_MAP_TestChoice_1_tag2el,
+ asn_MAP_TestChoice_tag2el_1,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_TestChoice = {
"TestChoice",
@@ -203,14 +242,16 @@ asn_TYPE_descriptor_t asn_DEF_TestChoice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_TestChoice_1,
2, /* Elements count */
- &asn_SPC_TestChoice_1_specs /* Additional specs */
+ &asn_SPC_TestChoice_specs_1 /* Additional specs */
};
@@ -259,7 +300,7 @@ extern asn_TYPE_descriptor_t asn_DEF_AutoChoice;
/*** <<< CODE [AutoChoice] >>> ***/
static int
-memb_common_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_common_constraint_2(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
long value;
@@ -284,7 +325,7 @@ memb_common_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
}
static int
-memb_common_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+memb_common_constraint_4(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_consume_bytes_f *app_errlog, void *app_key) {
BOOLEAN_t value;
@@ -316,22 +357,25 @@ static asn_TYPE_member_t asn_MBR_type1_2[] = {
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_NativeInteger,
- .memb_constraints = memb_common_2_constraint,
+ .memb_constraints = memb_common_constraint_2,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "common"
},
};
-static ber_tlv_tag_t asn_DEF_type1_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_type1_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_type1_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_type1_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 37 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_type1_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_type1_specs_2 = {
sizeof(struct type1),
offsetof(struct type1, _asn_ctx),
- asn_MAP_type1_2_tag2el,
+ asn_MAP_type1_tag2el_2,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -346,16 +390,18 @@ asn_TYPE_descriptor_t asn_DEF_type1_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_type1_2_tags,
- sizeof(asn_DEF_type1_2_tags)
- /sizeof(asn_DEF_type1_2_tags[0]) - 1, /* 1 */
- asn_DEF_type1_2_tags, /* Same as above */
- sizeof(asn_DEF_type1_2_tags)
- /sizeof(asn_DEF_type1_2_tags[0]), /* 2 */
+ asn_DEF_type1_tags_2,
+ sizeof(asn_DEF_type1_tags_2)
+ /sizeof(asn_DEF_type1_tags_2[0]) - 1, /* 1 */
+ asn_DEF_type1_tags_2, /* Same as above */
+ sizeof(asn_DEF_type1_tags_2)
+ /sizeof(asn_DEF_type1_tags_2[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_type1_2,
1, /* Elements count */
- &asn_SPC_type1_2_specs /* Additional specs */
+ &asn_SPC_type1_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_type2_4[] = {
@@ -363,22 +409,25 @@ static asn_TYPE_member_t asn_MBR_type2_4[] = {
.tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_BOOLEAN,
- .memb_constraints = memb_common_4_constraint,
+ .memb_constraints = memb_common_constraint_4,
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "common"
},
};
-static ber_tlv_tag_t asn_DEF_type2_4_tags[] = {
+static ber_tlv_tag_t asn_DEF_type2_tags_4[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_type2_4_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_type2_tag2el_4[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* common at 38 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_type2_4_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_type2_specs_4 = {
sizeof(struct type2),
offsetof(struct type2, _asn_ctx),
- asn_MAP_type2_4_tag2el,
+ asn_MAP_type2_tag2el_4,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -393,16 +442,18 @@ asn_TYPE_descriptor_t asn_DEF_type2_4 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_type2_4_tags,
- sizeof(asn_DEF_type2_4_tags)
- /sizeof(asn_DEF_type2_4_tags[0]) - 1, /* 1 */
- asn_DEF_type2_4_tags, /* Same as above */
- sizeof(asn_DEF_type2_4_tags)
- /sizeof(asn_DEF_type2_4_tags[0]), /* 2 */
+ asn_DEF_type2_tags_4,
+ sizeof(asn_DEF_type2_tags_4)
+ /sizeof(asn_DEF_type2_tags_4[0]) - 1, /* 1 */
+ asn_DEF_type2_tags_4, /* Same as above */
+ sizeof(asn_DEF_type2_tags_4)
+ /sizeof(asn_DEF_type2_tags_4[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_type2_4,
1, /* Elements count */
- &asn_SPC_type2_4_specs /* Additional specs */
+ &asn_SPC_type2_specs_4 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
@@ -411,6 +462,8 @@ static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_type1_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "type1"
},
{ ATF_NOFLAGS, 0, offsetof(struct AutoChoice, choice.type2),
@@ -418,21 +471,24 @@ static asn_TYPE_member_t asn_MBR_AutoChoice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_type2_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "type2"
},
};
-static asn_TYPE_tag2member_t asn_MAP_AutoChoice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_AutoChoice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type1 at 34 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* type2 at 34 */
};
-static asn_CHOICE_specifics_t asn_SPC_AutoChoice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_AutoChoice_specs_1 = {
sizeof(struct AutoChoice),
offsetof(struct AutoChoice, _asn_ctx),
offsetof(struct AutoChoice, present),
sizeof(((struct AutoChoice *)0)->present),
- asn_MAP_AutoChoice_1_tag2el,
+ asn_MAP_AutoChoice_tag2el_1,
2, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
"AutoChoice",
@@ -444,13 +500,15 @@ asn_TYPE_descriptor_t asn_DEF_AutoChoice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_AutoChoice_1,
2, /* Elements count */
- &asn_SPC_AutoChoice_1_specs /* Additional specs */
+ &asn_SPC_AutoChoice_specs_1 /* Additional specs */
};
diff --git a/tests/88-integer-enum-OK.asn1.-P b/tests/88-integer-enum-OK.asn1.-P
index d87bda5e..6b73d313 100644
--- a/tests/88-integer-enum-OK.asn1.-P
+++ b/tests/88-integer-enum-OK.asn1.-P
@@ -47,6 +47,9 @@ T_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -99,7 +102,7 @@ T_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [T] >>> ***/
-static ber_tlv_tag_t asn_DEF_T_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_T_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_T = {
@@ -112,13 +115,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
T_encode_der,
T_decode_xer,
T_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_T_1_tags,
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
- asn_DEF_T_1_tags, /* Same as above */
- sizeof(asn_DEF_T_1_tags)
- /sizeof(asn_DEF_T_1_tags[0]), /* 1 */
+ asn_DEF_T_tags_1,
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ asn_DEF_T_tags_1, /* Same as above */
+ sizeof(asn_DEF_T_tags_1)
+ /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
diff --git a/tests/89-bit-string-enum-OK.asn1.-P b/tests/89-bit-string-enum-OK.asn1.-P
index 158a4449..0514dadc 100644
--- a/tests/89-bit-string-enum-OK.asn1.-P
+++ b/tests/89-bit-string-enum-OK.asn1.-P
@@ -39,20 +39,23 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "bs"
},
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* bs at 15 */
};
-static asn_CHOICE_specifics_t asn_SPC_T_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
offsetof(struct T, present),
sizeof(((struct T *)0)->present),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
1, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
@@ -64,13 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
1, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
diff --git a/tests/89-bit-string-enum-OK.asn1.-Pfcompound-names b/tests/89-bit-string-enum-OK.asn1.-Pfcompound-names
index 8f5d06c3..dbea3a30 100644
--- a/tests/89-bit-string-enum-OK.asn1.-Pfcompound-names
+++ b/tests/89-bit-string-enum-OK.asn1.-Pfcompound-names
@@ -39,20 +39,23 @@ static asn_TYPE_member_t asn_MBR_T_1[] = {
.tag_mode = 0,
.type = &asn_DEF_BIT_STRING,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "bs"
},
};
-static asn_TYPE_tag2member_t asn_MAP_T_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 } /* bs at 15 */
};
-static asn_CHOICE_specifics_t asn_SPC_T_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_T_specs_1 = {
sizeof(struct T),
offsetof(struct T, _asn_ctx),
offsetof(struct T, present),
sizeof(((struct T *)0)->present),
- asn_MAP_T_1_tag2el,
+ asn_MAP_T_tag2el_1,
1, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_T = {
"T",
@@ -64,13 +67,15 @@ asn_TYPE_descriptor_t asn_DEF_T = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_T_1,
1, /* Elements count */
- &asn_SPC_T_1_specs /* Additional specs */
+ &asn_SPC_T_specs_1 /* Additional specs */
};
diff --git a/tests/90-cond-int-type-OK.asn1.-P b/tests/90-cond-int-type-OK.asn1.-P
index 89acc3fb..9e03bc23 100644
--- a/tests/90-cond-int-type-OK.asn1.-P
+++ b/tests/90-cond-int-type-OK.asn1.-P
@@ -40,6 +40,9 @@ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -92,7 +95,7 @@ CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
@@ -105,13 +108,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
CN_IntegerUnlimited_encode_der,
CN_IntegerUnlimited_decode_xer,
CN_IntegerUnlimited_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerUnlimited_1_tags,
- sizeof(asn_DEF_CN_IntegerUnlimited_1_tags)
- /sizeof(asn_DEF_CN_IntegerUnlimited_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerUnlimited_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerUnlimited_1_tags)
- /sizeof(asn_DEF_CN_IntegerUnlimited_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerUnlimited_tags_1,
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -172,6 +177,9 @@ CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -224,7 +232,7 @@ CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
@@ -237,13 +245,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
CN_IntegerMinMax_encode_der,
CN_IntegerMinMax_decode_xer,
CN_IntegerMinMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerMinMax_1_tags,
- sizeof(asn_DEF_CN_IntegerMinMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinMax_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerMinMax_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerMinMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinMax_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerMinMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -313,6 +323,9 @@ CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -365,7 +378,7 @@ CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
@@ -378,13 +391,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
CN_IntegerMinLow_encode_der,
CN_IntegerMinLow_decode_xer,
CN_IntegerMinLow_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerMinLow_1_tags,
- sizeof(asn_DEF_CN_IntegerMinLow_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinLow_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerMinLow_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerMinLow_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinLow_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerMinLow_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -454,6 +469,9 @@ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -506,7 +524,7 @@ NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
@@ -519,13 +537,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
NO_IntegerMinHigh_encode_der,
NO_IntegerMinHigh_decode_xer,
NO_IntegerMinHigh_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerMinHigh_1_tags,
- sizeof(asn_DEF_NO_IntegerMinHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerMinHigh_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerMinHigh_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerMinHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerMinHigh_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerMinHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -595,6 +615,9 @@ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -647,7 +670,7 @@ NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
@@ -660,13 +683,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
NO_IntegerLowHigh_encode_der,
NO_IntegerLowHigh_decode_xer,
NO_IntegerLowHigh_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerLowHigh_1_tags,
- sizeof(asn_DEF_NO_IntegerLowHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowHigh_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerLowHigh_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerLowHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowHigh_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerLowHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -736,6 +761,9 @@ CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -788,7 +816,7 @@ CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
@@ -801,13 +829,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
CN_IntegerLowMax_encode_der,
CN_IntegerLowMax_decode_xer,
CN_IntegerLowMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerLowMax_1_tags,
- sizeof(asn_DEF_CN_IntegerLowMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerLowMax_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerLowMax_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerLowMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerLowMax_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerLowMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -877,6 +907,9 @@ NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -929,7 +962,7 @@ NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
@@ -942,13 +975,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
NO_IntegerHighMax_encode_der,
NO_IntegerHighMax_decode_xer,
NO_IntegerHighMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerHighMax_1_tags,
- sizeof(asn_DEF_NO_IntegerHighMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerHighMax_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerHighMax_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerHighMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerHighMax_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerHighMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1018,6 +1053,9 @@ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1070,7 +1108,7 @@ NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
@@ -1083,13 +1121,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
NO_IntegerLowestMax_encode_der,
NO_IntegerLowestMax_decode_xer,
NO_IntegerLowestMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerLowestMax_1_tags,
- sizeof(asn_DEF_NO_IntegerLowestMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowestMax_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerLowestMax_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerLowestMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowestMax_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerLowestMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1159,6 +1199,9 @@ NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1211,7 +1254,7 @@ NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
@@ -1224,13 +1267,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
NO_IntegerOutRange_encode_der,
NO_IntegerOutRange_decode_xer,
NO_IntegerOutRange_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerOutRange_1_tags,
- sizeof(asn_DEF_NO_IntegerOutRange_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutRange_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerOutRange_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerOutRange_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutRange_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerOutRange_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1300,6 +1345,9 @@ NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1352,7 +1400,7 @@ NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
@@ -1365,13 +1413,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
NO_IntegerOutValue_encode_der,
NO_IntegerOutValue_decode_xer,
NO_IntegerOutValue_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerOutValue_1_tags,
- sizeof(asn_DEF_NO_IntegerOutValue_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutValue_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerOutValue_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerOutValue_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutValue_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerOutValue_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1435,6 +1485,9 @@ OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1487,7 +1540,7 @@ OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
@@ -1500,13 +1553,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
OK_IntegerInRange1_encode_der,
OK_IntegerInRange1_decode_xer,
OK_IntegerInRange1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange1_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange1_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange1_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange1_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange1_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange1_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange1_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1570,6 +1625,9 @@ OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1622,7 +1680,7 @@ OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
@@ -1635,13 +1693,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
OK_IntegerInRange2_encode_der,
OK_IntegerInRange2_decode_xer,
OK_IntegerInRange2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange2_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange2_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange2_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange2_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange2_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange2_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange2_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1705,6 +1765,9 @@ OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1757,7 +1820,7 @@ OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
@@ -1770,13 +1833,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
OK_IntegerInRange3_encode_der,
OK_IntegerInRange3_decode_xer,
OK_IntegerInRange3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange3_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange3_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange3_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange3_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange3_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange3_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange3_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1840,6 +1905,9 @@ OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1892,7 +1960,7 @@ OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
@@ -1905,13 +1973,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
OK_IntegerInRange4_encode_der,
OK_IntegerInRange4_decode_xer,
OK_IntegerInRange4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange4_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange4_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange4_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange4_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange4_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange4_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange4_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1981,6 +2051,9 @@ OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2033,7 +2106,7 @@ OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
@@ -2046,13 +2119,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
OK_IntegerInRange5_encode_der,
OK_IntegerInRange5_decode_xer,
OK_IntegerInRange5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange5_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange5_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange5_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange5_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange5_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange5_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange5_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2122,6 +2197,9 @@ NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2174,7 +2252,7 @@ NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
@@ -2187,13 +2265,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
NO_IntegerInRange6_encode_der,
NO_IntegerInRange6_decode_xer,
NO_IntegerInRange6_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerInRange6_1_tags,
- sizeof(asn_DEF_NO_IntegerInRange6_1_tags)
- /sizeof(asn_DEF_NO_IntegerInRange6_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerInRange6_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerInRange6_1_tags)
- /sizeof(asn_DEF_NO_IntegerInRange6_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerInRange6_tags_1,
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2247,6 +2327,9 @@ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2299,7 +2382,7 @@ CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
@@ -2312,13 +2395,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
CN_IntegerEnumerated1_encode_der,
CN_IntegerEnumerated1_decode_xer,
CN_IntegerEnumerated1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerEnumerated1_1_tags,
- sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags)
- /sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerEnumerated1_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags)
- /sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerEnumerated1_tags_1,
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -2372,6 +2457,9 @@ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2424,7 +2512,7 @@ NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
@@ -2437,13 +2525,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
NO_IntegerEnumerated2_encode_der,
NO_IntegerEnumerated2_decode_xer,
NO_IntegerEnumerated2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerEnumerated2_1_tags,
- sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags)
- /sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerEnumerated2_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags)
- /sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerEnumerated2_tags_1,
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
diff --git a/tests/90-cond-int-type-OK.asn1.-Pfnative-types b/tests/90-cond-int-type-OK.asn1.-Pfnative-types
index eaf0f53c..240c70b1 100644
--- a/tests/90-cond-int-type-OK.asn1.-Pfnative-types
+++ b/tests/90-cond-int-type-OK.asn1.-Pfnative-types
@@ -40,6 +40,9 @@ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -92,7 +95,7 @@ CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
@@ -105,13 +108,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
CN_IntegerUnlimited_encode_der,
CN_IntegerUnlimited_decode_xer,
CN_IntegerUnlimited_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerUnlimited_1_tags,
- sizeof(asn_DEF_CN_IntegerUnlimited_1_tags)
- /sizeof(asn_DEF_CN_IntegerUnlimited_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerUnlimited_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerUnlimited_1_tags)
- /sizeof(asn_DEF_CN_IntegerUnlimited_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerUnlimited_tags_1,
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -171,6 +176,9 @@ CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -223,7 +231,7 @@ CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
@@ -236,13 +244,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
CN_IntegerMinMax_encode_der,
CN_IntegerMinMax_decode_xer,
CN_IntegerMinMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerMinMax_1_tags,
- sizeof(asn_DEF_CN_IntegerMinMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinMax_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerMinMax_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerMinMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinMax_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerMinMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -306,6 +316,9 @@ CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -358,7 +371,7 @@ CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
@@ -371,13 +384,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
CN_IntegerMinLow_encode_der,
CN_IntegerMinLow_decode_xer,
CN_IntegerMinLow_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerMinLow_1_tags,
- sizeof(asn_DEF_CN_IntegerMinLow_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinLow_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerMinLow_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerMinLow_1_tags)
- /sizeof(asn_DEF_CN_IntegerMinLow_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerMinLow_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -447,6 +462,9 @@ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -499,7 +517,7 @@ NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
@@ -512,13 +530,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
NO_IntegerMinHigh_encode_der,
NO_IntegerMinHigh_decode_xer,
NO_IntegerMinHigh_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerMinHigh_1_tags,
- sizeof(asn_DEF_NO_IntegerMinHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerMinHigh_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerMinHigh_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerMinHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerMinHigh_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerMinHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -588,6 +608,9 @@ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -640,7 +663,7 @@ NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
@@ -653,13 +676,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
NO_IntegerLowHigh_encode_der,
NO_IntegerLowHigh_decode_xer,
NO_IntegerLowHigh_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerLowHigh_1_tags,
- sizeof(asn_DEF_NO_IntegerLowHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowHigh_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerLowHigh_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerLowHigh_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowHigh_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerLowHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -723,6 +748,9 @@ CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -775,7 +803,7 @@ CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
@@ -788,13 +816,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
CN_IntegerLowMax_encode_der,
CN_IntegerLowMax_decode_xer,
CN_IntegerLowMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerLowMax_1_tags,
- sizeof(asn_DEF_CN_IntegerLowMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerLowMax_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerLowMax_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerLowMax_1_tags)
- /sizeof(asn_DEF_CN_IntegerLowMax_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerLowMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -864,6 +894,9 @@ NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -916,7 +949,7 @@ NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
@@ -929,13 +962,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
NO_IntegerHighMax_encode_der,
NO_IntegerHighMax_decode_xer,
NO_IntegerHighMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerHighMax_1_tags,
- sizeof(asn_DEF_NO_IntegerHighMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerHighMax_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerHighMax_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerHighMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerHighMax_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerHighMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1005,6 +1040,9 @@ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1057,7 +1095,7 @@ NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
@@ -1070,13 +1108,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
NO_IntegerLowestMax_encode_der,
NO_IntegerLowestMax_decode_xer,
NO_IntegerLowestMax_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerLowestMax_1_tags,
- sizeof(asn_DEF_NO_IntegerLowestMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowestMax_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerLowestMax_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerLowestMax_1_tags)
- /sizeof(asn_DEF_NO_IntegerLowestMax_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerLowestMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1146,6 +1186,9 @@ NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1198,7 +1241,7 @@ NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
@@ -1211,13 +1254,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
NO_IntegerOutRange_encode_der,
NO_IntegerOutRange_decode_xer,
NO_IntegerOutRange_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerOutRange_1_tags,
- sizeof(asn_DEF_NO_IntegerOutRange_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutRange_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerOutRange_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerOutRange_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutRange_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerOutRange_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1287,6 +1332,9 @@ NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -1339,7 +1387,7 @@ NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
@@ -1352,13 +1400,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
NO_IntegerOutValue_encode_der,
NO_IntegerOutValue_decode_xer,
NO_IntegerOutValue_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerOutValue_1_tags,
- sizeof(asn_DEF_NO_IntegerOutValue_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutValue_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerOutValue_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerOutValue_1_tags)
- /sizeof(asn_DEF_NO_IntegerOutValue_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerOutValue_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1422,6 +1472,9 @@ OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1474,7 +1527,7 @@ OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
@@ -1487,13 +1540,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
OK_IntegerInRange1_encode_der,
OK_IntegerInRange1_decode_xer,
OK_IntegerInRange1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange1_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange1_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange1_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange1_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange1_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange1_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange1_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1557,6 +1612,9 @@ OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1609,7 +1667,7 @@ OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
@@ -1622,13 +1680,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
OK_IntegerInRange2_encode_der,
OK_IntegerInRange2_decode_xer,
OK_IntegerInRange2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange2_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange2_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange2_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange2_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange2_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange2_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange2_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1692,6 +1752,9 @@ OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1744,7 +1807,7 @@ OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
@@ -1757,13 +1820,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
OK_IntegerInRange3_encode_der,
OK_IntegerInRange3_decode_xer,
OK_IntegerInRange3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange3_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange3_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange3_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange3_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange3_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange3_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange3_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1827,6 +1892,9 @@ OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -1879,7 +1947,7 @@ OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
@@ -1892,13 +1960,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
OK_IntegerInRange4_encode_der,
OK_IntegerInRange4_decode_xer,
OK_IntegerInRange4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange4_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange4_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange4_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange4_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange4_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange4_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange4_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -1962,6 +2032,9 @@ OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -2014,7 +2087,7 @@ OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
@@ -2027,13 +2100,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
OK_IntegerInRange5_encode_der,
OK_IntegerInRange5_decode_xer,
OK_IntegerInRange5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_IntegerInRange5_1_tags,
- sizeof(asn_DEF_OK_IntegerInRange5_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange5_1_tags[0]), /* 1 */
- asn_DEF_OK_IntegerInRange5_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_IntegerInRange5_1_tags)
- /sizeof(asn_DEF_OK_IntegerInRange5_1_tags[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange5_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2103,6 +2178,9 @@ NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2155,7 +2233,7 @@ NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
@@ -2168,13 +2246,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
NO_IntegerInRange6_encode_der,
NO_IntegerInRange6_decode_xer,
NO_IntegerInRange6_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerInRange6_1_tags,
- sizeof(asn_DEF_NO_IntegerInRange6_1_tags)
- /sizeof(asn_DEF_NO_IntegerInRange6_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerInRange6_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerInRange6_1_tags)
- /sizeof(asn_DEF_NO_IntegerInRange6_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerInRange6_tags_1,
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -2228,6 +2308,9 @@ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -2280,7 +2363,7 @@ CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
-static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
@@ -2293,13 +2376,15 @@ asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
CN_IntegerEnumerated1_encode_der,
CN_IntegerEnumerated1_decode_xer,
CN_IntegerEnumerated1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_CN_IntegerEnumerated1_1_tags,
- sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags)
- /sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags[0]), /* 1 */
- asn_DEF_CN_IntegerEnumerated1_1_tags, /* Same as above */
- sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags)
- /sizeof(asn_DEF_CN_IntegerEnumerated1_1_tags[0]), /* 1 */
+ asn_DEF_CN_IntegerEnumerated1_tags_1,
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -2353,6 +2438,9 @@ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -2405,7 +2493,7 @@ NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
@@ -2418,13 +2506,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
NO_IntegerEnumerated2_encode_der,
NO_IntegerEnumerated2_decode_xer,
NO_IntegerEnumerated2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_IntegerEnumerated2_1_tags,
- sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags)
- /sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags[0]), /* 1 */
- asn_DEF_NO_IntegerEnumerated2_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags)
- /sizeof(asn_DEF_NO_IntegerEnumerated2_1_tags[0]), /* 1 */
+ asn_DEF_NO_IntegerEnumerated2_tags_1,
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
diff --git a/tests/90-cond-int-type-OK.asn1.-Pgen-PER b/tests/90-cond-int-type-OK.asn1.-Pgen-PER
new file mode 100644
index 00000000..e0951e4f
--- /dev/null
+++ b/tests/90-cond-int-type-OK.asn1.-Pgen-PER
@@ -0,0 +1,2744 @@
+
+/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
+
+typedef INTEGER_t CN_IntegerUnlimited_t;
+
+/*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited;
+asn_struct_free_f CN_IntegerUnlimited_free;
+asn_struct_print_f CN_IntegerUnlimited_print;
+asn_constr_check_f CN_IntegerUnlimited_constraint;
+ber_type_decoder_f CN_IntegerUnlimited_decode_ber;
+der_type_encoder_f CN_IntegerUnlimited_encode_der;
+xer_type_decoder_f CN_IntegerUnlimited_decode_xer;
+xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
+per_type_decoder_f CN_IntegerUnlimited_decode_uper;
+
+/*** <<< CODE [CN-IntegerUnlimited] >>> ***/
+
+int
+CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_INTEGER.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerUnlimited_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
+ "CN-IntegerUnlimited",
+ "CN-IntegerUnlimited",
+ CN_IntegerUnlimited_free,
+ CN_IntegerUnlimited_print,
+ CN_IntegerUnlimited_constraint,
+ CN_IntegerUnlimited_decode_ber,
+ CN_IntegerUnlimited_encode_der,
+ CN_IntegerUnlimited_decode_xer,
+ CN_IntegerUnlimited_encode_xer,
+ CN_IntegerUnlimited_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_CN_IntegerUnlimited_tags_1,
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
+ /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
+
+typedef INTEGER_t CN_IntegerMinMax_t;
+
+/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
+asn_struct_free_f CN_IntegerMinMax_free;
+asn_struct_print_f CN_IntegerMinMax_print;
+asn_constr_check_f CN_IntegerMinMax_constraint;
+ber_type_decoder_f CN_IntegerMinMax_decode_ber;
+der_type_encoder_f CN_IntegerMinMax_encode_der;
+xer_type_decoder_f CN_IntegerMinMax_decode_xer;
+xer_type_encoder_f CN_IntegerMinMax_encode_xer;
+per_type_decoder_f CN_IntegerMinMax_decode_uper;
+
+/*** <<< CODE [CN-IntegerMinMax] >>> ***/
+
+int
+CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+
+ if(1 /* No applicable constraints whatsoever */) {
+ /* Nothing is here. See below */
+ }
+
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_INTEGER.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_CN_IntegerMinMax_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 },
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
+ "CN-IntegerMinMax",
+ "CN-IntegerMinMax",
+ CN_IntegerMinMax_free,
+ CN_IntegerMinMax_print,
+ CN_IntegerMinMax_constraint,
+ CN_IntegerMinMax_decode_ber,
+ CN_IntegerMinMax_encode_der,
+ CN_IntegerMinMax_decode_xer,
+ CN_IntegerMinMax_encode_xer,
+ CN_IntegerMinMax_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_CN_IntegerMinMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
+ &asn_PER_CN_IntegerMinMax_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
+
+typedef INTEGER_t CN_IntegerMinLow_t;
+
+/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
+asn_struct_free_f CN_IntegerMinLow_free;
+asn_struct_print_f CN_IntegerMinLow_print;
+asn_constr_check_f CN_IntegerMinLow_constraint;
+ber_type_decoder_f CN_IntegerMinLow_decode_ber;
+der_type_encoder_f CN_IntegerMinLow_encode_der;
+xer_type_decoder_f CN_IntegerMinLow_decode_xer;
+xer_type_encoder_f CN_IntegerMinLow_encode_xer;
+per_type_decoder_f CN_IntegerMinLow_decode_uper;
+
+/*** <<< CODE [CN-IntegerMinLow] >>> ***/
+
+int
+CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value <= 1)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerMinLow_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_CN_IntegerMinLow_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
+ "CN-IntegerMinLow",
+ "CN-IntegerMinLow",
+ CN_IntegerMinLow_free,
+ CN_IntegerMinLow_print,
+ CN_IntegerMinLow_constraint,
+ CN_IntegerMinLow_decode_ber,
+ CN_IntegerMinLow_encode_der,
+ CN_IntegerMinLow_decode_xer,
+ CN_IntegerMinLow_encode_xer,
+ CN_IntegerMinLow_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_CN_IntegerMinLow_tags_1,
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
+ /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
+ &asn_PER_CN_IntegerMinLow_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
+
+typedef INTEGER_t NO_IntegerMinHigh_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
+asn_struct_free_f NO_IntegerMinHigh_free;
+asn_struct_print_f NO_IntegerMinHigh_print;
+asn_constr_check_f NO_IntegerMinHigh_constraint;
+ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
+der_type_encoder_f NO_IntegerMinHigh_encode_der;
+xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
+xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
+per_type_decoder_f NO_IntegerMinHigh_decode_uper;
+
+/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
+
+int
+NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value <= 3000000000)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerMinHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerMinHigh_constr_1 = {
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..3000000000) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
+ "NO-IntegerMinHigh",
+ "NO-IntegerMinHigh",
+ NO_IntegerMinHigh_free,
+ NO_IntegerMinHigh_print,
+ NO_IntegerMinHigh_constraint,
+ NO_IntegerMinHigh_decode_ber,
+ NO_IntegerMinHigh_encode_der,
+ NO_IntegerMinHigh_decode_xer,
+ NO_IntegerMinHigh_encode_xer,
+ NO_IntegerMinHigh_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerMinHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerMinHigh_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
+
+typedef INTEGER_t NO_IntegerLowHigh_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
+asn_struct_free_f NO_IntegerLowHigh_free;
+asn_struct_print_f NO_IntegerLowHigh_print;
+asn_constr_check_f NO_IntegerLowHigh_constraint;
+ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
+der_type_encoder_f NO_IntegerLowHigh_encode_der;
+xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
+xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
+per_type_decoder_f NO_IntegerLowHigh_decode_uper;
+
+/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
+
+int
+NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 1 && value <= 3000000000)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerLowHigh_constr_1 = {
+ { APC_CONSTRAINED, 32, -1, 1, 3000000000 } /* (1..3000000000) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
+ "NO-IntegerLowHigh",
+ "NO-IntegerLowHigh",
+ NO_IntegerLowHigh_free,
+ NO_IntegerLowHigh_print,
+ NO_IntegerLowHigh_constraint,
+ NO_IntegerLowHigh_decode_ber,
+ NO_IntegerLowHigh_encode_der,
+ NO_IntegerLowHigh_decode_xer,
+ NO_IntegerLowHigh_encode_xer,
+ NO_IntegerLowHigh_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerLowHigh_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerLowHigh_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
+
+typedef INTEGER_t CN_IntegerLowMax_t;
+
+/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
+asn_struct_free_f CN_IntegerLowMax_free;
+asn_struct_print_f CN_IntegerLowMax_print;
+asn_constr_check_f CN_IntegerLowMax_constraint;
+ber_type_decoder_f CN_IntegerLowMax_decode_ber;
+der_type_encoder_f CN_IntegerLowMax_encode_der;
+xer_type_decoder_f CN_IntegerLowMax_decode_xer;
+xer_type_encoder_f CN_IntegerLowMax_encode_xer;
+per_type_decoder_f CN_IntegerLowMax_decode_uper;
+
+/*** <<< CODE [CN-IntegerLowMax] >>> ***/
+
+int
+CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 1)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerLowMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_CN_IntegerLowMax_constr_1 = {
+ { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (1..MAX) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
+ "CN-IntegerLowMax",
+ "CN-IntegerLowMax",
+ CN_IntegerLowMax_free,
+ CN_IntegerLowMax_print,
+ CN_IntegerLowMax_constraint,
+ CN_IntegerLowMax_decode_ber,
+ CN_IntegerLowMax_encode_der,
+ CN_IntegerLowMax_decode_xer,
+ CN_IntegerLowMax_encode_xer,
+ CN_IntegerLowMax_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_CN_IntegerLowMax_tags_1,
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
+ /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
+ &asn_PER_CN_IntegerLowMax_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
+
+typedef INTEGER_t NO_IntegerHighMax_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
+asn_struct_free_f NO_IntegerHighMax_free;
+asn_struct_print_f NO_IntegerHighMax_print;
+asn_constr_check_f NO_IntegerHighMax_constraint;
+ber_type_decoder_f NO_IntegerHighMax_decode_ber;
+der_type_encoder_f NO_IntegerHighMax_encode_der;
+xer_type_decoder_f NO_IntegerHighMax_decode_xer;
+xer_type_encoder_f NO_IntegerHighMax_encode_xer;
+per_type_decoder_f NO_IntegerHighMax_decode_uper;
+
+/*** <<< CODE [NO-IntegerHighMax] >>> ***/
+
+int
+NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 3000000000)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerHighMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerHighMax_constr_1 = {
+ { APC_SEMI_CONSTRAINED, -1, -1, 3000000000, 0 } /* (3000000000..MAX) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
+ "NO-IntegerHighMax",
+ "NO-IntegerHighMax",
+ NO_IntegerHighMax_free,
+ NO_IntegerHighMax_print,
+ NO_IntegerHighMax_constraint,
+ NO_IntegerHighMax_decode_ber,
+ NO_IntegerHighMax_encode_der,
+ NO_IntegerHighMax_decode_xer,
+ NO_IntegerHighMax_encode_xer,
+ NO_IntegerHighMax_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerHighMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerHighMax_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
+
+typedef INTEGER_t NO_IntegerLowestMax_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
+asn_struct_free_f NO_IntegerLowestMax_free;
+asn_struct_print_f NO_IntegerLowestMax_print;
+asn_constr_check_f NO_IntegerLowestMax_constraint;
+ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
+der_type_encoder_f NO_IntegerLowestMax_encode_der;
+xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
+xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
+per_type_decoder_f NO_IntegerLowestMax_decode_uper;
+
+/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
+
+int
+NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= -3000000000)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerLowestMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerLowestMax_constr_1 = {
+ { APC_SEMI_CONSTRAINED, -1, -1, -3000000000, 0 } /* (-3000000000..MAX) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
+ "NO-IntegerLowestMax",
+ "NO-IntegerLowestMax",
+ NO_IntegerLowestMax_free,
+ NO_IntegerLowestMax_print,
+ NO_IntegerLowestMax_constraint,
+ NO_IntegerLowestMax_decode_ber,
+ NO_IntegerLowestMax_encode_der,
+ NO_IntegerLowestMax_decode_xer,
+ NO_IntegerLowestMax_encode_xer,
+ NO_IntegerLowestMax_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerLowestMax_tags_1,
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
+ /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerLowestMax_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
+
+typedef INTEGER_t NO_IntegerOutRange_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
+asn_struct_free_f NO_IntegerOutRange_free;
+asn_struct_print_f NO_IntegerOutRange_print;
+asn_constr_check_f NO_IntegerOutRange_constraint;
+ber_type_decoder_f NO_IntegerOutRange_decode_ber;
+der_type_encoder_f NO_IntegerOutRange_encode_der;
+xer_type_decoder_f NO_IntegerOutRange_decode_xer;
+xer_type_encoder_f NO_IntegerOutRange_encode_xer;
+per_type_decoder_f NO_IntegerOutRange_decode_uper;
+
+/*** <<< CODE [NO-IntegerOutRange] >>> ***/
+
+int
+NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 3000000000 && value <= 3000000001)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutRange_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerOutRange_constr_1 = {
+ { APC_CONSTRAINED, 1, -1, 3000000000, 3000000001 } /* (3000000000..3000000001) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
+ "NO-IntegerOutRange",
+ "NO-IntegerOutRange",
+ NO_IntegerOutRange_free,
+ NO_IntegerOutRange_print,
+ NO_IntegerOutRange_constraint,
+ NO_IntegerOutRange_decode_ber,
+ NO_IntegerOutRange_encode_der,
+ NO_IntegerOutRange_decode_xer,
+ NO_IntegerOutRange_encode_xer,
+ NO_IntegerOutRange_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerOutRange_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerOutRange_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
+
+typedef INTEGER_t NO_IntegerOutValue_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
+asn_struct_free_f NO_IntegerOutValue_free;
+asn_struct_print_f NO_IntegerOutValue_print;
+asn_constr_check_f NO_IntegerOutValue_constraint;
+ber_type_decoder_f NO_IntegerOutValue_decode_ber;
+der_type_encoder_f NO_IntegerOutValue_encode_der;
+xer_type_decoder_f NO_IntegerOutValue_decode_xer;
+xer_type_encoder_f NO_IntegerOutValue_encode_xer;
+per_type_decoder_f NO_IntegerOutValue_decode_uper;
+
+/*** <<< CODE [NO-IntegerOutValue] >>> ***/
+
+int
+NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value == 3000000000)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerOutValue_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerOutValue_constr_1 = {
+ { APC_CONSTRAINED, 0, -1, 3000000000, 3000000000 } /* (3000000000..3000000000) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
+ "NO-IntegerOutValue",
+ "NO-IntegerOutValue",
+ NO_IntegerOutValue_free,
+ NO_IntegerOutValue_print,
+ NO_IntegerOutValue_constraint,
+ NO_IntegerOutValue_decode_ber,
+ NO_IntegerOutValue_encode_der,
+ NO_IntegerOutValue_decode_xer,
+ NO_IntegerOutValue_encode_xer,
+ NO_IntegerOutValue_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerOutValue_tags_1,
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
+ /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerOutValue_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
+
+#include <NativeInteger.h>
+
+/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
+
+typedef long OK_IntegerInRange1_t;
+
+/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
+asn_struct_free_f OK_IntegerInRange1_free;
+asn_struct_print_f OK_IntegerInRange1_print;
+asn_constr_check_f OK_IntegerInRange1_constraint;
+ber_type_decoder_f OK_IntegerInRange1_decode_ber;
+der_type_encoder_f OK_IntegerInRange1_encode_der;
+xer_type_decoder_f OK_IntegerInRange1_decode_xer;
+xer_type_encoder_f OK_IntegerInRange1_encode_xer;
+per_type_decoder_f OK_IntegerInRange1_decode_uper;
+
+/*** <<< CODE [OK-IntegerInRange1] >>> ***/
+
+int
+OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if((value >= -100 && value <= 100)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeInteger.free_struct;
+ td->print_struct = asn_DEF_NativeInteger.print_struct;
+ td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
+ td->der_encoder = asn_DEF_NativeInteger.der_encoder;
+ td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
+ td->elements = asn_DEF_NativeInteger.elements;
+ td->elements_count = asn_DEF_NativeInteger.elements_count;
+ td->specifics = asn_DEF_NativeInteger.specifics;
+}
+
+void
+OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_OK_IntegerInRange1_constr_1 = {
+ { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
+ "OK-IntegerInRange1",
+ "OK-IntegerInRange1",
+ OK_IntegerInRange1_free,
+ OK_IntegerInRange1_print,
+ OK_IntegerInRange1_constraint,
+ OK_IntegerInRange1_decode_ber,
+ OK_IntegerInRange1_encode_der,
+ OK_IntegerInRange1_decode_xer,
+ OK_IntegerInRange1_encode_xer,
+ OK_IntegerInRange1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_OK_IntegerInRange1_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
+ &asn_PER_OK_IntegerInRange1_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
+
+#include <NativeInteger.h>
+
+/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
+
+typedef long OK_IntegerInRange2_t;
+
+/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
+asn_struct_free_f OK_IntegerInRange2_free;
+asn_struct_print_f OK_IntegerInRange2_print;
+asn_constr_check_f OK_IntegerInRange2_constraint;
+ber_type_decoder_f OK_IntegerInRange2_decode_ber;
+der_type_encoder_f OK_IntegerInRange2_encode_der;
+xer_type_decoder_f OK_IntegerInRange2_decode_xer;
+xer_type_encoder_f OK_IntegerInRange2_encode_xer;
+per_type_decoder_f OK_IntegerInRange2_decode_uper;
+
+/*** <<< CODE [OK-IntegerInRange2] >>> ***/
+
+int
+OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if(((value == -100) || (value == 100))) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeInteger.free_struct;
+ td->print_struct = asn_DEF_NativeInteger.print_struct;
+ td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
+ td->der_encoder = asn_DEF_NativeInteger.der_encoder;
+ td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
+ td->elements = asn_DEF_NativeInteger.elements;
+ td->elements_count = asn_DEF_NativeInteger.elements_count;
+ td->specifics = asn_DEF_NativeInteger.specifics;
+}
+
+void
+OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_OK_IntegerInRange2_constr_1 = {
+ { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
+ "OK-IntegerInRange2",
+ "OK-IntegerInRange2",
+ OK_IntegerInRange2_free,
+ OK_IntegerInRange2_print,
+ OK_IntegerInRange2_constraint,
+ OK_IntegerInRange2_decode_ber,
+ OK_IntegerInRange2_encode_der,
+ OK_IntegerInRange2_decode_xer,
+ OK_IntegerInRange2_encode_xer,
+ OK_IntegerInRange2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_OK_IntegerInRange2_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
+ &asn_PER_OK_IntegerInRange2_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
+
+#include <NativeInteger.h>
+
+/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
+
+typedef long OK_IntegerInRange3_t;
+
+/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
+asn_struct_free_f OK_IntegerInRange3_free;
+asn_struct_print_f OK_IntegerInRange3_print;
+asn_constr_check_f OK_IntegerInRange3_constraint;
+ber_type_decoder_f OK_IntegerInRange3_decode_ber;
+der_type_encoder_f OK_IntegerInRange3_encode_der;
+xer_type_decoder_f OK_IntegerInRange3_decode_xer;
+xer_type_encoder_f OK_IntegerInRange3_encode_xer;
+per_type_decoder_f OK_IntegerInRange3_decode_uper;
+
+/*** <<< CODE [OK-IntegerInRange3] >>> ***/
+
+int
+OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if((value >= -2147483648 && value <= 2147483647)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeInteger.free_struct;
+ td->print_struct = asn_DEF_NativeInteger.print_struct;
+ td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
+ td->der_encoder = asn_DEF_NativeInteger.der_encoder;
+ td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
+ td->elements = asn_DEF_NativeInteger.elements;
+ td->elements_count = asn_DEF_NativeInteger.elements_count;
+ td->specifics = asn_DEF_NativeInteger.specifics;
+}
+
+void
+OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_OK_IntegerInRange3_constr_1 = {
+ { APC_CONSTRAINED, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
+ "OK-IntegerInRange3",
+ "OK-IntegerInRange3",
+ OK_IntegerInRange3_free,
+ OK_IntegerInRange3_print,
+ OK_IntegerInRange3_constraint,
+ OK_IntegerInRange3_decode_ber,
+ OK_IntegerInRange3_encode_der,
+ OK_IntegerInRange3_decode_xer,
+ OK_IntegerInRange3_encode_xer,
+ OK_IntegerInRange3_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_OK_IntegerInRange3_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
+ &asn_PER_OK_IntegerInRange3_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
+
+#include <NativeInteger.h>
+
+/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
+
+typedef long OK_IntegerInRange4_t;
+
+/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
+asn_struct_free_f OK_IntegerInRange4_free;
+asn_struct_print_f OK_IntegerInRange4_print;
+asn_constr_check_f OK_IntegerInRange4_constraint;
+ber_type_decoder_f OK_IntegerInRange4_decode_ber;
+der_type_encoder_f OK_IntegerInRange4_encode_der;
+xer_type_decoder_f OK_IntegerInRange4_decode_xer;
+xer_type_encoder_f OK_IntegerInRange4_encode_xer;
+per_type_decoder_f OK_IntegerInRange4_decode_uper;
+
+/*** <<< CODE [OK-IntegerInRange4] >>> ***/
+
+int
+OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ value = *(const long *)sptr;
+
+ if(((value == -2147483648) || (value == 2147483647))) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using NativeInteger,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_NativeInteger.free_struct;
+ td->print_struct = asn_DEF_NativeInteger.print_struct;
+ td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
+ td->der_encoder = asn_DEF_NativeInteger.der_encoder;
+ td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
+ td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
+ td->elements = asn_DEF_NativeInteger.elements;
+ td->elements_count = asn_DEF_NativeInteger.elements_count;
+ td->specifics = asn_DEF_NativeInteger.specifics;
+}
+
+void
+OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_OK_IntegerInRange4_constr_1 = {
+ { APC_CONSTRAINED, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
+ "OK-IntegerInRange4",
+ "OK-IntegerInRange4",
+ OK_IntegerInRange4_free,
+ OK_IntegerInRange4_print,
+ OK_IntegerInRange4_constraint,
+ OK_IntegerInRange4_decode_ber,
+ OK_IntegerInRange4_encode_der,
+ OK_IntegerInRange4_decode_xer,
+ OK_IntegerInRange4_encode_xer,
+ OK_IntegerInRange4_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_OK_IntegerInRange4_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
+ &asn_PER_OK_IntegerInRange4_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
+
+typedef INTEGER_t OK_IntegerInRange5_t;
+
+/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
+asn_struct_free_f OK_IntegerInRange5_free;
+asn_struct_print_f OK_IntegerInRange5_print;
+asn_constr_check_f OK_IntegerInRange5_constraint;
+ber_type_decoder_f OK_IntegerInRange5_decode_ber;
+der_type_encoder_f OK_IntegerInRange5_encode_der;
+xer_type_decoder_f OK_IntegerInRange5_decode_xer;
+xer_type_encoder_f OK_IntegerInRange5_encode_xer;
+per_type_decoder_f OK_IntegerInRange5_decode_uper;
+
+/*** <<< CODE [OK-IntegerInRange5] >>> ***/
+
+int
+OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(((value == -2147483648) || (value == 2147483647))) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+OK_IntegerInRange5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_OK_IntegerInRange5_constr_1 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, -2147483648, 2147483647 } /* (-2147483648..2147483647,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
+ "OK-IntegerInRange5",
+ "OK-IntegerInRange5",
+ OK_IntegerInRange5_free,
+ OK_IntegerInRange5_print,
+ OK_IntegerInRange5_constraint,
+ OK_IntegerInRange5_decode_ber,
+ OK_IntegerInRange5_encode_der,
+ OK_IntegerInRange5_decode_xer,
+ OK_IntegerInRange5_encode_xer,
+ OK_IntegerInRange5_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_OK_IntegerInRange5_tags_1,
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
+ /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
+ &asn_PER_OK_IntegerInRange5_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
+
+typedef INTEGER_t NO_IntegerInRange6_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
+asn_struct_free_f NO_IntegerInRange6_free;
+asn_struct_print_f NO_IntegerInRange6_print;
+asn_constr_check_f NO_IntegerInRange6_constraint;
+ber_type_decoder_f NO_IntegerInRange6_decode_ber;
+der_type_encoder_f NO_IntegerInRange6_encode_der;
+xer_type_decoder_f NO_IntegerInRange6_decode_xer;
+xer_type_encoder_f NO_IntegerInRange6_encode_xer;
+per_type_decoder_f NO_IntegerInRange6_decode_uper;
+
+/*** <<< CODE [NO-IntegerInRange6] >>> ***/
+
+int
+NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ const INTEGER_t *st = (const INTEGER_t *)sptr;
+ long value;
+
+ if(!sptr) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value not given (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if(asn_INTEGER2long(st, &value)) {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: value too large (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+
+ if((value >= 0 && value <= 4294967295)) {
+ /* Constraint check succeeded */
+ return 0;
+ } else {
+ _ASN_ERRLOG(app_errlog, app_key,
+ "%s: constraint failed (%s:%d)",
+ td->name, __FILE__, __LINE__);
+ return -1;
+ }
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerInRange6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+static asn_per_constraints_t asn_PER_NO_IntegerInRange6_constr_1 = {
+ { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
+ "NO-IntegerInRange6",
+ "NO-IntegerInRange6",
+ NO_IntegerInRange6_free,
+ NO_IntegerInRange6_print,
+ NO_IntegerInRange6_constraint,
+ NO_IntegerInRange6_decode_ber,
+ NO_IntegerInRange6_encode_der,
+ NO_IntegerInRange6_decode_xer,
+ NO_IntegerInRange6_encode_xer,
+ NO_IntegerInRange6_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerInRange6_tags_1,
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
+ /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
+ &asn_PER_NO_IntegerInRange6_constr_1,
+ 0, 0, /* No members */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
+
+typedef enum CN_IntegerEnumerated1 {
+ CN_IntegerEnumerated1_a = 1,
+ CN_IntegerEnumerated1_b = 2
+} CN_IntegerEnumerated1_e;
+
+/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
+
+typedef INTEGER_t CN_IntegerEnumerated1_t;
+
+/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
+asn_struct_free_f CN_IntegerEnumerated1_free;
+asn_struct_print_f CN_IntegerEnumerated1_print;
+asn_constr_check_f CN_IntegerEnumerated1_constraint;
+ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
+der_type_encoder_f CN_IntegerEnumerated1_encode_der;
+xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
+xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
+per_type_decoder_f CN_IntegerEnumerated1_decode_uper;
+
+/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
+
+int
+CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_INTEGER.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+CN_IntegerEnumerated1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
+ "CN-IntegerEnumerated1",
+ "CN-IntegerEnumerated1",
+ CN_IntegerEnumerated1_free,
+ CN_IntegerEnumerated1_print,
+ CN_IntegerEnumerated1_constraint,
+ CN_IntegerEnumerated1_decode_ber,
+ CN_IntegerEnumerated1_encode_der,
+ CN_IntegerEnumerated1_decode_xer,
+ CN_IntegerEnumerated1_encode_xer,
+ CN_IntegerEnumerated1_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_CN_IntegerEnumerated1_tags_1,
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
+ sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
+ /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* Defined elsewhere */
+ 0 /* No specifics */
+};
+
+
+/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
+
+#include <INTEGER.h>
+
+/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
+
+typedef enum NO_IntegerEnumerated2 {
+ NO_IntegerEnumerated2_a = 1,
+ NO_IntegerEnumerated2_b = 3000000000
+} NO_IntegerEnumerated2_e;
+
+/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
+
+typedef INTEGER_t NO_IntegerEnumerated2_t;
+
+/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
+asn_struct_free_f NO_IntegerEnumerated2_free;
+asn_struct_print_f NO_IntegerEnumerated2_print;
+asn_constr_check_f NO_IntegerEnumerated2_constraint;
+ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
+der_type_encoder_f NO_IntegerEnumerated2_encode_der;
+xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
+xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
+per_type_decoder_f NO_IntegerEnumerated2_decode_uper;
+
+/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
+
+int
+NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
+ asn_app_consume_bytes_f *app_errlog, void *app_key) {
+ /* Replace with underlying type checker */
+ td->check_constraints = asn_DEF_INTEGER.check_constraints;
+ return td->check_constraints(td, sptr, app_errlog, app_key);
+}
+
+/*
+ * This type is implemented using INTEGER,
+ * so here we adjust the DEF accordingly.
+ */
+static void
+NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
+ td->free_struct = asn_DEF_INTEGER.free_struct;
+ td->print_struct = asn_DEF_INTEGER.print_struct;
+ td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
+ td->der_encoder = asn_DEF_INTEGER.der_encoder;
+ td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
+ td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
+ td->elements = asn_DEF_INTEGER.elements;
+ td->elements_count = asn_DEF_INTEGER.elements_count;
+ td->specifics = asn_DEF_INTEGER.specifics;
+}
+
+void
+NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
+ void *struct_ptr, int contents_only) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ td->free_struct(td, struct_ptr, contents_only);
+}
+
+int
+NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
+ int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const void *bufptr, size_t size, int tag_mode) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
+}
+
+asn_enc_rval_t
+NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
+ void *structure, int tag_mode, ber_tlv_tag_t tag,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ void **structure, const char *opt_mname, const void *bufptr, size_t size) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
+}
+
+asn_enc_rval_t
+NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
+ int ilevel, enum xer_encoder_flags_e flags,
+ asn_app_consume_bytes_f *cb, void *app_key) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
+}
+
+asn_dec_rval_t
+NO_IntegerEnumerated2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
+ asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
+ NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
+ return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
+}
+
+
+/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
+
+static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
+ (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
+};
+asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
+ "NO-IntegerEnumerated2",
+ "NO-IntegerEnumerated2",
+ NO_IntegerEnumerated2_free,
+ NO_IntegerEnumerated2_print,
+ NO_IntegerEnumerated2_constraint,
+ NO_IntegerEnumerated2_decode_ber,
+ NO_IntegerEnumerated2_encode_der,
+ NO_IntegerEnumerated2_decode_xer,
+ NO_IntegerEnumerated2_encode_xer,
+ NO_IntegerEnumerated2_decode_uper,
+ 0, /* Use generic outmost tag fetcher */
+ asn_DEF_NO_IntegerEnumerated2_tags_1,
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
+ /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
+ 0, 0, /* Defined elsewhere */
+ 0 /* No specifics */
+};
+
diff --git a/tests/91-cond-int-blessSize-OK.asn1.-Pfbless-SIZE b/tests/91-cond-int-blessSize-OK.asn1.-Pfbless-SIZE
index 5fe0bd3c..1164e418 100644
--- a/tests/91-cond-int-blessSize-OK.asn1.-Pfbless-SIZE
+++ b/tests/91-cond-int-blessSize-OK.asn1.-Pfbless-SIZE
@@ -53,6 +53,9 @@ OK_Integer1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -105,7 +108,7 @@ OK_Integer1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-Integer1] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_Integer1_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_Integer1_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_Integer1 = {
@@ -118,13 +121,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_Integer1 = {
OK_Integer1_encode_der,
OK_Integer1_decode_xer,
OK_Integer1_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_Integer1_1_tags,
- sizeof(asn_DEF_OK_Integer1_1_tags)
- /sizeof(asn_DEF_OK_Integer1_1_tags[0]), /* 1 */
- asn_DEF_OK_Integer1_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_Integer1_1_tags)
- /sizeof(asn_DEF_OK_Integer1_1_tags[0]), /* 1 */
+ asn_DEF_OK_Integer1_tags_1,
+ sizeof(asn_DEF_OK_Integer1_tags_1)
+ /sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */
+ asn_DEF_OK_Integer1_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_Integer1_tags_1)
+ /sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -184,6 +189,9 @@ OK_Integer2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -236,7 +244,7 @@ OK_Integer2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-Integer2] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_Integer2_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_Integer2_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_Integer2 = {
@@ -249,13 +257,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_Integer2 = {
OK_Integer2_encode_der,
OK_Integer2_decode_xer,
OK_Integer2_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_Integer2_1_tags,
- sizeof(asn_DEF_OK_Integer2_1_tags)
- /sizeof(asn_DEF_OK_Integer2_1_tags[0]), /* 1 */
- asn_DEF_OK_Integer2_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_Integer2_1_tags)
- /sizeof(asn_DEF_OK_Integer2_1_tags[0]), /* 1 */
+ asn_DEF_OK_Integer2_tags_1,
+ sizeof(asn_DEF_OK_Integer2_tags_1)
+ /sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */
+ asn_DEF_OK_Integer2_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_Integer2_tags_1)
+ /sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -315,6 +325,9 @@ OK_Integer3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -367,7 +380,7 @@ OK_Integer3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-Integer3] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_Integer3_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_Integer3_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_Integer3 = {
@@ -380,13 +393,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_Integer3 = {
OK_Integer3_encode_der,
OK_Integer3_decode_xer,
OK_Integer3_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_Integer3_1_tags,
- sizeof(asn_DEF_OK_Integer3_1_tags)
- /sizeof(asn_DEF_OK_Integer3_1_tags[0]), /* 1 */
- asn_DEF_OK_Integer3_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_Integer3_1_tags)
- /sizeof(asn_DEF_OK_Integer3_1_tags[0]), /* 1 */
+ asn_DEF_OK_Integer3_tags_1,
+ sizeof(asn_DEF_OK_Integer3_tags_1)
+ /sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */
+ asn_DEF_OK_Integer3_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_Integer3_tags_1)
+ /sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -446,6 +461,9 @@ OK_Integer4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_NativeInteger.der_encoder;
td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
+ td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_NativeInteger.per_constraints;
td->elements = asn_DEF_NativeInteger.elements;
td->elements_count = asn_DEF_NativeInteger.elements_count;
td->specifics = asn_DEF_NativeInteger.specifics;
@@ -498,7 +516,7 @@ OK_Integer4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [OK-Integer4] >>> ***/
-static ber_tlv_tag_t asn_DEF_OK_Integer4_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OK_Integer4_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_OK_Integer4 = {
@@ -511,13 +529,15 @@ asn_TYPE_descriptor_t asn_DEF_OK_Integer4 = {
OK_Integer4_encode_der,
OK_Integer4_decode_xer,
OK_Integer4_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OK_Integer4_1_tags,
- sizeof(asn_DEF_OK_Integer4_1_tags)
- /sizeof(asn_DEF_OK_Integer4_1_tags[0]), /* 1 */
- asn_DEF_OK_Integer4_1_tags, /* Same as above */
- sizeof(asn_DEF_OK_Integer4_1_tags)
- /sizeof(asn_DEF_OK_Integer4_1_tags[0]), /* 1 */
+ asn_DEF_OK_Integer4_tags_1,
+ sizeof(asn_DEF_OK_Integer4_tags_1)
+ /sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */
+ asn_DEF_OK_Integer4_tags_1, /* Same as above */
+ sizeof(asn_DEF_OK_Integer4_tags_1)
+ /sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
@@ -578,6 +598,9 @@ NO_Integer5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_INTEGER.der_encoder;
td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
+ td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_INTEGER.per_constraints;
td->elements = asn_DEF_INTEGER.elements;
td->elements_count = asn_DEF_INTEGER.elements_count;
td->specifics = asn_DEF_INTEGER.specifics;
@@ -630,7 +653,7 @@ NO_Integer5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [NO-Integer5] >>> ***/
-static ber_tlv_tag_t asn_DEF_NO_Integer5_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_NO_Integer5_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
};
asn_TYPE_descriptor_t asn_DEF_NO_Integer5 = {
@@ -643,13 +666,15 @@ asn_TYPE_descriptor_t asn_DEF_NO_Integer5 = {
NO_Integer5_encode_der,
NO_Integer5_decode_xer,
NO_Integer5_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_NO_Integer5_1_tags,
- sizeof(asn_DEF_NO_Integer5_1_tags)
- /sizeof(asn_DEF_NO_Integer5_1_tags[0]), /* 1 */
- asn_DEF_NO_Integer5_1_tags, /* Same as above */
- sizeof(asn_DEF_NO_Integer5_1_tags)
- /sizeof(asn_DEF_NO_Integer5_1_tags[0]), /* 1 */
+ asn_DEF_NO_Integer5_tags_1,
+ sizeof(asn_DEF_NO_Integer5_tags_1)
+ /sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */
+ asn_DEF_NO_Integer5_tags_1, /* Same as above */
+ sizeof(asn_DEF_NO_Integer5_tags_1)
+ /sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* No members */
0 /* No specifics */
};
diff --git a/tests/92-circular-loops-OK.asn1.-P b/tests/92-circular-loops-OK.asn1.-P
index a45b9bf1..5e161af1 100644
--- a/tests/92-circular-loops-OK.asn1.-P
+++ b/tests/92-circular-loops-OK.asn1.-P
@@ -52,6 +52,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch1"
},
{ ATF_POINTER, 0, offsetof(struct Everything, ch2),
@@ -59,6 +61,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch2"
},
{ ATF_POINTER, 0, offsetof(struct Everything, ch3),
@@ -66,6 +70,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch3"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, set),
@@ -73,6 +79,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, a),
@@ -80,6 +88,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, b),
@@ -87,6 +97,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, g),
@@ -94,6 +106,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, ot),
@@ -101,6 +115,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_OneTwo,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ot"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, tt),
@@ -108,6 +124,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "tt"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, to),
@@ -115,13 +133,15 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ThreeOne,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "to"
},
};
-static ber_tlv_tag_t asn_DEF_Everything_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Everything_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Everything_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Everything_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ch1 at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ch2 at 16 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ch3 at 17 */
@@ -133,11 +153,12 @@ static asn_TYPE_tag2member_t asn_MAP_Everything_1_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* tt at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* to at 25 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Everything_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Everything_specs_1 = {
sizeof(struct Everything),
offsetof(struct Everything, _asn_ctx),
- asn_MAP_Everything_1_tag2el,
+ asn_MAP_Everything_tag2el_1,
10, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -151,16 +172,18 @@ asn_TYPE_descriptor_t asn_DEF_Everything = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Everything_1_tags,
- sizeof(asn_DEF_Everything_1_tags)
- /sizeof(asn_DEF_Everything_1_tags[0]), /* 1 */
- asn_DEF_Everything_1_tags, /* Same as above */
- sizeof(asn_DEF_Everything_1_tags)
- /sizeof(asn_DEF_Everything_1_tags[0]), /* 1 */
+ asn_DEF_Everything_tags_1,
+ sizeof(asn_DEF_Everything_tags_1)
+ /sizeof(asn_DEF_Everything_tags_1[0]), /* 1 */
+ asn_DEF_Everything_tags_1, /* Same as above */
+ sizeof(asn_DEF_Everything_tags_1)
+ /sizeof(asn_DEF_Everything_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Everything_1,
10, /* Elements count */
- &asn_SPC_Everything_1_specs /* Additional specs */
+ &asn_SPC_Everything_specs_1 /* Additional specs */
};
@@ -214,6 +237,8 @@ static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "something"
},
{ ATF_POINTER, 0, offsetof(struct Choice1, choice.some2),
@@ -221,21 +246,24 @@ static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "some2"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice1_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* something at 29 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* some2 at 32 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice1_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice1_specs_1 = {
sizeof(struct Choice1),
offsetof(struct Choice1, _asn_ctx),
offsetof(struct Choice1, present),
sizeof(((struct Choice1 *)0)->present),
- asn_MAP_Choice1_1_tag2el,
+ asn_MAP_Choice1_tag2el_1,
2, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice1 = {
"Choice1",
@@ -247,14 +275,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice1 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice1_1,
2, /* Elements count */
- &asn_SPC_Choice1_1_specs /* Additional specs */
+ &asn_SPC_Choice1_specs_1 /* Additional specs */
};
@@ -309,6 +339,8 @@ static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TypeRef,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "typeref"
},
{ ATF_POINTER, 0, offsetof(struct Choice2, choice.some3),
@@ -316,21 +348,24 @@ static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "some3"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* typeref at 35 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* some3 at 38 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice2_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
sizeof(struct Choice2),
offsetof(struct Choice2, _asn_ctx),
offsetof(struct Choice2, present),
sizeof(((struct Choice2 *)0)->present),
- asn_MAP_Choice2_1_tag2el,
+ asn_MAP_Choice2_tag2el_1,
2, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice2 = {
"Choice2",
@@ -342,14 +377,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice2 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice2_1,
2, /* Elements count */
- &asn_SPC_Choice2_1_specs /* Additional specs */
+ &asn_SPC_Choice2_specs_1 /* Additional specs */
};
@@ -415,21 +452,24 @@ static asn_TYPE_member_t asn_MBR_a_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "aa"
},
};
-static ber_tlv_tag_t asn_DEF_a_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_a_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_a_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_a_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* aa at 43 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_a_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_a_specs_2 = {
sizeof(struct a),
offsetof(struct a, _asn_ctx),
- asn_MAP_a_2_tag2el,
+ asn_MAP_a_tag2el_2,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -444,16 +484,18 @@ asn_TYPE_descriptor_t asn_DEF_a_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_a_2_tags,
- sizeof(asn_DEF_a_2_tags)
- /sizeof(asn_DEF_a_2_tags[0]) - 1, /* 1 */
- asn_DEF_a_2_tags, /* Same as above */
- sizeof(asn_DEF_a_2_tags)
- /sizeof(asn_DEF_a_2_tags[0]), /* 2 */
+ asn_DEF_a_tags_2,
+ sizeof(asn_DEF_a_tags_2)
+ /sizeof(asn_DEF_a_tags_2[0]) - 1, /* 1 */
+ asn_DEF_a_tags_2, /* Same as above */
+ sizeof(asn_DEF_a_tags_2)
+ /sizeof(asn_DEF_a_tags_2[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_a_2,
1, /* Elements count */
- &asn_SPC_a_2_specs /* Additional specs */
+ &asn_SPC_a_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_c_5[] = {
@@ -462,14 +504,16 @@ static asn_TYPE_member_t asn_MBR_c_5[] = {
.tag_mode = 0,
.type = &asn_DEF_Choice3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_c_5_tags[] = {
+static ber_tlv_tag_t asn_DEF_c_tags_5[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_c_5_specs = {
+static asn_SET_OF_specifics_t asn_SPC_c_specs_5 = {
sizeof(struct c),
offsetof(struct c, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -485,16 +529,18 @@ asn_TYPE_descriptor_t asn_DEF_c_5 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_c_5_tags,
- sizeof(asn_DEF_c_5_tags)
- /sizeof(asn_DEF_c_5_tags[0]) - 1, /* 1 */
- asn_DEF_c_5_tags, /* Same as above */
- sizeof(asn_DEF_c_5_tags)
- /sizeof(asn_DEF_c_5_tags[0]), /* 2 */
+ asn_DEF_c_tags_5,
+ sizeof(asn_DEF_c_tags_5)
+ /sizeof(asn_DEF_c_tags_5[0]) - 1, /* 1 */
+ asn_DEF_c_tags_5, /* Same as above */
+ sizeof(asn_DEF_c_tags_5)
+ /sizeof(asn_DEF_c_tags_5[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_c_5,
1, /* Single element */
- &asn_SPC_c_5_specs /* Additional specs */
+ &asn_SPC_c_specs_5 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
@@ -503,6 +549,8 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_a_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 0, offsetof(struct Choice3, choice.b),
@@ -510,6 +558,8 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice3, choice.c),
@@ -517,22 +567,25 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_c_5,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "c"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice3_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice3_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 43 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 44 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c at 46 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice3_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice3_specs_1 = {
sizeof(struct Choice3),
offsetof(struct Choice3, _asn_ctx),
offsetof(struct Choice3, present),
sizeof(((struct Choice3 *)0)->present),
- asn_MAP_Choice3_1_tag2el,
+ asn_MAP_Choice3_tag2el_1,
3, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice3 = {
"Choice3",
@@ -544,14 +597,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice3_1,
3, /* Elements count */
- &asn_SPC_Choice3_1_specs /* Additional specs */
+ &asn_SPC_Choice3_specs_1 /* Additional specs */
};
@@ -606,6 +661,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "int"
},
{ ATF_POINTER, 0, offsetof(struct Member, set),
@@ -613,6 +670,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
{ ATF_POINTER, 0, offsetof(struct Member, seq),
@@ -620,6 +679,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "seq"
},
{ ATF_POINTER, 2, offsetof(struct Member, set2),
@@ -627,6 +688,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set2"
},
{ ATF_POINTER, 1, offsetof(struct Member, set3),
@@ -634,31 +697,34 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set3"
},
};
-static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Member_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* int at 49 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 50 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* seq at 51 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* set2 at 52 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* set3 at 55 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Member_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
- asn_MAP_Member_2_tag2el,
+ asn_MAP_Member_tag2el_2,
5, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
3, /* Start extensions */
6 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_2 = {
- "",
- "",
+ "SEQUENCE",
+ "SEQUENCE",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
@@ -666,16 +732,18 @@ asn_TYPE_descriptor_t asn_DEF_Member_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Member_2_tags,
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
- asn_DEF_Member_2_tags, /* Same as above */
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
+ asn_DEF_Member_tags_2,
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ asn_DEF_Member_tags_2, /* Same as above */
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Member_2,
5, /* Elements count */
- &asn_SPC_Member_2_specs /* Additional specs */
+ &asn_SPC_Member_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Set_1[] = {
@@ -684,13 +752,15 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Set_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Set_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Set_specs_1 = {
sizeof(struct Set),
offsetof(struct Set, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -705,16 +775,18 @@ asn_TYPE_descriptor_t asn_DEF_Set = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Set_1_tags,
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
- asn_DEF_Set_1_tags, /* Same as above */
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
+ asn_DEF_Set_tags_1,
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ asn_DEF_Set_tags_1, /* Same as above */
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Set_1,
1, /* Single element */
- &asn_SPC_Set_1_specs /* Additional specs */
+ &asn_SPC_Set_specs_1 /* Additional specs */
};
@@ -761,6 +833,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 3, offsetof(struct Sequence, seq),
@@ -768,6 +842,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "seq"
},
{ ATF_POINTER, 2, offsetof(struct Sequence, b),
@@ -775,6 +851,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 1, offsetof(struct Sequence, set),
@@ -782,23 +860,26 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
};
-static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 58 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* seq at 59 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* b at 61 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* set at 62 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
sizeof(struct Sequence),
offsetof(struct Sequence, _asn_ctx),
- asn_MAP_Sequence_1_tag2el,
+ asn_MAP_Sequence_tag2el_1,
4, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
5 /* Stop extensions */
};
@@ -812,16 +893,18 @@ asn_TYPE_descriptor_t asn_DEF_Sequence = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Sequence_1_tags,
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
- asn_DEF_Sequence_1_tags, /* Same as above */
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Sequence_1,
4, /* Elements count */
- &asn_SPC_Sequence_1_specs /* Additional specs */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
};
@@ -866,6 +949,9 @@ TypeRef_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Sequence.der_encoder;
td->xer_decoder = asn_DEF_Sequence.xer_decoder;
td->xer_encoder = asn_DEF_Sequence.xer_encoder;
+ td->uper_decoder = asn_DEF_Sequence.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Sequence.per_constraints;
td->elements = asn_DEF_Sequence.elements;
td->elements_count = asn_DEF_Sequence.elements_count;
td->specifics = asn_DEF_Sequence.specifics;
@@ -918,7 +1004,7 @@ TypeRef_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [TypeRef] >>> ***/
-static ber_tlv_tag_t asn_DEF_TypeRef_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_TypeRef_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_TypeRef = {
@@ -931,13 +1017,15 @@ asn_TYPE_descriptor_t asn_DEF_TypeRef = {
TypeRef_encode_der,
TypeRef_decode_xer,
TypeRef_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_TypeRef_1_tags,
- sizeof(asn_DEF_TypeRef_1_tags)
- /sizeof(asn_DEF_TypeRef_1_tags[0]), /* 1 */
- asn_DEF_TypeRef_1_tags, /* Same as above */
- sizeof(asn_DEF_TypeRef_1_tags)
- /sizeof(asn_DEF_TypeRef_1_tags[0]), /* 1 */
+ asn_DEF_TypeRef_tags_1,
+ sizeof(asn_DEF_TypeRef_tags_1)
+ /sizeof(asn_DEF_TypeRef_tags_1[0]), /* 1 */
+ asn_DEF_TypeRef_tags_1, /* Same as above */
+ sizeof(asn_DEF_TypeRef_tags_1)
+ /sizeof(asn_DEF_TypeRef_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -982,21 +1070,24 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_b_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_b_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_b_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* b at 70 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_b_3_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_b_specs_3 = {
sizeof(struct b),
offsetof(struct b, _asn_ctx),
- asn_MAP_b_3_tag2el,
+ asn_MAP_b_tag2el_3,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1011,16 +1102,18 @@ asn_TYPE_descriptor_t asn_DEF_b_3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_b_3_tags,
- sizeof(asn_DEF_b_3_tags)
- /sizeof(asn_DEF_b_3_tags[0]) - 1, /* 1 */
- asn_DEF_b_3_tags, /* Same as above */
- sizeof(asn_DEF_b_3_tags)
- /sizeof(asn_DEF_b_3_tags[0]), /* 2 */
+ asn_DEF_b_tags_3,
+ sizeof(asn_DEF_b_tags_3)
+ /sizeof(asn_DEF_b_tags_3[0]) - 1, /* 1 */
+ asn_DEF_b_tags_3, /* Same as above */
+ sizeof(asn_DEF_b_tags_3)
+ /sizeof(asn_DEF_b_tags_3[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_b_3,
1, /* Elements count */
- &asn_SPC_b_3_specs /* Additional specs */
+ &asn_SPC_b_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
@@ -1029,6 +1122,8 @@ static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Alpha, b),
@@ -1036,21 +1131,24 @@ static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_b_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_Alpha_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Alpha_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Alpha_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Alpha_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 68 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* b at 70 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Alpha_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Alpha_specs_1 = {
sizeof(struct Alpha),
offsetof(struct Alpha, _asn_ctx),
- asn_MAP_Alpha_1_tag2el,
+ asn_MAP_Alpha_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1064,16 +1162,18 @@ asn_TYPE_descriptor_t asn_DEF_Alpha = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Alpha_1_tags,
- sizeof(asn_DEF_Alpha_1_tags)
- /sizeof(asn_DEF_Alpha_1_tags[0]), /* 1 */
- asn_DEF_Alpha_1_tags, /* Same as above */
- sizeof(asn_DEF_Alpha_1_tags)
- /sizeof(asn_DEF_Alpha_1_tags[0]), /* 1 */
+ asn_DEF_Alpha_tags_1,
+ sizeof(asn_DEF_Alpha_tags_1)
+ /sizeof(asn_DEF_Alpha_tags_1[0]), /* 1 */
+ asn_DEF_Alpha_tags_1, /* Same as above */
+ sizeof(asn_DEF_Alpha_tags_1)
+ /sizeof(asn_DEF_Alpha_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Alpha_1,
2, /* Elements count */
- &asn_SPC_Alpha_1_specs /* Additional specs */
+ &asn_SPC_Alpha_specs_1 /* Additional specs */
};
@@ -1113,6 +1213,8 @@ static asn_TYPE_member_t asn_MBR_Beta_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 1, offsetof(struct Beta, g),
@@ -1120,21 +1222,24 @@ static asn_TYPE_member_t asn_MBR_Beta_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
};
-static ber_tlv_tag_t asn_DEF_Beta_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Beta_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Beta_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Beta_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* b at 75 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* g at 76 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Beta_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Beta_specs_1 = {
sizeof(struct Beta),
offsetof(struct Beta, _asn_ctx),
- asn_MAP_Beta_1_tag2el,
+ asn_MAP_Beta_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1148,16 +1253,18 @@ asn_TYPE_descriptor_t asn_DEF_Beta = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Beta_1_tags,
- sizeof(asn_DEF_Beta_1_tags)
- /sizeof(asn_DEF_Beta_1_tags[0]), /* 1 */
- asn_DEF_Beta_1_tags, /* Same as above */
- sizeof(asn_DEF_Beta_1_tags)
- /sizeof(asn_DEF_Beta_1_tags[0]), /* 1 */
+ asn_DEF_Beta_tags_1,
+ sizeof(asn_DEF_Beta_tags_1)
+ /sizeof(asn_DEF_Beta_tags_1[0]), /* 1 */
+ asn_DEF_Beta_tags_1, /* Same as above */
+ sizeof(asn_DEF_Beta_tags_1)
+ /sizeof(asn_DEF_Beta_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Beta_1,
2, /* Elements count */
- &asn_SPC_Beta_1_specs /* Additional specs */
+ &asn_SPC_Beta_specs_1 /* Additional specs */
};
@@ -1200,6 +1307,8 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "o"
},
{ ATF_POINTER, 0, offsetof(struct Gamma, a),
@@ -1207,6 +1316,8 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 0, offsetof(struct Gamma, b),
@@ -1214,22 +1325,25 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_Gamma_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Gamma_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Gamma_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Gamma_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* o at 80 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* a at 81 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* b at 83 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Gamma_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Gamma_specs_1 = {
sizeof(struct Gamma),
offsetof(struct Gamma, _asn_ctx),
- asn_MAP_Gamma_1_tag2el,
+ asn_MAP_Gamma_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1243,16 +1357,18 @@ asn_TYPE_descriptor_t asn_DEF_Gamma = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Gamma_1_tags,
- sizeof(asn_DEF_Gamma_1_tags)
- /sizeof(asn_DEF_Gamma_1_tags[0]), /* 1 */
- asn_DEF_Gamma_1_tags, /* Same as above */
- sizeof(asn_DEF_Gamma_1_tags)
- /sizeof(asn_DEF_Gamma_1_tags[0]), /* 1 */
+ asn_DEF_Gamma_tags_1,
+ sizeof(asn_DEF_Gamma_tags_1)
+ /sizeof(asn_DEF_Gamma_tags_1[0]), /* 1 */
+ asn_DEF_Gamma_tags_1, /* Same as above */
+ sizeof(asn_DEF_Gamma_tags_1)
+ /sizeof(asn_DEF_Gamma_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Gamma_1,
3, /* Elements count */
- &asn_SPC_Gamma_1_specs /* Additional specs */
+ &asn_SPC_Gamma_specs_1 /* Additional specs */
};
@@ -1303,28 +1419,30 @@ static asn_TYPE_member_t asn_MBR_OneTwo_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m12"
},
};
-static ber_tlv_tag_t asn_DEF_OneTwo_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OneTwo_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_OneTwo_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_OneTwo_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* m12 at 86 */
};
-static uint8_t asn_MAP_OneTwo_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_OneTwo_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_OneTwo_1_specs = {
+static asn_SET_specifics_t asn_SPC_OneTwo_specs_1 = {
sizeof(struct OneTwo),
offsetof(struct OneTwo, _asn_ctx),
offsetof(struct OneTwo, _presence_map),
- asn_MAP_OneTwo_1_tag2el,
+ asn_MAP_OneTwo_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_OneTwo_1_tag2el, /* Same as above */
+ asn_MAP_OneTwo_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_OneTwo_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_OneTwo_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_OneTwo = {
"OneTwo",
@@ -1336,16 +1454,18 @@ asn_TYPE_descriptor_t asn_DEF_OneTwo = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OneTwo_1_tags,
- sizeof(asn_DEF_OneTwo_1_tags)
- /sizeof(asn_DEF_OneTwo_1_tags[0]), /* 1 */
- asn_DEF_OneTwo_1_tags, /* Same as above */
- sizeof(asn_DEF_OneTwo_1_tags)
- /sizeof(asn_DEF_OneTwo_1_tags[0]), /* 1 */
+ asn_DEF_OneTwo_tags_1,
+ sizeof(asn_DEF_OneTwo_tags_1)
+ /sizeof(asn_DEF_OneTwo_tags_1[0]), /* 1 */
+ asn_DEF_OneTwo_tags_1, /* Same as above */
+ sizeof(asn_DEF_OneTwo_tags_1)
+ /sizeof(asn_DEF_OneTwo_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_OneTwo_1,
1, /* Elements count */
- &asn_SPC_OneTwo_1_specs /* Additional specs */
+ &asn_SPC_OneTwo_specs_1 /* Additional specs */
};
@@ -1396,28 +1516,30 @@ static asn_TYPE_member_t asn_MBR_TwoThree_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ThreeOne,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m23"
},
};
-static ber_tlv_tag_t asn_DEF_TwoThree_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_TwoThree_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_TwoThree_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_TwoThree_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* m23 at 87 */
};
-static uint8_t asn_MAP_TwoThree_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_TwoThree_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_TwoThree_1_specs = {
+static asn_SET_specifics_t asn_SPC_TwoThree_specs_1 = {
sizeof(struct TwoThree),
offsetof(struct TwoThree, _asn_ctx),
offsetof(struct TwoThree, _presence_map),
- asn_MAP_TwoThree_1_tag2el,
+ asn_MAP_TwoThree_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_TwoThree_1_tag2el, /* Same as above */
+ asn_MAP_TwoThree_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_TwoThree_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_TwoThree_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_TwoThree = {
"TwoThree",
@@ -1429,16 +1551,18 @@ asn_TYPE_descriptor_t asn_DEF_TwoThree = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_TwoThree_1_tags,
- sizeof(asn_DEF_TwoThree_1_tags)
- /sizeof(asn_DEF_TwoThree_1_tags[0]), /* 1 */
- asn_DEF_TwoThree_1_tags, /* Same as above */
- sizeof(asn_DEF_TwoThree_1_tags)
- /sizeof(asn_DEF_TwoThree_1_tags[0]), /* 1 */
+ asn_DEF_TwoThree_tags_1,
+ sizeof(asn_DEF_TwoThree_tags_1)
+ /sizeof(asn_DEF_TwoThree_tags_1[0]), /* 1 */
+ asn_DEF_TwoThree_tags_1, /* Same as above */
+ sizeof(asn_DEF_TwoThree_tags_1)
+ /sizeof(asn_DEF_TwoThree_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_TwoThree_1,
1, /* Elements count */
- &asn_SPC_TwoThree_1_specs /* Additional specs */
+ &asn_SPC_TwoThree_specs_1 /* Additional specs */
};
@@ -1493,6 +1617,8 @@ static asn_TYPE_member_t asn_MBR_ThreeOne_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_OneTwo,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m31"
},
{ ATF_POINTER, 0, offsetof(struct ThreeOne, g),
@@ -1500,29 +1626,31 @@ static asn_TYPE_member_t asn_MBR_ThreeOne_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
};
-static ber_tlv_tag_t asn_DEF_ThreeOne_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ThreeOne_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ThreeOne_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ThreeOne_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m31 at 88 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* g at 88 */
};
-static uint8_t asn_MAP_ThreeOne_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_ThreeOne_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6)
};
-static asn_SET_specifics_t asn_SPC_ThreeOne_1_specs = {
+static asn_SET_specifics_t asn_SPC_ThreeOne_specs_1 = {
sizeof(struct ThreeOne),
offsetof(struct ThreeOne, _asn_ctx),
offsetof(struct ThreeOne, _presence_map),
- asn_MAP_ThreeOne_1_tag2el,
+ asn_MAP_ThreeOne_tag2el_1,
2, /* Count of tags in the map */
- asn_MAP_ThreeOne_1_tag2el, /* Same as above */
+ asn_MAP_ThreeOne_tag2el_1, /* Same as above */
2, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_ThreeOne_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_ThreeOne_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_ThreeOne = {
"ThreeOne",
@@ -1534,15 +1662,17 @@ asn_TYPE_descriptor_t asn_DEF_ThreeOne = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ThreeOne_1_tags,
- sizeof(asn_DEF_ThreeOne_1_tags)
- /sizeof(asn_DEF_ThreeOne_1_tags[0]), /* 1 */
- asn_DEF_ThreeOne_1_tags, /* Same as above */
- sizeof(asn_DEF_ThreeOne_1_tags)
- /sizeof(asn_DEF_ThreeOne_1_tags[0]), /* 1 */
+ asn_DEF_ThreeOne_tags_1,
+ sizeof(asn_DEF_ThreeOne_tags_1)
+ /sizeof(asn_DEF_ThreeOne_tags_1[0]), /* 1 */
+ asn_DEF_ThreeOne_tags_1, /* Same as above */
+ sizeof(asn_DEF_ThreeOne_tags_1)
+ /sizeof(asn_DEF_ThreeOne_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ThreeOne_1,
2, /* Elements count */
- &asn_SPC_ThreeOne_1_specs /* Additional specs */
+ &asn_SPC_ThreeOne_specs_1 /* Additional specs */
};
diff --git a/tests/92-circular-loops-OK.asn1.-Pfindirect-choice b/tests/92-circular-loops-OK.asn1.-Pfindirect-choice
index 391ca911..7f0c3859 100644
--- a/tests/92-circular-loops-OK.asn1.-Pfindirect-choice
+++ b/tests/92-circular-loops-OK.asn1.-Pfindirect-choice
@@ -52,6 +52,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice1,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch1"
},
{ ATF_POINTER, 0, offsetof(struct Everything, ch2),
@@ -59,6 +61,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch2"
},
{ ATF_POINTER, 0, offsetof(struct Everything, ch3),
@@ -66,6 +70,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = +1, /* EXPLICIT tag at current level */
.type = &asn_DEF_Choice3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ch3"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, set),
@@ -73,6 +79,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, a),
@@ -80,6 +88,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, b),
@@ -87,6 +97,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, g),
@@ -94,6 +106,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, ot),
@@ -101,6 +115,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_OneTwo,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ot"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, tt),
@@ -108,6 +124,8 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "tt"
},
{ ATF_NOFLAGS, 0, offsetof(struct Everything, to),
@@ -115,13 +133,15 @@ static asn_TYPE_member_t asn_MBR_Everything_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ThreeOne,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "to"
},
};
-static ber_tlv_tag_t asn_DEF_Everything_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Everything_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Everything_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Everything_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ch1 at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ch2 at 16 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ch3 at 17 */
@@ -133,11 +153,12 @@ static asn_TYPE_tag2member_t asn_MAP_Everything_1_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* tt at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* to at 25 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Everything_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Everything_specs_1 = {
sizeof(struct Everything),
offsetof(struct Everything, _asn_ctx),
- asn_MAP_Everything_1_tag2el,
+ asn_MAP_Everything_tag2el_1,
10, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -151,16 +172,18 @@ asn_TYPE_descriptor_t asn_DEF_Everything = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Everything_1_tags,
- sizeof(asn_DEF_Everything_1_tags)
- /sizeof(asn_DEF_Everything_1_tags[0]), /* 1 */
- asn_DEF_Everything_1_tags, /* Same as above */
- sizeof(asn_DEF_Everything_1_tags)
- /sizeof(asn_DEF_Everything_1_tags[0]), /* 1 */
+ asn_DEF_Everything_tags_1,
+ sizeof(asn_DEF_Everything_tags_1)
+ /sizeof(asn_DEF_Everything_tags_1[0]), /* 1 */
+ asn_DEF_Everything_tags_1, /* Same as above */
+ sizeof(asn_DEF_Everything_tags_1)
+ /sizeof(asn_DEF_Everything_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Everything_1,
10, /* Elements count */
- &asn_SPC_Everything_1_specs /* Additional specs */
+ &asn_SPC_Everything_specs_1 /* Additional specs */
};
@@ -214,6 +237,8 @@ static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "something"
},
{ ATF_POINTER, 0, offsetof(struct Choice1, choice.some2),
@@ -221,21 +246,24 @@ static asn_TYPE_member_t asn_MBR_Choice1_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "some2"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice1_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice1_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* something at 29 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* some2 at 32 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice1_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice1_specs_1 = {
sizeof(struct Choice1),
offsetof(struct Choice1, _asn_ctx),
offsetof(struct Choice1, present),
sizeof(((struct Choice1 *)0)->present),
- asn_MAP_Choice1_1_tag2el,
+ asn_MAP_Choice1_tag2el_1,
2, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice1 = {
"Choice1",
@@ -247,14 +275,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice1 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice1_1,
2, /* Elements count */
- &asn_SPC_Choice1_1_specs /* Additional specs */
+ &asn_SPC_Choice1_specs_1 /* Additional specs */
};
@@ -310,6 +340,8 @@ static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TypeRef,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "typeref"
},
{ ATF_POINTER, 0, offsetof(struct Choice2, choice.some3),
@@ -317,21 +349,24 @@ static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "some3"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice2_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* typeref at 35 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* some3 at 38 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice2_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
sizeof(struct Choice2),
offsetof(struct Choice2, _asn_ctx),
offsetof(struct Choice2, present),
sizeof(((struct Choice2 *)0)->present),
- asn_MAP_Choice2_1_tag2el,
+ asn_MAP_Choice2_tag2el_1,
2, /* Count of tags in the map */
- 1 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = 1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice2 = {
"Choice2",
@@ -343,14 +378,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice2 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice2_1,
2, /* Elements count */
- &asn_SPC_Choice2_1_specs /* Additional specs */
+ &asn_SPC_Choice2_specs_1 /* Additional specs */
};
@@ -416,21 +453,24 @@ static asn_TYPE_member_t asn_MBR_a_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "aa"
},
};
-static ber_tlv_tag_t asn_DEF_a_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_a_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_a_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_a_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* aa at 43 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_a_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_a_specs_2 = {
sizeof(struct a),
offsetof(struct a, _asn_ctx),
- asn_MAP_a_2_tag2el,
+ asn_MAP_a_tag2el_2,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -445,16 +485,18 @@ asn_TYPE_descriptor_t asn_DEF_a_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_a_2_tags,
- sizeof(asn_DEF_a_2_tags)
- /sizeof(asn_DEF_a_2_tags[0]) - 1, /* 1 */
- asn_DEF_a_2_tags, /* Same as above */
- sizeof(asn_DEF_a_2_tags)
- /sizeof(asn_DEF_a_2_tags[0]), /* 2 */
+ asn_DEF_a_tags_2,
+ sizeof(asn_DEF_a_tags_2)
+ /sizeof(asn_DEF_a_tags_2[0]) - 1, /* 1 */
+ asn_DEF_a_tags_2, /* Same as above */
+ sizeof(asn_DEF_a_tags_2)
+ /sizeof(asn_DEF_a_tags_2[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_a_2,
1, /* Elements count */
- &asn_SPC_a_2_specs /* Additional specs */
+ &asn_SPC_a_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_c_5[] = {
@@ -463,14 +505,16 @@ static asn_TYPE_member_t asn_MBR_c_5[] = {
.tag_mode = 0,
.type = &asn_DEF_Choice3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_c_5_tags[] = {
+static ber_tlv_tag_t asn_DEF_c_tags_5[] = {
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_c_5_specs = {
+static asn_SET_OF_specifics_t asn_SPC_c_specs_5 = {
sizeof(struct c),
offsetof(struct c, _asn_ctx),
2, /* XER encoding is XMLValueList */
@@ -486,16 +530,18 @@ asn_TYPE_descriptor_t asn_DEF_c_5 = {
SEQUENCE_OF_encode_der,
SEQUENCE_OF_decode_xer,
SEQUENCE_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_c_5_tags,
- sizeof(asn_DEF_c_5_tags)
- /sizeof(asn_DEF_c_5_tags[0]) - 1, /* 1 */
- asn_DEF_c_5_tags, /* Same as above */
- sizeof(asn_DEF_c_5_tags)
- /sizeof(asn_DEF_c_5_tags[0]), /* 2 */
+ asn_DEF_c_tags_5,
+ sizeof(asn_DEF_c_tags_5)
+ /sizeof(asn_DEF_c_tags_5[0]) - 1, /* 1 */
+ asn_DEF_c_tags_5, /* Same as above */
+ sizeof(asn_DEF_c_tags_5)
+ /sizeof(asn_DEF_c_tags_5[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_c_5,
1, /* Single element */
- &asn_SPC_c_5_specs /* Additional specs */
+ &asn_SPC_c_specs_5 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
@@ -504,6 +550,8 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_a_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 0, offsetof(struct Choice3, choice.b),
@@ -511,6 +559,8 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Everything,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 0, offsetof(struct Choice3, choice.c),
@@ -518,22 +568,25 @@ static asn_TYPE_member_t asn_MBR_Choice3_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_c_5,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "c"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice3_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice3_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 43 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b at 44 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c at 46 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice3_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice3_specs_1 = {
sizeof(struct Choice3),
offsetof(struct Choice3, _asn_ctx),
offsetof(struct Choice3, present),
sizeof(((struct Choice3 *)0)->present),
- asn_MAP_Choice3_1_tag2el,
+ asn_MAP_Choice3_tag2el_1,
3, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice3 = {
"Choice3",
@@ -545,14 +598,16 @@ asn_TYPE_descriptor_t asn_DEF_Choice3 = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice3_1,
3, /* Elements count */
- &asn_SPC_Choice3_1_specs /* Additional specs */
+ &asn_SPC_Choice3_specs_1 /* Additional specs */
};
@@ -607,6 +662,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "int"
},
{ ATF_POINTER, 0, offsetof(struct Member, set),
@@ -614,6 +671,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
{ ATF_POINTER, 0, offsetof(struct Member, seq),
@@ -621,6 +680,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "seq"
},
{ ATF_POINTER, 2, offsetof(struct Member, set2),
@@ -628,6 +689,8 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set2"
},
{ ATF_POINTER, 1, offsetof(struct Member, set3),
@@ -635,31 +698,34 @@ static asn_TYPE_member_t asn_MBR_Member_2[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set3"
},
};
-static ber_tlv_tag_t asn_DEF_Member_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Member_2_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* int at 49 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* set at 50 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* seq at 51 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* set2 at 52 */
{ (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* set3 at 55 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Member_2_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
sizeof(struct Member),
offsetof(struct Member, _asn_ctx),
- asn_MAP_Member_2_tag2el,
+ asn_MAP_Member_tag2el_2,
5, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
3, /* Start extensions */
6 /* Stop extensions */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_Member_2 = {
- "",
- "",
+ "SEQUENCE",
+ "SEQUENCE",
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_constraint,
@@ -667,16 +733,18 @@ asn_TYPE_descriptor_t asn_DEF_Member_2 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Member_2_tags,
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
- asn_DEF_Member_2_tags, /* Same as above */
- sizeof(asn_DEF_Member_2_tags)
- /sizeof(asn_DEF_Member_2_tags[0]), /* 1 */
+ asn_DEF_Member_tags_2,
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ asn_DEF_Member_tags_2, /* Same as above */
+ sizeof(asn_DEF_Member_tags_2)
+ /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Member_2,
5, /* Elements count */
- &asn_SPC_Member_2_specs /* Additional specs */
+ &asn_SPC_Member_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Set_1[] = {
@@ -685,13 +753,15 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = 0,
.type = &asn_DEF_Member_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_Set_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_Set_1_specs = {
+static asn_SET_OF_specifics_t asn_SPC_Set_specs_1 = {
sizeof(struct Set),
offsetof(struct Set, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -706,16 +776,18 @@ asn_TYPE_descriptor_t asn_DEF_Set = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Set_1_tags,
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
- asn_DEF_Set_1_tags, /* Same as above */
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
+ asn_DEF_Set_tags_1,
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ asn_DEF_Set_tags_1, /* Same as above */
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Set_1,
1, /* Single element */
- &asn_SPC_Set_1_specs /* Additional specs */
+ &asn_SPC_Set_specs_1 /* Additional specs */
};
@@ -762,6 +834,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 3, offsetof(struct Sequence, seq),
@@ -769,6 +843,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "seq"
},
{ ATF_POINTER, 2, offsetof(struct Sequence, b),
@@ -776,6 +852,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 1, offsetof(struct Sequence, set),
@@ -783,23 +861,26 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Set,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "set"
},
};
-static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 58 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* seq at 59 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* b at 61 */
{ (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* set at 62 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
sizeof(struct Sequence),
offsetof(struct Sequence, _asn_ctx),
- asn_MAP_Sequence_1_tag2el,
+ asn_MAP_Sequence_tag2el_1,
4, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
1, /* Start extensions */
5 /* Stop extensions */
};
@@ -813,16 +894,18 @@ asn_TYPE_descriptor_t asn_DEF_Sequence = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Sequence_1_tags,
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
- asn_DEF_Sequence_1_tags, /* Same as above */
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Sequence_1,
4, /* Elements count */
- &asn_SPC_Sequence_1_specs /* Additional specs */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
};
@@ -867,6 +950,9 @@ TypeRef_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
td->der_encoder = asn_DEF_Sequence.der_encoder;
td->xer_decoder = asn_DEF_Sequence.xer_decoder;
td->xer_encoder = asn_DEF_Sequence.xer_encoder;
+ td->uper_decoder = asn_DEF_Sequence.uper_decoder;
+ if(!td->per_constraints)
+ td->per_constraints = asn_DEF_Sequence.per_constraints;
td->elements = asn_DEF_Sequence.elements;
td->elements_count = asn_DEF_Sequence.elements_count;
td->specifics = asn_DEF_Sequence.specifics;
@@ -919,7 +1005,7 @@ TypeRef_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
/*** <<< STAT-DEFS [TypeRef] >>> ***/
-static ber_tlv_tag_t asn_DEF_TypeRef_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_TypeRef_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_TypeRef = {
@@ -932,13 +1018,15 @@ asn_TYPE_descriptor_t asn_DEF_TypeRef = {
TypeRef_encode_der,
TypeRef_decode_xer,
TypeRef_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_TypeRef_1_tags,
- sizeof(asn_DEF_TypeRef_1_tags)
- /sizeof(asn_DEF_TypeRef_1_tags[0]), /* 1 */
- asn_DEF_TypeRef_1_tags, /* Same as above */
- sizeof(asn_DEF_TypeRef_1_tags)
- /sizeof(asn_DEF_TypeRef_1_tags[0]), /* 1 */
+ asn_DEF_TypeRef_tags_1,
+ sizeof(asn_DEF_TypeRef_tags_1)
+ /sizeof(asn_DEF_TypeRef_tags_1[0]), /* 1 */
+ asn_DEF_TypeRef_tags_1, /* Same as above */
+ sizeof(asn_DEF_TypeRef_tags_1)
+ /sizeof(asn_DEF_TypeRef_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
0, 0, /* Defined elsewhere */
0 /* No specifics */
};
@@ -983,21 +1071,24 @@ static asn_TYPE_member_t asn_MBR_b_3[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_b_3_tags[] = {
+static ber_tlv_tag_t asn_DEF_b_tags_3[] = {
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_b_3_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* b at 70 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_b_3_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_b_specs_3 = {
sizeof(struct b),
offsetof(struct b, _asn_ctx),
- asn_MAP_b_3_tag2el,
+ asn_MAP_b_tag2el_3,
1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1012,16 +1103,18 @@ asn_TYPE_descriptor_t asn_DEF_b_3 = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_b_3_tags,
- sizeof(asn_DEF_b_3_tags)
- /sizeof(asn_DEF_b_3_tags[0]) - 1, /* 1 */
- asn_DEF_b_3_tags, /* Same as above */
- sizeof(asn_DEF_b_3_tags)
- /sizeof(asn_DEF_b_3_tags[0]), /* 2 */
+ asn_DEF_b_tags_3,
+ sizeof(asn_DEF_b_tags_3)
+ /sizeof(asn_DEF_b_tags_3[0]) - 1, /* 1 */
+ asn_DEF_b_tags_3, /* Same as above */
+ sizeof(asn_DEF_b_tags_3)
+ /sizeof(asn_DEF_b_tags_3[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_b_3,
1, /* Elements count */
- &asn_SPC_b_3_specs /* Additional specs */
+ &asn_SPC_b_specs_3 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
@@ -1030,6 +1123,8 @@ static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_NOFLAGS, 0, offsetof(struct Alpha, b),
@@ -1037,21 +1132,24 @@ static asn_TYPE_member_t asn_MBR_Alpha_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_b_3,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_Alpha_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Alpha_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Alpha_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Alpha_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a at 68 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* b at 70 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Alpha_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Alpha_specs_1 = {
sizeof(struct Alpha),
offsetof(struct Alpha, _asn_ctx),
- asn_MAP_Alpha_1_tag2el,
+ asn_MAP_Alpha_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1065,16 +1163,18 @@ asn_TYPE_descriptor_t asn_DEF_Alpha = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Alpha_1_tags,
- sizeof(asn_DEF_Alpha_1_tags)
- /sizeof(asn_DEF_Alpha_1_tags[0]), /* 1 */
- asn_DEF_Alpha_1_tags, /* Same as above */
- sizeof(asn_DEF_Alpha_1_tags)
- /sizeof(asn_DEF_Alpha_1_tags[0]), /* 1 */
+ asn_DEF_Alpha_tags_1,
+ sizeof(asn_DEF_Alpha_tags_1)
+ /sizeof(asn_DEF_Alpha_tags_1[0]), /* 1 */
+ asn_DEF_Alpha_tags_1, /* Same as above */
+ sizeof(asn_DEF_Alpha_tags_1)
+ /sizeof(asn_DEF_Alpha_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Alpha_1,
2, /* Elements count */
- &asn_SPC_Alpha_1_specs /* Additional specs */
+ &asn_SPC_Alpha_specs_1 /* Additional specs */
};
@@ -1114,6 +1214,8 @@ static asn_TYPE_member_t asn_MBR_Beta_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
{ ATF_POINTER, 1, offsetof(struct Beta, g),
@@ -1121,21 +1223,24 @@ static asn_TYPE_member_t asn_MBR_Beta_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
};
-static ber_tlv_tag_t asn_DEF_Beta_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Beta_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Beta_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Beta_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* b at 75 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* g at 76 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Beta_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Beta_specs_1 = {
sizeof(struct Beta),
offsetof(struct Beta, _asn_ctx),
- asn_MAP_Beta_1_tag2el,
+ asn_MAP_Beta_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1149,16 +1254,18 @@ asn_TYPE_descriptor_t asn_DEF_Beta = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Beta_1_tags,
- sizeof(asn_DEF_Beta_1_tags)
- /sizeof(asn_DEF_Beta_1_tags[0]), /* 1 */
- asn_DEF_Beta_1_tags, /* Same as above */
- sizeof(asn_DEF_Beta_1_tags)
- /sizeof(asn_DEF_Beta_1_tags[0]), /* 1 */
+ asn_DEF_Beta_tags_1,
+ sizeof(asn_DEF_Beta_tags_1)
+ /sizeof(asn_DEF_Beta_tags_1[0]), /* 1 */
+ asn_DEF_Beta_tags_1, /* Same as above */
+ sizeof(asn_DEF_Beta_tags_1)
+ /sizeof(asn_DEF_Beta_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Beta_1,
2, /* Elements count */
- &asn_SPC_Beta_1_specs /* Additional specs */
+ &asn_SPC_Beta_specs_1 /* Additional specs */
};
@@ -1201,6 +1308,8 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "o"
},
{ ATF_POINTER, 0, offsetof(struct Gamma, a),
@@ -1208,6 +1317,8 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Alpha,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "a"
},
{ ATF_POINTER, 0, offsetof(struct Gamma, b),
@@ -1215,22 +1326,25 @@ static asn_TYPE_member_t asn_MBR_Gamma_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Beta,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "b"
},
};
-static ber_tlv_tag_t asn_DEF_Gamma_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Gamma_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Gamma_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Gamma_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* o at 80 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* a at 81 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* b at 83 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Gamma_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Gamma_specs_1 = {
sizeof(struct Gamma),
offsetof(struct Gamma, _asn_ctx),
- asn_MAP_Gamma_1_tag2el,
+ asn_MAP_Gamma_tag2el_1,
3, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -1244,16 +1358,18 @@ asn_TYPE_descriptor_t asn_DEF_Gamma = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Gamma_1_tags,
- sizeof(asn_DEF_Gamma_1_tags)
- /sizeof(asn_DEF_Gamma_1_tags[0]), /* 1 */
- asn_DEF_Gamma_1_tags, /* Same as above */
- sizeof(asn_DEF_Gamma_1_tags)
- /sizeof(asn_DEF_Gamma_1_tags[0]), /* 1 */
+ asn_DEF_Gamma_tags_1,
+ sizeof(asn_DEF_Gamma_tags_1)
+ /sizeof(asn_DEF_Gamma_tags_1[0]), /* 1 */
+ asn_DEF_Gamma_tags_1, /* Same as above */
+ sizeof(asn_DEF_Gamma_tags_1)
+ /sizeof(asn_DEF_Gamma_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Gamma_1,
3, /* Elements count */
- &asn_SPC_Gamma_1_specs /* Additional specs */
+ &asn_SPC_Gamma_specs_1 /* Additional specs */
};
@@ -1304,28 +1420,30 @@ static asn_TYPE_member_t asn_MBR_OneTwo_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_TwoThree,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m12"
},
};
-static ber_tlv_tag_t asn_DEF_OneTwo_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_OneTwo_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_OneTwo_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_OneTwo_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* m12 at 86 */
};
-static uint8_t asn_MAP_OneTwo_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_OneTwo_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_OneTwo_1_specs = {
+static asn_SET_specifics_t asn_SPC_OneTwo_specs_1 = {
sizeof(struct OneTwo),
offsetof(struct OneTwo, _asn_ctx),
offsetof(struct OneTwo, _presence_map),
- asn_MAP_OneTwo_1_tag2el,
+ asn_MAP_OneTwo_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_OneTwo_1_tag2el, /* Same as above */
+ asn_MAP_OneTwo_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_OneTwo_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_OneTwo_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_OneTwo = {
"OneTwo",
@@ -1337,16 +1455,18 @@ asn_TYPE_descriptor_t asn_DEF_OneTwo = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_OneTwo_1_tags,
- sizeof(asn_DEF_OneTwo_1_tags)
- /sizeof(asn_DEF_OneTwo_1_tags[0]), /* 1 */
- asn_DEF_OneTwo_1_tags, /* Same as above */
- sizeof(asn_DEF_OneTwo_1_tags)
- /sizeof(asn_DEF_OneTwo_1_tags[0]), /* 1 */
+ asn_DEF_OneTwo_tags_1,
+ sizeof(asn_DEF_OneTwo_tags_1)
+ /sizeof(asn_DEF_OneTwo_tags_1[0]), /* 1 */
+ asn_DEF_OneTwo_tags_1, /* Same as above */
+ sizeof(asn_DEF_OneTwo_tags_1)
+ /sizeof(asn_DEF_OneTwo_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_OneTwo_1,
1, /* Elements count */
- &asn_SPC_OneTwo_1_specs /* Additional specs */
+ &asn_SPC_OneTwo_specs_1 /* Additional specs */
};
@@ -1397,28 +1517,30 @@ static asn_TYPE_member_t asn_MBR_TwoThree_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_ThreeOne,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m23"
},
};
-static ber_tlv_tag_t asn_DEF_TwoThree_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_TwoThree_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_TwoThree_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_TwoThree_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* m23 at 87 */
};
-static uint8_t asn_MAP_TwoThree_1_mmap[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_TwoThree_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7)
};
-static asn_SET_specifics_t asn_SPC_TwoThree_1_specs = {
+static asn_SET_specifics_t asn_SPC_TwoThree_specs_1 = {
sizeof(struct TwoThree),
offsetof(struct TwoThree, _asn_ctx),
offsetof(struct TwoThree, _presence_map),
- asn_MAP_TwoThree_1_tag2el,
+ asn_MAP_TwoThree_tag2el_1,
1, /* Count of tags in the map */
- asn_MAP_TwoThree_1_tag2el, /* Same as above */
+ asn_MAP_TwoThree_tag2el_1, /* Same as above */
1, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_TwoThree_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_TwoThree_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_TwoThree = {
"TwoThree",
@@ -1430,16 +1552,18 @@ asn_TYPE_descriptor_t asn_DEF_TwoThree = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_TwoThree_1_tags,
- sizeof(asn_DEF_TwoThree_1_tags)
- /sizeof(asn_DEF_TwoThree_1_tags[0]), /* 1 */
- asn_DEF_TwoThree_1_tags, /* Same as above */
- sizeof(asn_DEF_TwoThree_1_tags)
- /sizeof(asn_DEF_TwoThree_1_tags[0]), /* 1 */
+ asn_DEF_TwoThree_tags_1,
+ sizeof(asn_DEF_TwoThree_tags_1)
+ /sizeof(asn_DEF_TwoThree_tags_1[0]), /* 1 */
+ asn_DEF_TwoThree_tags_1, /* Same as above */
+ sizeof(asn_DEF_TwoThree_tags_1)
+ /sizeof(asn_DEF_TwoThree_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_TwoThree_1,
1, /* Elements count */
- &asn_SPC_TwoThree_1_specs /* Additional specs */
+ &asn_SPC_TwoThree_specs_1 /* Additional specs */
};
@@ -1494,6 +1618,8 @@ static asn_TYPE_member_t asn_MBR_ThreeOne_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_OneTwo,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m31"
},
{ ATF_POINTER, 0, offsetof(struct ThreeOne, g),
@@ -1501,29 +1627,31 @@ static asn_TYPE_member_t asn_MBR_ThreeOne_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Gamma,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "g"
},
};
-static ber_tlv_tag_t asn_DEF_ThreeOne_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_ThreeOne_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_ThreeOne_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_ThreeOne_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m31 at 88 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* g at 88 */
};
-static uint8_t asn_MAP_ThreeOne_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_ThreeOne_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6)
};
-static asn_SET_specifics_t asn_SPC_ThreeOne_1_specs = {
+static asn_SET_specifics_t asn_SPC_ThreeOne_specs_1 = {
sizeof(struct ThreeOne),
offsetof(struct ThreeOne, _asn_ctx),
offsetof(struct ThreeOne, _presence_map),
- asn_MAP_ThreeOne_1_tag2el,
+ asn_MAP_ThreeOne_tag2el_1,
2, /* Count of tags in the map */
- asn_MAP_ThreeOne_1_tag2el, /* Same as above */
+ asn_MAP_ThreeOne_tag2el_1, /* Same as above */
2, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_ThreeOne_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_ThreeOne_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_ThreeOne = {
"ThreeOne",
@@ -1535,15 +1663,17 @@ asn_TYPE_descriptor_t asn_DEF_ThreeOne = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_ThreeOne_1_tags,
- sizeof(asn_DEF_ThreeOne_1_tags)
- /sizeof(asn_DEF_ThreeOne_1_tags[0]), /* 1 */
- asn_DEF_ThreeOne_1_tags, /* Same as above */
- sizeof(asn_DEF_ThreeOne_1_tags)
- /sizeof(asn_DEF_ThreeOne_1_tags[0]), /* 1 */
+ asn_DEF_ThreeOne_tags_1,
+ sizeof(asn_DEF_ThreeOne_tags_1)
+ /sizeof(asn_DEF_ThreeOne_tags_1[0]), /* 1 */
+ asn_DEF_ThreeOne_tags_1, /* Same as above */
+ sizeof(asn_DEF_ThreeOne_tags_1)
+ /sizeof(asn_DEF_ThreeOne_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_ThreeOne_1,
2, /* Elements count */
- &asn_SPC_ThreeOne_1_specs /* Additional specs */
+ &asn_SPC_ThreeOne_specs_1 /* Additional specs */
};
diff --git a/tests/93-asn1c-controls-OK.asn1.-P b/tests/93-asn1c-controls-OK.asn1.-P
index f2d5fe36..0be9a2c6 100644
--- a/tests/93-asn1c-controls-OK.asn1.-P
+++ b/tests/93-asn1c-controls-OK.asn1.-P
@@ -26,6 +26,8 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ainl"
},
{ ATF_POINTER, 0, offsetof(struct Sequence, aptr),
@@ -33,21 +35,24 @@ static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "aptr"
},
};
-static ber_tlv_tag_t asn_DEF_Sequence_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Sequence_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr at 18 */
};
-static asn_SEQUENCE_specifics_t asn_SPC_Sequence_1_specs = {
+static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
sizeof(struct Sequence),
offsetof(struct Sequence, _asn_ctx),
- asn_MAP_Sequence_1_tag2el,
+ asn_MAP_Sequence_tag2el_1,
2, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
-1, /* Start extensions */
-1 /* Stop extensions */
};
@@ -61,16 +66,18 @@ asn_TYPE_descriptor_t asn_DEF_Sequence = {
SEQUENCE_encode_der,
SEQUENCE_decode_xer,
SEQUENCE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Sequence_1_tags,
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
- asn_DEF_Sequence_1_tags, /* Same as above */
- sizeof(asn_DEF_Sequence_1_tags)
- /sizeof(asn_DEF_Sequence_1_tags[0]), /* 1 */
+ asn_DEF_Sequence_tags_1,
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ asn_DEF_Sequence_tags_1, /* Same as above */
+ sizeof(asn_DEF_Sequence_tags_1)
+ /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Sequence_1,
2, /* Elements count */
- &asn_SPC_Sequence_1_specs /* Additional specs */
+ &asn_SPC_Sequence_specs_1 /* Additional specs */
};
@@ -124,6 +131,8 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ainl"
},
{ ATF_POINTER, 0, offsetof(struct Set, aptr),
@@ -131,29 +140,31 @@ static asn_TYPE_member_t asn_MBR_Set_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "aptr"
},
};
-static ber_tlv_tag_t asn_DEF_Set_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_Set_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_Set_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Set_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ainl at 21 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aptr at 24 */
};
-static uint8_t asn_MAP_Set_1_mmap[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_Set_mmap_1[(2 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (1 << 6)
};
-static asn_SET_specifics_t asn_SPC_Set_1_specs = {
+static asn_SET_specifics_t asn_SPC_Set_specs_1 = {
sizeof(struct Set),
offsetof(struct Set, _asn_ctx),
offsetof(struct Set, _presence_map),
- asn_MAP_Set_1_tag2el,
+ asn_MAP_Set_tag2el_1,
2, /* Count of tags in the map */
- asn_MAP_Set_1_tag2el, /* Same as above */
+ asn_MAP_Set_tag2el_1, /* Same as above */
2, /* Count of tags in the CXER map */
0, /* Whether extensible */
- (unsigned int *)asn_MAP_Set_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_Set_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_Set = {
"Set",
@@ -165,16 +176,18 @@ asn_TYPE_descriptor_t asn_DEF_Set = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_Set_1_tags,
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
- asn_DEF_Set_1_tags, /* Same as above */
- sizeof(asn_DEF_Set_1_tags)
- /sizeof(asn_DEF_Set_1_tags[0]), /* 1 */
+ asn_DEF_Set_tags_1,
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ asn_DEF_Set_tags_1, /* Same as above */
+ sizeof(asn_DEF_Set_tags_1)
+ /sizeof(asn_DEF_Set_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_Set_1,
2, /* Elements count */
- &asn_SPC_Set_1_specs /* Additional specs */
+ &asn_SPC_Set_specs_1 /* Additional specs */
};
@@ -234,14 +247,16 @@ static asn_TYPE_member_t asn_MBR_setof_2[] = {
.tag_mode = 0,
.type = &asn_DEF_INTEGER,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = ""
},
};
-static ber_tlv_tag_t asn_DEF_setof_2_tags[] = {
+static ber_tlv_tag_t asn_DEF_setof_tags_2[] = {
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_SET_OF_specifics_t asn_SPC_setof_2_specs = {
+static asn_SET_OF_specifics_t asn_SPC_setof_specs_2 = {
sizeof(struct setof),
offsetof(struct setof, _asn_ctx),
0, /* XER encoding is XMLDelimitedItemList */
@@ -257,16 +272,18 @@ asn_TYPE_descriptor_t asn_DEF_setof_2 = {
SET_OF_encode_der,
SET_OF_decode_xer,
SET_OF_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_setof_2_tags,
- sizeof(asn_DEF_setof_2_tags)
- /sizeof(asn_DEF_setof_2_tags[0]) - 1, /* 1 */
- asn_DEF_setof_2_tags, /* Same as above */
- sizeof(asn_DEF_setof_2_tags)
- /sizeof(asn_DEF_setof_2_tags[0]), /* 2 */
+ asn_DEF_setof_tags_2,
+ sizeof(asn_DEF_setof_tags_2)
+ /sizeof(asn_DEF_setof_tags_2[0]) - 1, /* 1 */
+ asn_DEF_setof_tags_2, /* Same as above */
+ sizeof(asn_DEF_setof_tags_2)
+ /sizeof(asn_DEF_setof_tags_2[0]), /* 2 */
+ 0, /* No PER visible constraints */
asn_MBR_setof_2,
1, /* Single element */
- &asn_SPC_setof_2_specs /* Additional specs */
+ &asn_SPC_setof_specs_2 /* Additional specs */
};
static asn_TYPE_member_t asn_MBR_Choice_1[] = {
@@ -275,6 +292,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_setof_2,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "setof"
},
{ ATF_POINTER, 0, offsetof(struct Choice, choice.aptr),
@@ -282,6 +301,8 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "aptr"
},
{ ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ainl),
@@ -289,22 +310,25 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_Sequence,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "ainl"
},
};
-static asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* setof at 28 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aptr at 30 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ainl at 32 */
};
-static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs = {
+static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
sizeof(struct Choice),
offsetof(struct Choice, _asn_ctx),
offsetof(struct Choice, present),
sizeof(((struct Choice *)0)->present),
- asn_MAP_Choice_1_tag2el,
+ asn_MAP_Choice_tag2el_1,
3, /* Count of tags in the map */
- 0 /* Whether extensible */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_Choice = {
"Choice",
@@ -316,13 +340,15 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
CHOICE_encode_der,
CHOICE_decode_xer,
CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
CHOICE_outmost_tag,
0, /* No effective tags (pointer) */
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
+ 0, /* No PER visible constraints */
asn_MBR_Choice_1,
3, /* Elements count */
- &asn_SPC_Choice_1_specs /* Additional specs */
+ &asn_SPC_Choice_specs_1 /* Additional specs */
};
diff --git a/tests/94-set-optionals-OK.asn1.-P b/tests/94-set-optionals-OK.asn1.-P
index c1c4dd9a..879cb069 100644
--- a/tests/94-set-optionals-OK.asn1.-P
+++ b/tests/94-set-optionals-OK.asn1.-P
@@ -61,6 +61,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m0"
},
{ ATF_POINTER, 1, offsetof(struct TestSet, m1),
@@ -68,6 +70,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m1"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m2),
@@ -75,6 +79,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m2"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m3),
@@ -82,6 +88,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m3"
},
{ ATF_POINTER, 1, offsetof(struct TestSet, m4),
@@ -89,6 +97,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m4"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m5),
@@ -96,6 +106,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m5"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m6),
@@ -103,6 +115,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m6"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m7),
@@ -110,6 +124,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m7"
},
{ ATF_POINTER, 1, offsetof(struct TestSet, m8),
@@ -117,6 +133,8 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m8"
},
{ ATF_NOFLAGS, 0, offsetof(struct TestSet, m9),
@@ -124,13 +142,15 @@ static asn_TYPE_member_t asn_MBR_TestSet_1[] = {
.tag_mode = -1, /* IMPLICIT tag at current level */
.type = &asn_DEF_VisibleString,
.memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
.name = "m9"
},
};
-static ber_tlv_tag_t asn_DEF_TestSet_1_tags[] = {
+static ber_tlv_tag_t asn_DEF_TestSet_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
};
-static asn_TYPE_tag2member_t asn_MAP_TestSet_1_tag2el[] = {
+static asn_TYPE_tag2member_t asn_MAP_TestSet_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m0 at 15 */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m1 at 16 */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m2 at 17 */
@@ -142,20 +162,20 @@ static asn_TYPE_tag2member_t asn_MAP_TestSet_1_tag2el[] = {
{ (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* m8 at 23 */
{ (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* m9 at 24 */
};
-static uint8_t asn_MAP_TestSet_1_mmap[(10 + (8 * sizeof(unsigned int)) - 1) / 8] = {
+static uint8_t asn_MAP_TestSet_mmap_1[(10 + (8 * sizeof(unsigned int)) - 1) / 8] = {
(1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (0 << 3) | (1 << 2) | (1 << 1) | (1 << 0),
(0 << 7) | (1 << 6)
};
-static asn_SET_specifics_t asn_SPC_TestSet_1_specs = {
+static asn_SET_specifics_t asn_SPC_TestSet_specs_1 = {
sizeof(struct TestSet),
offsetof(struct TestSet, _asn_ctx),
offsetof(struct TestSet, _presence_map),
- asn_MAP_TestSet_1_tag2el,
+ asn_MAP_TestSet_tag2el_1,
10, /* Count of tags in the map */
- asn_MAP_TestSet_1_tag2el, /* Same as above */
+ asn_MAP_TestSet_tag2el_1, /* Same as above */
10, /* Count of tags in the CXER map */
1, /* Whether extensible */
- (unsigned int *)asn_MAP_TestSet_1_mmap /* Mandatory elements map */
+ (unsigned int *)asn_MAP_TestSet_mmap_1 /* Mandatory elements map */
};
asn_TYPE_descriptor_t asn_DEF_TestSet = {
"TestSet",
@@ -167,15 +187,17 @@ asn_TYPE_descriptor_t asn_DEF_TestSet = {
SET_encode_der,
SET_decode_xer,
SET_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
0, /* Use generic outmost tag fetcher */
- asn_DEF_TestSet_1_tags,
- sizeof(asn_DEF_TestSet_1_tags)
- /sizeof(asn_DEF_TestSet_1_tags[0]), /* 1 */
- asn_DEF_TestSet_1_tags, /* Same as above */
- sizeof(asn_DEF_TestSet_1_tags)
- /sizeof(asn_DEF_TestSet_1_tags[0]), /* 1 */
+ asn_DEF_TestSet_tags_1,
+ sizeof(asn_DEF_TestSet_tags_1)
+ /sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */
+ asn_DEF_TestSet_tags_1, /* Same as above */
+ sizeof(asn_DEF_TestSet_tags_1)
+ /sizeof(asn_DEF_TestSet_tags_1[0]), /* 1 */
+ 0, /* No PER visible constraints */
asn_MBR_TestSet_1,
10, /* Elements count */
- &asn_SPC_TestSet_1_specs /* Additional specs */
+ &asn_SPC_TestSet_specs_1 /* Additional specs */
};
diff --git a/tests/95-choice-per-order-OK.asn1 b/tests/95-choice-per-order-OK.asn1
new file mode 100644
index 00000000..2aeb4f72
--- /dev/null
+++ b/tests/95-choice-per-order-OK.asn1
@@ -0,0 +1,30 @@
+
+-- OK: Everything is fine
+
+-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
+-- .spelio.software.asn1c.test (9363.1.5.1)
+-- .95
+
+ModuleCHOICE-PER-Ordering
+ { iso org(3) dod(6) internet (1) private(4) enterprise(1)
+ spelio(9363) software(1) asn1c(5) test(1) 95 }
+ DEFINITIONS ::=
+BEGIN
+
+ Choice ::= CHOICE {
+ roid RELATIVE-OID,
+ bitstr BIT STRING,
+ ch CHOICE {
+ null NULL,
+ int INTEGER
+ },
+ ...,
+ bool BOOLEAN
+ }
+
+ Choice2 ::= CHOICE {
+ bitstr [0] BIT STRING,
+ roid [1] RELATIVE-OID
+ }
+
+END
diff --git a/tests/95-choice-per-order-OK.asn1.-P b/tests/95-choice-per-order-OK.asn1.-P
new file mode 100644
index 00000000..c1f726b2
--- /dev/null
+++ b/tests/95-choice-per-order-OK.asn1.-P
@@ -0,0 +1,284 @@
+
+/*** <<< INCLUDES [Choice] >>> ***/
+
+#include <RELATIVE-OID.h>
+#include <BIT_STRING.h>
+#include <BOOLEAN.h>
+#include <NULL.h>
+#include <INTEGER.h>
+#include <constr_CHOICE.h>
+
+/*** <<< DEPS [Choice] >>> ***/
+
+typedef enum Choice_PR {
+ Choice_PR_NOTHING, /* No components present */
+ Choice_PR_roid,
+ Choice_PR_bitstr,
+ Choice_PR_ch,
+ /* Extensions may appear below */
+ Choice_PR_bool,
+} Choice_PR;
+typedef enum ch_PR {
+ ch_PR_NOTHING, /* No components present */
+ ch_PR_null,
+ ch_PR_int,
+} ch_PR;
+
+/*** <<< TYPE-DECLS [Choice] >>> ***/
+
+typedef struct Choice {
+ Choice_PR present;
+ union Choice_u {
+ RELATIVE_OID_t roid;
+ BIT_STRING_t bitstr;
+ struct ch {
+ ch_PR present;
+ union Choice__ch_u {
+ NULL_t null;
+ INTEGER_t Int;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+ } ch;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+ BOOLEAN_t bool;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Choice_t;
+
+/*** <<< FUNC-DECLS [Choice] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Choice;
+
+/*** <<< STAT-DEFS [Choice] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_ch_4[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_NULL,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "null"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_INTEGER,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "int"
+ },
+};
+static asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int at 20 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null at 18 */
+};
+static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
+ sizeof(struct ch),
+ offsetof(struct ch, _asn_ctx),
+ offsetof(struct ch, present),
+ sizeof(((struct ch *)0)->present),
+ asn_MAP_ch_tag2el_4,
+ 2, /* Count of tags in the map */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_ch_4 = {
+ "ch",
+ "ch",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ 0, /* No PER visible constraints */
+ asn_MBR_ch_4,
+ 2, /* Elements count */
+ &asn_SPC_ch_specs_4 /* Additional specs */
+};
+
+static asn_TYPE_member_t asn_MBR_Choice_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_RELATIVE_OID,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "roid"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BIT_STRING,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "bitstr"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
+ .tag = -1 /* Ambiguous tag (CHOICE?) */,
+ .tag_mode = 0,
+ .type = &asn_DEF_ch_4,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "ch"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bool),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BOOLEAN,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "bool"
+ },
+};
+static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 22 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int at 20 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr at 16 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null at 18 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid at 15 */
+};
+static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
+ sizeof(struct Choice),
+ offsetof(struct Choice, _asn_ctx),
+ offsetof(struct Choice, present),
+ sizeof(((struct Choice *)0)->present),
+ asn_MAP_Choice_tag2el_1,
+ 5, /* Count of tags in the map */
+ .canonical_order = 0,
+ .ext_start = 3 /* Extensions start */
+};
+asn_TYPE_descriptor_t asn_DEF_Choice = {
+ "Choice",
+ "Choice",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ 0, /* No PER visible constraints */
+ asn_MBR_Choice_1,
+ 4, /* Elements count */
+ &asn_SPC_Choice_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Choice2] >>> ***/
+
+#include <BIT_STRING.h>
+#include <RELATIVE-OID.h>
+#include <constr_CHOICE.h>
+
+/*** <<< DEPS [Choice2] >>> ***/
+
+typedef enum Choice2_PR {
+ Choice2_PR_NOTHING, /* No components present */
+ Choice2_PR_bitstr,
+ Choice2_PR_roid,
+} Choice2_PR;
+
+/*** <<< TYPE-DECLS [Choice2] >>> ***/
+
+typedef struct Choice2 {
+ Choice2_PR present;
+ union Choice2_u {
+ BIT_STRING_t bitstr;
+ RELATIVE_OID_t roid;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Choice2_t;
+
+/*** <<< FUNC-DECLS [Choice2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Choice2;
+
+/*** <<< STAT-DEFS [Choice2] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_BIT_STRING,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "bitstr"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_RELATIVE_OID,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* PER is not compiled, use -gen-PER */
+ .default_value = 0,
+ .name = "roid"
+ },
+};
+static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
+ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr at 26 */
+ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid at 27 */
+};
+static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
+ sizeof(struct Choice2),
+ offsetof(struct Choice2, _asn_ctx),
+ offsetof(struct Choice2, present),
+ sizeof(((struct Choice2 *)0)->present),
+ asn_MAP_Choice2_tag2el_1,
+ 2, /* Count of tags in the map */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
+};
+asn_TYPE_descriptor_t asn_DEF_Choice2 = {
+ "Choice2",
+ "Choice2",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ 0, /* No PER decoder, -gen-PER to enable */
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ 0, /* No PER visible constraints */
+ asn_MBR_Choice2_1,
+ 2, /* Elements count */
+ &asn_SPC_Choice2_specs_1 /* Additional specs */
+};
+
diff --git a/tests/95-choice-per-order-OK.asn1.-Pgen-PER b/tests/95-choice-per-order-OK.asn1.-Pgen-PER
new file mode 100644
index 00000000..68e9ad93
--- /dev/null
+++ b/tests/95-choice-per-order-OK.asn1.-Pgen-PER
@@ -0,0 +1,302 @@
+
+/*** <<< INCLUDES [Choice] >>> ***/
+
+#include <RELATIVE-OID.h>
+#include <BIT_STRING.h>
+#include <BOOLEAN.h>
+#include <NULL.h>
+#include <INTEGER.h>
+#include <constr_CHOICE.h>
+
+/*** <<< DEPS [Choice] >>> ***/
+
+typedef enum Choice_PR {
+ Choice_PR_NOTHING, /* No components present */
+ Choice_PR_roid,
+ Choice_PR_bitstr,
+ Choice_PR_ch,
+ /* Extensions may appear below */
+ Choice_PR_bool,
+} Choice_PR;
+typedef enum ch_PR {
+ ch_PR_NOTHING, /* No components present */
+ ch_PR_null,
+ ch_PR_int,
+} ch_PR;
+
+/*** <<< TYPE-DECLS [Choice] >>> ***/
+
+typedef struct Choice {
+ Choice_PR present;
+ union Choice_u {
+ RELATIVE_OID_t roid;
+ BIT_STRING_t bitstr;
+ struct ch {
+ ch_PR present;
+ union Choice__ch_u {
+ NULL_t null;
+ INTEGER_t Int;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+ } ch;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+ BOOLEAN_t bool;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Choice_t;
+
+/*** <<< FUNC-DECLS [Choice] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Choice;
+
+/*** <<< STAT-DEFS [Choice] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_ch_4[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_NULL,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "null"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_INTEGER,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "int"
+ },
+};
+static int asn_MAP_ch_cmap_4[] = { 1, 0 };
+static asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int at 20 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null at 18 */
+};
+static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
+ sizeof(struct ch),
+ offsetof(struct ch, _asn_ctx),
+ offsetof(struct ch, present),
+ sizeof(((struct ch *)0)->present),
+ asn_MAP_ch_tag2el_4,
+ 2, /* Count of tags in the map */
+ .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
+ .ext_start = -1 /* Extensions start */
+};
+static asn_per_constraints_t asn_PER_ch_constr_4 = {
+ { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_ch_4 = {
+ "ch",
+ "ch",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ CHOICE_decode_uper,
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ &asn_PER_ch_constr_4,
+ asn_MBR_ch_4,
+ 2, /* Elements count */
+ &asn_SPC_ch_specs_4 /* Additional specs */
+};
+
+static asn_per_constraints_t asn_PER_memb_ch_constr_4 = {
+ { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+static asn_TYPE_member_t asn_MBR_Choice_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_RELATIVE_OID,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "roid"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BIT_STRING,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "bitstr"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
+ .tag = -1 /* Ambiguous tag (CHOICE?) */,
+ .tag_mode = 0,
+ .type = &asn_DEF_ch_4,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = &asn_PER_memb_ch_constr_4,
+ .default_value = 0,
+ .name = "ch"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bool),
+ .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
+ .tag_mode = 0,
+ .type = &asn_DEF_BOOLEAN,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "bool"
+ },
+};
+static int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
+static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
+ { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 22 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int at 20 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr at 16 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null at 18 */
+ { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid at 15 */
+};
+static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
+ sizeof(struct Choice),
+ offsetof(struct Choice, _asn_ctx),
+ offsetof(struct Choice, present),
+ sizeof(((struct Choice *)0)->present),
+ asn_MAP_Choice_tag2el_1,
+ 5, /* Count of tags in the map */
+ .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
+ .ext_start = 3 /* Extensions start */
+};
+static asn_per_constraints_t asn_PER_Choice_constr_1 = {
+ { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Choice = {
+ "Choice",
+ "Choice",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ CHOICE_decode_uper,
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ &asn_PER_Choice_constr_1,
+ asn_MBR_Choice_1,
+ 4, /* Elements count */
+ &asn_SPC_Choice_specs_1 /* Additional specs */
+};
+
+
+/*** <<< INCLUDES [Choice2] >>> ***/
+
+#include <BIT_STRING.h>
+#include <RELATIVE-OID.h>
+#include <constr_CHOICE.h>
+
+/*** <<< DEPS [Choice2] >>> ***/
+
+typedef enum Choice2_PR {
+ Choice2_PR_NOTHING, /* No components present */
+ Choice2_PR_bitstr,
+ Choice2_PR_roid,
+} Choice2_PR;
+
+/*** <<< TYPE-DECLS [Choice2] >>> ***/
+
+typedef struct Choice2 {
+ Choice2_PR present;
+ union Choice2_u {
+ BIT_STRING_t bitstr;
+ RELATIVE_OID_t roid;
+ } choice;
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} Choice2_t;
+
+/*** <<< FUNC-DECLS [Choice2] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Choice2;
+
+/*** <<< STAT-DEFS [Choice2] >>> ***/
+
+static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_BIT_STRING,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "bitstr"
+ },
+ { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
+ .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+ .tag_mode = +1, /* EXPLICIT tag at current level */
+ .type = &asn_DEF_RELATIVE_OID,
+ .memb_constraints = 0, /* Defer constraints checking to the member type */
+ .per_constraints = 0, /* No PER visible constraints */
+ .default_value = 0,
+ .name = "roid"
+ },
+};
+static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
+ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr at 26 */
+ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid at 27 */
+};
+static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
+ sizeof(struct Choice2),
+ offsetof(struct Choice2, _asn_ctx),
+ offsetof(struct Choice2, present),
+ sizeof(((struct Choice2 *)0)->present),
+ asn_MAP_Choice2_tag2el_1,
+ 2, /* Count of tags in the map */
+ .canonical_order = 0,
+ .ext_start = -1 /* Extensions start */
+};
+static asn_per_constraints_t asn_PER_Choice2_constr_1 = {
+ { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
+ { APC_UNCONSTRAINED, -1, -1, 0, 0 }
+};
+asn_TYPE_descriptor_t asn_DEF_Choice2 = {
+ "Choice2",
+ "Choice2",
+ CHOICE_free,
+ CHOICE_print,
+ CHOICE_constraint,
+ CHOICE_decode_ber,
+ CHOICE_encode_der,
+ CHOICE_decode_xer,
+ CHOICE_encode_xer,
+ CHOICE_decode_uper,
+ CHOICE_outmost_tag,
+ 0, /* No effective tags (pointer) */
+ 0, /* No effective tags (count) */
+ 0, /* No tags (pointer) */
+ 0, /* No tags (count) */
+ &asn_PER_Choice2_constr_1,
+ asn_MBR_Choice2_1,
+ 2, /* Elements count */
+ &asn_SPC_Choice2_specs_1 /* Additional specs */
+};
+