blob: 8813f3e5276a474b07fbc64f1b21f99404cb5bbb [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,
66 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040067 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000068 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
69 .default_value = 0,
70 .name = "null"
71 },
72 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
73 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
74 .tag_mode = 0,
75 .type = &asn_DEF_INTEGER,
76 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040077 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000078 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
79 .default_value = 0,
80 .name = "int"
81 },
82};
Lev Walkina7591b52014-10-12 18:37:35 -070083static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070084 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
85 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000086};
87static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
88 sizeof(struct ch),
89 offsetof(struct ch, _asn_ctx),
90 offsetof(struct ch, present),
91 sizeof(((struct ch *)0)->present),
92 asn_MAP_ch_tag2el_4,
93 2, /* Count of tags in the map */
94 .canonical_order = 0,
95 .ext_start = -1 /* Extensions start */
96};
97static /* Use -fall-defs-global to expose */
98asn_TYPE_descriptor_t asn_DEF_ch_4 = {
99 "ch",
100 "ch",
101 CHOICE_free,
102 CHOICE_print,
103 CHOICE_constraint,
104 CHOICE_decode_ber,
105 CHOICE_encode_der,
106 CHOICE_decode_xer,
107 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700108 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400109 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000110 CHOICE_outmost_tag,
111 0, /* No effective tags (pointer) */
112 0, /* No effective tags (count) */
113 0, /* No tags (pointer) */
114 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400115 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000116 0, /* No PER visible constraints */
117 asn_MBR_ch_4,
118 2, /* Elements count */
119 &asn_SPC_ch_specs_4 /* Additional specs */
120};
121
122static asn_TYPE_member_t asn_MBR_Choice_1[] = {
123 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
124 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
125 .tag_mode = 0,
126 .type = &asn_DEF_RELATIVE_OID,
127 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400128 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000129 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
130 .default_value = 0,
131 .name = "roid"
132 },
133 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
134 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
135 .tag_mode = 0,
136 .type = &asn_DEF_BIT_STRING,
137 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400138 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000139 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
140 .default_value = 0,
141 .name = "bitstr"
142 },
143 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
144 .tag = -1 /* Ambiguous tag (CHOICE?) */,
145 .tag_mode = 0,
146 .type = &asn_DEF_ch_4,
147 .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, /* PER is not compiled, use -gen-PER */
150 .default_value = 0,
151 .name = "ch"
152 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700153 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000154 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
155 .tag_mode = 0,
156 .type = &asn_DEF_BOOLEAN,
157 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400158 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000159 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
160 .default_value = 0,
161 .name = "bool"
162 },
163};
Lev Walkina7591b52014-10-12 18:37:35 -0700164static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700165 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
166 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
167 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
168 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
169 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000170};
171static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
172 sizeof(struct Choice),
173 offsetof(struct Choice, _asn_ctx),
174 offsetof(struct Choice, present),
175 sizeof(((struct Choice *)0)->present),
176 asn_MAP_Choice_tag2el_1,
177 5, /* Count of tags in the map */
178 .canonical_order = 0,
179 .ext_start = 3 /* Extensions start */
180};
181asn_TYPE_descriptor_t asn_DEF_Choice = {
182 "Choice",
183 "Choice",
184 CHOICE_free,
185 CHOICE_print,
186 CHOICE_constraint,
187 CHOICE_decode_ber,
188 CHOICE_encode_der,
189 CHOICE_decode_xer,
190 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700191 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400192 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000193 CHOICE_outmost_tag,
194 0, /* No effective tags (pointer) */
195 0, /* No effective tags (count) */
196 0, /* No tags (pointer) */
197 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400198 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000199 0, /* No PER visible constraints */
200 asn_MBR_Choice_1,
201 4, /* Elements count */
202 &asn_SPC_Choice_specs_1 /* Additional specs */
203};
204
205
206/*** <<< INCLUDES [Choice2] >>> ***/
207
208#include <BIT_STRING.h>
209#include <RELATIVE-OID.h>
210#include <constr_CHOICE.h>
211
212/*** <<< DEPS [Choice2] >>> ***/
213
214typedef enum Choice2_PR {
215 Choice2_PR_NOTHING, /* No components present */
216 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000217 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000218} Choice2_PR;
219
220/*** <<< TYPE-DECLS [Choice2] >>> ***/
221
222typedef struct Choice2 {
223 Choice2_PR present;
224 union Choice2_u {
225 BIT_STRING_t bitstr;
226 RELATIVE_OID_t roid;
227 } choice;
228
229 /* Context for parsing across buffer boundaries */
230 asn_struct_ctx_t _asn_ctx;
231} Choice2_t;
232
233/*** <<< FUNC-DECLS [Choice2] >>> ***/
234
235extern asn_TYPE_descriptor_t asn_DEF_Choice2;
236
237/*** <<< STAT-DEFS [Choice2] >>> ***/
238
239static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
240 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
241 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
242 .tag_mode = +1, /* EXPLICIT tag at current level */
243 .type = &asn_DEF_BIT_STRING,
244 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400245 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000246 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
247 .default_value = 0,
248 .name = "bitstr"
249 },
250 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
251 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
252 .tag_mode = +1, /* EXPLICIT tag at current level */
253 .type = &asn_DEF_RELATIVE_OID,
254 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400255 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000256 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
257 .default_value = 0,
258 .name = "roid"
259 },
260};
Lev Walkina7591b52014-10-12 18:37:35 -0700261static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700262 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
263 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000264};
265static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
266 sizeof(struct Choice2),
267 offsetof(struct Choice2, _asn_ctx),
268 offsetof(struct Choice2, present),
269 sizeof(((struct Choice2 *)0)->present),
270 asn_MAP_Choice2_tag2el_1,
271 2, /* Count of tags in the map */
272 .canonical_order = 0,
273 .ext_start = -1 /* Extensions start */
274};
275asn_TYPE_descriptor_t asn_DEF_Choice2 = {
276 "Choice2",
277 "Choice2",
278 CHOICE_free,
279 CHOICE_print,
280 CHOICE_constraint,
281 CHOICE_decode_ber,
282 CHOICE_encode_der,
283 CHOICE_decode_xer,
284 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700285 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400286 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000287 CHOICE_outmost_tag,
288 0, /* No effective tags (pointer) */
289 0, /* No effective tags (count) */
290 0, /* No tags (pointer) */
291 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400292 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000293 0, /* No PER visible constraints */
294 asn_MBR_Choice2_1,
295 2, /* Elements count */
296 &asn_SPC_Choice2_specs_1 /* Additional specs */
297};
298