Lev Walkin | f75b874 | 2017-08-23 04:44:18 -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_21P0_t content13; |
| 11 | SpecializedContent_21P1_t content42; |
| 12 | |
| 13 | /* Context for parsing across buffer boundaries */ |
| 14 | asn_struct_ctx_t _asn_ctx; |
| 15 | } Message_t; |
| 16 | |
| 17 | /*** <<< FUNC-DECLS [Message] >>> ***/ |
| 18 | |
| 19 | extern asn_TYPE_descriptor_t asn_DEF_Message; |
| 20 | |
| 21 | /*** <<< STAT-DEFS [Message] >>> ***/ |
| 22 | |
| 23 | static asn_TYPE_member_t asn_MBR_Message_1[] = { |
| 24 | { ATF_NOFLAGS, 0, offsetof(struct Message, content13), |
| 25 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 26 | .tag_mode = 0, |
| 27 | .type = &asn_DEF_SpecializedContent_21P0, |
| 28 | .type_selector = 0, |
| 29 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 30 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 31 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 32 | .default_value = 0, |
| 33 | .name = "content13" |
| 34 | }, |
| 35 | { ATF_NOFLAGS, 0, offsetof(struct Message, content42), |
| 36 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), |
| 37 | .tag_mode = 0, |
| 38 | .type = &asn_DEF_SpecializedContent_21P1, |
| 39 | .type_selector = 0, |
| 40 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
| 41 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 42 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 43 | .default_value = 0, |
| 44 | .name = "content42" |
| 45 | }, |
| 46 | }; |
| 47 | static const ber_tlv_tag_t asn_DEF_Message_tags_1[] = { |
| 48 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 49 | }; |
| 50 | static const asn_TYPE_tag2member_t asn_MAP_Message_tag2el_1[] = { |
| 51 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* content13 */ |
| 52 | { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* content42 */ |
| 53 | }; |
| 54 | static asn_SEQUENCE_specifics_t asn_SPC_Message_specs_1 = { |
| 55 | sizeof(struct Message), |
| 56 | offsetof(struct Message, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 57 | .tag2el = asn_MAP_Message_tag2el_1, |
| 58 | .tag2el_count = 2, /* Count of tags in the map */ |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 59 | 0, 0, 0, /* Optional elements (not needed) */ |
| 60 | -1, /* Start extensions */ |
| 61 | -1 /* Stop extensions */ |
| 62 | }; |
| 63 | asn_TYPE_descriptor_t asn_DEF_Message = { |
| 64 | "Message", |
| 65 | "Message", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 66 | &asn_OP_SEQUENCE, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 67 | SEQUENCE_constraint, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 68 | asn_DEF_Message_tags_1, |
| 69 | sizeof(asn_DEF_Message_tags_1) |
| 70 | /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */ |
| 71 | asn_DEF_Message_tags_1, /* Same as above */ |
| 72 | sizeof(asn_DEF_Message_tags_1) |
| 73 | /sizeof(asn_DEF_Message_tags_1[0]), /* 1 */ |
| 74 | 0, /* No OER visible constraints */ |
| 75 | 0, /* No PER visible constraints */ |
| 76 | asn_MBR_Message_1, |
| 77 | 2, /* Elements count */ |
| 78 | &asn_SPC_Message_specs_1 /* Additional specs */ |
| 79 | }; |
| 80 | |
| 81 | |
| 82 | /*** <<< INCLUDES [SpecializedContent] >>> ***/ |
| 83 | |
| 84 | #include <NativeInteger.h> |
| 85 | #include <constr_SEQUENCE.h> |
| 86 | |
| 87 | /*** <<< TYPE-DECLS [SpecializedContent] >>> ***/ |
| 88 | |
| 89 | typedef struct SpecializedContent_21P0 { |
| 90 | long id; |
| 91 | |
| 92 | /* Context for parsing across buffer boundaries */ |
| 93 | asn_struct_ctx_t _asn_ctx; |
| 94 | } SpecializedContent_21P0_t; |
| 95 | typedef struct SpecializedContent_21P1 { |
| 96 | long id; |
| 97 | |
| 98 | /* Context for parsing across buffer boundaries */ |
| 99 | asn_struct_ctx_t _asn_ctx; |
| 100 | } SpecializedContent_21P1_t; |
| 101 | |
| 102 | /*** <<< FUNC-DECLS [SpecializedContent] >>> ***/ |
| 103 | |
| 104 | extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0; |
| 105 | extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1; |
| 106 | extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[1]; |
| 107 | extern asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1; |
| 108 | extern asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3; |
| 109 | extern asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[1]; |
| 110 | |
| 111 | /*** <<< CODE [SpecializedContent] >>> ***/ |
| 112 | |
| 113 | static int |
| 114 | memb_id_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 115 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 116 | long value; |
| 117 | |
| 118 | if(!sptr) { |
| 119 | ASN__CTFAIL(app_key, td, sptr, |
| 120 | "%s: value not given (%s:%d)", |
| 121 | td->name, __FILE__, __LINE__); |
| 122 | return -1; |
| 123 | } |
| 124 | |
| 125 | value = *(const long *)sptr; |
| 126 | |
| 127 | if((value == 13)) { |
| 128 | /* Constraint check succeeded */ |
| 129 | return 0; |
| 130 | } else { |
| 131 | ASN__CTFAIL(app_key, td, sptr, |
| 132 | "%s: constraint failed (%s:%d)", |
| 133 | td->name, __FILE__, __LINE__); |
| 134 | return -1; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | static int |
| 139 | memb_id_constraint_3(asn_TYPE_descriptor_t *td, const void *sptr, |
| 140 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 141 | long value; |
| 142 | |
| 143 | if(!sptr) { |
| 144 | ASN__CTFAIL(app_key, td, sptr, |
| 145 | "%s: value not given (%s:%d)", |
| 146 | td->name, __FILE__, __LINE__); |
| 147 | return -1; |
| 148 | } |
| 149 | |
| 150 | value = *(const long *)sptr; |
| 151 | |
| 152 | if((value == 42)) { |
| 153 | /* Constraint check succeeded */ |
| 154 | return 0; |
| 155 | } else { |
| 156 | ASN__CTFAIL(app_key, td, sptr, |
| 157 | "%s: constraint failed (%s:%d)", |
| 158 | td->name, __FILE__, __LINE__); |
| 159 | return -1; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | |
| 164 | /*** <<< STAT-DEFS [SpecializedContent] >>> ***/ |
| 165 | |
| 166 | asn_TYPE_member_t asn_MBR_SpecializedContent_21P0_1[] = { |
| 167 | { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P0, id), |
| 168 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 169 | .tag_mode = 0, |
| 170 | .type = &asn_DEF_NativeInteger, |
| 171 | .type_selector = 0, |
| 172 | .memb_constraints = memb_id_constraint_1, |
| 173 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 174 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 175 | .default_value = 0, |
| 176 | .name = "id" |
| 177 | }, |
| 178 | }; |
| 179 | static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P0_tags_1[] = { |
| 180 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 181 | }; |
| 182 | static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P0_tag2el_1[] = { |
| 183 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */ |
| 184 | }; |
| 185 | asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P0_specs_1 = { |
| 186 | sizeof(struct SpecializedContent_21P0), |
| 187 | offsetof(struct SpecializedContent_21P0, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 188 | .tag2el = asn_MAP_SpecializedContent_21P0_tag2el_1, |
| 189 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 190 | 0, 0, 0, /* Optional elements (not needed) */ |
| 191 | -1, /* Start extensions */ |
| 192 | -1 /* Stop extensions */ |
| 193 | }; |
| 194 | asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P0 = { |
| 195 | "SpecializedContent", |
| 196 | "SpecializedContent", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 197 | &asn_OP_SEQUENCE, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 198 | SEQUENCE_constraint, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 199 | asn_DEF_SpecializedContent_21P0_tags_1, |
| 200 | sizeof(asn_DEF_SpecializedContent_21P0_tags_1) |
| 201 | /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */ |
| 202 | asn_DEF_SpecializedContent_21P0_tags_1, /* Same as above */ |
| 203 | sizeof(asn_DEF_SpecializedContent_21P0_tags_1) |
| 204 | /sizeof(asn_DEF_SpecializedContent_21P0_tags_1[0]), /* 1 */ |
| 205 | 0, /* No OER visible constraints */ |
| 206 | 0, /* No PER visible constraints */ |
| 207 | asn_MBR_SpecializedContent_21P0_1, |
| 208 | 1, /* Elements count */ |
| 209 | &asn_SPC_SpecializedContent_21P0_specs_1 /* Additional specs */ |
| 210 | }; |
| 211 | |
| 212 | asn_TYPE_member_t asn_MBR_SpecializedContent_21P1_3[] = { |
| 213 | { ATF_NOFLAGS, 0, offsetof(struct SpecializedContent_21P1, id), |
| 214 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 215 | .tag_mode = 0, |
| 216 | .type = &asn_DEF_NativeInteger, |
| 217 | .type_selector = 0, |
| 218 | .memb_constraints = memb_id_constraint_3, |
| 219 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 220 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 221 | .default_value = 0, |
| 222 | .name = "id" |
| 223 | }, |
| 224 | }; |
| 225 | static const ber_tlv_tag_t asn_DEF_SpecializedContent_21P1_tags_3[] = { |
| 226 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 227 | }; |
| 228 | static const asn_TYPE_tag2member_t asn_MAP_SpecializedContent_21P1_tag2el_3[] = { |
| 229 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* id */ |
| 230 | }; |
| 231 | asn_SEQUENCE_specifics_t asn_SPC_SpecializedContent_21P1_specs_3 = { |
| 232 | sizeof(struct SpecializedContent_21P1), |
| 233 | offsetof(struct SpecializedContent_21P1, _asn_ctx), |
Lev Walkin | e391708 | 2017-08-23 10:29:38 -0700 | [diff] [blame] | 234 | .tag2el = asn_MAP_SpecializedContent_21P1_tag2el_3, |
| 235 | .tag2el_count = 1, /* Count of tags in the map */ |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 236 | 0, 0, 0, /* Optional elements (not needed) */ |
| 237 | -1, /* Start extensions */ |
| 238 | -1 /* Stop extensions */ |
| 239 | }; |
| 240 | asn_TYPE_descriptor_t asn_DEF_SpecializedContent_21P1 = { |
| 241 | "SpecializedContent", |
| 242 | "SpecializedContent", |
Bi-Ruei, Chiu | 1f87ac0 | 2017-08-20 01:25:45 +0800 | [diff] [blame] | 243 | &asn_OP_SEQUENCE, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 244 | SEQUENCE_constraint, |
Lev Walkin | f75b874 | 2017-08-23 04:44:18 -0700 | [diff] [blame] | 245 | asn_DEF_SpecializedContent_21P1_tags_3, |
| 246 | sizeof(asn_DEF_SpecializedContent_21P1_tags_3) |
| 247 | /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */ |
| 248 | asn_DEF_SpecializedContent_21P1_tags_3, /* Same as above */ |
| 249 | sizeof(asn_DEF_SpecializedContent_21P1_tags_3) |
| 250 | /sizeof(asn_DEF_SpecializedContent_21P1_tags_3[0]), /* 1 */ |
| 251 | 0, /* No OER visible constraints */ |
| 252 | 0, /* No PER visible constraints */ |
| 253 | asn_MBR_SpecializedContent_21P1_3, |
| 254 | 1, /* Elements count */ |
| 255 | &asn_SPC_SpecializedContent_21P1_specs_3 /* Additional specs */ |
| 256 | }; |
| 257 | |