blob: 5a30ea22130e305973c8aa54a980ec0db82cb7d8 [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>
Lev Walkin2a744a72013-03-27 01:56:23 -07008#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00009#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;
Lev Walkin2a744a72013-03-27 01:56:23 -070038 long Int;
Lev Walkin59b176e2005-11-26 11:25:14 +000039 } 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
Lev Walkin725883b2006-10-09 12:07:58 +000059/*** <<< CTDEFS [Choice] >>> ***/
60
Lev Walkin2fce55d2013-03-28 05:00:39 -070061static asn_per_constraints_t asn_PER_type_ch_constr_4 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +000062 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 0, 0 /* No PER value map */
65};
Lev Walkin2fce55d2013-03-28 05:00:39 -070066static asn_per_constraints_t asn_PER_type_Choice_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +000067 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
68 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
69 0, 0 /* No PER value map */
70};
71
Lev Walkin59b176e2005-11-26 11:25:14 +000072/*** <<< STAT-DEFS [Choice] >>> ***/
73
74static asn_TYPE_member_t asn_MBR_ch_4[] = {
75 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
76 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
77 .tag_mode = 0,
78 .type = &asn_DEF_NULL,
79 .memb_constraints = 0, /* Defer constraints checking to the member type */
80 .per_constraints = 0, /* No PER visible constraints */
81 .default_value = 0,
82 .name = "null"
83 },
84 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
85 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
86 .tag_mode = 0,
Lev Walkin2a744a72013-03-27 01:56:23 -070087 .type = &asn_DEF_NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +000088 .memb_constraints = 0, /* Defer constraints checking to the member type */
89 .per_constraints = 0, /* No PER visible constraints */
90 .default_value = 0,
91 .name = "int"
92 },
93};
Lev Walkina7591b52014-10-12 18:37:35 -070094static const int asn_MAP_ch_cmap_4[] = { 1, 0 };
95static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070096 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
97 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000098};
99static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
100 sizeof(struct ch),
101 offsetof(struct ch, _asn_ctx),
102 offsetof(struct ch, present),
103 sizeof(((struct ch *)0)->present),
104 asn_MAP_ch_tag2el_4,
105 2, /* Count of tags in the map */
106 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
107 .ext_start = -1 /* Extensions start */
108};
Lev Walkin59b176e2005-11-26 11:25:14 +0000109static /* Use -fall-defs-global to expose */
110asn_TYPE_descriptor_t asn_DEF_ch_4 = {
111 "ch",
112 "ch",
113 CHOICE_free,
114 CHOICE_print,
115 CHOICE_constraint,
116 CHOICE_decode_ber,
117 CHOICE_encode_der,
118 CHOICE_decode_xer,
119 CHOICE_encode_xer,
120 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000121 CHOICE_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700122 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000123 CHOICE_outmost_tag,
124 0, /* No effective tags (pointer) */
125 0, /* No effective tags (count) */
126 0, /* No tags (pointer) */
127 0, /* No tags (count) */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000128 &asn_PER_type_ch_constr_4,
Lev Walkin59b176e2005-11-26 11:25:14 +0000129 asn_MBR_ch_4,
130 2, /* Elements count */
131 &asn_SPC_ch_specs_4 /* Additional specs */
132};
133
Lev Walkin59b176e2005-11-26 11:25:14 +0000134static asn_TYPE_member_t asn_MBR_Choice_1[] = {
135 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
136 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
137 .tag_mode = 0,
138 .type = &asn_DEF_RELATIVE_OID,
139 .memb_constraints = 0, /* Defer constraints checking to the member type */
140 .per_constraints = 0, /* No PER visible constraints */
141 .default_value = 0,
142 .name = "roid"
143 },
144 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
145 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
146 .tag_mode = 0,
147 .type = &asn_DEF_BIT_STRING,
148 .memb_constraints = 0, /* Defer constraints checking to the member type */
149 .per_constraints = 0, /* No PER visible constraints */
150 .default_value = 0,
151 .name = "bitstr"
152 },
153 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
154 .tag = -1 /* Ambiguous tag (CHOICE?) */,
155 .tag_mode = 0,
156 .type = &asn_DEF_ch_4,
157 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkin07aaa342006-10-09 12:52:15 +0000158 .per_constraints = 0, /* No PER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000159 .default_value = 0,
160 .name = "ch"
161 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700162 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000163 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
164 .tag_mode = 0,
165 .type = &asn_DEF_BOOLEAN,
166 .memb_constraints = 0, /* Defer constraints checking to the member type */
167 .per_constraints = 0, /* No PER visible constraints */
168 .default_value = 0,
169 .name = "bool"
170 },
171};
Lev Walkina7591b52014-10-12 18:37:35 -0700172static const int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
173static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700174 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
175 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
176 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
177 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
178 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000179};
180static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
181 sizeof(struct Choice),
182 offsetof(struct Choice, _asn_ctx),
183 offsetof(struct Choice, present),
184 sizeof(((struct Choice *)0)->present),
185 asn_MAP_Choice_tag2el_1,
186 5, /* Count of tags in the map */
187 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
188 .ext_start = 3 /* Extensions start */
189};
Lev Walkin59b176e2005-11-26 11:25:14 +0000190asn_TYPE_descriptor_t asn_DEF_Choice = {
191 "Choice",
192 "Choice",
193 CHOICE_free,
194 CHOICE_print,
195 CHOICE_constraint,
196 CHOICE_decode_ber,
197 CHOICE_encode_der,
198 CHOICE_decode_xer,
199 CHOICE_encode_xer,
200 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000201 CHOICE_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700202 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000203 CHOICE_outmost_tag,
204 0, /* No effective tags (pointer) */
205 0, /* No effective tags (count) */
206 0, /* No tags (pointer) */
207 0, /* No tags (count) */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000208 &asn_PER_type_Choice_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000209 asn_MBR_Choice_1,
210 4, /* Elements count */
211 &asn_SPC_Choice_specs_1 /* Additional specs */
212};
213
214
215/*** <<< INCLUDES [Choice2] >>> ***/
216
217#include <BIT_STRING.h>
218#include <RELATIVE-OID.h>
219#include <constr_CHOICE.h>
220
221/*** <<< DEPS [Choice2] >>> ***/
222
223typedef enum Choice2_PR {
224 Choice2_PR_NOTHING, /* No components present */
225 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000226 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000227} Choice2_PR;
228
229/*** <<< TYPE-DECLS [Choice2] >>> ***/
230
231typedef struct Choice2 {
232 Choice2_PR present;
233 union Choice2_u {
234 BIT_STRING_t bitstr;
235 RELATIVE_OID_t roid;
236 } choice;
237
238 /* Context for parsing across buffer boundaries */
239 asn_struct_ctx_t _asn_ctx;
240} Choice2_t;
241
242/*** <<< FUNC-DECLS [Choice2] >>> ***/
243
244extern asn_TYPE_descriptor_t asn_DEF_Choice2;
245
Lev Walkin725883b2006-10-09 12:07:58 +0000246/*** <<< CTDEFS [Choice2] >>> ***/
247
Lev Walkin2fce55d2013-03-28 05:00:39 -0700248static asn_per_constraints_t asn_PER_type_Choice2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000249 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
250 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
251 0, 0 /* No PER value map */
252};
253
Lev Walkin59b176e2005-11-26 11:25:14 +0000254/*** <<< STAT-DEFS [Choice2] >>> ***/
255
256static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
257 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
258 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
259 .tag_mode = +1, /* EXPLICIT tag at current level */
260 .type = &asn_DEF_BIT_STRING,
261 .memb_constraints = 0, /* Defer constraints checking to the member type */
262 .per_constraints = 0, /* No PER visible constraints */
263 .default_value = 0,
264 .name = "bitstr"
265 },
266 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
267 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
268 .tag_mode = +1, /* EXPLICIT tag at current level */
269 .type = &asn_DEF_RELATIVE_OID,
270 .memb_constraints = 0, /* Defer constraints checking to the member type */
271 .per_constraints = 0, /* No PER visible constraints */
272 .default_value = 0,
273 .name = "roid"
274 },
275};
Lev Walkina7591b52014-10-12 18:37:35 -0700276static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700277 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
278 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000279};
280static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
281 sizeof(struct Choice2),
282 offsetof(struct Choice2, _asn_ctx),
283 offsetof(struct Choice2, present),
284 sizeof(((struct Choice2 *)0)->present),
285 asn_MAP_Choice2_tag2el_1,
286 2, /* Count of tags in the map */
287 .canonical_order = 0,
288 .ext_start = -1 /* Extensions start */
289};
Lev Walkin59b176e2005-11-26 11:25:14 +0000290asn_TYPE_descriptor_t asn_DEF_Choice2 = {
291 "Choice2",
292 "Choice2",
293 CHOICE_free,
294 CHOICE_print,
295 CHOICE_constraint,
296 CHOICE_decode_ber,
297 CHOICE_encode_der,
298 CHOICE_decode_xer,
299 CHOICE_encode_xer,
300 CHOICE_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000301 CHOICE_encode_uper,
Lev Walkinba68c912017-07-06 07:52:39 -0700302 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000303 CHOICE_outmost_tag,
304 0, /* No effective tags (pointer) */
305 0, /* No effective tags (count) */
306 0, /* No tags (pointer) */
307 0, /* No tags (count) */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000308 &asn_PER_type_Choice2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000309 asn_MBR_Choice2_1,
310 2, /* Elements count */
311 &asn_SPC_Choice2_specs_1 /* Additional specs */
312};
313