Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [Frame] >>> ***/ |
| 3 | |
| 4 | #include <NativeInteger.h> |
| 5 | #include <ANY.h> |
| 6 | #include <asn_ioc.h> |
| 7 | #include "PrimitiveMessage.h" |
| 8 | #include "ComplexMessage.h" |
| 9 | #include <constr_SEQUENCE.h> |
| 10 | |
| 11 | /*** <<< TYPE-DECLS [Frame] >>> ***/ |
| 12 | |
| 13 | typedef struct Frame { |
| 14 | long ident; |
| 15 | ANY_t value; |
| 16 | /* |
| 17 | * This type is extensible, |
| 18 | * possible extensions are below. |
| 19 | */ |
| 20 | |
| 21 | /* Context for parsing across buffer boundaries */ |
| 22 | asn_struct_ctx_t _asn_ctx; |
| 23 | } Frame_t; |
| 24 | |
| 25 | /*** <<< FUNC-DECLS [Frame] >>> ***/ |
| 26 | |
| 27 | extern asn_TYPE_descriptor_t asn_DEF_Frame; |
| 28 | |
| 29 | /*** <<< CODE [Frame] >>> ***/ |
| 30 | |
| 31 | static int |
| 32 | memb_ident_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 33 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 34 | |
| 35 | if(!sptr) { |
| 36 | ASN__CTFAIL(app_key, td, sptr, |
| 37 | "%s: value not given (%s:%d)", |
| 38 | td->name, __FILE__, __LINE__); |
| 39 | return -1; |
| 40 | } |
| 41 | |
| 42 | |
| 43 | if(1 /* No applicable constraints whatsoever */) { |
| 44 | /* Nothing is here. See below */ |
| 45 | } |
| 46 | |
| 47 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 48 | } |
| 49 | |
| 50 | static int |
| 51 | memb_value_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr, |
| 52 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
| 53 | |
| 54 | if(!sptr) { |
| 55 | ASN__CTFAIL(app_key, td, sptr, |
| 56 | "%s: value not given (%s:%d)", |
| 57 | td->name, __FILE__, __LINE__); |
| 58 | return -1; |
| 59 | } |
| 60 | |
| 61 | |
| 62 | if(1 /* No applicable constraints whatsoever */) { |
| 63 | /* Nothing is here. See below */ |
| 64 | } |
| 65 | |
| 66 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
| 67 | } |
| 68 | |
| 69 | |
| 70 | /*** <<< STAT-DEFS [Frame] >>> ***/ |
| 71 | |
| 72 | static const long asn_VAL_basicMessage_0 = 1; |
| 73 | static const long asn_VAL_2_0 = 2; |
| 74 | static const asn_ioc_cell_t asn_IOS_FrameTypes_1_rows[] = { |
| 75 | { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_basicMessage_0 }, |
| 76 | { "&Type", aioc__type, &asn_DEF_PrimitiveMessage }, |
| 77 | { "&id", aioc__value, &asn_DEF_NativeInteger, &asn_VAL_2_0 }, |
| 78 | { "&Type", aioc__type, &asn_DEF_ComplexMessage } |
| 79 | }; |
| 80 | static asn_ioc_set_t asn_IOS_FrameTypes_1[] = { |
| 81 | 2, 2, asn_IOS_FrameTypes_1_rows |
| 82 | }; |
| 83 | static asn_TYPE_member_t asn_MBR_Frame_1[] = { |
| 84 | { ATF_NOFLAGS, 0, offsetof(struct Frame, ident), |
| 85 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 86 | .tag_mode = 0, |
| 87 | .type = &asn_DEF_NativeInteger, |
| 88 | .memb_constraints = memb_ident_constraint_1, |
| 89 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 90 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 91 | .default_value = 0, |
| 92 | .name = "ident" |
| 93 | }, |
| 94 | { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Frame, value), |
| 95 | .tag = -1 /* Ambiguous tag (ANY?) */, |
| 96 | .tag_mode = 0, |
| 97 | .type = &asn_DEF_ANY, |
| 98 | .memb_constraints = memb_value_constraint_1, |
| 99 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
| 100 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 101 | .default_value = 0, |
| 102 | .name = "value" |
| 103 | }, |
| 104 | }; |
| 105 | static const ber_tlv_tag_t asn_DEF_Frame_tags_1[] = { |
| 106 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 107 | }; |
| 108 | static const asn_TYPE_tag2member_t asn_MAP_Frame_tag2el_1[] = { |
| 109 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* ident */ |
| 110 | }; |
| 111 | static asn_SEQUENCE_specifics_t asn_SPC_Frame_specs_1 = { |
| 112 | sizeof(struct Frame), |
| 113 | offsetof(struct Frame, _asn_ctx), |
| 114 | asn_MAP_Frame_tag2el_1, |
| 115 | 1, /* Count of tags in the map */ |
| 116 | 0, 0, 0, /* Optional elements (not needed) */ |
| 117 | 1, /* Start extensions */ |
| 118 | 3 /* Stop extensions */ |
| 119 | }; |
| 120 | asn_TYPE_descriptor_t asn_DEF_Frame = { |
| 121 | "Frame", |
| 122 | "Frame", |
| 123 | SEQUENCE_free, |
| 124 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 125 | SEQUENCE_compare, |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 126 | SEQUENCE_constraint, |
| 127 | SEQUENCE_decode_ber, |
| 128 | SEQUENCE_encode_der, |
| 129 | SEQUENCE_decode_xer, |
| 130 | SEQUENCE_encode_xer, |
| 131 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
| 132 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 133 | 0, /* Use generic outmost tag fetcher */ |
| 134 | asn_DEF_Frame_tags_1, |
| 135 | sizeof(asn_DEF_Frame_tags_1) |
| 136 | /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */ |
| 137 | asn_DEF_Frame_tags_1, /* Same as above */ |
| 138 | sizeof(asn_DEF_Frame_tags_1) |
| 139 | /sizeof(asn_DEF_Frame_tags_1[0]), /* 1 */ |
| 140 | 0, /* No OER visible constraints */ |
| 141 | 0, /* No PER visible constraints */ |
| 142 | asn_MBR_Frame_1, |
| 143 | 2, /* Elements count */ |
| 144 | &asn_SPC_Frame_specs_1 /* Additional specs */ |
| 145 | }; |
| 146 | |
| 147 | |
| 148 | /*** <<< INCLUDES [PrimitiveMessage] >>> ***/ |
| 149 | |
| 150 | #include <constr_SEQUENCE.h> |
| 151 | |
| 152 | /*** <<< TYPE-DECLS [PrimitiveMessage] >>> ***/ |
| 153 | |
| 154 | typedef struct PrimitiveMessage { |
| 155 | |
| 156 | /* Context for parsing across buffer boundaries */ |
| 157 | asn_struct_ctx_t _asn_ctx; |
| 158 | } PrimitiveMessage_t; |
| 159 | |
| 160 | /*** <<< FUNC-DECLS [PrimitiveMessage] >>> ***/ |
| 161 | |
| 162 | extern asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage; |
| 163 | extern asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1; |
| 164 | |
| 165 | /*** <<< STAT-DEFS [PrimitiveMessage] >>> ***/ |
| 166 | |
| 167 | static const ber_tlv_tag_t asn_DEF_PrimitiveMessage_tags_1[] = { |
| 168 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 169 | }; |
| 170 | asn_SEQUENCE_specifics_t asn_SPC_PrimitiveMessage_specs_1 = { |
| 171 | sizeof(struct PrimitiveMessage), |
| 172 | offsetof(struct PrimitiveMessage, _asn_ctx), |
| 173 | 0, /* No top level tags */ |
| 174 | 0, /* No tags in the map */ |
| 175 | 0, 0, 0, /* Optional elements (not needed) */ |
| 176 | -1, /* Start extensions */ |
| 177 | -1 /* Stop extensions */ |
| 178 | }; |
| 179 | asn_TYPE_descriptor_t asn_DEF_PrimitiveMessage = { |
| 180 | "PrimitiveMessage", |
| 181 | "PrimitiveMessage", |
| 182 | SEQUENCE_free, |
| 183 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 184 | SEQUENCE_compare, |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 185 | SEQUENCE_constraint, |
| 186 | SEQUENCE_decode_ber, |
| 187 | SEQUENCE_encode_der, |
| 188 | SEQUENCE_decode_xer, |
| 189 | SEQUENCE_encode_xer, |
| 190 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
| 191 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 192 | 0, /* Use generic outmost tag fetcher */ |
| 193 | asn_DEF_PrimitiveMessage_tags_1, |
| 194 | sizeof(asn_DEF_PrimitiveMessage_tags_1) |
| 195 | /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */ |
| 196 | asn_DEF_PrimitiveMessage_tags_1, /* Same as above */ |
| 197 | sizeof(asn_DEF_PrimitiveMessage_tags_1) |
| 198 | /sizeof(asn_DEF_PrimitiveMessage_tags_1[0]), /* 1 */ |
| 199 | 0, /* No OER visible constraints */ |
| 200 | 0, /* No PER visible constraints */ |
| 201 | 0, 0, /* No members */ |
| 202 | &asn_SPC_PrimitiveMessage_specs_1 /* Additional specs */ |
| 203 | }; |
| 204 | |
| 205 | |
| 206 | /*** <<< INCLUDES [ComplexMessage] >>> ***/ |
| 207 | |
| 208 | #include <constr_SEQUENCE.h> |
| 209 | |
| 210 | /*** <<< TYPE-DECLS [ComplexMessage] >>> ***/ |
| 211 | |
| 212 | typedef struct ComplexMessage { |
| 213 | |
| 214 | /* Context for parsing across buffer boundaries */ |
| 215 | asn_struct_ctx_t _asn_ctx; |
| 216 | } ComplexMessage_t; |
| 217 | |
| 218 | /*** <<< FUNC-DECLS [ComplexMessage] >>> ***/ |
| 219 | |
| 220 | extern asn_TYPE_descriptor_t asn_DEF_ComplexMessage; |
| 221 | extern asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1; |
| 222 | |
| 223 | /*** <<< STAT-DEFS [ComplexMessage] >>> ***/ |
| 224 | |
| 225 | static const ber_tlv_tag_t asn_DEF_ComplexMessage_tags_1[] = { |
| 226 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 227 | }; |
| 228 | asn_SEQUENCE_specifics_t asn_SPC_ComplexMessage_specs_1 = { |
| 229 | sizeof(struct ComplexMessage), |
| 230 | offsetof(struct ComplexMessage, _asn_ctx), |
| 231 | 0, /* No top level tags */ |
| 232 | 0, /* No tags in the map */ |
| 233 | 0, 0, 0, /* Optional elements (not needed) */ |
| 234 | -1, /* Start extensions */ |
| 235 | -1 /* Stop extensions */ |
| 236 | }; |
| 237 | asn_TYPE_descriptor_t asn_DEF_ComplexMessage = { |
| 238 | "ComplexMessage", |
| 239 | "ComplexMessage", |
| 240 | SEQUENCE_free, |
| 241 | SEQUENCE_print, |
Lev Walkin | cd2f48e | 2017-08-10 02:14:59 -0700 | [diff] [blame^] | 242 | SEQUENCE_compare, |
Lev Walkin | ad0d637 | 2017-08-08 02:02:42 -0700 | [diff] [blame] | 243 | SEQUENCE_constraint, |
| 244 | SEQUENCE_decode_ber, |
| 245 | SEQUENCE_encode_der, |
| 246 | SEQUENCE_decode_xer, |
| 247 | SEQUENCE_encode_xer, |
| 248 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
| 249 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
| 250 | 0, /* Use generic outmost tag fetcher */ |
| 251 | asn_DEF_ComplexMessage_tags_1, |
| 252 | sizeof(asn_DEF_ComplexMessage_tags_1) |
| 253 | /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */ |
| 254 | asn_DEF_ComplexMessage_tags_1, /* Same as above */ |
| 255 | sizeof(asn_DEF_ComplexMessage_tags_1) |
| 256 | /sizeof(asn_DEF_ComplexMessage_tags_1[0]), /* 1 */ |
| 257 | 0, /* No OER visible constraints */ |
| 258 | 0, /* No PER visible constraints */ |
| 259 | 0, 0, /* No members */ |
| 260 | &asn_SPC_ComplexMessage_specs_1 /* Additional specs */ |
| 261 | }; |
| 262 | |