blob: 95af883bce58a6e4170d00c6116c01f4dd13f077 [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 */
67 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
68 .default_value = 0,
69 .name = "null"
70 },
71 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
72 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
73 .tag_mode = 0,
74 .type = &asn_DEF_INTEGER,
75 .memb_constraints = 0, /* Defer constraints checking to the member type */
76 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
77 .default_value = 0,
78 .name = "int"
79 },
80};
Lev Walkina7591b52014-10-12 18:37:35 -070081static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070082 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
83 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000084};
85static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
86 sizeof(struct ch),
87 offsetof(struct ch, _asn_ctx),
88 offsetof(struct ch, present),
89 sizeof(((struct ch *)0)->present),
90 asn_MAP_ch_tag2el_4,
91 2, /* Count of tags in the map */
92 .canonical_order = 0,
93 .ext_start = -1 /* Extensions start */
94};
95static /* Use -fall-defs-global to expose */
96asn_TYPE_descriptor_t asn_DEF_ch_4 = {
97 "ch",
98 "ch",
99 CHOICE_free,
100 CHOICE_print,
101 CHOICE_constraint,
102 CHOICE_decode_ber,
103 CHOICE_encode_der,
104 CHOICE_decode_xer,
105 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000106 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700107 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000108 CHOICE_outmost_tag,
109 0, /* No effective tags (pointer) */
110 0, /* No effective tags (count) */
111 0, /* No tags (pointer) */
112 0, /* No tags (count) */
113 0, /* No PER visible constraints */
114 asn_MBR_ch_4,
115 2, /* Elements count */
116 &asn_SPC_ch_specs_4 /* Additional specs */
117};
118
119static asn_TYPE_member_t asn_MBR_Choice_1[] = {
120 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
121 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
122 .tag_mode = 0,
123 .type = &asn_DEF_RELATIVE_OID,
124 .memb_constraints = 0, /* Defer constraints checking to the member type */
125 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
126 .default_value = 0,
127 .name = "roid"
128 },
129 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
130 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
131 .tag_mode = 0,
132 .type = &asn_DEF_BIT_STRING,
133 .memb_constraints = 0, /* Defer constraints checking to the member type */
134 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
135 .default_value = 0,
136 .name = "bitstr"
137 },
138 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
139 .tag = -1 /* Ambiguous tag (CHOICE?) */,
140 .tag_mode = 0,
141 .type = &asn_DEF_ch_4,
142 .memb_constraints = 0, /* Defer constraints checking to the member type */
143 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
144 .default_value = 0,
145 .name = "ch"
146 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700147 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000148 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
149 .tag_mode = 0,
150 .type = &asn_DEF_BOOLEAN,
151 .memb_constraints = 0, /* Defer constraints checking to the member type */
152 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
153 .default_value = 0,
154 .name = "bool"
155 },
156};
Lev Walkina7591b52014-10-12 18:37:35 -0700157static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700158 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
159 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
160 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
161 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
162 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000163};
164static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
165 sizeof(struct Choice),
166 offsetof(struct Choice, _asn_ctx),
167 offsetof(struct Choice, present),
168 sizeof(((struct Choice *)0)->present),
169 asn_MAP_Choice_tag2el_1,
170 5, /* Count of tags in the map */
171 .canonical_order = 0,
172 .ext_start = 3 /* Extensions start */
173};
174asn_TYPE_descriptor_t asn_DEF_Choice = {
175 "Choice",
176 "Choice",
177 CHOICE_free,
178 CHOICE_print,
179 CHOICE_constraint,
180 CHOICE_decode_ber,
181 CHOICE_encode_der,
182 CHOICE_decode_xer,
183 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000184 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700185 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000186 CHOICE_outmost_tag,
187 0, /* No effective tags (pointer) */
188 0, /* No effective tags (count) */
189 0, /* No tags (pointer) */
190 0, /* No tags (count) */
191 0, /* No PER visible constraints */
192 asn_MBR_Choice_1,
193 4, /* Elements count */
194 &asn_SPC_Choice_specs_1 /* Additional specs */
195};
196
197
198/*** <<< INCLUDES [Choice2] >>> ***/
199
200#include <BIT_STRING.h>
201#include <RELATIVE-OID.h>
202#include <constr_CHOICE.h>
203
204/*** <<< DEPS [Choice2] >>> ***/
205
206typedef enum Choice2_PR {
207 Choice2_PR_NOTHING, /* No components present */
208 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000209 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000210} Choice2_PR;
211
212/*** <<< TYPE-DECLS [Choice2] >>> ***/
213
214typedef struct Choice2 {
215 Choice2_PR present;
216 union Choice2_u {
217 BIT_STRING_t bitstr;
218 RELATIVE_OID_t roid;
219 } choice;
220
221 /* Context for parsing across buffer boundaries */
222 asn_struct_ctx_t _asn_ctx;
223} Choice2_t;
224
225/*** <<< FUNC-DECLS [Choice2] >>> ***/
226
227extern asn_TYPE_descriptor_t asn_DEF_Choice2;
228
229/*** <<< STAT-DEFS [Choice2] >>> ***/
230
231static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
232 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
233 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
234 .tag_mode = +1, /* EXPLICIT tag at current level */
235 .type = &asn_DEF_BIT_STRING,
236 .memb_constraints = 0, /* Defer constraints checking to the member type */
237 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
238 .default_value = 0,
239 .name = "bitstr"
240 },
241 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
242 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
243 .tag_mode = +1, /* EXPLICIT tag at current level */
244 .type = &asn_DEF_RELATIVE_OID,
245 .memb_constraints = 0, /* Defer constraints checking to the member type */
246 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
247 .default_value = 0,
248 .name = "roid"
249 },
250};
Lev Walkina7591b52014-10-12 18:37:35 -0700251static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700252 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
253 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000254};
255static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
256 sizeof(struct Choice2),
257 offsetof(struct Choice2, _asn_ctx),
258 offsetof(struct Choice2, present),
259 sizeof(((struct Choice2 *)0)->present),
260 asn_MAP_Choice2_tag2el_1,
261 2, /* Count of tags in the map */
262 .canonical_order = 0,
263 .ext_start = -1 /* Extensions start */
264};
265asn_TYPE_descriptor_t asn_DEF_Choice2 = {
266 "Choice2",
267 "Choice2",
268 CHOICE_free,
269 CHOICE_print,
270 CHOICE_constraint,
271 CHOICE_decode_ber,
272 CHOICE_encode_der,
273 CHOICE_decode_xer,
274 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000275 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinba68c912017-07-06 07:52:39 -0700276 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000277 CHOICE_outmost_tag,
278 0, /* No effective tags (pointer) */
279 0, /* No effective tags (count) */
280 0, /* No tags (pointer) */
281 0, /* No tags (count) */
282 0, /* No PER visible constraints */
283 asn_MBR_Choice2_1,
284 2, /* Elements count */
285 &asn_SPC_Choice2_specs_1 /* Additional specs */
286};
287