blob: 69d0d67d9b38ad0c823dbaa71229fa3dd496d706 [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,
Lev Walkin67a30122017-08-10 05:48:54 -070066 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000067 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040068 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000069 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
70 .default_value = 0,
71 .name = "null"
72 },
73 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
74 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
75 .tag_mode = 0,
76 .type = &asn_DEF_INTEGER,
Lev Walkin67a30122017-08-10 05:48:54 -070077 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +000078 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +040079 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +000080 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
81 .default_value = 0,
82 .name = "int"
83 },
84};
Lev Walkina7591b52014-10-12 18:37:35 -070085static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
Lev Walkin4062b012013-10-11 14:29:38 -070086 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
87 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
Lev Walkin59b176e2005-11-26 11:25:14 +000088};
89static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
90 sizeof(struct ch),
91 offsetof(struct ch, _asn_ctx),
92 offsetof(struct ch, present),
93 sizeof(((struct ch *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -070094 .tag2el = asn_MAP_ch_tag2el_4,
95 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +000096 .canonical_order = 0,
97 .ext_start = -1 /* Extensions start */
98};
99static /* Use -fall-defs-global to expose */
100asn_TYPE_descriptor_t asn_DEF_ch_4 = {
101 "ch",
102 "ch",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800103 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000104 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000105 0, /* No effective tags (pointer) */
106 0, /* No effective tags (count) */
107 0, /* No tags (pointer) */
108 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400109 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000110 0, /* No PER visible constraints */
111 asn_MBR_ch_4,
112 2, /* Elements count */
113 &asn_SPC_ch_specs_4 /* Additional specs */
114};
115
116static asn_TYPE_member_t asn_MBR_Choice_1[] = {
117 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
118 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
119 .tag_mode = 0,
120 .type = &asn_DEF_RELATIVE_OID,
Lev Walkin67a30122017-08-10 05:48:54 -0700121 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000122 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400123 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000124 .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,
Lev Walkin67a30122017-08-10 05:48:54 -0700132 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000133 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400134 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000135 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
136 .default_value = 0,
137 .name = "bitstr"
138 },
139 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
140 .tag = -1 /* Ambiguous tag (CHOICE?) */,
141 .tag_mode = 0,
142 .type = &asn_DEF_ch_4,
Lev Walkin67a30122017-08-10 05:48:54 -0700143 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000144 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400145 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000146 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
147 .default_value = 0,
148 .name = "ch"
149 },
Lev Walkin2a744a72013-03-27 01:56:23 -0700150 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
Lev Walkin59b176e2005-11-26 11:25:14 +0000151 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
152 .tag_mode = 0,
153 .type = &asn_DEF_BOOLEAN,
Lev Walkin67a30122017-08-10 05:48:54 -0700154 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000155 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400156 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000157 .per_constraints = 0, /* PER is not compiled, use -gen-PER */
158 .default_value = 0,
159 .name = "bool"
160 },
161};
Lev Walkina7591b52014-10-12 18:37:35 -0700162static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700163 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
164 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
165 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
166 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
167 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000168};
169static asn_CHOICE_specifics_t asn_SPC_Choice_specs_1 = {
170 sizeof(struct Choice),
171 offsetof(struct Choice, _asn_ctx),
172 offsetof(struct Choice, present),
173 sizeof(((struct Choice *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700174 .tag2el = asn_MAP_Choice_tag2el_1,
175 .tag2el_count = 5, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000176 .canonical_order = 0,
177 .ext_start = 3 /* Extensions start */
178};
179asn_TYPE_descriptor_t asn_DEF_Choice = {
180 "Choice",
181 "Choice",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800182 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000183 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000184 0, /* No effective tags (pointer) */
185 0, /* No effective tags (count) */
186 0, /* No tags (pointer) */
187 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400188 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000189 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,
Lev Walkin67a30122017-08-10 05:48:54 -0700234 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000235 .memb_constraints = 0, /* Defer constraints checking to the member type */
Lev Walkinb33425f2017-07-14 14:59:52 +0400236 .oer_constraints = 0, /* OER is not compiled, use -gen-OER */
Lev Walkin59b176e2005-11-26 11:25:14 +0000237 .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,
Lev Walkin67a30122017-08-10 05:48:54 -0700245 .type_selector = 0,
Lev Walkin59b176e2005-11-26 11:25:14 +0000246 .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 = "roid"
251 },
252};
Lev Walkina7591b52014-10-12 18:37:35 -0700253static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
Lev Walkin4062b012013-10-11 14:29:38 -0700254 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
255 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
Lev Walkin59b176e2005-11-26 11:25:14 +0000256};
257static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
258 sizeof(struct Choice2),
259 offsetof(struct Choice2, _asn_ctx),
260 offsetof(struct Choice2, present),
261 sizeof(((struct Choice2 *)0)->present),
Lev Walkine3917082017-08-23 10:29:38 -0700262 .tag2el = asn_MAP_Choice2_tag2el_1,
263 .tag2el_count = 2, /* Count of tags in the map */
Lev Walkin59b176e2005-11-26 11:25:14 +0000264 .canonical_order = 0,
265 .ext_start = -1 /* Extensions start */
266};
267asn_TYPE_descriptor_t asn_DEF_Choice2 = {
268 "Choice2",
269 "Choice2",
Bi-Ruei, Chiu1f87ac02017-08-20 01:25:45 +0800270 &asn_OP_CHOICE,
Lev Walkin59b176e2005-11-26 11:25:14 +0000271 CHOICE_constraint,
Lev Walkin59b176e2005-11-26 11:25:14 +0000272 0, /* No effective tags (pointer) */
273 0, /* No effective tags (count) */
274 0, /* No tags (pointer) */
275 0, /* No tags (count) */
Lev Walkinb33425f2017-07-14 14:59:52 +0400276 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000277 0, /* No PER visible constraints */
278 asn_MBR_Choice2_1,
279 2, /* Elements count */
280 &asn_SPC_Choice2_specs_1 /* Additional specs */
281};
282