2 /*** <<< INCLUDES [PacketId] >>> ***/
4 #include <NativeInteger.h>
6 /*** <<< TYPE-DECLS [PacketId] >>> ***/
8 typedef long PacketId_t;
10 /*** <<< FUNC-DECLS [PacketId] >>> ***/
12 #define PacketId_id_TYPE1 ((PacketId_t)1)
13 extern asn_per_constraints_t asn_PER_type_PacketId_constr_1;
14 extern asn_TYPE_descriptor_t asn_DEF_PacketId;
15 asn_struct_free_f PacketId_free;
16 asn_struct_print_f PacketId_print;
17 asn_constr_check_f PacketId_constraint;
18 ber_type_decoder_f PacketId_decode_ber;
19 der_type_encoder_f PacketId_encode_der;
20 xer_type_decoder_f PacketId_decode_xer;
21 xer_type_encoder_f PacketId_encode_xer;
22 per_type_decoder_f PacketId_decode_uper;
23 per_type_encoder_f PacketId_encode_uper;
24 per_type_decoder_f PacketId_decode_aper;
25 per_type_encoder_f PacketId_encode_aper;
27 /*** <<< CODE [PacketId] >>> ***/
30 PacketId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
31 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
35 ASN__CTFAIL(app_key, td, sptr,
36 "%s: value not given (%s:%d)",
37 td->name, __FILE__, __LINE__);
41 value = *(const long *)sptr;
43 if((value >= 0 && value <= 65535)) {
44 /* Constraint check succeeded */
47 ASN__CTFAIL(app_key, td, sptr,
48 "%s: constraint failed (%s:%d)",
49 td->name, __FILE__, __LINE__);
55 * This type is implemented using NativeInteger,
56 * so here we adjust the DEF accordingly.
59 /*** <<< CTDEFS [PacketId] >>> ***/
61 asn_per_constraints_t asn_PER_type_PacketId_constr_1 CC_NOTUSED = {
62 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
63 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64 0, 0 /* No PER value map */
67 /*** <<< STAT-DEFS [PacketId] >>> ***/
69 static const ber_tlv_tag_t asn_DEF_PacketId_tags_1[] = {
70 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
72 asn_TYPE_descriptor_t asn_DEF_PacketId = {
75 &asn_OP_NativeInteger,
76 asn_DEF_PacketId_tags_1,
77 sizeof(asn_DEF_PacketId_tags_1)
78 /sizeof(asn_DEF_PacketId_tags_1[0]), /* 1 */
79 asn_DEF_PacketId_tags_1, /* Same as above */
80 sizeof(asn_DEF_PacketId_tags_1)
81 /sizeof(asn_DEF_PacketId_tags_1[0]), /* 1 */
82 { 0, &asn_PER_type_PacketId_constr_1, PacketId_constraint },
83 0, 0, /* No members */
88 /*** <<< INCLUDES [Color] >>> ***/
90 #include <NativeEnumerated.h>
92 /*** <<< DEPS [Color] >>> ***/
100 /*** <<< TYPE-DECLS [Color] >>> ***/
102 typedef long Color_t;
104 /*** <<< FUNC-DECLS [Color] >>> ***/
106 extern asn_per_constraints_t asn_PER_type_Color_constr_1;
107 extern asn_TYPE_descriptor_t asn_DEF_Color;
108 extern const asn_INTEGER_specifics_t asn_SPC_Color_specs_1;
109 asn_struct_free_f Color_free;
110 asn_struct_print_f Color_print;
111 asn_constr_check_f Color_constraint;
112 ber_type_decoder_f Color_decode_ber;
113 der_type_encoder_f Color_encode_der;
114 xer_type_decoder_f Color_decode_xer;
115 xer_type_encoder_f Color_encode_xer;
116 per_type_decoder_f Color_decode_uper;
117 per_type_encoder_f Color_encode_uper;
118 per_type_decoder_f Color_decode_aper;
119 per_type_encoder_f Color_encode_aper;
121 /*** <<< CODE [Color] >>> ***/
124 * This type is implemented using NativeEnumerated,
125 * so here we adjust the DEF accordingly.
128 /*** <<< CTDEFS [Color] >>> ***/
130 asn_per_constraints_t asn_PER_type_Color_constr_1 CC_NOTUSED = {
131 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
132 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
133 0, 0 /* No PER value map */
136 /*** <<< STAT-DEFS [Color] >>> ***/
138 static const asn_INTEGER_enum_map_t asn_MAP_Color_value2enum_1[] = {
143 static const unsigned int asn_MAP_Color_enum2value_1[] = {
148 const asn_INTEGER_specifics_t asn_SPC_Color_specs_1 = {
149 asn_MAP_Color_value2enum_1, /* "tag" => N; sorted by tag */
150 asn_MAP_Color_enum2value_1, /* N => "tag"; sorted by N */
151 3, /* Number of elements in the maps */
152 0, /* Enumeration is not extensible */
153 1, /* Strict enumeration */
154 0, /* Native long size */
157 static const ber_tlv_tag_t asn_DEF_Color_tags_1[] = {
158 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
160 asn_TYPE_descriptor_t asn_DEF_Color = {
163 &asn_OP_NativeEnumerated,
164 asn_DEF_Color_tags_1,
165 sizeof(asn_DEF_Color_tags_1)
166 /sizeof(asn_DEF_Color_tags_1[0]), /* 1 */
167 asn_DEF_Color_tags_1, /* Same as above */
168 sizeof(asn_DEF_Color_tags_1)
169 /sizeof(asn_DEF_Color_tags_1[0]), /* 1 */
170 { 0, &asn_PER_type_Color_constr_1, NativeEnumerated_constraint },
171 0, 0, /* Defined elsewhere */
172 &asn_SPC_Color_specs_1 /* Additional specs */
176 /*** <<< INCLUDES [Valid] >>> ***/
178 #include <NativeEnumerated.h>
180 /*** <<< DEPS [Valid] >>> ***/
187 /*** <<< TYPE-DECLS [Valid] >>> ***/
189 typedef long Valid_t;
191 /*** <<< FUNC-DECLS [Valid] >>> ***/
193 extern asn_per_constraints_t asn_PER_type_Valid_constr_1;
194 extern asn_TYPE_descriptor_t asn_DEF_Valid;
195 extern const asn_INTEGER_specifics_t asn_SPC_Valid_specs_1;
196 asn_struct_free_f Valid_free;
197 asn_struct_print_f Valid_print;
198 asn_constr_check_f Valid_constraint;
199 ber_type_decoder_f Valid_decode_ber;
200 der_type_encoder_f Valid_encode_der;
201 xer_type_decoder_f Valid_decode_xer;
202 xer_type_encoder_f Valid_encode_xer;
203 per_type_decoder_f Valid_decode_uper;
204 per_type_encoder_f Valid_encode_uper;
205 per_type_decoder_f Valid_decode_aper;
206 per_type_encoder_f Valid_encode_aper;
208 /*** <<< CODE [Valid] >>> ***/
211 * This type is implemented using NativeEnumerated,
212 * so here we adjust the DEF accordingly.
215 /*** <<< CTDEFS [Valid] >>> ***/
217 asn_per_constraints_t asn_PER_type_Valid_constr_1 CC_NOTUSED = {
218 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
219 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
220 0, 0 /* No PER value map */
223 /*** <<< STAT-DEFS [Valid] >>> ***/
225 static const asn_INTEGER_enum_map_t asn_MAP_Valid_value2enum_1[] = {
229 static const unsigned int asn_MAP_Valid_enum2value_1[] = {
233 const asn_INTEGER_specifics_t asn_SPC_Valid_specs_1 = {
234 asn_MAP_Valid_value2enum_1, /* "tag" => N; sorted by tag */
235 asn_MAP_Valid_enum2value_1, /* N => "tag"; sorted by N */
236 2, /* Number of elements in the maps */
237 0, /* Enumeration is not extensible */
238 1, /* Strict enumeration */
239 0, /* Native long size */
242 static const ber_tlv_tag_t asn_DEF_Valid_tags_1[] = {
243 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
245 asn_TYPE_descriptor_t asn_DEF_Valid = {
248 &asn_OP_NativeEnumerated,
249 asn_DEF_Valid_tags_1,
250 sizeof(asn_DEF_Valid_tags_1)
251 /sizeof(asn_DEF_Valid_tags_1[0]), /* 1 */
252 asn_DEF_Valid_tags_1, /* Same as above */
253 sizeof(asn_DEF_Valid_tags_1)
254 /sizeof(asn_DEF_Valid_tags_1[0]), /* 1 */
255 { 0, &asn_PER_type_Valid_constr_1, NativeEnumerated_constraint },
256 0, 0, /* Defined elsewhere */
257 &asn_SPC_Valid_specs_1 /* Additional specs */
261 /*** <<< INCLUDES [Packet-List] >>> ***/
263 #include "UpperLayer-List.h"
265 /*** <<< TYPE-DECLS [Packet-List] >>> ***/
267 typedef UpperLayer_List_41P0_t Packet_List_t;
269 /*** <<< FUNC-DECLS [Packet-List] >>> ***/
271 extern asn_TYPE_descriptor_t asn_DEF_Packet_List;
272 asn_struct_free_f Packet_List_free;
273 asn_struct_print_f Packet_List_print;
274 asn_constr_check_f Packet_List_constraint;
275 ber_type_decoder_f Packet_List_decode_ber;
276 der_type_encoder_f Packet_List_encode_der;
277 xer_type_decoder_f Packet_List_decode_xer;
278 xer_type_encoder_f Packet_List_encode_xer;
279 per_type_decoder_f Packet_List_decode_uper;
280 per_type_encoder_f Packet_List_encode_uper;
281 per_type_decoder_f Packet_List_decode_aper;
282 per_type_encoder_f Packet_List_encode_aper;
284 /*** <<< CODE [Packet-List] >>> ***/
287 Packet_List_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
288 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
292 ASN__CTFAIL(app_key, td, sptr,
293 "%s: value not given (%s:%d)",
294 td->name, __FILE__, __LINE__);
298 /* Determine the number of elements */
299 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
301 if((size >= 1 && size <= 256)) {
302 /* Perform validation of the inner elements */
303 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
305 ASN__CTFAIL(app_key, td, sptr,
306 "%s: constraint failed (%s:%d)",
307 td->name, __FILE__, __LINE__);
313 * This type is implemented using UpperLayer_List_41P0,
314 * so here we adjust the DEF accordingly.
317 /*** <<< CTDEFS [Packet-List] >>> ***/
319 static asn_per_constraints_t asn_PER_type_Packet_List_constr_1 CC_NOTUSED = {
320 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
321 { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,
322 0, 0 /* No PER value map */
325 /*** <<< STAT-DEFS [Packet-List] >>> ***/
327 static const ber_tlv_tag_t asn_DEF_Packet_List_tags_1[] = {
328 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
330 asn_TYPE_descriptor_t asn_DEF_Packet_List = {
334 asn_DEF_Packet_List_tags_1,
335 sizeof(asn_DEF_Packet_List_tags_1)
336 /sizeof(asn_DEF_Packet_List_tags_1[0]), /* 1 */
337 asn_DEF_Packet_List_tags_1, /* Same as above */
338 sizeof(asn_DEF_Packet_List_tags_1)
339 /sizeof(asn_DEF_Packet_List_tags_1[0]), /* 1 */
340 { 0, &asn_PER_type_Packet_List_constr_1, Packet_List_constraint },
341 asn_MBR_LowerLayer_List_45P0_1,
342 1, /* Single element */
343 &asn_SPC_LowerLayer_List_45P0_specs_1 /* Additional specs */
347 /*** <<< INCLUDES [UpperLayer-List] >>> ***/
349 #include "LowerLayer-List.h"
351 /*** <<< TYPE-DECLS [UpperLayer-List] >>> ***/
353 typedef LowerLayer_List_45P0_t UpperLayer_List_41P0_t;
355 /*** <<< FUNC-DECLS [UpperLayer-List] >>> ***/
357 extern asn_per_constraints_t asn_PER_type_UpperLayer_List_41P0_constr_1;
358 extern asn_TYPE_descriptor_t asn_DEF_UpperLayer_List_41P0;
359 asn_struct_free_f UpperLayer_List_41P0_free;
360 asn_struct_print_f UpperLayer_List_41P0_print;
361 asn_constr_check_f UpperLayer_List_41P0_constraint;
362 ber_type_decoder_f UpperLayer_List_41P0_decode_ber;
363 der_type_encoder_f UpperLayer_List_41P0_encode_der;
364 xer_type_decoder_f UpperLayer_List_41P0_decode_xer;
365 xer_type_encoder_f UpperLayer_List_41P0_encode_xer;
366 per_type_decoder_f UpperLayer_List_41P0_decode_uper;
367 per_type_encoder_f UpperLayer_List_41P0_encode_uper;
368 per_type_decoder_f UpperLayer_List_41P0_decode_aper;
369 per_type_encoder_f UpperLayer_List_41P0_encode_aper;
371 /*** <<< CODE [UpperLayer-List] >>> ***/
374 UpperLayer_List_41P0_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
375 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
379 ASN__CTFAIL(app_key, td, sptr,
380 "%s: value not given (%s:%d)",
381 td->name, __FILE__, __LINE__);
385 /* Determine the number of elements */
386 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
388 if((size >= 1 && size <= 256)) {
389 /* Perform validation of the inner elements */
390 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
392 ASN__CTFAIL(app_key, td, sptr,
393 "%s: constraint failed (%s:%d)",
394 td->name, __FILE__, __LINE__);
400 * This type is implemented using LowerLayer_List_45P0,
401 * so here we adjust the DEF accordingly.
404 /*** <<< CTDEFS [UpperLayer-List] >>> ***/
406 asn_per_constraints_t asn_PER_type_UpperLayer_List_41P0_constr_1 CC_NOTUSED = {
407 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
408 { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,
409 0, 0 /* No PER value map */
412 /*** <<< STAT-DEFS [UpperLayer-List] >>> ***/
414 static const ber_tlv_tag_t asn_DEF_UpperLayer_List_41P0_tags_1[] = {
415 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
417 asn_TYPE_descriptor_t asn_DEF_UpperLayer_List_41P0 = {
421 asn_DEF_UpperLayer_List_41P0_tags_1,
422 sizeof(asn_DEF_UpperLayer_List_41P0_tags_1)
423 /sizeof(asn_DEF_UpperLayer_List_41P0_tags_1[0]), /* 1 */
424 asn_DEF_UpperLayer_List_41P0_tags_1, /* Same as above */
425 sizeof(asn_DEF_UpperLayer_List_41P0_tags_1)
426 /sizeof(asn_DEF_UpperLayer_List_41P0_tags_1[0]), /* 1 */
427 { 0, &asn_PER_type_UpperLayer_List_41P0_constr_1, UpperLayer_List_41P0_constraint },
428 asn_MBR_LowerLayer_List_45P0_1,
429 1, /* Single element */
430 &asn_SPC_LowerLayer_List_45P0_specs_1 /* Additional specs */
434 /*** <<< INCLUDES [LowerLayer-List] >>> ***/
436 #include <asn_SEQUENCE_OF.h>
437 #include <constr_SEQUENCE_OF.h>
439 /*** <<< FWD-DECLS [LowerLayer-List] >>> ***/
443 /*** <<< TYPE-DECLS [LowerLayer-List] >>> ***/
445 typedef struct LowerLayer_List_45P0 {
446 A_SEQUENCE_OF(struct SinglePacket) list;
448 /* Context for parsing across buffer boundaries */
449 asn_struct_ctx_t _asn_ctx;
450 } LowerLayer_List_45P0_t;
452 /*** <<< FUNC-DECLS [LowerLayer-List] >>> ***/
454 extern asn_TYPE_descriptor_t asn_DEF_LowerLayer_List_45P0;
455 extern asn_SET_OF_specifics_t asn_SPC_LowerLayer_List_45P0_specs_1;
456 extern asn_TYPE_member_t asn_MBR_LowerLayer_List_45P0_1[1];
457 extern asn_per_constraints_t asn_PER_type_LowerLayer_List_45P0_constr_1;
459 /*** <<< POST-INCLUDE [LowerLayer-List] >>> ***/
461 #include "SinglePacket.h"
463 /*** <<< CTDEFS [LowerLayer-List] >>> ***/
465 asn_per_constraints_t asn_PER_type_LowerLayer_List_45P0_constr_1 CC_NOTUSED = {
466 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
467 { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */,
468 0, 0 /* No PER value map */
471 /*** <<< STAT-DEFS [LowerLayer-List] >>> ***/
473 asn_TYPE_member_t asn_MBR_LowerLayer_List_45P0_1[] = {
475 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
477 .type = &asn_DEF_SinglePacket_48P0,
479 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
480 0, 0, /* No default value */
484 static const ber_tlv_tag_t asn_DEF_LowerLayer_List_45P0_tags_1[] = {
485 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
487 asn_SET_OF_specifics_t asn_SPC_LowerLayer_List_45P0_specs_1 = {
488 sizeof(struct LowerLayer_List_45P0),
489 offsetof(struct LowerLayer_List_45P0, _asn_ctx),
490 0, /* XER encoding is XMLDelimitedItemList */
492 asn_TYPE_descriptor_t asn_DEF_LowerLayer_List_45P0 = {
496 asn_DEF_LowerLayer_List_45P0_tags_1,
497 sizeof(asn_DEF_LowerLayer_List_45P0_tags_1)
498 /sizeof(asn_DEF_LowerLayer_List_45P0_tags_1[0]), /* 1 */
499 asn_DEF_LowerLayer_List_45P0_tags_1, /* Same as above */
500 sizeof(asn_DEF_LowerLayer_List_45P0_tags_1)
501 /sizeof(asn_DEF_LowerLayer_List_45P0_tags_1[0]), /* 1 */
502 { 0, &asn_PER_type_LowerLayer_List_45P0_constr_1, SEQUENCE_OF_constraint },
503 asn_MBR_LowerLayer_List_45P0_1,
504 1, /* Single element */
505 &asn_SPC_LowerLayer_List_45P0_specs_1 /* Additional specs */
509 /*** <<< INCLUDES [SinglePacket] >>> ***/
513 /*** <<< TYPE-DECLS [SinglePacket] >>> ***/
515 typedef ClassItem_t SinglePacket_48P0_t;
517 /*** <<< FUNC-DECLS [SinglePacket] >>> ***/
519 extern asn_TYPE_descriptor_t asn_DEF_SinglePacket_48P0;
520 asn_struct_free_f SinglePacket_48P0_free;
521 asn_struct_print_f SinglePacket_48P0_print;
522 asn_constr_check_f SinglePacket_48P0_constraint;
523 ber_type_decoder_f SinglePacket_48P0_decode_ber;
524 der_type_encoder_f SinglePacket_48P0_encode_der;
525 xer_type_decoder_f SinglePacket_48P0_decode_xer;
526 xer_type_encoder_f SinglePacket_48P0_encode_xer;
527 per_type_decoder_f SinglePacket_48P0_decode_uper;
528 per_type_encoder_f SinglePacket_48P0_encode_uper;
529 per_type_decoder_f SinglePacket_48P0_decode_aper;
530 per_type_encoder_f SinglePacket_48P0_encode_aper;
532 /*** <<< CODE [SinglePacket] >>> ***/
535 * This type is implemented using ClassItem,
536 * so here we adjust the DEF accordingly.
539 /*** <<< STAT-DEFS [SinglePacket] >>> ***/
541 static const ber_tlv_tag_t asn_DEF_SinglePacket_48P0_tags_1[] = {
542 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
544 asn_TYPE_descriptor_t asn_DEF_SinglePacket_48P0 = {
548 asn_DEF_SinglePacket_48P0_tags_1,
549 sizeof(asn_DEF_SinglePacket_48P0_tags_1)
550 /sizeof(asn_DEF_SinglePacket_48P0_tags_1[0]), /* 1 */
551 asn_DEF_SinglePacket_48P0_tags_1, /* Same as above */
552 sizeof(asn_DEF_SinglePacket_48P0_tags_1)
553 /sizeof(asn_DEF_SinglePacket_48P0_tags_1[0]), /* 1 */
554 { 0, 0, SEQUENCE_constraint },
556 3, /* Elements count */
557 &asn_SPC_ClassItem_specs_1 /* Additional specs */
561 /*** <<< INCLUDES [Packet] >>> ***/
563 #include "PacketId.h"
567 #include <OCTET_STRING.h>
569 #include <OPEN_TYPE.h>
570 #include <constr_CHOICE.h>
571 #include <constr_SEQUENCE.h>
573 /*** <<< DEPS [Packet] >>> ***/
575 typedef enum value_PR {
576 value_PR_NOTHING, /* No components present */
577 value_PR_OCTET_STRING
580 /*** <<< TYPE-DECLS [Packet] >>> ***/
582 typedef struct ClassItem {
587 union ClassItem__value_u {
588 OCTET_STRING_t OCTET_STRING;
591 /* Context for parsing across buffer boundaries */
592 asn_struct_ctx_t _asn_ctx;
595 /* Context for parsing across buffer boundaries */
596 asn_struct_ctx_t _asn_ctx;
599 /*** <<< FUNC-DECLS [Packet] >>> ***/
601 extern asn_TYPE_descriptor_t asn_DEF_ClassItem;
602 extern asn_SEQUENCE_specifics_t asn_SPC_ClassItem_specs_1;
603 extern asn_TYPE_member_t asn_MBR_ClassItem_1[3];
605 /*** <<< IOC-TABLES [Packet] >>> ***/
607 static const long asn_VAL_1_id_TYPE1 = 1;
608 static const long asn_VAL_1_blue = 2;
609 static const long asn_VAL_1_crc_ok = 1;
610 static const asn_ioc_cell_t asn_IOS_ClassItem_1_rows[] = {
611 { "&id", aioc__value, &asn_DEF_PacketId, &asn_VAL_1_id_TYPE1 },
612 { "&color", aioc__value, &asn_DEF_Color, &asn_VAL_1_blue },
613 { "&Value", aioc__type, &asn_DEF_OCTET_STRING },
614 { "&valid", aioc__value, &asn_DEF_Valid, &asn_VAL_1_crc_ok }
616 static const asn_ioc_set_t asn_IOS_ClassItem_1[] = {
617 { 1, 4, asn_IOS_ClassItem_1_rows }
620 /*** <<< CODE [Packet] >>> ***/
623 memb_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
624 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
628 ASN__CTFAIL(app_key, td, sptr,
629 "%s: value not given (%s:%d)",
630 td->name, __FILE__, __LINE__);
634 value = *(const long *)sptr;
636 if((value >= 0 && value <= 65535)) {
637 /* Constraint check succeeded */
640 ASN__CTFAIL(app_key, td, sptr,
641 "%s: constraint failed (%s:%d)",
642 td->name, __FILE__, __LINE__);
647 static asn_type_selector_result_t
648 select_ClassItem_color_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
649 asn_type_selector_result_t result = {0, 0};
650 const asn_ioc_set_t *itable = asn_IOS_ClassItem_1;
651 size_t constraining_column = 0; /* &id */
652 size_t for_column = 1; /* &color */
653 size_t row, presence_index = 0;
654 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ClassItem, id));
656 for(row=0; row < itable->rows_count; row++) {
657 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
658 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
660 if(type_cell->cell_kind == aioc__undefined)
664 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
665 result.type_descriptor = type_cell->type_descriptor;
666 result.presence_index = presence_index;
675 memb_color_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
676 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
679 ASN__CTFAIL(app_key, td, sptr,
680 "%s: value not given (%s:%d)",
681 td->name, __FILE__, __LINE__);
686 if(1 /* No applicable constraints whatsoever */) {
687 /* Nothing is here. See below */
690 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
693 static asn_type_selector_result_t
694 select_ClassItem_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
695 asn_type_selector_result_t result = {0, 0};
696 const asn_ioc_set_t *itable = asn_IOS_ClassItem_1;
697 size_t constraining_column = 0; /* &id */
698 size_t for_column = 2; /* &Value */
699 size_t row, presence_index = 0;
700 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct ClassItem, id));
702 for(row=0; row < itable->rows_count; row++) {
703 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
704 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
706 if(type_cell->cell_kind == aioc__undefined)
710 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
711 result.type_descriptor = type_cell->type_descriptor;
712 result.presence_index = presence_index;
721 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
722 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
725 ASN__CTFAIL(app_key, td, sptr,
726 "%s: value not given (%s:%d)",
727 td->name, __FILE__, __LINE__);
732 if(1 /* No applicable constraints whatsoever */) {
733 /* Nothing is here. See below */
736 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
740 /*** <<< CTDEFS [Packet] >>> ***/
742 static asn_per_constraints_t asn_PER_memb_id_constr_2 CC_NOTUSED = {
743 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
744 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
745 0, 0 /* No PER value map */
747 static asn_per_constraints_t asn_PER_memb_color_constr_3 CC_NOTUSED = {
748 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
749 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
750 0, 0 /* No PER value map */
752 static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
753 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
754 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
755 0, 0 /* No PER value map */
758 /*** <<< STAT-DEFS [Packet] >>> ***/
760 static asn_TYPE_member_t asn_MBR_value_4[] = {
761 { ATF_NOFLAGS, 0, offsetof(struct value, choice.OCTET_STRING),
762 .tag = (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
764 .type = &asn_DEF_OCTET_STRING,
766 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
767 0, 0, /* No default value */
768 .name = "OCTET STRING"
771 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
772 { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* OCTET STRING */
774 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
775 sizeof(struct value),
776 offsetof(struct value, _asn_ctx),
777 offsetof(struct value, present),
778 sizeof(((struct value *)0)->present),
779 .tag2el = asn_MAP_value_tag2el_4,
780 .tag2el_count = 1, /* Count of tags in the map */
782 .first_extension = -1 /* Extensions start */
784 static /* Use -fall-defs-global to expose */
785 asn_TYPE_descriptor_t asn_DEF_value_4 = {
789 0, /* No effective tags (pointer) */
790 0, /* No effective tags (count) */
791 0, /* No tags (pointer) */
792 0, /* No tags (count) */
793 { 0, 0, OPEN_TYPE_constraint },
795 1, /* Elements count */
796 &asn_SPC_value_specs_4 /* Additional specs */
799 asn_TYPE_member_t asn_MBR_ClassItem_1[] = {
800 { ATF_NOFLAGS, 0, offsetof(struct ClassItem, id),
801 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
803 .type = &asn_DEF_PacketId,
805 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_id_constr_2, .general_constraints = memb_id_constraint_1 },
806 0, 0, /* No default value */
809 { ATF_NOFLAGS, 0, offsetof(struct ClassItem, color),
810 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
812 .type = &asn_DEF_Color,
813 .type_selector = select_ClassItem_color_type,
814 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_color_constr_3, .general_constraints = memb_color_constraint_1 },
815 0, 0, /* No default value */
818 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct ClassItem, value),
819 .tag = -1 /* Ambiguous tag (ANY?) */,
821 .type = &asn_DEF_value_4,
822 .type_selector = select_ClassItem_value_type,
823 { .oer_constraints = 0, .per_constraints = &asn_PER_memb_value_constr_4, .general_constraints = memb_value_constraint_1 },
824 0, 0, /* No default value */
828 static const ber_tlv_tag_t asn_DEF_ClassItem_tags_1[] = {
829 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
831 static const asn_TYPE_tag2member_t asn_MAP_ClassItem_tag2el_1[] = {
832 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */
833 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* color */
835 asn_SEQUENCE_specifics_t asn_SPC_ClassItem_specs_1 = {
836 sizeof(struct ClassItem),
837 offsetof(struct ClassItem, _asn_ctx),
838 .tag2el = asn_MAP_ClassItem_tag2el_1,
839 .tag2el_count = 2, /* Count of tags in the map */
840 0, 0, 0, /* Optional elements (not needed) */
841 -1, /* First extension addition */
843 asn_TYPE_descriptor_t asn_DEF_ClassItem = {
847 asn_DEF_ClassItem_tags_1,
848 sizeof(asn_DEF_ClassItem_tags_1)
849 /sizeof(asn_DEF_ClassItem_tags_1[0]), /* 1 */
850 asn_DEF_ClassItem_tags_1, /* Same as above */
851 sizeof(asn_DEF_ClassItem_tags_1)
852 /sizeof(asn_DEF_ClassItem_tags_1[0]), /* 1 */
853 { 0, 0, SEQUENCE_constraint },
855 3, /* Elements count */
856 &asn_SPC_ClassItem_specs_1 /* Additional specs */
860 /*** <<< asn_constant.h >>> ***/
863 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
866 #ifndef _ASN_CONSTANT_H
867 #define _ASN_CONSTANT_H
873 #define max_items (256)
880 #endif /* _ASN_CONSTANT_H */