Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Message] >>> ***/ |
| 3 | |
| 4 | #include "SpecializedContent.h" |
| 5 | #include <constr_SEQUENCE.h> |
| 6 | |
| 7 | /*** <<< TYPE-DECLS [Message] >>> ***/ |
| 8 | |
| 9 | typedef struct Message { |
| 10 | SpecializedContent_30P0_t content; |
| 11 | |
| 12 | /* Context for parsing across buffer boundaries */ |
| 13 | asn_struct_ctx_t _asn_ctx; |
| 14 | } Message_t; |
| 15 | |
| 16 | /*** <<< FUNC-DECLS [Message] >>> ***/ |
| 17 | |
| 18 | extern asn_TYPE_descriptor_t asn_DEF_Message; |
| 19 | |
| 20 | /*** <<< STAT-DEFS [Message] >>> ***/ |
| 21 | |
| 22 | static asn_TYPE_member_t asn_MBR_Message_1[] = { |
| 23 | { ATF_NOFLAGS, 0, offsetof(struct Message, content), |
| 24 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 25 | .tag_mode = 0, |
| 26 | .type = &asn_DEF_SpecializedContent_30P0, |
| 27 | .type_selector = 0, |
| 28 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 29 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 30 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 31 | .default_value = 0, |
| 32 | .name = "content" |
| 33 | }, |
| 34 | }; |
| 35 | static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = { |
| 36 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 37 | }; |
| 38 | static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = { |
| 39 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* content */ |
| 40 | }; |
| 41 | static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = { |
| 42 | sizeof(struct Message), |
| 43 | offsetof(struct Message, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 44 | .tag2el = asn_MAP_Message_tag2el_1, |
| 45 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 46 | 0, 0, 0, /* Optional elements (not needed) */ |
| 47 | -1, /* Start extensions */ |
| 48 | -1 /* Stop extensions */ |
| 49 | }; |
| 50 | asn_TYPE_descriptor_t asn_DEF_Message = { |
| 51 | "Message", |
| 52 | "Message", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 53 | &asn_OP_SEQUENCE, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 54 | SEQUENCE_constraint, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 55 | asn_DEF_Message_tags_1, |
| 56 | sizeof(asn_DEF_Message_tags_1) |
| 57 | /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */ |
| 58 | asn_DEF_Message_tags_1, /* Same as above */ |
| 59 | sizeof(asn_DEF_Message_tags_1) |
| 60 | /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */ |
| 61 | 0, /* No OER visible constraints */ |
| 62 | 0, /* No PER visible constraints */ |
| 63 | asn_MBR_Message_1, |
| 64 | 1, /* Elements count */ |
| 65 | &asn_SPC_Message_specs_1 /* Additional specs */ |
| 66 | }; |
| 67 | |
| 68 | |
| 69 | /*** <<< INCLUDES [SpecializedContent] >>> ***/ |
| 70 | |
| 71 | #include <NativeInteger.h> |
| 72 | #include <ANY.h> |
| 73 | #include <asn_ioc.h> |
| 74 | #include <OPEN_TYPE.h> |
| 75 | #include <BOOLEAN.h> |
| 76 | #include <constr_CHOICE.h> |
| 77 | #include <constr_SEQUENCE.h> |
| 78 | |
| 79 | /*** <<< DEPS [SpecializedContent] >>> ***/ |
| 80 | |
| 81 | typedef enum value_PR { |
| 82 | value_PR_NOTHING, /* No components present */ |
| 83 | value_PR_INTEGER, |
| 84 | value_PR_BOOLEAN |
| 85 | } value_PR; |
| 86 | |
| 87 | /*** <<< TYPE-DECLS [SpecializedContent] >>> ***/ |
| 88 | |
| 89 | typedef struct SpecializedContent_30P0 { |
| 90 | long id; |
| 91 | struct value { |
| 92 | value_PR present; |
| 93 | union value_u { |
| 94 | long INTEGER; |
| 95 | BOOLEAN_t BOOLEAN; |
| 96 | } choice; |
| 97 | |
| 98 | /* Context for parsing across buffer boundaries */ |
| 99 | asn_struct_ctx_t _asn_ctx; |
| 100 | } value; |
| 101 | |
| 102 | /* Context for parsing across buffer boundaries */ |
| 103 | asn_struct_ctx_t _asn_ctx; |
| 104 | } SpecializedContent_30P0_t; |
| 105 | |
| 106 | /*** <<< FUNC-DECLS [SpecializedContent] >>> ***/ |
| 107 | |
| 108 | extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0; |
| 109 | extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1; |
| 110 | extern asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[2]; |
| 111 | |
| 112 | /*** <<< IOC-TABLES [SpecializedContent] >>> ***/ |
| 113 | |
| 114 | static const long asn_VAL_1_1 = 1; |
| 115 | static const long asn_VAL_2_2 = 2; |
| 116 | static const asn_ioc_cell_t asn_IOS_RegionalExtension_1_rows[] = { |
| 117 | { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_1_1 }, |
| 118 | { "&Type", , |
| 119 | { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_2 }, |
| 120 | { "&Type", |
| 121 | }; |
| 122 | static const asn_ioc_set_t asn_IOS_RegionalExtension_1[] = { |
| 123 | 2, 2, asn_IOS_RegionalExtension_1_rows |
| 124 | }; |
| 125 | |
| 126 | /*** <<< CODE [SpecializedContent] >>> ***/ |
| 127 | |
| 128 | static int |
| 129 | memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 130 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 131 | |
| 132 | if(!sptr) { |
| 133 | ASN__CTFAIL(app_key, td, sptr, |
| 134 | "%s: value not given (%s:%d)", |
| 135 | td->name, __FILE__, __LINE__); |
| 136 | return -1; |
| 137 | } |
| 138 | |
| 139 | |
| 140 | if(1 /* No applicable constraints whatsoever */) { |
| 141 | /* Nothing is here. See below */ |
| 142 | } |
| 143 | |
| 144 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 145 | } |
| 146 | |
| 147 | static asn_type_selector_result_t |
| 148 | select_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { |
| 149 | asn_type_selector_result_t result = {0, 0}; |
| 150 | const asn_ioc_set_t *itable = asn_IOS_RegionalExtension_1; |
| 151 | size_t constraining_column = 0; /* &id */ |
| 152 | size_t for_column = 1; /* &Type */ |
| 153 | size_t row; |
| 154 | const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SpecializedContent_30P0, id)); |
| 155 | |
| 156 | for(row=0; row < itable->rows_count; row++) { |
| 157 | const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; |
| 158 | const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; |
| 159 | |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 160 | if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 161 | result.type_descriptor = type_cell->type_descriptor; |
| 162 | result.presence_index = row + 1; |
| 163 | break; |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | return result; |
| 168 | } |
| 169 | |
| 170 | static int |
| 171 | memb_value_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 172 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 173 | |
| 174 | if(!sptr) { |
| 175 | ASN__CTFAIL(app_key, td, sptr, |
| 176 | "%s: value not given (%s:%d)", |
| 177 | td->name, __FILE__, __LINE__); |
| 178 | return -1; |
| 179 | } |
| 180 | |
| 181 | |
| 182 | if(1 /* No applicable constraints whatsoever */) { |
| 183 | /* Nothing is here. See below */ |
| 184 | } |
| 185 | |
| 186 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 187 | } |
| 188 | |
| 189 | |
| 190 | /*** <<< STAT-DEFS [SpecializedContent] >>> ***/ |
| 191 | |
| 192 | static asn_TYPE_member_t asn_MBR_value_3[] = { |
| 193 | { ATF_NOFLAGS, 0, offsetof(struct value, choice.INTEGER), |
| 194 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 195 | .tag_mode = 0, |
| 196 | .type = &asn_DEF_NativeInteger, |
| 197 | .type_selector = 0, |
| 198 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 199 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 200 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 201 | .default_value = 0, |
| 202 | .name = "INTEGER" |
| 203 | }, |
| 204 | { ATF_NOFLAGS, 0, offsetof(struct value, choice.BOOLEAN), |
| 205 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), |
| 206 | .tag_mode = 0, |
| 207 | .type = &asn_DEF_BOOLEAN, |
| 208 | .type_selector = 0, |
| 209 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 210 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 211 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 212 | .default_value = 0, |
| 213 | .name = "BOOLEAN" |
| 214 | }, |
| 215 | }; |
| 216 | static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_3[] = { |
| 217 | { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 1, 0, 0 }, /* BOOLEAN */ |
| 218 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* INTEGER */ |
| 219 | }; |
| 220 | static asn_CHOICE_specifics_t asn_SPC_value_specs_3 = { |
| 221 | sizeof(struct value), |
| 222 | offsetof(struct value, _asn_ctx), |
| 223 | offsetof(struct value, present), |
| 224 | sizeof(((struct value *)0)->present), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 225 | .tag2el = asn_MAP_value_tag2el_3, |
| 226 | .tag2el_count = 2, /* Count of tags in the map */ |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 227 | .canonical_order = 0, |
| 228 | .ext_start = -1 /* Extensions start */ |
| 229 | }; |
| 230 | static /* Use -fall-defs-global to expose */ |
| 231 | asn_TYPE_descriptor_t asn_DEF_value_3 = { |
| 232 | "value", |
| 233 | "value", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 234 | &asn_OP_OPEN_TYPE, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 235 | OPEN_TYPE_constraint, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 236 | 0, /* No effective tags (pointer) */ |
| 237 | 0, /* No effective tags (count) */ |
| 238 | 0, /* No tags (pointer) */ |
| 239 | 0, /* No tags (count) */ |
| 240 | 0, /* No OER visible constraints */ |
| 241 | 0, /* No PER visible constraints */ |
| 242 | asn_MBR_value_3, |
| 243 | 2, /* Elements count */ |
| 244 | &asn_SPC_value_specs_3 /* Additional specs */ |
| 245 | }; |
| 246 | |
| 247 | asn_TYPE_member_t asn_MBR_SpecializedContent_30P0_1[] = { |
| 248 | { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, id), |
| 249 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 250 | .tag_mode = 0, |
| 251 | .type = &asn_DEF_NativeInteger, |
| 252 | .type_selector = 0, |
| 253 | .memb_constraints = memb_id_constraint_1, |
| 254 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 255 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 256 | .default_value = 0, |
| 257 | .name = "id" |
| 258 | }, |
| 259 | { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_30P0, value), |
| 260 | .tag = -1 /* Ambiguous tag (ANY?) */, |
| 261 | .tag_mode = 0, |
| 262 | .type = &asn_DEF_value_3, |
| 263 | .type_selector = select_value_type, |
| 264 | .memb_constraints = memb_value_constraint_1, |
| 265 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 266 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 267 | .default_value = 0, |
| 268 | .name = "value" |
| 269 | }, |
| 270 | }; |
| 271 | static const ber_tlv_tag_t asn_DEF_SpecializedContent_30P0_tags_1[] = { |
| 272 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 273 | }; |
| 274 | static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_30P0_tag2el_1[] = { |
| 275 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */ |
| 276 | }; |
| 277 | asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_30P0_specs_1 = { |
| 278 | sizeof(struct SpecializedContent_30P0), |
| 279 | offsetof(struct SpecializedContent_30P0, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 280 | .tag2el = asn_MAP_SpecializedContent_30P0_tag2el_1, |
| 281 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 282 | 0, 0, 0, /* Optional elements (not needed) */ |
| 283 | -1, /* Start extensions */ |
| 284 | -1 /* Stop extensions */ |
| 285 | }; |
| 286 | asn_TYPE_descriptor_t asn_DEF_SpecializedContent_30P0 = { |
| 287 | "SpecializedContent", |
| 288 | "SpecializedContent", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 289 | &asn_OP_SEQUENCE, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 290 | SEQUENCE_constraint, |
Lev Walkin | d8e07c5 | 2017-08-23 07:38:30 -0700 | [diff] [blame] | 291 | asn_DEF_SpecializedContent_30P0_tags_1, |
| 292 | sizeof(asn_DEF_SpecializedContent_30P0_tags_1) |
| 293 | /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */ |
| 294 | asn_DEF_SpecializedContent_30P0_tags_1, /* Same as above */ |
| 295 | sizeof(asn_DEF_SpecializedContent_30P0_tags_1) |
| 296 | /sizeof(asn_DEF_SpecializedContent_30P0_tags_1[0]), /* 1 */ |
| 297 | 0, /* No OER visible constraints */ |
| 298 | 0, /* No PER visible constraints */ |
| 299 | asn_MBR_SpecializedContent_30P0_1, |
| 300 | 2, /* Elements count */ |
| 301 | &asn_SPC_SpecializedContent_30P0_specs_1 /* Additional specs */ |
| 302 | }; |
| 303 | |