blob: c4c2d6bbb9955927bba9c303b8c27d270159de07 [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 Walkin59b176e2005-11-26 11:25:14 +0000107 CHOICE_outmost_tag,
108 0, /* No effective tags (pointer) */
109 0, /* No effective tags (count) */
110 0, /* No tags (pointer) */
111 0, /* No tags (count) */
112 0, /* No PER visible constraints */
113 asn_MBR_ch_4,
114 2, /* Elements count */
115 &asn_SPC_ch_specs_4 /* Additional specs */
116};
117
118static asn_TYPE_member_t asn_MBR_Choice_1[] = {
119 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
120 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
121 .tag_mode = 0,
122 .type = &asn_DEF_RELATIVE_OID,
123 .memb_constraints = 0, /* Defer constraints checking to the member type */
124 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
125 .default_value = 0,
126 .name = "roid"
127 },
128 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
129 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
130 .tag_mode = 0,
131 .type = &asn_DEF_BIT_STRING,
132 .memb_constraints = 0, /* Defer constraints checking to the member type */
133 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
134 .default_value = 0,
135 .name = "bitstr"
136 },
137 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
138 .tag = -1 /* Ambiguous tag (CHOICE?) */,
139 .tag_mode = 0,
140 .type = &asn_DEF_ch_4,
141 .memb_constraints = 0, /* Defer constraints checking to the member type */
142 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
143 .default_value = 0,
144 .name = "ch"
145 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700146 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000147 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
148 .tag_mode = 0,
149 .type = &asn_DEF_BOOLEAN,
150 .memb_constraints = 0, /* Defer constraints checking to the member type */
151 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
152 .default_value = 0,
153 .name = "bool"
154 },
155};
Lev Walkina7591b52014-10-12 18:37:35 -0700156static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700157 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
158 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
159 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
160 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
161 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000162};
163static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
164 sizeof(struct Choice),
165 offsetof(struct Choice, _asn_ctx),
166 offsetof(struct Choice, present),
167 sizeof(((struct Choice *)0)->present),
168 asn_MAP_Choice_tag2el_1,
169 5, /* Count of tags in the map */
170 .canonical_order = 0,
171 .ext_start = 3 /* Extensions start */
172};
173asn_TYPE_descriptor_t asn_DEF_Choice = {
174 "Choice",
175 "Choice",
176 CHOICE_free,
177 CHOICE_print,
178 CHOICE_constraint,
179 CHOICE_decode_ber,
180 CHOICE_encode_der,
181 CHOICE_decode_xer,
182 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000183 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000184 CHOICE_outmost_tag,
185 0, /* No effective tags (pointer) */
186 0, /* No effective tags (count) */
187 0, /* No tags (pointer) */
188 0, /* No tags (count) */
189 0, /* No PER visible constraints */
190 asn_MBR_Choice_1,
191 4, /* Elements count */
192 &asn_SPC_Choice_specs_1 /* Additional specs */
193};
194
195
196/*** <<< INCLUDES [Choice2] >>> ***/
197
198#include <BIT_STRING.h>
199#include <RELATIVE-OID.h>
200#include <constr_CHOICE.h>
201
202/*** <<< DEPS [Choice2] >>> ***/
203
204typedef enum Choice2_PR {
205 Choice2_PR_NOTHING, /* No components present */
206 Choice2_PR_bitstr,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000207 Choice2_PR_roid
Lev Walkin59b176e2005-11-26 11:25:14 +0000208} Choice2_PR;
209
210/*** <<< TYPE-DECLS [Choice2] >>> ***/
211
212typedef struct Choice2 {
213 Choice2_PR present;
214 union Choice2_u {
215 BIT_STRING_t bitstr;
216 RELATIVE_OID_t roid;
217 } choice;
218
219 /* Context for parsing across buffer boundaries */
220 asn_struct_ctx_t _asn_ctx;
221} Choice2_t;
222
223/*** <<< FUNC-DECLS [Choice2] >>> ***/
224
225extern asn_TYPE_descriptor_t asn_DEF_Choice2;
226
227/*** <<< STAT-DEFS [Choice2] >>> ***/
228
229static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
230 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
231 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
232 .tag_mode = +1, /* EXPLICIT tag at current level */
233 .type = &asn_DEF_BIT_STRING,
234 .memb_constraints = 0, /* Defer constraints checking to the member type */
235 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
236 .default_value = 0,
237 .name = "bitstr"
238 },
239 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
240 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
241 .tag_mode = +1, /* EXPLICIT tag at current level */
242 .type = &asn_DEF_RELATIVE_OID,
243 .memb_constraints = 0, /* Defer constraints checking to the member type */
244 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
245 .default_value = 0,
246 .name = "roid"
247 },
248};
Lev Walkina7591b52014-10-12 18:37:35 -0700249static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700250 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
251 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000252};
253static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
254 sizeof(struct Choice2),
255 offsetof(struct Choice2, _asn_ctx),
256 offsetof(struct Choice2, present),
257 sizeof(((struct Choice2 *)0)->present),
258 asn_MAP_Choice2_tag2el_1,
259 2, /* Count of tags in the map */
260 .canonical_order = 0,
261 .ext_start = -1 /* Extensions start */
262};
263asn_TYPE_descriptor_t asn_DEF_Choice2 = {
264 "Choice2",
265 "Choice2",
266 CHOICE_free,
267 CHOICE_print,
268 CHOICE_constraint,
269 CHOICE_decode_ber,
270 CHOICE_encode_der,
271 CHOICE_decode_xer,
272 CHOICE_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000273 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000274 CHOICE_outmost_tag,
275 0, /* No effective tags (pointer) */
276 0, /* No effective tags (count) */
277 0, /* No tags (pointer) */
278 0, /* No tags (count) */
279 0, /* No PER visible constraints */
280 asn_MBR_Choice2_1,
281 2, /* Elements count */
282 &asn_SPC_Choice2_specs_1 /* Additional specs */
283};
284