blob: cefd97664e121c90bb9fe133d8c53de4b2c7e2c1 [file] [log] [blame]
Lev Walkin9ab21b82006-10-19 02:46:01 +00001
2/*** <<< INCLUDES [T1] >>> ***/
3
4#include <INTEGER.h>
5#include <UTF8String.h>
6#include <IA5String.h>
7#include <constr_CHOICE.h>
8#include <constr_SEQUENCE.h>
9
10/*** <<< DEPS [T1] >>> ***/
11
12typedef enum b_PR {
13 b_PR_NOTHING, /* No components present */
14 b_PR_i,
15 b_PR_n
16} b_PR;
17
18/*** <<< TYPE-DECLS [T1] >>> ***/
19
20typedef struct T1 {
21 INTEGER_t a;
22 struct b {
23 b_PR present;
24 union T1__b_u {
25 INTEGER_t i;
26 IA5String_t n;
27 } choice;
28
29 /* Context for parsing across buffer boundaries */
30 asn_struct_ctx_t _asn_ctx;
31 } b;
32 UTF8String_t c;
33
34 /* Context for parsing across buffer boundaries */
35 asn_struct_ctx_t _asn_ctx;
36} T1_t;
37
38/*** <<< FUNC-DECLS [T1] >>> ***/
39
40extern asn_TYPE_descriptor_t asn_DEF_T1;
41
42/*** <<< STAT-DEFS [T1] >>> ***/
43
44static asn_TYPE_member_t asn_MBR_b_3[] = {
45 { ATF_NOFLAGS, 0, offsetof(struct b, choice.i),
46 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
47 .tag_mode = -1, /* IMPLICIT tag at current level */
48 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070049 .type_selector = 0,
Lev Walkin9ab21b82006-10-19 02:46:01 +000050 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040051 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin9ab21b82006-10-19 02:46:01 +000052 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
53 .default_value = 0,
54 .name = "i"
55 },
56 { ATF_NOFLAGS, 0, offsetof(struct b, choice.n),
57 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
58 .tag_mode = -1, /* IMPLICIT tag at current level */
59 .type = &asn_DEF_IA5String,
Lev Walkin67a30122017-08-10 05:48:54 -070060 .type_selector = 0,
Lev Walkin9ab21b82006-10-19 02:46:01 +000061 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040062 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin9ab21b82006-10-19 02:46:01 +000063 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
64 .default_value = 0,
65 .name = "n"
66 },
67};
Lev Walkina7591b52014-10-12 18:37:35 -070068static const asn_TYPE_tag2member_t asn_MAP_b_tag2el_3[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070069 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* i */
70 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* n */
Lev Walkin9ab21b82006-10-19 02:46:01 +000071};
72static asn_CHOICE_specifics_t asn_SPC_b_specs_3 = {
73 sizeof(struct b),
74 offsetof(struct b, _asn_ctx),
75 offsetof(struct b, present),
76 sizeof(((struct b *)0)->present),
77 asn_MAP_b_tag2el_3,
78 2, /* Count of tags in the map */
79 .canonical_order = 0,
80 .ext_start = -1 /* Extensions start */
81};
82static /* Use -fall-defs-global to expose */
83asn_TYPE_descriptor_t asn_DEF_b_3 = {
84 "b",
85 "b",
86 CHOICE_free,
87 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -070088 CHOICE_compare,
Lev Walkin9ab21b82006-10-19 02:46:01 +000089 CHOICE_constraint,
90 CHOICE_decode_ber,
91 CHOICE_encode_der,
92 CHOICE_decode_xer,
93 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -070094 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +040095 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin9ab21b82006-10-19 02:46:01 +000096 CHOICE_outmost_tag,
97 0, /* No effective tags (pointer) */
98 0, /* No effective tags (count) */
99 0, /* No tags (pointer) */
100 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400101 0, /* No OER visible constraints */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000102 0, /* No PER visible constraints */
103 asn_MBR_b_3,
104 2, /* Elements count */
105 &asn_SPC_b_specs_3 /* Additional specs */
106};
107
108static asn_TYPE_member_t asn_MBR_T1_1[] = {
109 { ATF_NOFLAGS, 0, offsetof(struct T1, a),
110 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
111 .tag_mode = -1, /* IMPLICIT tag at current level */
112 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -0700113 .type_selector = 0,
Lev Walkin9ab21b82006-10-19 02:46:01 +0000114 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400115 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000116 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
117 .default_value = 0,
118 .name = "a"
119 },
120 { ATF_NOFLAGS, 0, offsetof(struct T1, b),
121 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
122 .tag_mode = +1, /* EXPLICIT tag at current level */
123 .type = &asn_DEF_b_3,
Lev Walkin67a30122017-08-10 05:48:54 -0700124 .type_selector = 0,
Lev Walkin9ab21b82006-10-19 02:46:01 +0000125 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400126 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000127 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
128 .default_value = 0,
129 .name = "b"
130 },
131 { ATF_NOFLAGS, 0, offsetof(struct T1, c),
132 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
133 .tag_mode = -1, /* IMPLICIT tag at current level */
134 .type = &asn_DEF_UTF8String,
Lev Walkin67a30122017-08-10 05:48:54 -0700135 .type_selector = 0,
Lev Walkin9ab21b82006-10-19 02:46:01 +0000136 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400137 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000138 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
139 .default_value = 0,
140 .name = "c"
141 },
142};
Lev Walkina7591b52014-10-12 18:37:35 -0700143static const ber_tlv_tag_t asn_DEF_T1_tags_1[] = {
Lev Walkin9ab21b82006-10-19 02:46:01 +0000144 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
145};
Lev Walkina7591b52014-10-12 18:37:35 -0700146static const asn_TYPE_tag2member_t asn_MAP_T1_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700147 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* a */
148 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* b */
149 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* c */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000150};
151static asn_SEQUENCE_specifics_t asn_SPC_T1_specs_1 = {
152 sizeof(struct T1),
153 offsetof(struct T1, _asn_ctx),
154 asn_MAP_T1_tag2el_1,
155 3, /* Count of tags in the map */
156 0, 0, 0, /* Optional elements (not needed) */
157 -1, /* Start extensions */
158 -1 /* Stop extensions */
159};
160asn_TYPE_descriptor_t asn_DEF_T1 = {
161 "T1",
162 "T1",
163 SEQUENCE_free,
164 SEQUENCE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700165 SEQUENCE_compare,
Lev Walkin9ab21b82006-10-19 02:46:01 +0000166 SEQUENCE_constraint,
167 SEQUENCE_decode_ber,
168 SEQUENCE_encode_der,
169 SEQUENCE_decode_xer,
170 SEQUENCE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700171 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400172 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000173 0, /* Use generic outmost tag fetcher */
174 asn_DEF_T1_tags_1,
175 sizeof(asn_DEF_T1_tags_1)
176 /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
177 asn_DEF_T1_tags_1, /* Same as above */
178 sizeof(asn_DEF_T1_tags_1)
179 /sizeof(asn_DEF_T1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400180 0, /* No OER visible constraints */
Lev Walkin9ab21b82006-10-19 02:46:01 +0000181 0, /* No PER visible constraints */
182 asn_MBR_T1_1,
183 3, /* Elements count */
184 &asn_SPC_T1_specs_1 /* Additional specs */
185};
186