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