Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [SIGNED] >>> ***/ |
| 3 | |
| 4 | #include <REAL.h> |
| 5 | #include <constr_SEQUENCE.h> |
| 6 | #include <INTEGER.h> |
| 7 | #include <constr_SET.h> |
| 8 | |
| 9 | /*** <<< DEPS [SIGNED] >>> ***/ |
| 10 | |
| 11 | |
| 12 | /* |
| 13 | * Method of determining the components presence |
| 14 | */ |
| 15 | typedef enum signed_PR { |
| 16 | signed_PR_a, /* Member a is present */ |
| 17 | } signed_PR; |
| 18 | |
| 19 | /*** <<< TYPE-DECLS [SIGNED] >>> ***/ |
| 20 | |
| 21 | typedef struct SIGNED_16P0 { |
| 22 | REAL_t Signed; |
| 23 | |
| 24 | /* Context for parsing across buffer boundaries */ |
| 25 | asn_struct_ctx_t _asn_ctx; |
| 26 | } SIGNED_16P0_t; |
| 27 | typedef struct SIGNED_16P1 { |
| 28 | struct Signed { |
| 29 | INTEGER_t a; |
| 30 | |
| 31 | /* Presence bitmask: ASN_SET_ISPRESENT(psigned, signed_PR_x) */ |
| 32 | unsigned int _presence_map |
| 33 | [((1+(8*sizeof(unsigned int))-1)/(8*sizeof(unsigned int)))]; |
| 34 | |
| 35 | /* Context for parsing across buffer boundaries */ |
| 36 | asn_struct_ctx_t _asn_ctx; |
| 37 | } Signed; |
| 38 | |
| 39 | /* Context for parsing across buffer boundaries */ |
| 40 | asn_struct_ctx_t _asn_ctx; |
| 41 | } SIGNED_16P1_t; |
| 42 | |
| 43 | /*** <<< FUNC-DECLS [SIGNED] >>> ***/ |
| 44 | |
| 45 | extern asn_TYPE_descriptor_t asn_DEF_SIGNED_16P0; |
| 46 | extern asn_TYPE_descriptor_t asn_DEF_SIGNED_16P1; |
| 47 | |
| 48 | /*** <<< STAT-DEFS [SIGNED] >>> ***/ |
| 49 | |
| 50 | static asn_TYPE_member_t asn_MBR_SIGNED_16P0_1[] = { |
| 51 | { ATF_NOFLAGS, 0, offsetof(struct SIGNED_16P0, Signed), |
| 52 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), |
| 53 | .tag_mode = 0, |
| 54 | .type = &asn_DEF_REAL, |
| 55 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 56 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 57 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 58 | .default_value = 0, |
| 59 | .name = "signed" |
| 60 | }, |
| 61 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 62 | static const ber_tlv_tag_t asn_DEF_SIGNED_16P0_tags_1[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 63 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 64 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 65 | static const asn_TYPE_tag2member_t asn_MAP_SIGNED_16P0_tag2el_1[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 66 | { (ASN_TAG_CLASS_UNIVERSAL | (9 << 2)), 0, 0, 0 } /* signed */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 67 | }; |
| 68 | static asn_SEQUENCE_specifics_t asn_SPC_SIGNED_16P0_specs_1 = { |
| 69 | sizeof(struct SIGNED_16P0), |
| 70 | offsetof(struct SIGNED_16P0, _asn_ctx), |
| 71 | asn_MAP_SIGNED_16P0_tag2el_1, |
| 72 | 1, /* Count of tags in the map */ |
| 73 | 0, 0, 0, /* Optional elements (not needed) */ |
| 74 | -1, /* Start extensions */ |
| 75 | -1 /* Stop extensions */ |
| 76 | }; |
| 77 | asn_TYPE_descriptor_t asn_DEF_SIGNED_16P0 = { |
| 78 | "SIGNED", |
| 79 | "SIGNED", |
| 80 | SEQUENCE_free, |
| 81 | SEQUENCE_print, |
| 82 | SEQUENCE_constraint, |
| 83 | SEQUENCE_decode_ber, |
| 84 | SEQUENCE_encode_der, |
| 85 | SEQUENCE_decode_xer, |
| 86 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 87 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 88 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 89 | 0, /* Use generic outmost tag fetcher */ |
| 90 | asn_DEF_SIGNED_16P0_tags_1, |
| 91 | sizeof(asn_DEF_SIGNED_16P0_tags_1) |
| 92 | /sizeof(asn_DEF_SIGNED_16P0_tags_1[0]), /* 1 */ |
| 93 | asn_DEF_SIGNED_16P0_tags_1, /* Same as above */ |
| 94 | sizeof(asn_DEF_SIGNED_16P0_tags_1) |
| 95 | /sizeof(asn_DEF_SIGNED_16P0_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 96 | 0, /* No OER visible constraints */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 97 | 0, /* No PER visible constraints */ |
| 98 | asn_MBR_SIGNED_16P0_1, |
| 99 | 1, /* Elements count */ |
| 100 | &asn_SPC_SIGNED_16P0_specs_1 /* Additional specs */ |
| 101 | }; |
| 102 | |
| 103 | static asn_TYPE_member_t asn_MBR_signed_4[] = { |
| 104 | { ATF_NOFLAGS, 0, offsetof(struct Signed, a), |
| 105 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), |
| 106 | .tag_mode = 0, |
| 107 | .type = &asn_DEF_INTEGER, |
| 108 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 109 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 110 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 111 | .default_value = 0, |
| 112 | .name = "a" |
| 113 | }, |
| 114 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 115 | static const ber_tlv_tag_t asn_DEF_signed_tags_4[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 116 | (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)) |
| 117 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 118 | static const asn_TYPE_tag2member_t asn_MAP_signed_tag2el_4[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 119 | { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 } /* a */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 120 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 121 | static const uint8_t asn_MAP_signed_mmap_4[(1 + (8 * sizeof(unsigned int)) - 1) / 8] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 122 | (1 << 7) |
| 123 | }; |
| 124 | static asn_SET_specifics_t asn_SPC_signed_specs_4 = { |
| 125 | sizeof(struct Signed), |
| 126 | offsetof(struct Signed, _asn_ctx), |
| 127 | offsetof(struct Signed, _presence_map), |
| 128 | asn_MAP_signed_tag2el_4, |
| 129 | 1, /* Count of tags in the map */ |
| 130 | asn_MAP_signed_tag2el_4, /* Same as above */ |
| 131 | 1, /* Count of tags in the CXER map */ |
| 132 | 0, /* Whether extensible */ |
Lev Walkin | 46ef3f3 | 2017-07-06 08:47:53 -0700 | [diff] [blame] | 133 | (const unsigned int *)asn_MAP_signed_mmap_4 /* Mandatory elements map */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 134 | }; |
| 135 | static /* Use -fall-defs-global to expose */ |
| 136 | asn_TYPE_descriptor_t asn_DEF_signed_4 = { |
| 137 | "signed", |
| 138 | "signed", |
| 139 | SET_free, |
| 140 | SET_print, |
| 141 | SET_constraint, |
| 142 | SET_decode_ber, |
| 143 | SET_encode_der, |
| 144 | SET_decode_xer, |
| 145 | SET_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 146 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 147 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 148 | 0, /* Use generic outmost tag fetcher */ |
| 149 | asn_DEF_signed_tags_4, |
| 150 | sizeof(asn_DEF_signed_tags_4) |
| 151 | /sizeof(asn_DEF_signed_tags_4[0]), /* 1 */ |
| 152 | asn_DEF_signed_tags_4, /* Same as above */ |
| 153 | sizeof(asn_DEF_signed_tags_4) |
| 154 | /sizeof(asn_DEF_signed_tags_4[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 155 | 0, /* No OER visible constraints */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 156 | 0, /* No PER visible constraints */ |
| 157 | asn_MBR_signed_4, |
| 158 | 1, /* Elements count */ |
| 159 | &asn_SPC_signed_specs_4 /* Additional specs */ |
| 160 | }; |
| 161 | |
| 162 | static asn_TYPE_member_t asn_MBR_SIGNED_16P1_3[] = { |
| 163 | { ATF_NOFLAGS, 0, offsetof(struct SIGNED_16P1, Signed), |
| 164 | .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), |
| 165 | .tag_mode = 0, |
| 166 | .type = &asn_DEF_signed_4, |
| 167 | .memb_constraints = 0, /* Defer constraints checking to the member type */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 168 | .oer_constraints = 0, /* OER is not compiled, use -gen-OER */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 169 | .per_constraints = 0, /* PER is not compiled, use -gen-PER */ |
| 170 | .default_value = 0, |
| 171 | .name = "signed" |
| 172 | }, |
| 173 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 174 | static const ber_tlv_tag_t asn_DEF_SIGNED_16P1_tags_3[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 175 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 176 | }; |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 177 | static const asn_TYPE_tag2member_t asn_MAP_SIGNED_16P1_tag2el_3[] = { |
Lev Walkin | 4062b01 | 2013-10-11 14:29:38 -0700 | [diff] [blame] | 178 | { (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)), 0, 0, 0 } /* signed */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 179 | }; |
| 180 | static asn_SEQUENCE_specifics_t asn_SPC_SIGNED_16P1_specs_3 = { |
| 181 | sizeof(struct SIGNED_16P1), |
| 182 | offsetof(struct SIGNED_16P1, _asn_ctx), |
| 183 | asn_MAP_SIGNED_16P1_tag2el_3, |
| 184 | 1, /* Count of tags in the map */ |
| 185 | 0, 0, 0, /* Optional elements (not needed) */ |
| 186 | -1, /* Start extensions */ |
| 187 | -1 /* Stop extensions */ |
| 188 | }; |
| 189 | asn_TYPE_descriptor_t asn_DEF_SIGNED_16P1 = { |
| 190 | "SIGNED", |
| 191 | "SIGNED", |
| 192 | SEQUENCE_free, |
| 193 | SEQUENCE_print, |
| 194 | SEQUENCE_constraint, |
| 195 | SEQUENCE_decode_ber, |
| 196 | SEQUENCE_encode_der, |
| 197 | SEQUENCE_decode_xer, |
| 198 | SEQUENCE_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 199 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 200 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 201 | 0, /* Use generic outmost tag fetcher */ |
| 202 | asn_DEF_SIGNED_16P1_tags_3, |
| 203 | sizeof(asn_DEF_SIGNED_16P1_tags_3) |
| 204 | /sizeof(asn_DEF_SIGNED_16P1_tags_3[0]), /* 1 */ |
| 205 | asn_DEF_SIGNED_16P1_tags_3, /* Same as above */ |
| 206 | sizeof(asn_DEF_SIGNED_16P1_tags_3) |
| 207 | /sizeof(asn_DEF_SIGNED_16P1_tags_3[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 208 | 0, /* No OER visible constraints */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 209 | 0, /* No PER visible constraints */ |
| 210 | asn_MBR_SIGNED_16P1_3, |
| 211 | 1, /* Elements count */ |
| 212 | &asn_SPC_SIGNED_16P1_specs_3 /* Additional specs */ |
| 213 | }; |
| 214 | |
| 215 | |
| 216 | /*** <<< INCLUDES [SignedREAL] >>> ***/ |
| 217 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 218 | #include "SIGNED.h" |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 219 | |
| 220 | /*** <<< TYPE-DECLS [SignedREAL] >>> ***/ |
| 221 | |
| 222 | typedef SIGNED_16P0_t SignedREAL_t; |
| 223 | |
| 224 | /*** <<< FUNC-DECLS [SignedREAL] >>> ***/ |
| 225 | |
| 226 | extern asn_TYPE_descriptor_t asn_DEF_SignedREAL; |
| 227 | asn_struct_free_f SignedREAL_free; |
| 228 | asn_struct_print_f SignedREAL_print; |
| 229 | asn_constr_check_f SignedREAL_constraint; |
| 230 | ber_type_decoder_f SignedREAL_decode_ber; |
| 231 | der_type_encoder_f SignedREAL_encode_der; |
| 232 | xer_type_decoder_f SignedREAL_decode_xer; |
| 233 | xer_type_encoder_f SignedREAL_encode_xer; |
| 234 | |
| 235 | /*** <<< CODE [SignedREAL] >>> ***/ |
| 236 | |
| 237 | int |
| 238 | SignedREAL_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 239 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 240 | /* Replace with underlying type checker */ |
| 241 | td->check_constraints = asn_DEF_SIGNED_16P0.check_constraints; |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 242 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | /* |
| 246 | * This type is implemented using SIGNED_16P0, |
| 247 | * so here we adjust the DEF accordingly. |
| 248 | */ |
| 249 | static void |
| 250 | SignedREAL_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 251 | td->free_struct = asn_DEF_SIGNED_16P0.free_struct; |
| 252 | td->print_struct = asn_DEF_SIGNED_16P0.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 253 | td->check_constraints = asn_DEF_SIGNED_16P0.check_constraints; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 254 | td->ber_decoder = asn_DEF_SIGNED_16P0.ber_decoder; |
| 255 | td->der_encoder = asn_DEF_SIGNED_16P0.der_encoder; |
| 256 | td->xer_decoder = asn_DEF_SIGNED_16P0.xer_decoder; |
| 257 | td->xer_encoder = asn_DEF_SIGNED_16P0.xer_encoder; |
| 258 | td->uper_decoder = asn_DEF_SIGNED_16P0.uper_decoder; |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 259 | td->uper_encoder = asn_DEF_SIGNED_16P0.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 260 | td->oer_decoder = asn_DEF_SIGNED_16P0.oer_decoder; |
| 261 | td->oer_encoder = asn_DEF_SIGNED_16P0.oer_encoder; |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 262 | if(!td->oer_constraints) |
| 263 | td->oer_constraints = asn_DEF_SIGNED_16P0.oer_constraints; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 264 | if(!td->per_constraints) |
| 265 | td->per_constraints = asn_DEF_SIGNED_16P0.per_constraints; |
| 266 | td->elements = asn_DEF_SIGNED_16P0.elements; |
| 267 | td->elements_count = asn_DEF_SIGNED_16P0.elements_count; |
| 268 | td->specifics = asn_DEF_SIGNED_16P0.specifics; |
| 269 | } |
| 270 | |
| 271 | void |
| 272 | SignedREAL_free(asn_TYPE_descriptor_t *td, |
| 273 | void *struct_ptr, int contents_only) { |
| 274 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 275 | td->free_struct(td, struct_ptr, contents_only); |
| 276 | } |
| 277 | |
| 278 | int |
| 279 | SignedREAL_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 280 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 281 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 282 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 283 | } |
| 284 | |
| 285 | asn_dec_rval_t |
| 286 | SignedREAL_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 287 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 288 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 289 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 290 | } |
| 291 | |
| 292 | asn_enc_rval_t |
| 293 | SignedREAL_encode_der(asn_TYPE_descriptor_t *td, |
| 294 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 295 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 296 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 297 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 298 | } |
| 299 | |
| 300 | asn_dec_rval_t |
| 301 | SignedREAL_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 302 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 303 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 304 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 305 | } |
| 306 | |
| 307 | asn_enc_rval_t |
| 308 | SignedREAL_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 309 | int ilevel, enum xer_encoder_flags_e flags, |
| 310 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 311 | SignedREAL_1_inherit_TYPE_descriptor(td); |
| 312 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 313 | } |
| 314 | |
| 315 | |
| 316 | /*** <<< STAT-DEFS [SignedREAL] >>> ***/ |
| 317 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 318 | static const ber_tlv_tag_t asn_DEF_SignedREAL_tags_1[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 319 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 320 | }; |
| 321 | asn_TYPE_descriptor_t asn_DEF_SignedREAL = { |
| 322 | "SignedREAL", |
| 323 | "SignedREAL", |
| 324 | SignedREAL_free, |
| 325 | SignedREAL_print, |
| 326 | SignedREAL_constraint, |
| 327 | SignedREAL_decode_ber, |
| 328 | SignedREAL_encode_der, |
| 329 | SignedREAL_decode_xer, |
| 330 | SignedREAL_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 331 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 332 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 333 | 0, /* Use generic outmost tag fetcher */ |
| 334 | asn_DEF_SignedREAL_tags_1, |
| 335 | sizeof(asn_DEF_SignedREAL_tags_1) |
| 336 | /sizeof(asn_DEF_SignedREAL_tags_1[0]), /* 1 */ |
| 337 | asn_DEF_SignedREAL_tags_1, /* Same as above */ |
| 338 | sizeof(asn_DEF_SignedREAL_tags_1) |
| 339 | /sizeof(asn_DEF_SignedREAL_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 340 | 0, /* No OER visible constraints */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 341 | 0, /* No PER visible constraints */ |
| 342 | 0, 0, /* Defined elsewhere */ |
| 343 | 0 /* No specifics */ |
| 344 | }; |
| 345 | |
| 346 | |
| 347 | /*** <<< INCLUDES [SignedSET] >>> ***/ |
| 348 | |
Lev Walkin | 22b5ed4 | 2006-09-13 02:51:20 +0000 | [diff] [blame] | 349 | #include "SIGNED.h" |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 350 | |
| 351 | /*** <<< TYPE-DECLS [SignedSET] >>> ***/ |
| 352 | |
| 353 | typedef SIGNED_16P1_t SignedSET_t; |
| 354 | |
| 355 | /*** <<< FUNC-DECLS [SignedSET] >>> ***/ |
| 356 | |
| 357 | extern asn_TYPE_descriptor_t asn_DEF_SignedSET; |
| 358 | asn_struct_free_f SignedSET_free; |
| 359 | asn_struct_print_f SignedSET_print; |
| 360 | asn_constr_check_f SignedSET_constraint; |
| 361 | ber_type_decoder_f SignedSET_decode_ber; |
| 362 | der_type_encoder_f SignedSET_encode_der; |
| 363 | xer_type_decoder_f SignedSET_decode_xer; |
| 364 | xer_type_encoder_f SignedSET_encode_xer; |
| 365 | |
| 366 | /*** <<< CODE [SignedSET] >>> ***/ |
| 367 | |
| 368 | int |
| 369 | SignedSET_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 370 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 371 | /* Replace with underlying type checker */ |
| 372 | td->check_constraints = asn_DEF_SIGNED_16P1.check_constraints; |
Lev Walkin | 1eded35 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 373 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | /* |
| 377 | * This type is implemented using SIGNED_16P1, |
| 378 | * so here we adjust the DEF accordingly. |
| 379 | */ |
| 380 | static void |
| 381 | SignedSET_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 382 | td->free_struct = asn_DEF_SIGNED_16P1.free_struct; |
| 383 | td->print_struct = asn_DEF_SIGNED_16P1.print_struct; |
Lev Walkin | 6169b8d | 2013-12-07 11:02:44 -0800 | [diff] [blame] | 384 | td->check_constraints = asn_DEF_SIGNED_16P1.check_constraints; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 385 | td->ber_decoder = asn_DEF_SIGNED_16P1.ber_decoder; |
| 386 | td->der_encoder = asn_DEF_SIGNED_16P1.der_encoder; |
| 387 | td->xer_decoder = asn_DEF_SIGNED_16P1.xer_decoder; |
| 388 | td->xer_encoder = asn_DEF_SIGNED_16P1.xer_encoder; |
| 389 | td->uper_decoder = asn_DEF_SIGNED_16P1.uper_decoder; |
Lev Walkin | 9f5bb3a | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 390 | td->uper_encoder = asn_DEF_SIGNED_16P1.uper_encoder; |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 391 | td->oer_decoder = asn_DEF_SIGNED_16P1.oer_decoder; |
| 392 | td->oer_encoder = asn_DEF_SIGNED_16P1.oer_encoder; |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 393 | if(!td->oer_constraints) |
| 394 | td->oer_constraints = asn_DEF_SIGNED_16P1.oer_constraints; |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 395 | if(!td->per_constraints) |
| 396 | td->per_constraints = asn_DEF_SIGNED_16P1.per_constraints; |
| 397 | td->elements = asn_DEF_SIGNED_16P1.elements; |
| 398 | td->elements_count = asn_DEF_SIGNED_16P1.elements_count; |
| 399 | td->specifics = asn_DEF_SIGNED_16P1.specifics; |
| 400 | } |
| 401 | |
| 402 | void |
| 403 | SignedSET_free(asn_TYPE_descriptor_t *td, |
| 404 | void *struct_ptr, int contents_only) { |
| 405 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 406 | td->free_struct(td, struct_ptr, contents_only); |
| 407 | } |
| 408 | |
| 409 | int |
| 410 | SignedSET_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 411 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 412 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 413 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 414 | } |
| 415 | |
| 416 | asn_dec_rval_t |
| 417 | SignedSET_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 418 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 419 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 420 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 421 | } |
| 422 | |
| 423 | asn_enc_rval_t |
| 424 | SignedSET_encode_der(asn_TYPE_descriptor_t *td, |
| 425 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 426 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 427 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 428 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 429 | } |
| 430 | |
| 431 | asn_dec_rval_t |
| 432 | SignedSET_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 433 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 434 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 435 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 436 | } |
| 437 | |
| 438 | asn_enc_rval_t |
| 439 | SignedSET_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 440 | int ilevel, enum xer_encoder_flags_e flags, |
| 441 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 442 | SignedSET_1_inherit_TYPE_descriptor(td); |
| 443 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 444 | } |
| 445 | |
| 446 | |
| 447 | /*** <<< STAT-DEFS [SignedSET] >>> ***/ |
| 448 | |
Lev Walkin | a7591b5 | 2014-10-12 18:37:35 -0700 | [diff] [blame] | 449 | static const ber_tlv_tag_t asn_DEF_SignedSET_tags_1[] = { |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 450 | (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) |
| 451 | }; |
| 452 | asn_TYPE_descriptor_t asn_DEF_SignedSET = { |
| 453 | "SignedSET", |
| 454 | "SignedSET", |
| 455 | SignedSET_free, |
| 456 | SignedSET_print, |
| 457 | SignedSET_constraint, |
| 458 | SignedSET_decode_ber, |
| 459 | SignedSET_encode_der, |
| 460 | SignedSET_decode_xer, |
| 461 | SignedSET_encode_xer, |
Lev Walkin | ba68c91 | 2017-07-06 07:52:39 -0700 | [diff] [blame] | 462 | 0, 0, /* No OER support, use "-gen-OER" to enable */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 463 | 0, 0, /* No PER support, use "-gen-PER" to enable */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 464 | 0, /* Use generic outmost tag fetcher */ |
| 465 | asn_DEF_SignedSET_tags_1, |
| 466 | sizeof(asn_DEF_SignedSET_tags_1) |
| 467 | /sizeof(asn_DEF_SignedSET_tags_1[0]), /* 1 */ |
| 468 | asn_DEF_SignedSET_tags_1, /* Same as above */ |
| 469 | sizeof(asn_DEF_SignedSET_tags_1) |
| 470 | /sizeof(asn_DEF_SignedSET_tags_1[0]), /* 1 */ |
Lev Walkin | b33425f | 2017-07-14 14:59:52 +0400 | [diff] [blame] | 471 | 0, /* No OER visible constraints */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 472 | 0, /* No PER visible constraints */ |
| 473 | 0, 0, /* Defined elsewhere */ |
| 474 | 0 /* No specifics */ |
| 475 | }; |
| 476 | |