Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Test-structure-1] >>> ***/ |
| 3 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 4 | #include <INTEGER.h> |
| 5 | #include <asn_SET_OF.h> |
| 6 | #include <constr_SET_OF.h> |
| 7 | #include <asn_SEQUENCE_OF.h> |
| 8 | #include <constr_SEQUENCE_OF.h> |
| 9 | #include <constr_SEQUENCE.h> |
| 10 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 11 | /*** <<< FWD-DECLS [Test-structure-1] >>> ***/ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 12 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 13 | struct Test_structure_1; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 14 | |
| 15 | /*** <<< TYPE-DECLS [Test-structure-1] >>> ***/ |
| 16 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 17 | typedef struct Test_structure_1 { |
| 18 | struct t_member1 { |
| 19 | A_SET_OF(struct Test_structure_1) list; |
| 20 | |
| 21 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 22 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 23 | } t_member1; |
| 24 | struct t_member2 { |
| 25 | A_SEQUENCE_OF(struct Test_structure_1) list; |
| 26 | |
| 27 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 28 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 29 | } t_member2; |
| 30 | struct Test_structure_1 *t_member3 /* OPTIONAL */; |
| 31 | INTEGER_t t_member4; |
| 32 | |
| 33 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 34 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 35 | } Test_structure_1_t; |
| 36 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 37 | /*** <<< FUNC-DECLS [Test-structure-1] >>> ***/ |
| 38 | |
| 39 | extern asn_TYPE_descriptor_t asn_DEF_Test_structure_1; |
| 40 | |
| 41 | /*** <<< POST-INCLUDE [Test-structure-1] >>> ***/ |
| 42 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 43 | #include "Test-structure-1.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 44 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 45 | /*** <<< STAT-DEFS [Test-structure-1] >>> ***/ |
| 46 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 47 | static asn_TYPE_member_t asn_MBR_t_member1_2[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 48 | { ATF_POINTER, 0, 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 49 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 50 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 51 | .type = &asn_DEF_Test_structure_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 52 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 53 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 54 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 55 | .name = "" |
| 56 | }, |
| 57 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 58 | static const ber_tlv_tag_t asn_DEF_t_member1_tags_2[] = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 59 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 60 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 61 | static asn_SET_OF_specifics_t asn_SPC_t_member1_specs_2 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 62 | sizeof(struct t_member1), |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 63 | offsetof(struct t_member1, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 64 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 65 | }; |
| 66 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 67 | asn_TYPE_descriptor_t asn_DEF_t_member1_2 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 68 | "t-member1", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 69 | "t-member1", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 70 | SET_OF_free, |
| 71 | SET_OF_print, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 72 | SET_OF_constraint, |
| 73 | SET_OF_decode_ber, |
| 74 | SET_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 75 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 76 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 77 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 78 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 79 | asn_DEF_t_member1_tags_2, |
| 80 | sizeof(asn_DEF_t_member1_tags_2) |
| 81 | /sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */ |
| 82 | asn_DEF_t_member1_tags_2, /* Same as above */ |
| 83 | sizeof(asn_DEF_t_member1_tags_2) |
| 84 | /sizeof(asn_DEF_t_member1_tags_2[0]), /* 1 */ |
| 85 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 86 | asn_MBR_t_member1_2, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 87 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 88 | &asn_SPC_t_member1_specs_2 /* Additional specs */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 89 | }; |
| 90 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 91 | static asn_TYPE_member_t asn_MBR_t_member2_4[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 92 | { ATF_POINTER, 0, 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 93 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 94 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 95 | .type = &asn_DEF_Test_structure_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 96 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 97 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 98 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 99 | .name = "" |
| 100 | }, |
| 101 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 102 | static const ber_tlv_tag_t asn_DEF_t_member2_tags_4[] = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 103 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 104 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 105 | static asn_SET_OF_specifics_t asn_SPC_t_member2_specs_4 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 106 | sizeof(struct t_member2), |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 107 | offsetof(struct t_member2, _asn_ctx), |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 108 | 0, /* XER encoding is XMLDelimitedItemList */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 109 | }; |
| 110 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 111 | asn_TYPE_descriptor_t asn_DEF_t_member2_4 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 112 | "t-member2", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 113 | "t-member2", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 114 | SEQUENCE_OF_free, |
| 115 | SEQUENCE_OF_print, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 116 | SEQUENCE_OF_constraint, |
| 117 | SEQUENCE_OF_decode_ber, |
| 118 | SEQUENCE_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 119 | SEQUENCE_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 120 | SEQUENCE_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 121 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 122 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 123 | asn_DEF_t_member2_tags_4, |
| 124 | sizeof(asn_DEF_t_member2_tags_4) |
| 125 | /sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */ |
| 126 | asn_DEF_t_member2_tags_4, /* Same as above */ |
| 127 | sizeof(asn_DEF_t_member2_tags_4) |
| 128 | /sizeof(asn_DEF_t_member2_tags_4[0]), /* 1 */ |
| 129 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 130 | asn_MBR_t_member2_4, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 131 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 132 | &asn_SPC_t_member2_specs_4 /* Additional specs */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 133 | }; |
| 134 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 135 | static asn_TYPE_member_t asn_MBR_Test_structure_1_1[] = { |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 136 | { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member1), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 137 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 138 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 139 | .type = &asn_DEF_t_member1_2, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 140 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 141 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 142 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 143 | .name = "t-member1" |
| 144 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 145 | { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member2), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 146 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 147 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 148 | .type = &asn_DEF_t_member2_4, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 149 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 150 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 151 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 152 | .name = "t-member2" |
| 153 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 154 | { ATF_POINTER, 1, offsetof(struct Test_structure_1, t_member3), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 155 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 156 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 157 | .type = &asn_DEF_Test_structure_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 158 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 159 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 160 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 161 | .name = "t-member3" |
| 162 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 163 | { ATF_NOFLAGS, 0, offsetof(struct Test_structure_1, t_member4), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 164 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 165 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 166 | .type = &asn_DEF_INTEGER, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 167 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 168 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 169 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 170 | .name = "t-member4" |
| 171 | }, |
| 172 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 173 | static const ber_tlv_tag_t asn_DEF_Test_structure_1_tags_1[] = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 174 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 175 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 176 | static const asn_TYPE_tag2member_t asn_MAP_Test_structure_1_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 177 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* t-member4 */ |
| 178 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* t-member2 */ |
| 179 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* t-member3 */ |
| 180 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* t-member1 */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 181 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 182 | static asn_SEQUENCE_specifics_t asn_SPC_Test_structure_1_specs_1 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 183 | sizeof(struct Test_structure_1), |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 184 | offsetof(struct Test_structure_1, _asn_ctx), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 185 | asn_MAP_Test_structure_1_tag2el_1, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 186 | 4, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 187 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 188 | -1, /* Start extensions */ |
| 189 | -1 /* Stop extensions */ |
| 190 | }; |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 191 | asn_TYPE_descriptor_t asn_DEF_Test_structure_1 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 192 | "Test-structure-1", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 193 | "Test-structure-1", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 194 | SEQUENCE_free, |
| 195 | SEQUENCE_print, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 196 | SEQUENCE_constraint, |
| 197 | SEQUENCE_decode_ber, |
| 198 | SEQUENCE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 199 | SEQUENCE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 200 | SEQUENCE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 201 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 202 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 203 | asn_DEF_Test_structure_1_tags_1, |
| 204 | sizeof(asn_DEF_Test_structure_1_tags_1) |
| 205 | /sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */ |
| 206 | asn_DEF_Test_structure_1_tags_1, /* Same as above */ |
| 207 | sizeof(asn_DEF_Test_structure_1_tags_1) |
| 208 | /sizeof(asn_DEF_Test_structure_1_tags_1[0]), /* 1 */ |
| 209 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 210 | asn_MBR_Test_structure_1_1, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 211 | 4, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 212 | &asn_SPC_Test_structure_1_specs_1 /* Additional specs */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 213 | }; |
| 214 | |
| 215 | |
| 216 | /*** <<< INCLUDES [Choice-1] >>> ***/ |
| 217 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 218 | #include <INTEGER.h> |
| 219 | #include <asn_SET_OF.h> |
| 220 | #include <constr_SET_OF.h> |
| 221 | #include <constr_CHOICE.h> |
| 222 | |
| 223 | /*** <<< DEPS [Choice-1] >>> ***/ |
| 224 | |
| 225 | typedef enum Choice_1_PR { |
| 226 | Choice_1_PR_NOTHING, /* No components present */ |
| 227 | Choice_1_PR_and, |
| 228 | Choice_1_PR_or, |
| 229 | Choice_1_PR_not, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 230 | Choice_1_PR_other |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 231 | } Choice_1_PR; |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 232 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 233 | /*** <<< FWD-DECLS [Choice-1] >>> ***/ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 234 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 235 | struct Choice_1; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 236 | |
| 237 | /*** <<< TYPE-DECLS [Choice-1] >>> ***/ |
| 238 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 239 | typedef struct Choice_1 { |
| 240 | Choice_1_PR present; |
Lev Walkin | 0f5d74c | 2005-08-14 15:03:31 +0000 | [diff] [blame] | 241 | union Choice_1_u { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 242 | struct Choice_1 *And; |
| 243 | struct Or { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 244 | A_SET_OF(struct Choice_1) list; |
| 245 | |
| 246 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 247 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 248 | } Or; |
| 249 | struct Choice_1 *Not; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 250 | INTEGER_t other; |
| 251 | } choice; |
| 252 | |
| 253 | /* Context for parsing across buffer boundaries */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 254 | asn_struct_ctx_t _asn_ctx; |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 255 | } Choice_1_t; |
| 256 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 257 | /*** <<< FUNC-DECLS [Choice-1] >>> ***/ |
| 258 | |
| 259 | extern asn_TYPE_descriptor_t asn_DEF_Choice_1; |
| 260 | |
| 261 | /*** <<< POST-INCLUDE [Choice-1] >>> ***/ |
| 262 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 263 | #include "Choice-1.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 264 | |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 265 | /*** <<< STAT-DEFS [Choice-1] >>> ***/ |
| 266 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 267 | static asn_TYPE_member_t asn_MBR_or_3[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 268 | { ATF_POINTER, 0, 0, |
Lev Walkin | b918973 | 2004-09-10 09:37:12 +0000 | [diff] [blame] | 269 | .tag = -1 /* Ambiguous tag (CHOICE?) */, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 270 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 271 | .type = &asn_DEF_Choice_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 272 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 273 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 274 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 275 | .name = "" |
| 276 | }, |
| 277 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 278 | static const ber_tlv_tag_t asn_DEF_or_tags_3[] = { |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 279 | (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 280 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 281 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 282 | static asn_SET_OF_specifics_t asn_SPC_or_specs_3 = { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 283 | sizeof(struct Or), |
| 284 | offsetof(struct Or, _asn_ctx), |
Lev Walkin | d1bfea6 | 2005-11-08 03:06:16 +0000 | [diff] [blame] | 285 | 2, /* XER encoding is XMLValueList */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 286 | }; |
| 287 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 288 | asn_TYPE_descriptor_t asn_DEF_or_3 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 289 | "or", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 290 | "or", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 291 | SET_OF_free, |
| 292 | SET_OF_print, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 293 | SET_OF_constraint, |
| 294 | SET_OF_decode_ber, |
| 295 | SET_OF_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 296 | SET_OF_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 297 | SET_OF_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 298 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 299 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 300 | asn_DEF_or_tags_3, |
| 301 | sizeof(asn_DEF_or_tags_3) |
| 302 | /sizeof(asn_DEF_or_tags_3[0]) - 1, /* 1 */ |
| 303 | asn_DEF_or_tags_3, /* Same as above */ |
| 304 | sizeof(asn_DEF_or_tags_3) |
| 305 | /sizeof(asn_DEF_or_tags_3[0]), /* 2 */ |
| 306 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 307 | asn_MBR_or_3, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 308 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 309 | &asn_SPC_or_specs_3 /* Additional specs */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 310 | }; |
| 311 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 312 | static asn_TYPE_member_t asn_MBR_Choice_1_1[] = { |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 313 | { ATF_POINTER, 0, offsetof(struct Choice_1, choice.And), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 314 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 315 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 316 | .type = &asn_DEF_Choice_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 317 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 318 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 319 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 320 | .name = "and" |
| 321 | }, |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 322 | { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.Or), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 323 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
Lev Walkin | 9ab21b8 | 2006-10-19 02:46:01 +0000 | [diff] [blame] | 324 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 325 | .type = &asn_DEF_or_3, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 326 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 327 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 328 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 329 | .name = "or" |
| 330 | }, |
Lev Walkin | 2a744a7 | 2013-03-27 01:56:23 -0700 | [diff] [blame] | 331 | { ATF_POINTER, 0, offsetof(struct Choice_1, choice.Not), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 332 | .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)), |
| 333 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 334 | .type = &asn_DEF_Choice_1, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 335 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 336 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 337 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 338 | .name = "not" |
| 339 | }, |
Lev Walkin | cc93b0f | 2004-09-10 09:18:20 +0000 | [diff] [blame] | 340 | { ATF_NOFLAGS, 0, offsetof(struct Choice_1, choice.other), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 341 | .tag = (ASN_TAG_CLASS_CONTEXT | (4 << 2)), |
| 342 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 343 | .type = &asn_DEF_INTEGER, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 344 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 345 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 346 | .default_value = 0, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 347 | .name = "other" |
| 348 | }, |
| 349 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 350 | static const asn_TYPE_tag2member_t asn_MAP_Choice_1_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 351 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* and */ |
| 352 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* or */ |
| 353 | { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* not */ |
| 354 | { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* other */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 355 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 356 | static asn_CHOICE_specifics_t asn_SPC_Choice_1_specs_1 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 357 | sizeof(struct Choice_1), |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 358 | offsetof(struct Choice_1, _asn_ctx), |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 359 | offsetof(struct Choice_1, present), |
| 360 | sizeof(((struct Choice_1 *)0)->present), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 361 | asn_MAP_Choice_1_tag2el_1, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 362 | 4, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 363 | .canonical_order = 0, |
| 364 | .ext_start = -1 /* Extensions start */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 365 | }; |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 366 | asn_TYPE_descriptor_t asn_DEF_Choice_1 = { |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 367 | "Choice-1", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 368 | "Choice-1", |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 369 | CHOICE_free, |
| 370 | CHOICE_print, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 371 | CHOICE_constraint, |
| 372 | CHOICE_decode_ber, |
| 373 | CHOICE_encode_der, |
Lev Walkin | 61b40d8 | 2004-10-23 15:07:45 +0000 | [diff] [blame] | 374 | CHOICE_decode_xer, |
Lev Walkin | a9cc46e | 2004-09-22 16:06:28 +0000 | [diff] [blame] | 375 | CHOICE_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 376 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 377 | CHOICE_outmost_tag, |
Lev Walkin | 188ed2c | 2004-09-13 08:31:01 +0000 | [diff] [blame] | 378 | 0, /* No effective tags (pointer) */ |
| 379 | 0, /* No effective tags (count) */ |
| 380 | 0, /* No tags (pointer) */ |
| 381 | 0, /* No tags (count) */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 382 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 383 | asn_MBR_Choice_1_1, |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 384 | 4, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 385 | &asn_SPC_Choice_1_specs_1 /* Additional specs */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 386 | }; |
| 387 | |
| 388 | |
| 389 | /*** <<< INCLUDES [Test-structure-2] >>> ***/ |
| 390 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 391 | #include <constr_SET.h> |
| 392 | |
| 393 | /*** <<< DEPS [Test-structure-2] >>> ***/ |
| 394 | |
| 395 | |
| 396 | /* |
| 397 | * Method of determining the components presence |
| 398 | */ |
| 399 | typedef enum Test_structure_2_PR { |
| 400 | Test_structure_2_PR_m1, /* Member m1 is present */ |
| 401 | } Test_structure_2_PR; |
| 402 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 403 | /*** <<< FWD-DECLS [Test-structure-2] >>> ***/ |
| 404 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 405 | struct Test_structure_3; |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 406 | |
| 407 | /*** <<< TYPE-DECLS [Test-structure-2] >>> ***/ |
| 408 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 409 | typedef struct Test_structure_2 { |
| 410 | struct Test_structure_3 *m1 /* OPTIONAL */; |
| 411 | |
| 412 | /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_2, Test_structure_2_PR_x) */ |
| 413 | unsigned int _presence_map |
| 414 | [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 415 | |
| 416 | /* Context for parsing across buffer boundaries */ |
| 417 | asn_struct_ctx_t _asn_ctx; |
| 418 | } Test_structure_2_t; |
| 419 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 420 | /*** <<< FUNC-DECLS [Test-structure-2] >>> ***/ |
| 421 | |
| 422 | extern asn_TYPE_descriptor_t asn_DEF_Test_structure_2; |
| 423 | |
| 424 | /*** <<< POST-INCLUDE [Test-structure-2] >>> ***/ |
| 425 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 426 | #include "Test-structure-3.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 427 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 428 | /*** <<< STAT-DEFS [Test-structure-2] >>> ***/ |
| 429 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 430 | static asn_TYPE_member_t asn_MBR_Test_structure_2_1[] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 431 | { ATF_POINTER, 1, offsetof(struct Test_structure_2, m1), |
| 432 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 433 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 434 | .type = &asn_DEF_Test_structure_3, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 435 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 436 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 437 | .default_value = 0, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 438 | .name = "m1" |
| 439 | }, |
| 440 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 441 | static const ber_tlv_tag_t asn_DEF_Test_structure_2_tags_1[] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 442 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 443 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 444 | static const asn_TYPE_tag2member_t asn_MAP_Test_structure_2_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 445 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 446 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 447 | static const uint8_t asn_MAP_Test_structure_2_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 448 | (0 << 7) |
| 449 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 450 | static asn_SET_specifics_t asn_SPC_Test_structure_2_specs_1 = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 451 | sizeof(struct Test_structure_2), |
| 452 | offsetof(struct Test_structure_2, _asn_ctx), |
| 453 | offsetof(struct Test_structure_2, _presence_map), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 454 | asn_MAP_Test_structure_2_tag2el_1, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 455 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 456 | asn_MAP_Test_structure_2_tag2el_1, /* Same as above */ |
Lev Walkin | f82138b | 2005-02-25 08:20:32 +0000 | [diff] [blame] | 457 | 1, /* Count of tags in the CXER map */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 458 | 0, /* Whether extensible */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 459 | (unsigned int *)asn_MAP_Test_structure_2_mmap_1 /* Mandatory elements map */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 460 | }; |
| 461 | asn_TYPE_descriptor_t asn_DEF_Test_structure_2 = { |
| 462 | "Test-structure-2", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 463 | "Test-structure-2", |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 464 | SET_free, |
| 465 | SET_print, |
| 466 | SET_constraint, |
| 467 | SET_decode_ber, |
| 468 | SET_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 469 | SET_decode_xer, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 470 | SET_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 471 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 472 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 473 | asn_DEF_Test_structure_2_tags_1, |
| 474 | sizeof(asn_DEF_Test_structure_2_tags_1) |
| 475 | /sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */ |
| 476 | asn_DEF_Test_structure_2_tags_1, /* Same as above */ |
| 477 | sizeof(asn_DEF_Test_structure_2_tags_1) |
| 478 | /sizeof(asn_DEF_Test_structure_2_tags_1[0]), /* 1 */ |
| 479 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 480 | asn_MBR_Test_structure_2_1, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 481 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 482 | &asn_SPC_Test_structure_2_specs_1 /* Additional specs */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 483 | }; |
| 484 | |
| 485 | |
| 486 | /*** <<< INCLUDES [Test-structure-3] >>> ***/ |
| 487 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 488 | #include <constr_SET.h> |
| 489 | |
| 490 | /*** <<< DEPS [Test-structure-3] >>> ***/ |
| 491 | |
| 492 | |
| 493 | /* |
| 494 | * Method of determining the components presence |
| 495 | */ |
| 496 | typedef enum Test_structure_3_PR { |
| 497 | Test_structure_3_PR_m1, /* Member m1 is present */ |
| 498 | } Test_structure_3_PR; |
| 499 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 500 | /*** <<< FWD-DECLS [Test-structure-3] >>> ***/ |
| 501 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 502 | struct Test_structure_2; |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 503 | |
| 504 | /*** <<< TYPE-DECLS [Test-structure-3] >>> ***/ |
| 505 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 506 | typedef struct Test_structure_3 { |
| 507 | struct Test_structure_2 *m1 /* OPTIONAL */; |
| 508 | |
| 509 | /* Presence bitmask: ASN_SET_ISPRESENT(pTest_structure_3, Test_structure_3_PR_x) */ |
| 510 | unsigned int _presence_map |
| 511 | [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 512 | |
| 513 | /* Context for parsing across buffer boundaries */ |
| 514 | asn_struct_ctx_t _asn_ctx; |
| 515 | } Test_structure_3_t; |
| 516 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 517 | /*** <<< FUNC-DECLS [Test-structure-3] >>> ***/ |
| 518 | |
| 519 | extern asn_TYPE_descriptor_t asn_DEF_Test_structure_3; |
| 520 | |
| 521 | /*** <<< POST-INCLUDE [Test-structure-3] >>> ***/ |
| 522 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 523 | #include "Test-structure-2.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 524 | |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 525 | /*** <<< STAT-DEFS [Test-structure-3] >>> ***/ |
| 526 | |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 527 | static asn_TYPE_member_t asn_MBR_Test_structure_3_1[] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 528 | { ATF_POINTER, 1, offsetof(struct Test_structure_3, m1), |
| 529 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 530 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 531 | .type = &asn_DEF_Test_structure_2, |
Lev Walkin | ba58e1b | 2005-01-17 12:20:19 +0000 | [diff] [blame] | 532 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 533 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 534 | .default_value = 0, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 535 | .name = "m1" |
| 536 | }, |
| 537 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 538 | static const ber_tlv_tag_t asn_DEF_Test_structure_3_tags_1[] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 539 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 540 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 541 | static const asn_TYPE_tag2member_t asn_MAP_Test_structure_3_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 542 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* m1 */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 543 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 544 | static const uint8_t asn_MAP_Test_structure_3_mmap_1[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 545 | (0 << 7) |
| 546 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 547 | static asn_SET_specifics_t asn_SPC_Test_structure_3_specs_1 = { |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 548 | sizeof(struct Test_structure_3), |
| 549 | offsetof(struct Test_structure_3, _asn_ctx), |
| 550 | offsetof(struct Test_structure_3, _presence_map), |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 551 | asn_MAP_Test_structure_3_tag2el_1, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 552 | 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 553 | asn_MAP_Test_structure_3_tag2el_1, /* Same as above */ |
Lev Walkin | f82138b | 2005-02-25 08:20:32 +0000 | [diff] [blame] | 554 | 1, /* Count of tags in the CXER map */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 555 | 0, /* Whether extensible */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 556 | (unsigned int *)asn_MAP_Test_structure_3_mmap_1 /* Mandatory elements map */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 557 | }; |
| 558 | asn_TYPE_descriptor_t asn_DEF_Test_structure_3 = { |
| 559 | "Test-structure-3", |
Lev Walkin | dc06f6b | 2004-10-20 15:50:55 +0000 | [diff] [blame] | 560 | "Test-structure-3", |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 561 | SET_free, |
| 562 | SET_print, |
| 563 | SET_constraint, |
| 564 | SET_decode_ber, |
| 565 | SET_encode_der, |
Lev Walkin | b223080 | 2005-02-14 20:31:31 +0000 | [diff] [blame] | 566 | SET_decode_xer, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 567 | SET_encode_xer, |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 568 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 569 | 0, /* Use generic outmost tag fetcher */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 570 | asn_DEF_Test_structure_3_tags_1, |
| 571 | sizeof(asn_DEF_Test_structure_3_tags_1) |
| 572 | /sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */ |
| 573 | asn_DEF_Test_structure_3_tags_1, /* Same as above */ |
| 574 | sizeof(asn_DEF_Test_structure_3_tags_1) |
| 575 | /sizeof(asn_DEF_Test_structure_3_tags_1[0]), /* 1 */ |
| 576 | 0, /* No PER visible constraints */ |
Lev Walkin | e0272aa | 2005-03-04 11:26:08 +0000 | [diff] [blame] | 577 | asn_MBR_Test_structure_3_1, |
Lev Walkin | 1ca6967 | 2004-09-29 13:19:12 +0000 | [diff] [blame] | 578 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 579 | &asn_SPC_Test_structure_3_specs_1 /* Additional specs */ |
Lev Walkin | 67ec209 | 2004-09-08 00:26:56 +0000 | [diff] [blame] | 580 | }; |
| 581 | |