2 /*** <<< INCLUDES [Frame] >>> ***/
4 #include <NativeInteger.h>
7 #include "PrimitiveMessage.h"
8 #include "ComplexMessage.h"
10 #include <constr_CHOICE.h>
11 #include <constr_SEQUENCE.h>
13 /*** <<< DEPS [Frame] >>> ***/
15 typedef enum value_PR {
16 value_PR_NOTHING, /* No components present */
17 value_PR_PrimitiveMessage,
18 value_PR_ComplexMessage
21 /*** <<< TYPE-DECLS [Frame] >>> ***/
23 typedef struct Frame {
27 union Frame__value_u {
28 PrimitiveMessage_t PrimitiveMessage;
29 ComplexMessage_t ComplexMessage;
32 /* Context for parsing across buffer boundaries */
33 asn_struct_ctx_t _asn_ctx;
36 * This type is extensible,
37 * possible extensions are below.
40 /* Context for parsing across buffer boundaries */
41 asn_struct_ctx_t _asn_ctx;
44 /*** <<< FUNC-DECLS [Frame] >>> ***/
46 extern asn_TYPE_descriptor_t asn_DEF_Frame;
48 /*** <<< IOC-TABLES [Frame] >>> ***/
50 static const long asn_VAL_1_basicMessage = 1;
51 static const long asn_VAL_2_2 = 2;
52 static const asn_ioc_cell_t asn_IOS_FrameTypes_1_rows[] = {
53 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_basicMessage },
54 { "&Type", aioc__type, &asn_DEF_PrimitiveMessage },
55 { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 },
56 { "&Type", aioc__type, &asn_DEF_ComplexMessage }
58 static const asn_ioc_set_t asn_IOS_FrameTypes_1[] = {
59 { 2, 2, asn_IOS_FrameTypes_1_rows }
62 /*** <<< CODE [Frame] >>> ***/
65 memb_ident_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
66 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
69 ASN__CTFAIL(app_key, td, sptr,
70 "%s: value not given (%s:%d)",
71 td->name, __FILE__, __LINE__);
76 if(1 /* No applicable constraints whatsoever */) {
77 /* Nothing is here. See below */
80 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
83 static asn_type_selector_result_t
84 select_Frame_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
85 asn_type_selector_result_t result = {0, 0};
86 const asn_ioc_set_t *itable = asn_IOS_FrameTypes_1;
87 size_t constraining_column = 0; /* &id */
88 size_t for_column = 1; /* &Type */
89 size_t row, presence_index = 0;
90 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Frame, ident));
92 for(row=0; row < itable->rows_count; row++) {
93 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
94 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
96 if(type_cell->cell_kind == aioc__undefined)
100 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
101 result.type_descriptor = type_cell->type_descriptor;
102 result.presence_index = presence_index;
111 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
112 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
115 ASN__CTFAIL(app_key, td, sptr,
116 "%s: value not given (%s:%d)",
117 td->name, __FILE__, __LINE__);
122 if(1 /* No applicable constraints whatsoever */) {
123 /* Nothing is here. See below */
126 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
130 /*** <<< STAT-DEFS [Frame] >>> ***/
132 static asn_TYPE_member_t asn_MBR_value_3[] = {
133 { ATF_NOFLAGS, 0, offsetof(struct value, choice.PrimitiveMessage),
134 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
136 .type = &asn_DEF_PrimitiveMessage,
138 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
139 0, 0, /* No default value */
140 .name = "PrimitiveMessage"
142 { ATF_NOFLAGS, 0, offsetof(struct value, choice.ComplexMessage),
143 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
145 .type = &asn_DEF_ComplexMessage,
147 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
148 0, 0, /* No default value */
149 .name = "ComplexMessage"
152 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = {
153 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* PrimitiveMessage */
154 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* ComplexMessage */
156 static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = {
157 sizeof(struct value),
158 offsetof(struct value, _asn_ctx),
159 offsetof(struct value, present),
160 sizeof(((struct value *)0)->present),
161 .tag2el = asn_MAP_value_tag2el_3,
162 .tag2el_count = 2, /* Count of tags in the map */
164 .first_extension = -1 /* Extensions start */
166 static /* Use -fall-defs-global to expose */
167 asn_TYPE_descriptor_t asn_DEF_value_3 = {
171 0, /* No effective tags (pointer) */
172 0, /* No effective tags (count) */
173 0, /* No tags (pointer) */
174 0, /* No tags (count) */
175 { 0, 0, OPEN_TYPE_constraint },
177 2, /* Elements count */
178 &asn_SPC_value_specs_3 /* Additional specs */
181 static asn_TYPE_member_t asn_MBR_Frame_1[] = {
182 { ATF_NOFLAGS, 0, offsetof(struct Frame, ident),
183 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
185 .type = &asn_DEF_NativeInteger,
187 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_ident_constraint_1 },
188 0, 0, /* No default value */
191 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Frame, value),
192 .tag = -1 /* Ambiguous tag (ANY?) */,
194 .type = &asn_DEF_value_3,
195 .type_selector = select_Frame_value_type,
196 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_value_constraint_1 },
197 0, 0, /* No default value */
201 static const ber_tlv_tag_t asn_DEF_Frame_tags_1[] = {
202 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
204 static const asn_TYPE_tag2member_t asn_MAP_Frame_tag2el_1[] = {
205 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* ident */
207 static asn_SEQUENCE_specifics_t asn_SPC_Frame_specs_1 = {
208 sizeof(struct Frame),
209 offsetof(struct Frame, _asn_ctx),
210 .tag2el = asn_MAP_Frame_tag2el_1,
211 .tag2el_count = 1, /* Count of tags in the map */
212 0, 0, 0, /* Optional elements (not needed) */
213 2, /* First extension addition */
215 asn_TYPE_descriptor_t asn_DEF_Frame = {
219 asn_DEF_Frame_tags_1,
220 sizeof(asn_DEF_Frame_tags_1)
221 /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */
222 asn_DEF_Frame_tags_1, /* Same as above */
223 sizeof(asn_DEF_Frame_tags_1)
224 /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */
225 { 0, 0, SEQUENCE_constraint },
227 2, /* Elements count */
228 &asn_SPC_Frame_specs_1 /* Additional specs */
232 /*** <<< INCLUDES [PrimitiveMessage] >>> ***/
234 #include <constr_SEQUENCE.h>
236 /*** <<< TYPE-DECLS [PrimitiveMessage] >>> ***/
238 typedef struct PrimitiveMessage {
240 /* Context for parsing across buffer boundaries */
241 asn_struct_ctx_t _asn_ctx;
242 } PrimitiveMessage_t;
244 /*** <<< FUNC-DECLS [PrimitiveMessage] >>> ***/
246 extern asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage;
247 extern asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1;
249 /*** <<< STAT-DEFS [PrimitiveMessage] >>> ***/
251 static const ber_tlv_tag_t asn_DEF_PrimitiveMessage_tags_1[] = {
252 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
254 asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1 = {
255 sizeof(struct PrimitiveMessage),
256 offsetof(struct PrimitiveMessage, _asn_ctx),
257 0, /* No top level tags */
258 0, /* No tags in the map */
259 0, 0, 0, /* Optional elements (not needed) */
260 -1, /* First extension addition */
262 asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage = {
266 asn_DEF_PrimitiveMessage_tags_1,
267 sizeof(asn_DEF_PrimitiveMessage_tags_1)
268 /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */
269 asn_DEF_PrimitiveMessage_tags_1, /* Same as above */
270 sizeof(asn_DEF_PrimitiveMessage_tags_1)
271 /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */
272 { 0, 0, SEQUENCE_constraint },
273 0, 0, /* No members */
274 &asn_SPC_PrimitiveMessage_specs_1 /* Additional specs */
278 /*** <<< INCLUDES [ComplexMessage] >>> ***/
280 #include <constr_SEQUENCE.h>
282 /*** <<< TYPE-DECLS [ComplexMessage] >>> ***/
284 typedef struct ComplexMessage {
286 /* Context for parsing across buffer boundaries */
287 asn_struct_ctx_t _asn_ctx;
290 /*** <<< FUNC-DECLS [ComplexMessage] >>> ***/
292 extern asn_TYPE_descriptor_t asn_DEF_ComplexMessage;
293 extern asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1;
295 /*** <<< STAT-DEFS [ComplexMessage] >>> ***/
297 static const ber_tlv_tag_t asn_DEF_ComplexMessage_tags_1[] = {
298 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
300 asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1 = {
301 sizeof(struct ComplexMessage),
302 offsetof(struct ComplexMessage, _asn_ctx),
303 0, /* No top level tags */
304 0, /* No tags in the map */
305 0, 0, 0, /* Optional elements (not needed) */
306 -1, /* First extension addition */
308 asn_TYPE_descriptor_t asn_DEF_ComplexMessage = {
312 asn_DEF_ComplexMessage_tags_1,
313 sizeof(asn_DEF_ComplexMessage_tags_1)
314 /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */
315 asn_DEF_ComplexMessage_tags_1, /* Same as above */
316 sizeof(asn_DEF_ComplexMessage_tags_1)
317 /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */
318 { 0, 0, SEQUENCE_constraint },
319 0, 0, /* No members */
320 &asn_SPC_ComplexMessage_specs_1 /* Additional specs */
324 /*** <<< asn_constant.h >>> ***/
327 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
330 #ifndef _ASN_CONSTANT_H
331 #define _ASN_CONSTANT_H
337 #define basicMessage (1)
344 #endif /* _ASN_CONSTANT_H */