2 /*** <<< INCLUDES [Choice] >>> ***/
4 #include <RELATIVE-OID.h>
5 #include <BIT_STRING.h>
8 #include <NativeInteger.h>
9 #include <constr_CHOICE.h>
11 /*** <<< DEPS [Choice] >>> ***/
13 typedef enum Choice_PR {
14 Choice_PR_NOTHING, /* No components present */
18 /* Extensions may appear below */
22 ch_PR_NOTHING, /* No components present */
27 /*** <<< TYPE-DECLS [Choice] >>> ***/
29 typedef struct Choice {
41 /* Context for parsing across buffer boundaries */
42 asn_struct_ctx_t _asn_ctx;
45 * This type is extensible,
46 * possible extensions are below.
51 /* Context for parsing across buffer boundaries */
52 asn_struct_ctx_t _asn_ctx;
55 /*** <<< FUNC-DECLS [Choice] >>> ***/
57 extern asn_TYPE_descriptor_t asn_DEF_Choice;
59 /*** <<< CTDEFS [Choice] >>> ***/
61 static asn_per_constraints_t asn_PER_type_ch_constr_4 CC_NOTUSED = {
62 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 0, 0 /* No PER value map */
66 static asn_per_constraints_t asn_PER_type_Choice_constr_1 CC_NOTUSED = {
67 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
68 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
69 0, 0 /* No PER value map */
72 /*** <<< STAT-DEFS [Choice] >>> ***/
74 static asn_TYPE_member_t asn_MBR_ch_4[] = {
75 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.null),
76 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
78 .type = &asn_DEF_NULL,
80 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
81 0, 0, /* No default value */
84 { ATF_NOFLAGS, 0, offsetof(struct ch, choice.Int),
85 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
87 .type = &asn_DEF_NativeInteger,
89 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
90 0, 0, /* No default value */
94 static const unsigned asn_MAP_ch_to_canonical_4[] = { 1, 0 };
95 static const unsigned asn_MAP_ch_from_canonical_4[] = { 1, 0 };
96 static const asn_TYPE_tag2member_t asn_MAP_ch_tag2el_4[] = {
97 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* int */
98 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 0, 0, 0 } /* null */
100 static asn_CHOICE_specifics_t asn_SPC_ch_specs_4 = {
102 offsetof(struct ch, _asn_ctx),
103 offsetof(struct ch, present),
104 sizeof(((struct ch *)0)->present),
105 .tag2el = asn_MAP_ch_tag2el_4,
106 .tag2el_count = 2, /* Count of tags in the map */
107 .to_canonical_order = asn_MAP_ch_to_canonical_4,
108 .from_canonical_order = asn_MAP_ch_from_canonical_4,
109 .first_extension = -1 /* Extensions start */
111 static /* Use -fall-defs-global to expose */
112 asn_TYPE_descriptor_t asn_DEF_ch_4 = {
116 0, /* No effective tags (pointer) */
117 0, /* No effective tags (count) */
118 0, /* No tags (pointer) */
119 0, /* No tags (count) */
120 { 0, &asn_PER_type_ch_constr_4, CHOICE_constraint },
122 2, /* Elements count */
123 &asn_SPC_ch_specs_4 /* Additional specs */
126 static asn_TYPE_member_t asn_MBR_Choice_1[] = {
127 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.roid),
128 .tag = (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)),
130 .type = &asn_DEF_RELATIVE_OID,
132 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
133 0, 0, /* No default value */
136 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.bitstr),
137 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
139 .type = &asn_DEF_BIT_STRING,
141 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
142 0, 0, /* No default value */
145 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.ch),
146 .tag = -1 /* Ambiguous tag (CHOICE?) */,
148 .type = &asn_DEF_ch_4,
150 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
151 0, 0, /* No default value */
154 { ATF_NOFLAGS, 0, offsetof(struct Choice, choice.Bool),
155 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
157 .type = &asn_DEF_BOOLEAN,
159 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
160 0, 0, /* No default value */
164 static const unsigned asn_MAP_Choice_to_canonical_1[] = { 2, 1, 0, 3 };
165 static const unsigned asn_MAP_Choice_from_canonical_1[] = { 2, 1, 0, 3 };
166 static const asn_TYPE_tag2member_t asn_MAP_Choice_tag2el_1[] = {
167 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool */
168 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* int */
169 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 0 }, /* bitstr */
170 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 2, 0, 0 }, /* null */
171 { (ASN_TAG_CLASS_UNIVERSAL | (13 << 2)), 0, 0, 0 } /* roid */
173 static 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 .tag2el = asn_MAP_Choice_tag2el_1,
179 .tag2el_count = 5, /* Count of tags in the map */
180 .to_canonical_order = asn_MAP_Choice_to_canonical_1,
181 .from_canonical_order = asn_MAP_Choice_from_canonical_1,
182 .first_extension = 3 /* Extensions start */
184 asn_TYPE_descriptor_t asn_DEF_Choice = {
188 0, /* No effective tags (pointer) */
189 0, /* No effective tags (count) */
190 0, /* No tags (pointer) */
191 0, /* No tags (count) */
192 { 0, &asn_PER_type_Choice_constr_1, CHOICE_constraint },
194 4, /* Elements count */
195 &asn_SPC_Choice_specs_1 /* Additional specs */
199 /*** <<< INCLUDES [Choice2] >>> ***/
201 #include <BIT_STRING.h>
202 #include <RELATIVE-OID.h>
203 #include <constr_CHOICE.h>
205 /*** <<< DEPS [Choice2] >>> ***/
207 typedef enum Choice2_PR {
208 Choice2_PR_NOTHING, /* No components present */
213 /*** <<< TYPE-DECLS [Choice2] >>> ***/
215 typedef struct Choice2 {
222 /* Context for parsing across buffer boundaries */
223 asn_struct_ctx_t _asn_ctx;
226 /*** <<< FUNC-DECLS [Choice2] >>> ***/
228 extern asn_TYPE_descriptor_t asn_DEF_Choice2;
230 /*** <<< CTDEFS [Choice2] >>> ***/
232 static asn_per_constraints_t asn_PER_type_Choice2_constr_1 CC_NOTUSED = {
233 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
234 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
235 0, 0 /* No PER value map */
238 /*** <<< STAT-DEFS [Choice2] >>> ***/
240 static asn_TYPE_member_t asn_MBR_Choice2_1[] = {
241 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.bitstr),
242 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
243 .tag_mode = +1, /* EXPLICIT tag at current level */
244 .type = &asn_DEF_BIT_STRING,
246 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
247 0, 0, /* No default value */
250 { ATF_NOFLAGS, 0, offsetof(struct Choice2, choice.roid),
251 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
252 .tag_mode = +1, /* EXPLICIT tag at current level */
253 .type = &asn_DEF_RELATIVE_OID,
255 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
256 0, 0, /* No default value */
260 static const asn_TYPE_tag2member_t asn_MAP_Choice2_tag2el_1[] = {
261 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bitstr */
262 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* roid */
264 static asn_CHOICE_specifics_t asn_SPC_Choice2_specs_1 = {
265 sizeof(struct Choice2),
266 offsetof(struct Choice2, _asn_ctx),
267 offsetof(struct Choice2, present),
268 sizeof(((struct Choice2 *)0)->present),
269 .tag2el = asn_MAP_Choice2_tag2el_1,
270 .tag2el_count = 2, /* Count of tags in the map */
272 .first_extension = -1 /* Extensions start */
274 asn_TYPE_descriptor_t asn_DEF_Choice2 = {
278 0, /* No effective tags (pointer) */
279 0, /* No effective tags (count) */
280 0, /* No tags (pointer) */
281 0, /* No tags (count) */
282 { 0, &asn_PER_type_Choice2_constr_1, CHOICE_constraint },
284 2, /* Elements count */
285 &asn_SPC_Choice2_specs_1 /* Additional specs */