blob: 8cb1295df3fb9ebf9fb51bafec0416364b8957aa [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,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700103 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000104 CHOICE_constraint,
105 CHOICE_decode_ber,
106 CHOICE_encode_der,
107 CHOICE_decode_xer,
108 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700109 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400110 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000111 CHOICE_outmost_tag,
112 0, /* No effective tags (pointer) */
113 0, /* No effective tags (count) */
114 0, /* No tags (pointer) */
115 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400116 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000117 0, /* No PER visible constraints */
118 asn_MBR_ch_4,
119 2, /* Elements count */
120 &asn_SPC_ch_specs_4 /* Additional specs */
121};
122
123static asn_TYPE_member_t asn_MBR_Choice_1[] = {
124 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
125 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
126 .tag_mode = 0,
127 .type = &asn_DEF_RELATIVE_OID,
128 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400129 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000130 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
131 .default_value = 0,
132 .name = "roid"
133 },
134 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
135 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
136 .tag_mode = 0,
137 .type = &asn_DEF_BIT_STRING,
138 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400139 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000140 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
141 .default_value = 0,
142 .name = "bitstr"
143 },
144 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
145 .tag = -1 /* Ambiguous tag (CHOICE?) */,
146 .tag_mode = 0,
147 .type = &asn_DEF_ch_4,
148 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400149 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000150 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
151 .default_value = 0,
152 .name = "ch"
153 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700154 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000155 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
156 .tag_mode = 0,
157 .type = &asn_DEF_BOOLEAN,
158 .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 Walkin59b176e2005-11-26 11:25:14 +0000160 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
161 .default_value = 0,
162 .name = "bool"
163 },
164};
Lev Walkina7591b52014-10-12 18:37:35 -0700165static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700166 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
167 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
168 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
169 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
170 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000171};
172static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
173 sizeof(struct Choice),
174 offsetof(struct Choice, _asn_ctx),
175 offsetof(struct Choice, present),
176 sizeof(((struct Choice *)0)->present),
177 asn_MAP_Choice_tag2el_1,
178 5, /* Count of tags in the map */
179 .canonical_order = 0,
180 .ext_start = 3 /* Extensions start */
181};
182asn_TYPE_descriptor_t asn_DEF_Choice = {
183 "Choice",
184 "Choice",
185 CHOICE_free,
186 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700187 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000188 CHOICE_constraint,
189 CHOICE_decode_ber,
190 CHOICE_encode_der,
191 CHOICE_decode_xer,
192 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700193 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400194 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000195 CHOICE_outmost_tag,
196 0, /* No effective tags (pointer) */
197 0, /* No effective tags (count) */
198 0, /* No tags (pointer) */
199 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400200 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000201 0, /* No PER visible constraints */
202 asn_MBR_Choice_1,
203 4, /* Elements count */
204 &asn_SPC_Choice_specs_1 /* Additional specs */
205};
206
207
208/*** <<< INCLUDES [Choice2] >>> ***/
209
210#include <BIT_STRING.h>
211#include <RELATIVE-OID.h>
212#include <constr_CHOICE.h>
213
214/*** <<< DEPS [Choice2] >>> ***/
215
216typedef enum Choice2_PR {
217 Choice2_PR_NOTHING, /* No components present */
218 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000219 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000220} Choice2_PR;
221
222/*** <<< TYPE-DECLS [Choice2] >>> ***/
223
224typedef struct Choice2 {
225 Choice2_PR present;
226 union Choice2_u {
227 BIT_STRING_t bitstr;
228 RELATIVE_OID_t roid;
229 } choice;
230
231 /* Context for parsing across buffer boundaries */
232 asn_struct_ctx_t _asn_ctx;
233} Choice2_t;
234
235/*** <<< FUNC-DECLS [Choice2] >>> ***/
236
237extern asn_TYPE_descriptor_t asn_DEF_Choice2;
238
239/*** <<< STAT-DEFS [Choice2] >>> ***/
240
241static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
242 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
243 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
244 .tag_mode = +1, /* EXPLICIT tag at current level */
245 .type = &asn_DEF_BIT_STRING,
246 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400247 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000248 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
249 .default_value = 0,
250 .name = "bitstr"
251 },
252 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
253 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
254 .tag_mode = +1, /* EXPLICIT tag at current level */
255 .type = &asn_DEF_RELATIVE_OID,
256 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400257 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000258 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
259 .default_value = 0,
260 .name = "roid"
261 },
262};
Lev Walkina7591b52014-10-12 18:37:35 -0700263static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700264 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
265 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000266};
267static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
268 sizeof(struct Choice2),
269 offsetof(struct Choice2, _asn_ctx),
270 offsetof(struct Choice2, present),
271 sizeof(((struct Choice2 *)0)->present),
272 asn_MAP_Choice2_tag2el_1,
273 2, /* Count of tags in the map */
274 .canonical_order = 0,
275 .ext_start = -1 /* Extensions start */
276};
277asn_TYPE_descriptor_t asn_DEF_Choice2 = {
278 "Choice2",
279 "Choice2",
280 CHOICE_free,
281 CHOICE_print,
Lev Walkincd2f48e2017-08-10 02:14:59 -0700282 CHOICE_compare,
Lev Walkin59b176e2005-11-26 11:25:14 +0000283 CHOICE_constraint,
284 CHOICE_decode_ber,
285 CHOICE_encode_der,
286 CHOICE_decode_xer,
287 CHOICE_encode_xer,
Lev Walkinba68c912017-07-06 07:52:39 -0700288 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkinb33425f2017-07-14 14:59:52 +0400289 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000290 CHOICE_outmost_tag,
291 0, /* No effective tags (pointer) */
292 0, /* No effective tags (count) */
293 0, /* No tags (pointer) */
294 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400295 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000296 0, /* No PER visible constraints */
297 asn_MBR_Choice2_1,
298 2, /* Elements count */
299 &asn_SPC_Choice2_specs_1 /* Additional specs */
300};
301