blob: 68e9ad9317393e091250fa919b92e4b3e0acb425 [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 */
19 Choice_PR_bool,
20} Choice_PR;
21typedef enum ch_PR {
22 ch_PR_NOTHING, /* No components present */
23 ch_PR_null,
24 ch_PR_int,
25} 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 */
48 BOOLEAN_t bool;
49 } 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, /* No PER visible constraints */
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, /* No PER visible constraints */
77 .default_value = 0,
78 .name = "int"
79 },
80};
81static int asn_MAP_ch_cmap_4[] = { 1, 0 };
82static asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
83 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int at 20 */
84 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null at 18 */
85};
86static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
87 sizeof(struct ch),
88 offsetof(struct ch, _asn_ctx),
89 offsetof(struct ch, present),
90 sizeof(((struct ch *)0)->present),
91 asn_MAP_ch_tag2el_4,
92 2, /* Count of tags in the map */
93 .canonical_order = asn_MAP_ch_cmap_4, /* Canonically sorted */
94 .ext_start = -1 /* Extensions start */
95};
96static asn_per_constraints_t asn_PER_ch_constr_4 = {
97 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
98 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
99};
100static /* Use -fall-defs-global to expose */
101asn_TYPE_descriptor_t asn_DEF_ch_4 = {
102 "ch",
103 "ch",
104 CHOICE_free,
105 CHOICE_print,
106 CHOICE_constraint,
107 CHOICE_decode_ber,
108 CHOICE_encode_der,
109 CHOICE_decode_xer,
110 CHOICE_encode_xer,
111 CHOICE_decode_uper,
112 CHOICE_outmost_tag,
113 0, /* No effective tags (pointer) */
114 0, /* No effective tags (count) */
115 0, /* No tags (pointer) */
116 0, /* No tags (count) */
117 &asn_PER_ch_constr_4,
118 asn_MBR_ch_4,
119 2, /* Elements count */
120 &asn_SPC_ch_specs_4 /* Additional specs */
121};
122
123static asn_per_constraints_t asn_PER_memb_ch_constr_4 = {
124 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
125 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
126};
127static asn_TYPE_member_t asn_MBR_Choice_1[] = {
128 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
129 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
130 .tag_mode = 0,
131 .type = &asn_DEF_RELATIVE_OID,
132 .memb_constraints = 0, /* Defer constraints checking to the member type */
133 .per_constraints = 0, /* No PER visible constraints */
134 .default_value = 0,
135 .name = "roid"
136 },
137 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
138 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
139 .tag_mode = 0,
140 .type = &asn_DEF_BIT_STRING,
141 .memb_constraints = 0, /* Defer constraints checking to the member type */
142 .per_constraints = 0, /* No PER visible constraints */
143 .default_value = 0,
144 .name = "bitstr"
145 },
146 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
147 .tag = -1 /* Ambiguous tag (CHOICE?) */,
148 .tag_mode = 0,
149 .type = &asn_DEF_ch_4,
150 .memb_constraints = 0, /* Defer constraints checking to the member type */
151 .per_constraints = &asn_PER_memb_ch_constr_4,
152 .default_value = 0,
153 .name = "ch"
154 },
155 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bool),
156 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
157 .tag_mode = 0,
158 .type = &asn_DEF_BOOLEAN,
159 .memb_constraints = 0, /* Defer constraints checking to the member type */
160 .per_constraints = 0, /* No PER visible constraints */
161 .default_value = 0,
162 .name = "bool"
163 },
164};
165static int asn_MAP_Choice_cmap_1[] = { 2, 1, 0, 3 };
166static asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
167 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 22 */
168 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int at 20 */
169 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr at 16 */
170 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null at 18 */
171 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid at 15 */
172};
173static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
174 sizeof(struct Choice),
175 offsetof(struct Choice, _asn_ctx),
176 offsetof(struct Choice, present),
177 sizeof(((struct Choice *)0)->present),
178 asn_MAP_Choice_tag2el_1,
179 5, /* Count of tags in the map */
180 .canonical_order = asn_MAP_Choice_cmap_1, /* Canonically sorted */
181 .ext_start = 3 /* Extensions start */
182};
183static asn_per_constraints_t asn_PER_Choice_constr_1 = {
184 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
185 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
186};
187asn_TYPE_descriptor_t asn_DEF_Choice = {
188 "Choice",
189 "Choice",
190 CHOICE_free,
191 CHOICE_print,
192 CHOICE_constraint,
193 CHOICE_decode_ber,
194 CHOICE_encode_der,
195 CHOICE_decode_xer,
196 CHOICE_encode_xer,
197 CHOICE_decode_uper,
198 CHOICE_outmost_tag,
199 0, /* No effective tags (pointer) */
200 0, /* No effective tags (count) */
201 0, /* No tags (pointer) */
202 0, /* No tags (count) */
203 &asn_PER_Choice_constr_1,
204 asn_MBR_Choice_1,
205 4, /* Elements count */
206 &asn_SPC_Choice_specs_1 /* Additional specs */
207};
208
209
210/*** <<< INCLUDES [Choice2] >>> ***/
211
212#include <BIT_STRING.h>
213#include <RELATIVE-OID.h>
214#include <constr_CHOICE.h>
215
216/*** <<< DEPS [Choice2] >>> ***/
217
218typedef enum Choice2_PR {
219 Choice2_PR_NOTHING, /* No components present */
220 Choice2_PR_bitstr,
221 Choice2_PR_roid,
222} Choice2_PR;
223
224/*** <<< TYPE-DECLS [Choice2] >>> ***/
225
226typedef struct Choice2 {
227 Choice2_PR present;
228 union Choice2_u {
229 BIT_STRING_t bitstr;
230 RELATIVE_OID_t roid;
231 } choice;
232
233 /* Context for parsing across buffer boundaries */
234 asn_struct_ctx_t _asn_ctx;
235} Choice2_t;
236
237/*** <<< FUNC-DECLS [Choice2] >>> ***/
238
239extern asn_TYPE_descriptor_t asn_DEF_Choice2;
240
241/*** <<< STAT-DEFS [Choice2] >>> ***/
242
243static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
244 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
245 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
246 .tag_mode = +1, /* EXPLICIT tag at current level */
247 .type = &asn_DEF_BIT_STRING,
248 .memb_constraints = 0, /* Defer constraints checking to the member type */
249 .per_constraints = 0, /* No PER visible constraints */
250 .default_value = 0,
251 .name = "bitstr"
252 },
253 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
254 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
255 .tag_mode = +1, /* EXPLICIT tag at current level */
256 .type = &asn_DEF_RELATIVE_OID,
257 .memb_constraints = 0, /* Defer constraints checking to the member type */
258 .per_constraints = 0, /* No PER visible constraints */
259 .default_value = 0,
260 .name = "roid"
261 },
262};
263static asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
264 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr at 26 */
265 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid at 27 */
266};
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};
277static asn_per_constraints_t asn_PER_Choice2_constr_1 = {
278 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
279 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
280};
281asn_TYPE_descriptor_t asn_DEF_Choice2 = {
282 "Choice2",
283 "Choice2",
284 CHOICE_free,
285 CHOICE_print,
286 CHOICE_constraint,
287 CHOICE_decode_ber,
288 CHOICE_encode_der,
289 CHOICE_decode_xer,
290 CHOICE_encode_xer,
291 CHOICE_decode_uper,
292 CHOICE_outmost_tag,
293 0, /* No effective tags (pointer) */
294 0, /* No effective tags (count) */
295 0, /* No tags (pointer) */
296 0, /* No tags (count) */
297 &asn_PER_Choice2_constr_1,
298 asn_MBR_Choice2_1,
299 2, /* Elements count */
300 &asn_SPC_Choice2_specs_1 /* Additional specs */
301};
302