blob: 44e2aea0f53d423584bcbb8ce8bf1473eea29508 [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [Choice] >>> ***/
3
4#include <RELATIVE-OID.h>
5#include <BIT_STRING.h>
6#include <BOOLEAN.h>
7#include <NULL.h>
8#include <INTEGER.h>
9#include <constr_CHOICE.h>
10
11/*** <<< DEPS [Choice] >>> ***/
12
13typedef enum Choice_PR {
14 Choice_PR_NOTHING, /* No components present */
15 Choice_PR_roid,
16 Choice_PR_bitstr,
17 Choice_PR_ch,
18 /* Extensions may appear below */
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000019 Choice_PR_bool
Lev Walkin59b176e2005-11-26 11:25:14 +000020} Choice_PR;
21typedef enum ch_PR {
22 ch_PR_NOTHING, /* No components present */
23 ch_PR_null,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000024 ch_PR_int
Lev Walkin59b176e2005-11-26 11:25:14 +000025} ch_PR;
26
27/*** <<< TYPE-DECLS [Choice] >>> ***/
28
29typedef struct Choice {
30 Choice_PR present;
31 union Choice_u {
32 RELATIVE_OID_t roid;
33 BIT_STRING_t bitstr;
34 struct ch {
35 ch_PR present;
36 union Choice__ch_u {
37 NULL_t null;
38 INTEGER_t Int;
39 } choice;
40
41 /* Context for parsing across buffer boundaries */
42 asn_struct_ctx_t _asn_ctx;
43 } ch;
44 /*
45 * This type is extensible,
46 * possible extensions are below.
47 */
Lev Walkin2a744a72013-03-27 01:56:23 -070048 BOOLEAN_t Bool;
Lev Walkin59b176e2005-11-26 11:25:14 +000049 } choice;
50
51 /* Context for parsing across buffer boundaries */
52 asn_struct_ctx_t _asn_ctx;
53} Choice_t;
54
55/*** <<< FUNC-DECLS [Choice] >>> ***/
56
57extern asn_TYPE_descriptor_t asn_DEF_Choice;
58
59/*** <<< STAT-DEFS [Choice] >>> ***/
60
61static asn_TYPE_member_t asn_MBR_ch_4[] = {
62 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
63 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
64 .tag_mode = 0,
65 .type = &asn_DEF_NULL,
Lev Walkin67a30122017-08-10 05:48:54 -070066 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000067 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040068 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000069 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
70 .default_value = 0,
71 .name = "null"
72 },
73 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
74 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
75 .tag_mode = 0,
76 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070077 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000078 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040079 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000080 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
81 .default_value = 0,
82 .name = "int"
83 },
84};
Lev Walkina7591b52014-10-12 18:37:35 -070085static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070086 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
87 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000088};
89static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
90 sizeof(struct ch),
91 offsetof(struct ch, _asn_ctx),
92 offsetof(struct ch, present),
93 sizeof(((struct ch *)0)->present),
94 asn_MAP_ch_tag2el_4,
95 2, /* Count of tags in the map */
96 .canonical_order = 0,
97 .ext_start = -1 /* Extensions start */
98};
99static /* Use -fall-defs-global to expose */
100asn_TYPE_descriptor_t asn_DEF_ch_4 = {
101 "ch",
102 "ch",
103 CHOICE_free,
104 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700105 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000106 CHOICE_constraint,
107 CHOICE_decode_ber,
108 CHOICE_encode_der,
109 CHOICE_decode_xer,
110 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700111 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400112 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000113 CHOICE_outmost_tag,
114 0, /* No effective tags (pointer) */
115 0, /* No effective tags (count) */
116 0, /* No tags (pointer) */
117 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400118 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000119 0, /* No PER visible constraints */
120 asn_MBR_ch_4,
121 2, /* Elements count */
122 &asn_SPC_ch_specs_4 /* Additional specs */
123};
124
125static asn_TYPE_member_t asn_MBR_Choice_1[] = {
126 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
127 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
128 .tag_mode = 0,
129 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700130 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000131 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400132 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000133 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
134 .default_value = 0,
135 .name = "roid"
136 },
137 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
138 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
139 .tag_mode = 0,
140 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700141 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000142 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400143 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000144 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
145 .default_value = 0,
146 .name = "bitstr"
147 },
148 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
149 .tag = -1 /* Ambiguous tag (CHOICE?) */,
150 .tag_mode = 0,
151 .type = &asn_DEF_ch_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700152 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000153 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400154 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000155 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
156 .default_value = 0,
157 .name = "ch"
158 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700159 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000160 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
161 .tag_mode = 0,
162 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700163 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000164 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400165 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000166 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
167 .default_value = 0,
168 .name = "bool"
169 },
170};
Lev Walkina7591b52014-10-12 18:37:35 -0700171static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700172 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
173 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
174 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
175 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
176 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000177};
178static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
179 sizeof(struct Choice),
180 offsetof(struct Choice, _asn_ctx),
181 offsetof(struct Choice, present),
182 sizeof(((struct Choice *)0)->present),
183 asn_MAP_Choice_tag2el_1,
184 5, /* Count of tags in the map */
185 .canonical_order = 0,
186 .ext_start = 3 /* Extensions start */
187};
188asn_TYPE_descriptor_t asn_DEF_Choice = {
189 "Choice",
190 "Choice",
191 CHOICE_free,
192 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700193 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000194 CHOICE_constraint,
195 CHOICE_decode_ber,
196 CHOICE_encode_der,
197 CHOICE_decode_xer,
198 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700199 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400200 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000201 CHOICE_outmost_tag,
202 0, /* No effective tags (pointer) */
203 0, /* No effective tags (count) */
204 0, /* No tags (pointer) */
205 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400206 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000207 0, /* No PER visible constraints */
208 asn_MBR_Choice_1,
209 4, /* Elements count */
210 &asn_SPC_Choice_specs_1 /* Additional specs */
211};
212
213
214/*** <<< INCLUDES [Choice2] >>> ***/
215
216#include <BIT_STRING.h>
217#include <RELATIVE-OID.h>
218#include <constr_CHOICE.h>
219
220/*** <<< DEPS [Choice2] >>> ***/
221
222typedef enum Choice2_PR {
223 Choice2_PR_NOTHING, /* No components present */
224 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000225 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000226} Choice2_PR;
227
228/*** <<< TYPE-DECLS [Choice2] >>> ***/
229
230typedef struct Choice2 {
231 Choice2_PR present;
232 union Choice2_u {
233 BIT_STRING_t bitstr;
234 RELATIVE_OID_t roid;
235 } choice;
236
237 /* Context for parsing across buffer boundaries */
238 asn_struct_ctx_t _asn_ctx;
239} Choice2_t;
240
241/*** <<< FUNC-DECLS [Choice2] >>> ***/
242
243extern asn_TYPE_descriptor_t asn_DEF_Choice2;
244
245/*** <<< STAT-DEFS [Choice2] >>> ***/
246
247static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
248 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
249 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
250 .tag_mode = +1, /* EXPLICIT tag at current level */
251 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700252 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000253 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400254 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000255 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
256 .default_value = 0,
257 .name = "bitstr"
258 },
259 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
260 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
261 .tag_mode = +1, /* EXPLICIT tag at current level */
262 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700263 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000264 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400265 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000266 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
267 .default_value = 0,
268 .name = "roid"
269 },
270};
Lev Walkina7591b52014-10-12 18:37:35 -0700271static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700272 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
273 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000274};
275static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
276 sizeof(struct Choice2),
277 offsetof(struct Choice2, _asn_ctx),
278 offsetof(struct Choice2, present),
279 sizeof(((struct Choice2 *)0)->present),
280 asn_MAP_Choice2_tag2el_1,
281 2, /* Count of tags in the map */
282 .canonical_order = 0,
283 .ext_start = -1 /* Extensions start */
284};
285asn_TYPE_descriptor_t asn_DEF_Choice2 = {
286 "Choice2",
287 "Choice2",
288 CHOICE_free,
289 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700290 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000291 CHOICE_constraint,
292 CHOICE_decode_ber,
293 CHOICE_encode_der,
294 CHOICE_decode_xer,
295 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700296 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400297 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000298 CHOICE_outmost_tag,
299 0, /* No effective tags (pointer) */
300 0, /* No effective tags (count) */
301 0, /* No tags (pointer) */
302 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400303 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000304 0, /* No PER visible constraints */
305 asn_MBR_Choice2_1,
306 2, /* Elements count */
307 &asn_SPC_Choice2_specs_1 /* Additional specs */
308};
309