2 /*** <<< INCLUDES [Message] >>> ***/
4 #include "SpecializedContent.h"
5 #include <constr_SEQUENCE.h>
7 /*** <<< TYPE-DECLS [Message] >>> ***/
9 typedef struct Message {
10 RegionalExtension_t content;
12 /* Context for parsing across buffer boundaries */
13 asn_struct_ctx_t _asn_ctx;
16 /*** <<< FUNC-DECLS [Message] >>> ***/
18 extern asn_TYPE_descriptor_t asn_DEF_Message;
20 /*** <<< STAT-DEFS [Message] >>> ***/
22 static asn_TYPE_member_t asn_MBR_Message_1[] = {
23 { ATF_NOFLAGS, 0, offsetof(struct Message, content),
24 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
26 .type = &asn_DEF_RegionalExtension,
28 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
29 0, 0, /* No default value */
33 static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = {
34 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
36 static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = {
37 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* content */
39 static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = {
40 sizeof(struct Message),
41 offsetof(struct Message, _asn_ctx),
42 .tag2el = asn_MAP_Message_tag2el_1,
43 .tag2el_count = 1, /* Count of tags in the map */
44 0, 0, 0, /* Optional elements (not needed) */
45 -1, /* First extension addition */
47 asn_TYPE_descriptor_t asn_DEF_Message = {
51 asn_DEF_Message_tags_1,
52 sizeof(asn_DEF_Message_tags_1)
53 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
54 asn_DEF_Message_tags_1, /* Same as above */
55 sizeof(asn_DEF_Message_tags_1)
56 /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */
57 { 0, 0, SEQUENCE_constraint },
59 1, /* Elements count */
60 &asn_SPC_Message_specs_1 /* Additional specs */
64 /*** <<< INCLUDES [SpecializedContent] >>> ***/
66 #include <NativeInteger.h>
70 #include <OPEN_TYPE.h>
71 #include <constr_CHOICE.h>
72 #include <constr_SEQUENCE.h>
74 /*** <<< DEPS [SpecializedContent] >>> ***/
76 typedef enum value_PR {
77 value_PR_NOTHING, /* No components present */
82 /*** <<< TYPE-DECLS [SpecializedContent] >>> ***/
84 typedef struct RegionalExtension {
88 union RegionalExtension__value_u {
93 /* Context for parsing across buffer boundaries */
94 asn_struct_ctx_t _asn_ctx;
97 /* Context for parsing across buffer boundaries */
98 asn_struct_ctx_t _asn_ctx;
99 } RegionalExtension_t;
101 /*** <<< FUNC-DECLS [SpecializedContent] >>> ***/
103 extern asn_TYPE_descriptor_t asn_DEF_RegionalExtension;
104 extern asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1;
105 extern asn_TYPE_member_t asn_MBR_RegionalExtension_1[2];
107 /*** <<< IOC-TABLES [SpecializedContent] >>> ***/
109 static const long asn_VAL_1_1 = 1;
110 static const long asn_VAL_2_2 = 2;
111 static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = {
112 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 },
113 { "&Type", aioc__type, &asn_DEF_NativeInteger },
114 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
115 { "&Type", aioc__type, &asn_DEF_BOOLEAN }
117 static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = {
118 { 2, 2, asn_IOS_RegionalExtension_1_rows }
121 /*** <<< CODE [SpecializedContent] >>> ***/
124 memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
125 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
128 ASN__CTFAIL(app_key, td, sptr,
129 "%s: value not given (%s:%d)",
130 td->name, __FILE__, __LINE__);
135 if(1 /* No applicable constraints whatsoever */) {
136 /* Nothing is here. See below */
139 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
142 static asn_type_selector_result_t
143 select_RegionalExtension_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
144 asn_type_selector_result_t result = {0, 0};
145 const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1;
146 size_t constraining_column = 0; /* &id */
147 size_t for_column = 1; /* &Type */
148 size_t row, presence_index = 0;
149 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct RegionalExtension, id));
151 for(row=0; row < itable->rows_count; row++) {
152 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
153 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
155 if(type_cell->cell_kind == aioc__undefined)
159 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
160 result.type_descriptor = type_cell->type_descriptor;
161 result.presence_index = presence_index;
170 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
171 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
174 ASN__CTFAIL(app_key, td, sptr,
175 "%s: value not given (%s:%d)",
176 td->name, __FILE__, __LINE__);
181 if(1 /* No applicable constraints whatsoever */) {
182 /* Nothing is here. See below */
185 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
189 /*** <<< CTDEFS [SpecializedContent] >>> ***/
191 static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
192 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
193 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
194 0, 0 /* No PER value map */
196 static asn_per_constraints_t asn_PER_memb_value_constr_3 CC_NOTUSED = {
197 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
198 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
199 0, 0 /* No PER value map */
202 /*** <<< STAT-DEFS [SpecializedContent] >>> ***/
204 static asn_TYPE_member_t asn_MBR_value_3[] = {
205 { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER),
206 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
208 .type = &asn_DEF_NativeInteger,
210 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
211 0, 0, /* No default value */
214 { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN),
215 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
217 .type = &asn_DEF_BOOLEAN,
219 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
220 0, 0, /* No default value */
224 static const unsigned asn_MAP_value_to_canonical_3[] = { 1, 0 };
225 static const unsigned asn_MAP_value_from_canonical_3[] = { 1, 0 };
226 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
227 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */
228 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */
230 static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
231 sizeof(struct value),
232 offsetof(struct value, _asn_ctx),
233 offsetof(struct value, present),
234 sizeof(((struct value *)0)->present),
235 .tag2el = asn_MAP_value_tag2el_3,
236 .tag2el_count = 2, /* Count of tags in the map */
237 .to_canonical_order = asn_MAP_value_to_canonical_3,
238 .from_canonical_order = asn_MAP_value_from_canonical_3,
239 .first_extension = -1 /* Extensions start */
241 static /* Use -fall-defs-global to expose */
242 asn_TYPE_descriptor_t asn_DEF_value_3 = {
246 0, /* No effective tags (pointer) */
247 0, /* No effective tags (count) */
248 0, /* No tags (pointer) */
249 0, /* No tags (count) */
250 { 0, 0, OPEN_TYPE_constraint },
252 2, /* Elements count */
253 &asn_SPC_value_specs_3 /* Additional specs */
256 asn_TYPE_member_t asn_MBR_RegionalExtension_1[] = {
257 { ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, id),
258 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
260 .type = &asn_DEF_NativeInteger,
262 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_id_constr_2, .general_constraints = memb_id_constraint_1 },
263 0, 0, /* No default value */
266 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct RegionalExtension, value),
267 .tag = -1 /* Ambiguous tag (ANY?) */,
269 .type = &asn_DEF_value_3,
270 .type_selector = select_RegionalExtension_value_type,
271 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_value_constr_3, .general_constraints = memb_value_constraint_1 },
272 0, 0, /* No default value */
276 static const ber_tlv_tag_t asn_DEF_RegionalExtension_tags_1[] = {
277 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
279 static const asn_TYPE_tag2member_t asn_MAP_RegionalExtension_tag2el_1[] = {
280 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */
282 asn_SEQUENCE_specifics_t asn_SPC_RegionalExtension_specs_1 = {
283 sizeof(struct RegionalExtension),
284 offsetof(struct RegionalExtension, _asn_ctx),
285 .tag2el = asn_MAP_RegionalExtension_tag2el_1,
286 .tag2el_count = 1, /* Count of tags in the map */
287 0, 0, 0, /* Optional elements (not needed) */
288 -1, /* First extension addition */
290 asn_TYPE_descriptor_t asn_DEF_RegionalExtension = {
294 asn_DEF_RegionalExtension_tags_1,
295 sizeof(asn_DEF_RegionalExtension_tags_1)
296 /sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
297 asn_DEF_RegionalExtension_tags_1, /* Same as above */
298 sizeof(asn_DEF_RegionalExtension_tags_1)
299 /sizeof(asn_DEF_RegionalExtension_tags_1[0]), /* 1 */
300 { 0, 0, SEQUENCE_constraint },
301 asn_MBR_RegionalExtension_1,
302 2, /* Elements count */
303 &asn_SPC_RegionalExtension_specs_1 /* Additional specs */