blob: e3d73f2935a4a29ea8b4e73acd75e94eba9ddca7 [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,
Lev Walkin67a30122017-08-10 05:48:54 -070079 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000080 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040081 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000082 .per_constraints = 0, /* No PER visible constraints */
83 .default_value = 0,
84 .name = "null"
85 },
86 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
87 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
88 .tag_mode = 0,
Lev Walkin2a744a72013-03-27 01:56:23 -070089 .type = &asn_DEF_NativeInteger,
Lev Walkin67a30122017-08-10 05:48:54 -070090 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000091 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040092 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000093 .per_constraints = 0, /* No PER visible constraints */
94 .default_value = 0,
95 .name = "int"
96 },
97};
Lev Walkin18660d22017-08-12 20:45:23 -070098static const unsigned asn_MAP_ch_cmap_4[] = { 1, 0 };
Lev Walkina7591b52014-10-12 18:37:35 -070099static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700100 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
101 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +0000102};
103static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
104 sizeof(struct ch),
105 offsetof(struct ch, _asn_ctx),
106 offsetof(struct ch, present),
107 sizeof(((struct ch *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700108 .tag2el = asn_MAP_ch_tag2el_4,
109 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000110 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
111 .ext_start = -1 /* Extensions start */
112};
Lev Walkin59b176e2005-11-26 11:25:14 +0000113static /* Use -fall-defs-global to expose */
114asn_TYPE_descriptor_t asn_DEF_ch_4 = {
115 "ch",
116 "ch",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800117 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000119 0, /* No effective tags (pointer) */
120 0, /* No effective tags (count) */
121 0, /* No tags (pointer) */
122 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400123 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000124 &asn_PER_type_ch_constr_4,
Lev Walkin59b176e2005-11-26 11:25:14 +0000125 asn_MBR_ch_4,
126 2, /* Elements count */
127 &asn_SPC_ch_specs_4 /* Additional specs */
128};
129
Lev Walkin59b176e2005-11-26 11:25:14 +0000130static asn_TYPE_member_t asn_MBR_Choice_1[] = {
131 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
132 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
133 .tag_mode = 0,
134 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700135 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +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 Walkin59b176e2005-11-26 11:25:14 +0000138 .per_constraints = 0, /* No PER visible constraints */
139 .default_value = 0,
140 .name = "roid"
141 },
142 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
143 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
144 .tag_mode = 0,
145 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700146 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000147 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400148 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000149 .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,
Lev Walkin67a30122017-08-10 05:48:54 -0700157 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000158 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400159 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin07aaa342006-10-09 12:52:15 +0000160 .per_constraints = 0, /* No PER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000161 .default_value = 0,
162 .name = "ch"
163 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700164 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000165 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
166 .tag_mode = 0,
167 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700168 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000169 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400170 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000171 .per_constraints = 0, /* No PER visible constraints */
172 .default_value = 0,
173 .name = "bool"
174 },
175};
Lev Walkin18660d22017-08-12 20:45:23 -0700176static const unsigned asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
Lev Walkina7591b52014-10-12 18:37:35 -0700177static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700178 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
179 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
180 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
181 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
182 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000183};
184static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
185 sizeof(struct Choice),
186 offsetof(struct Choice, _asn_ctx),
187 offsetof(struct Choice, present),
188 sizeof(((struct Choice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700189 .tag2el = asn_MAP_Choice_tag2el_1,
190 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000191 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
192 .ext_start = 3 /* Extensions start */
193};
Lev Walkin59b176e2005-11-26 11:25:14 +0000194asn_TYPE_descriptor_t asn_DEF_Choice = {
195 "Choice",
196 "Choice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800197 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000198 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000199 0, /* No effective tags (pointer) */
200 0, /* No effective tags (count) */
201 0, /* No tags (pointer) */
202 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400203 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000204 &asn_PER_type_Choice_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000205 asn_MBR_Choice_1,
206 4, /* Elements count */
207 &asn_SPC_Choice_specs_1 /* Additional specs */
208};
209
210
211/*** <<< INCLUDES [Choice2] >>> ***/
212
213#include <BIT_STRING.h>
214#include <RELATIVE-OID.h>
215#include <constr_CHOICE.h>
216
217/*** <<< DEPS [Choice2] >>> ***/
218
219typedef enum Choice2_PR {
220 Choice2_PR_NOTHING, /* No components present */
221 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000222 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000223} Choice2_PR;
224
225/*** <<< TYPE-DECLS [Choice2] >>> ***/
226
227typedef struct Choice2 {
228 Choice2_PR present;
229 union Choice2_u {
230 BIT_STRING_t bitstr;
231 RELATIVE_OID_t roid;
232 } choice;
233
234 /* Context for parsing across buffer boundaries */
235 asn_struct_ctx_t _asn_ctx;
236} Choice2_t;
237
238/*** <<< FUNC-DECLS [Choice2] >>> ***/
239
240extern asn_TYPE_descriptor_t asn_DEF_Choice2;
241
Lev Walkin725883b2006-10-09 12:07:58 +0000242/*** <<< CTDEFS [Choice2] >>> ***/
243
Lev Walkin2fce55d2013-03-28 05:00:39 -0700244static asn_per_constraints_t asn_PER_type_Choice2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000245 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
246 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
247 0, 0 /* No PER value map */
248};
249
Lev Walkin59b176e2005-11-26 11:25:14 +0000250/*** <<< STAT-DEFS [Choice2] >>> ***/
251
252static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
253 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
254 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
255 .tag_mode = +1, /* EXPLICIT tag at current level */
256 .type = &asn_DEF_BIT_STRING,
Lev Walkin67a30122017-08-10 05:48:54 -0700257 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000258 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400259 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000260 .per_constraints = 0, /* No PER visible constraints */
261 .default_value = 0,
262 .name = "bitstr"
263 },
264 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
265 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
266 .tag_mode = +1, /* EXPLICIT tag at current level */
267 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700268 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000269 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400270 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000271 .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),
Lev Walkine3917082017-08-23 10:29:38 -0700285 .tag2el = asn_MAP_Choice2_tag2el_1,
286 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000287 .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",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800293 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000294 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000295 0, /* No effective tags (pointer) */
296 0, /* No effective tags (count) */
297 0, /* No tags (pointer) */
298 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400299 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000300 &asn_PER_type_Choice2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000301 asn_MBR_Choice2_1,
302 2, /* Elements count */
303 &asn_SPC_Choice2_specs_1 /* Additional specs */
304};
305