Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Type] >>> ***/ |
| 3 | |
| 4 | #include <asn_SEQUENCE_OF.h> |
| 5 | #include <constr_SEQUENCE_OF.h> |
| 6 | #include <constr_SEQUENCE.h> |
| 7 | |
| 8 | /*** <<< FWD-DECLS [Type] >>> ***/ |
| 9 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 10 | struct Epyt; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 11 | |
| 12 | /*** <<< TYPE-DECLS [Type] >>> ***/ |
| 13 | |
| 14 | typedef struct Type { |
| 15 | struct data { |
| 16 | A_SEQUENCE_OF(struct Epyt) list; |
| 17 | |
| 18 | /* Context for parsing across buffer boundaries */ |
| 19 | asn_struct_ctx_t _asn_ctx; |
| 20 | } data; |
| 21 | |
| 22 | /* Context for parsing across buffer boundaries */ |
| 23 | asn_struct_ctx_t _asn_ctx; |
| 24 | } Type_t; |
| 25 | |
| 26 | /*** <<< FUNC-DECLS [Type] >>> ***/ |
| 27 | |
| 28 | extern asn_TYPE_descriptor_t asn_DEF_Type; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 29 | extern asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1; |
| 30 | extern asn_TYPE_member_t asn_MBR_Type_1[1]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 31 | |
| 32 | /*** <<< POST-INCLUDE [Type] >>> ***/ |
| 33 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 34 | #include "EpytRef.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 35 | |
| 36 | /*** <<< STAT-DEFS [Type] >>> ***/ |
| 37 | |
| 38 | static asn_TYPE_member_t asn_MBR_data_2[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 39 | { ATF_POINTER, 0, 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 40 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 41 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 42 | .type = &asn_DEF_EpytRef, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 43 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 44 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 45 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 46 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 47 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 48 | .name = "" |
| 49 | }, |
| 50 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 51 | static const ber_tlv_tag_t asn_DEF_data_tags_2[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 52 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 53 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 54 | static asn_SET_OF_specifics_t asn_SPC_data_specs_2 = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 55 | sizeof(struct data), |
| 56 | offsetof(struct data, _asn_ctx), |
| 57 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 58 | }; |
| 59 | static /* Use -fall-defs-global to expose */ |
| 60 | asn_TYPE_descriptor_t asn_DEF_data_2 = { |
| 61 | "data", |
| 62 | "data", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 63 | &asn_OP_SEQUENCE_OF, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 64 | SEQUENCE_OF_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 65 | asn_DEF_data_tags_2, |
| 66 | sizeof(asn_DEF_data_tags_2) |
| 67 | /sizeof(asn_DEF_data_tags_2[0]), /* 1 */ |
| 68 | asn_DEF_data_tags_2, /* Same as above */ |
| 69 | sizeof(asn_DEF_data_tags_2) |
| 70 | /sizeof(asn_DEF_data_tags_2[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 71 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 72 | 0, /* No PER visible constraints */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 73 | asn_MBR_data_2, |
| 74 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 75 | &asn_SPC_data_specs_2 /* Additional specs */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 76 | }; |
| 77 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 78 | asn_TYPE_member_t asn_MBR_Type_1[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 79 | { ATF_NOFLAGS, 0, offsetof(struct Type, data), |
| 80 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 81 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 82 | .type = &asn_DEF_data_2, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 83 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 84 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 85 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 86 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 87 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 88 | .name = "data" |
| 89 | }, |
| 90 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 91 | static const ber_tlv_tag_t asn_DEF_Type_tags_1[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 92 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 93 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 94 | static const asn_TYPE_tag2member_t asn_MAP_Type_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 95 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* data */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 96 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 97 | asn_SEQUENCE_specifics_t asn_SPC_Type_specs_1 = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 98 | sizeof(struct Type), |
| 99 | offsetof(struct Type, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 100 | .tag2el = asn_MAP_Type_tag2el_1, |
| 101 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 102 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 103 | -1, /* Start extensions */ |
| 104 | -1 /* Stop extensions */ |
| 105 | }; |
| 106 | asn_TYPE_descriptor_t asn_DEF_Type = { |
| 107 | "Type", |
| 108 | "Type", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 109 | &asn_OP_SEQUENCE, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 110 | SEQUENCE_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 111 | asn_DEF_Type_tags_1, |
| 112 | sizeof(asn_DEF_Type_tags_1) |
| 113 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
| 114 | asn_DEF_Type_tags_1, /* Same as above */ |
| 115 | sizeof(asn_DEF_Type_tags_1) |
| 116 | /sizeof(asn_DEF_Type_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 117 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 118 | 0, /* No PER visible constraints */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 119 | asn_MBR_Type_1, |
| 120 | 1, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 121 | &asn_SPC_Type_specs_1 /* Additional specs */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 125 | /*** <<< INCLUDES [EpytRef] >>> ***/ |
| 126 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 127 | #include "Epyt.h" |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 128 | |
| 129 | /*** <<< TYPE-DECLS [EpytRef] >>> ***/ |
| 130 | |
| 131 | typedef Epyt_t EpytRef_t; |
| 132 | |
| 133 | /*** <<< FUNC-DECLS [EpytRef] >>> ***/ |
| 134 | |
| 135 | extern asn_TYPE_descriptor_t asn_DEF_EpytRef; |
| 136 | asn_struct_free_f EpytRef_free; |
| 137 | asn_struct_print_f EpytRef_print; |
| 138 | asn_constr_check_f EpytRef_constraint; |
| 139 | ber_type_decoder_f EpytRef_decode_ber; |
| 140 | der_type_encoder_f EpytRef_encode_der; |
| 141 | xer_type_decoder_f EpytRef_decode_xer; |
| 142 | xer_type_encoder_f EpytRef_encode_xer; |
| 143 | |
| 144 | /*** <<< CODE [EpytRef] >>> ***/ |
| 145 | |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 146 | /* |
| 147 | * This type is implemented using Epyt, |
| 148 | * so here we adjust the DEF accordingly. |
| 149 | */ |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 150 | |
| 151 | /*** <<< STAT-DEFS [EpytRef] >>> ***/ |
| 152 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 153 | static const ber_tlv_tag_t asn_DEF_EpytRef_tags_1[] = { |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 154 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 155 | }; |
| 156 | asn_TYPE_descriptor_t asn_DEF_EpytRef = { |
| 157 | "EpytRef", |
| 158 | "EpytRef", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 159 | &asn_OP_SEQUENCE, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 160 | SEQUENCE_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 161 | asn_DEF_EpytRef_tags_1, |
| 162 | sizeof(asn_DEF_EpytRef_tags_1) |
| 163 | /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */ |
| 164 | asn_DEF_EpytRef_tags_1, /* Same as above */ |
| 165 | sizeof(asn_DEF_EpytRef_tags_1) |
| 166 | /sizeof(asn_DEF_EpytRef_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 167 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 168 | 0, /* No PER visible constraints */ |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 169 | asn_MBR_Epyt_1, |
| 170 | 3, /* Elements count */ |
| 171 | &asn_SPC_Epyt_specs_1 /* Additional specs */ |
Lev Walkin | caf0d5a | 2005-03-04 23:48:19 +0000 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 175 | /*** <<< INCLUDES [Epyt] >>> ***/ |
| 176 | |
| 177 | #include <asn_SET_OF.h> |
| 178 | #include <constr_SET_OF.h> |
| 179 | #include <constr_SEQUENCE.h> |
| 180 | |
| 181 | /*** <<< FWD-DECLS [Epyt] >>> ***/ |
| 182 | |
Lev Walkin | bf56d54 | 2005-03-04 23:50:56 +0000 | [diff] [blame] | 183 | struct Type; |
| 184 | struct Ypet; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 185 | |
| 186 | /*** <<< TYPE-DECLS [Epyt] >>> ***/ |
| 187 | |
| 188 | typedef struct Epyt { |
| 189 | struct stype { |
| 190 | A_SET_OF(struct Type) list; |
| 191 | |
| 192 | /* Context for parsing across buffer boundaries */ |
| 193 | asn_struct_ctx_t _asn_ctx; |
| 194 | } stype; |
| 195 | struct Type *type /* OPTIONAL */; |
| 196 | struct Ypet *ypet /* OPTIONAL */; |
| 197 | |
| 198 | /* Context for parsing across buffer boundaries */ |
| 199 | asn_struct_ctx_t _asn_ctx; |
| 200 | } Epyt_t; |
| 201 | |
| 202 | /*** <<< FUNC-DECLS [Epyt] >>> ***/ |
| 203 | |
| 204 | extern asn_TYPE_descriptor_t asn_DEF_Epyt; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 205 | extern asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1; |
| 206 | extern asn_TYPE_member_t asn_MBR_Epyt_1[3]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 207 | |
| 208 | /*** <<< POST-INCLUDE [Epyt] >>> ***/ |
| 209 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 210 | #include "Type.h" |
| 211 | #include "Ypet.h" |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 212 | |
| 213 | /*** <<< STAT-DEFS [Epyt] >>> ***/ |
| 214 | |
| 215 | static asn_TYPE_member_t asn_MBR_stype_2[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 216 | { ATF_POINTER, 0, 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 217 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 218 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 219 | .type = &asn_DEF_Type, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 220 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 221 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 222 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 223 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 224 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 225 | .name = "" |
| 226 | }, |
| 227 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 228 | static const ber_tlv_tag_t asn_DEF_stype_tags_2[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 229 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 230 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 231 | static asn_SET_OF_specifics_t asn_SPC_stype_specs_2 = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 232 | sizeof(struct stype), |
| 233 | offsetof(struct stype, _asn_ctx), |
| 234 | 0, /* XER encoding is XMLDelimitedItemList */ |
| 235 | }; |
| 236 | static /* Use -fall-defs-global to expose */ |
| 237 | asn_TYPE_descriptor_t asn_DEF_stype_2 = { |
| 238 | "stype", |
| 239 | "stype", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 240 | &asn_OP_SET_OF, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 241 | SET_OF_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 242 | asn_DEF_stype_tags_2, |
| 243 | sizeof(asn_DEF_stype_tags_2) |
| 244 | /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */ |
| 245 | asn_DEF_stype_tags_2, /* Same as above */ |
| 246 | sizeof(asn_DEF_stype_tags_2) |
| 247 | /sizeof(asn_DEF_stype_tags_2[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 248 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 249 | 0, /* No PER visible constraints */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 250 | asn_MBR_stype_2, |
| 251 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 252 | &asn_SPC_stype_specs_2 /* Additional specs */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 253 | }; |
| 254 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 255 | asn_TYPE_member_t asn_MBR_Epyt_1[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 256 | { ATF_NOFLAGS, 0, offsetof(struct Epyt, stype), |
| 257 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 258 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 259 | .type = &asn_DEF_stype_2, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 260 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 261 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 262 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 263 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 264 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 265 | .name = "stype" |
| 266 | }, |
| 267 | { ATF_POINTER, 2, offsetof(struct Epyt, type), |
| 268 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 269 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 270 | .type = &asn_DEF_Type, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 271 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 272 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 273 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 274 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 275 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 276 | .name = "type" |
| 277 | }, |
| 278 | { ATF_POINTER, 1, offsetof(struct Epyt, ypet), |
| 279 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 280 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 281 | .type = &asn_DEF_Ypet, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 282 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 283 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 284 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 285 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 286 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 287 | .name = "ypet" |
| 288 | }, |
| 289 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 290 | static const ber_tlv_tag_t asn_DEF_Epyt_tags_1[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 291 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 292 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 293 | static const asn_TYPE_tag2member_t asn_MAP_Epyt_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 294 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* type */ |
| 295 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 1 }, /* stype */ |
| 296 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, -1, 0 } /* ypet */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 297 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 298 | asn_SEQUENCE_specifics_t asn_SPC_Epyt_specs_1 = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 299 | sizeof(struct Epyt), |
| 300 | offsetof(struct Epyt, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 301 | .tag2el = asn_MAP_Epyt_tag2el_1, |
| 302 | .tag2el_count = 3, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 303 | 0, 0, 0, /* Optional elements (not needed) */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 304 | -1, /* Start extensions */ |
| 305 | -1 /* Stop extensions */ |
| 306 | }; |
| 307 | asn_TYPE_descriptor_t asn_DEF_Epyt = { |
| 308 | "Epyt", |
| 309 | "Epyt", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 310 | &asn_OP_SEQUENCE, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 311 | SEQUENCE_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 312 | asn_DEF_Epyt_tags_1, |
| 313 | sizeof(asn_DEF_Epyt_tags_1) |
| 314 | /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */ |
| 315 | asn_DEF_Epyt_tags_1, /* Same as above */ |
| 316 | sizeof(asn_DEF_Epyt_tags_1) |
| 317 | /sizeof(asn_DEF_Epyt_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 318 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 319 | 0, /* No PER visible constraints */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 320 | asn_MBR_Epyt_1, |
| 321 | 3, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 322 | &asn_SPC_Epyt_specs_1 /* Additional specs */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 323 | }; |
| 324 | |
| 325 | |
| 326 | /*** <<< INCLUDES [Ypet] >>> ***/ |
| 327 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 328 | #include <INTEGER.h> |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 329 | #include <IA5String.h> |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 330 | #include "EnumType.h" |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 331 | #include <asn_SET_OF.h> |
| 332 | #include <constr_SET_OF.h> |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 333 | #include <constr_SET.h> |
| 334 | |
| 335 | /*** <<< DEPS [Ypet] >>> ***/ |
| 336 | |
| 337 | |
| 338 | /* |
| 339 | * Method of determining the components presence |
| 340 | */ |
| 341 | typedef enum Ypet_PR { |
| 342 | Ypet_PR_epyt, /* Member epyt is present */ |
| 343 | Ypet_PR_plain, /* Member plain is present */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 344 | Ypet_PR_senums, /* Member senums is present */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 345 | Ypet_PR_patest1, /* Member patest1 is present */ |
| 346 | Ypet_PR_patest2, /* Member patest2 is present */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 347 | } Ypet_PR; |
| 348 | |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 349 | /*** <<< FWD-DECLS [Ypet] >>> ***/ |
| 350 | |
| 351 | struct Epyt; |
| 352 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 353 | /*** <<< TYPE-DECLS [Ypet] >>> ***/ |
| 354 | |
| 355 | typedef struct Ypet { |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 356 | struct Epyt *epyt; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 357 | INTEGER_t *plain /* DEFAULT 7 */; |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 358 | struct senums { |
| 359 | A_SET_OF(EnumType_t) list; |
| 360 | |
| 361 | /* Context for parsing across buffer boundaries */ |
| 362 | asn_struct_ctx_t _asn_ctx; |
| 363 | } senums; |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 364 | IA5String_t patest1; |
| 365 | IA5String_t patest2; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 366 | |
| 367 | /* Presence bitmask: ASN_SET_ISPRESENT(pYpet, Ypet_PR_x) */ |
| 368 | unsigned int _presence_map |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 369 | [((5+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 370 | |
| 371 | /* Context for parsing across buffer boundaries */ |
| 372 | asn_struct_ctx_t _asn_ctx; |
| 373 | } Ypet_t; |
| 374 | |
| 375 | /*** <<< FUNC-DECLS [Ypet] >>> ***/ |
| 376 | |
| 377 | extern asn_TYPE_descriptor_t asn_DEF_Ypet; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 378 | extern asn_SET_specifics_t asn_SPC_Ypet_specs_1; |
| 379 | extern asn_TYPE_member_t asn_MBR_Ypet_1[5]; |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 380 | |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 381 | /*** <<< POST-INCLUDE [Ypet] >>> ***/ |
| 382 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 383 | #include "Epyt.h" |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 384 | |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 385 | /*** <<< CTABLES [Ypet] >>> ***/ |
| 386 | |
| 387 | static int check_permitted_alphabet_6(const void *sptr) { |
| 388 | /* The underlying type is IA5String */ |
| 389 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 390 | const uint8_t *ch = st->buf; |
| 391 | const uint8_t *end = ch + st->size; |
| 392 | |
| 393 | for(; ch < end; ch++) { |
| 394 | uint8_t cv = *ch; |
| 395 | if(!(cv >= 65 && cv <= 90)) return -1; |
| 396 | } |
| 397 | return 0; |
| 398 | } |
| 399 | |
| 400 | static int check_permitted_alphabet_7(const void *sptr) { |
| 401 | /* The underlying type is IA5String */ |
| 402 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 403 | const uint8_t *ch = st->buf; |
| 404 | const uint8_t *end = ch + st->size; |
| 405 | |
| 406 | for(; ch < end; ch++) { |
| 407 | uint8_t cv = *ch; |
| 408 | if(!(cv >= 97 && cv <= 122)) return -1; |
| 409 | } |
| 410 | return 0; |
| 411 | } |
| 412 | |
| 413 | |
| 414 | /*** <<< CODE [Ypet] >>> ***/ |
| 415 | |
| 416 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 417 | memb_patest1_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 418 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 419 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 420 | |
| 421 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 422 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 423 | "%s: value not given (%s:%d)", |
| 424 | td->name, __FILE__, __LINE__); |
| 425 | return -1; |
| 426 | } |
| 427 | |
| 428 | |
| 429 | if(!check_permitted_alphabet_6(st)) { |
| 430 | /* Constraint check succeeded */ |
| 431 | return 0; |
| 432 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 433 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 434 | "%s: constraint failed (%s:%d)", |
| 435 | td->name, __FILE__, __LINE__); |
| 436 | return -1; |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | static int |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 441 | memb_patest2_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 442 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 443 | const IA5String_t *st = (const IA5String_t *)sptr; |
| 444 | |
| 445 | if(!sptr) { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 446 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 447 | "%s: value not given (%s:%d)", |
| 448 | td->name, __FILE__, __LINE__); |
| 449 | return -1; |
| 450 | } |
| 451 | |
| 452 | |
| 453 | if(!check_permitted_alphabet_7(st)) { |
| 454 | /* Constraint check succeeded */ |
| 455 | return 0; |
| 456 | } else { |
Lev Walkin | 7c1dc05 | 2016-03-14 03:08:15 -0700 | [diff] [blame] | 457 | ASN__CTFAIL(app_key, td, sptr, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 458 | "%s: constraint failed (%s:%d)", |
| 459 | td->name, __FILE__, __LINE__); |
| 460 | return -1; |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 465 | /*** <<< STAT-DEFS [Ypet] >>> ***/ |
| 466 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 467 | static int asn_DFL_3_set_7(int set_value, void **sptr) { |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 468 | INTEGER_t *st = *sptr; |
| 469 | |
| 470 | if(!st) { |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 471 | if(!set_value) return -1; /* Not a default value */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 472 | st = (*sptr = CALLOC(1, sizeof(*st))); |
| 473 | if(!st) return -1; |
| 474 | } |
| 475 | |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 476 | if(set_value) { |
| 477 | /* Install default value 7 */ |
| 478 | return asn_long2INTEGER(st, 7); |
| 479 | } else { |
| 480 | /* Test default value 7 */ |
| 481 | long value; |
| 482 | if(asn_INTEGER2long(st, &value)) |
| 483 | return -1; |
| 484 | return (value == 7); |
| 485 | } |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 486 | } |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 487 | static asn_TYPE_member_t asn_MBR_senums_4[] = { |
Lev Walkin | 8eb4b57 | 2005-08-16 16:57:17 +0000 | [diff] [blame] | 488 | { ATF_POINTER, 0, 0, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 489 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), |
| 490 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 491 | .type = &asn_DEF_EnumType, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 492 | .type_selector = 0, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 493 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 494 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 495 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 496 | .default_value = 0, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 497 | .name = "" |
| 498 | }, |
| 499 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 500 | static const ber_tlv_tag_t asn_DEF_senums_tags_4[] = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 501 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 502 | }; |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 503 | static asn_SET_OF_specifics_t asn_SPC_senums_specs_4 = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 504 | sizeof(struct senums), |
| 505 | offsetof(struct senums, _asn_ctx), |
| 506 | 1, /* XER encoding is XMLValueList */ |
| 507 | }; |
| 508 | static /* Use -fall-defs-global to expose */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 509 | asn_TYPE_descriptor_t asn_DEF_senums_4 = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 510 | "senums", |
| 511 | "senums", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 512 | &asn_OP_SET_OF, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 513 | SET_OF_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 514 | asn_DEF_senums_tags_4, |
| 515 | sizeof(asn_DEF_senums_tags_4) |
| 516 | /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */ |
| 517 | asn_DEF_senums_tags_4, /* Same as above */ |
| 518 | sizeof(asn_DEF_senums_tags_4) |
| 519 | /sizeof(asn_DEF_senums_tags_4[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 520 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 521 | 0, /* No PER visible constraints */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 522 | asn_MBR_senums_4, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 523 | 1, /* Single element */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 524 | &asn_SPC_senums_specs_4 /* Additional specs */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 525 | }; |
| 526 | |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 527 | asn_TYPE_member_t asn_MBR_Ypet_1[] = { |
Lev Walkin | b85a813 | 2005-08-18 13:38:19 +0000 | [diff] [blame] | 528 | { ATF_POINTER, 0, offsetof(struct Ypet, epyt), |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 529 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 530 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 531 | .type = &asn_DEF_Epyt, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 532 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 533 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 534 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 535 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 536 | .default_value = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 537 | .name = "epyt" |
| 538 | }, |
| 539 | { ATF_POINTER, 1, offsetof(struct Ypet, plain), |
| 540 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 541 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 542 | .type = &asn_DEF_INTEGER, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 543 | .type_selector = 0, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 544 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 545 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 546 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 547 | .default_value = asn_DFL_3_set_7, /* DEFAULT 7 */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 548 | .name = "plain" |
| 549 | }, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 550 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, senums), |
| 551 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 552 | .tag_mode = 0, |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 553 | .type = &asn_DEF_senums_4, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 554 | .type_selector = 0, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 555 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 556 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 557 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 558 | .default_value = 0, |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 559 | .name = "senums" |
| 560 | }, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 561 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest1), |
| 562 | .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)), |
| 563 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 564 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 565 | .type_selector = 0, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 566 | .memb_constraints = memb_patest1_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 567 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 568 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 569 | .default_value = 0, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 570 | .name = "patest1" |
| 571 | }, |
| 572 | { ATF_NOFLAGS, 0, offsetof(struct Ypet, patest2), |
| 573 | .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)), |
| 574 | .tag_mode = +1, /* EXPLICIT tag at current level */ |
Lev Walkin | ae7bf3f | 2005-08-29 10:31:14 +0000 | [diff] [blame] | 575 | .type = &asn_DEF_IA5String, |
Lev Walkin | 67a3012 | 2017-08-10 05:48:54 -0700 | [diff] [blame] | 576 | .type_selector = 0, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 577 | .memb_constraints = memb_patest2_constraint_1, |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 578 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 579 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 580 | .default_value = 0, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 581 | .name = "patest2" |
| 582 | }, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 583 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 584 | static const ber_tlv_tag_t asn_DEF_Ypet_tags_1[] = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 585 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 586 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 587 | static const asn_TYPE_tag2member_t asn_MAP_Ypet_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 588 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* plain */ |
| 589 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 }, /* epyt */ |
| 590 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 2, 0, 0 }, /* senums */ |
| 591 | { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* patest1 */ |
| 592 | { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 } /* patest2 */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 593 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 594 | static const uint8_t asn_MAP_Ypet_mmap_1[(5 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 595 | (1 << 7) | (0 << 6) | (1 << 5) | (1 << 4) | (1 << 3) |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 596 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 597 | asn_SET_specifics_t asn_SPC_Ypet_specs_1 = { |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 598 | sizeof(struct Ypet), |
| 599 | offsetof(struct Ypet, _asn_ctx), |
| 600 | offsetof(struct Ypet, _presence_map), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 601 | .tag2el = asn_MAP_Ypet_tag2el_1, |
| 602 | .tag2el_count = 5, /* Count of tags in the map */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 603 | asn_MAP_Ypet_tag2el_1, /* Same as above */ |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 604 | 5, /* Count of tags in the CXER map */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 605 | 0, /* Whether extensible */ |
Lev Walkin | 46ef3f3 | 2017-07-06 08:47:53 -0700 | [diff] [blame] | 606 | (const unsigned int *)asn_MAP_Ypet_mmap_1 /* Mandatory elements map */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 607 | }; |
| 608 | asn_TYPE_descriptor_t asn_DEF_Ypet = { |
| 609 | "Ypet", |
| 610 | "Ypet", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 611 | &asn_OP_SET, |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 612 | SET_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 613 | asn_DEF_Ypet_tags_1, |
| 614 | sizeof(asn_DEF_Ypet_tags_1) |
| 615 | /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */ |
| 616 | asn_DEF_Ypet_tags_1, /* Same as above */ |
| 617 | sizeof(asn_DEF_Ypet_tags_1) |
| 618 | /sizeof(asn_DEF_Ypet_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 619 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 620 | 0, /* No PER visible constraints */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 621 | asn_MBR_Ypet_1, |
Lev Walkin | e8318b8 | 2005-03-06 09:29:03 +0000 | [diff] [blame] | 622 | 5, /* Elements count */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 623 | &asn_SPC_Ypet_specs_1 /* Additional specs */ |
Lev Walkin | c828571 | 2005-03-04 22:18:20 +0000 | [diff] [blame] | 624 | }; |
| 625 | |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 626 | |
| 627 | /*** <<< INCLUDES [EnumType] >>> ***/ |
| 628 | |
| 629 | #include <ENUMERATED.h> |
| 630 | |
| 631 | /*** <<< DEPS [EnumType] >>> ***/ |
| 632 | |
| 633 | typedef enum EnumType { |
| 634 | EnumType_one = 0, |
| 635 | EnumType_two = 1 |
Lev Walkin | 171487e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 636 | } e_EnumType; |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 637 | |
| 638 | /*** <<< TYPE-DECLS [EnumType] >>> ***/ |
| 639 | |
| 640 | typedef ENUMERATED_t EnumType_t; |
| 641 | |
| 642 | /*** <<< FUNC-DECLS [EnumType] >>> ***/ |
| 643 | |
| 644 | extern asn_TYPE_descriptor_t asn_DEF_EnumType; |
Lev Walkin | 9ded96c | 2017-08-23 04:38:31 -0700 | [diff] [blame] | 645 | extern const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1; |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 646 | asn_struct_free_f EnumType_free; |
| 647 | asn_struct_print_f EnumType_print; |
| 648 | asn_constr_check_f EnumType_constraint; |
| 649 | ber_type_decoder_f EnumType_decode_ber; |
| 650 | der_type_encoder_f EnumType_encode_der; |
| 651 | xer_type_decoder_f EnumType_decode_xer; |
| 652 | xer_type_encoder_f EnumType_encode_xer; |
| 653 | |
| 654 | /*** <<< CODE [EnumType] >>> ***/ |
| 655 | |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 656 | /* |
| 657 | * This type is implemented using ENUMERATED, |
| 658 | * so here we adjust the DEF accordingly. |
| 659 | */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 660 | |
| 661 | /*** <<< STAT-DEFS [EnumType] >>> ***/ |
| 662 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 663 | static const asn_INTEGER_enum_map_t asn_MAP_EnumType_value2enum_1[] = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 664 | { 0, 3, "one" }, |
| 665 | { 1, 3, "two" } |
| 666 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 667 | static const unsigned int asn_MAP_EnumType_enum2value_1[] = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 668 | 0, /* one(0) */ |
| 669 | 1 /* two(1) */ |
| 670 | }; |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 671 | const asn_INTEGER_specifics_t asn_SPC_EnumType_specs_1 = { |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 672 | asn_MAP_EnumType_value2enum_1, /* "tag" => N; sorted by tag */ |
| 673 | asn_MAP_EnumType_enum2value_1, /* N => "tag"; sorted by N */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 674 | 2, /* Number of elements in the maps */ |
| 675 | 0, /* Enumeration is not extensible */ |
Lev Walkin | 8bb57a2 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 676 | 1, /* Strict enumeration */ |
| 677 | 0, /* Native long size */ |
| 678 | 0 |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 679 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 680 | static const ber_tlv_tag_t asn_DEF_EnumType_tags_1[] = { |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 681 | (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) |
| 682 | }; |
| 683 | asn_TYPE_descriptor_t asn_DEF_EnumType = { |
| 684 | "EnumType", |
| 685 | "EnumType", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 686 | &asn_OP_ENUMERATED, |
Bi-Ruei, Chiu | 1fa31c9 | 2016-05-16 13:50:09 +0800 | [diff] [blame] | 687 | ENUMERATED_constraint, |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 688 | asn_DEF_EnumType_tags_1, |
| 689 | sizeof(asn_DEF_EnumType_tags_1) |
| 690 | /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */ |
| 691 | asn_DEF_EnumType_tags_1, /* Same as above */ |
| 692 | sizeof(asn_DEF_EnumType_tags_1) |
| 693 | /sizeof(asn_DEF_EnumType_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 694 | 0, /* No OER visible constraints */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 695 | 0, /* No PER visible constraints */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 696 | 0, 0, /* Defined elsewhere */ |
Lev Walkin | 59b176e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 697 | &asn_SPC_EnumType_specs_1 /* Additional specs */ |
Lev Walkin | fe7f6ec | 2005-03-04 22:38:22 +0000 | [diff] [blame] | 698 | }; |
| 699 | |