vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [OK-Integer1] >>> ***/ |
| 3 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 4 | #include <NativeInteger.h> |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 5 | |
| 6 | /*** <<< TYPE-DECLS [OK-Integer1] >>> ***/ |
| 7 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 8 | typedef long OK_Integer1_t; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 9 | |
| 10 | /*** <<< FUNC-DECLS [OK-Integer1] >>> ***/ |
| 11 | |
| 12 | extern asn_TYPE_descriptor_t asn_DEF_OK_Integer1; |
| 13 | asn_struct_free_f OK_Integer1_free; |
| 14 | asn_struct_print_f OK_Integer1_print; |
| 15 | asn_constr_check_f OK_Integer1_constraint; |
| 16 | ber_type_decoder_f OK_Integer1_decode_ber; |
| 17 | der_type_encoder_f OK_Integer1_encode_der; |
| 18 | xer_type_decoder_f OK_Integer1_decode_xer; |
| 19 | xer_type_encoder_f OK_Integer1_encode_xer; |
| 20 | |
| 21 | /*** <<< CODE [OK-Integer1] >>> ***/ |
| 22 | |
| 23 | int |
| 24 | OK_Integer1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 25 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 26 | |
| 27 | if(!sptr) { |
| 28 | _ASN_ERRLOG(app_errlog, app_key, |
| 29 | "%s: value not given (%s:%d)", |
| 30 | td->name, __FILE__, __LINE__); |
| 31 | return -1; |
| 32 | } |
| 33 | |
| 34 | |
| 35 | if(1 /* No applicable constraints whatsoever */) { |
| 36 | /* Nothing is here. See below */ |
| 37 | } |
| 38 | |
| 39 | /* Replace with underlying type checker */ |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 40 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 41 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 42 | } |
| 43 | |
| 44 | /* |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 45 | * This type is implemented using NativeInteger, |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 46 | * so here we adjust the DEF accordingly. |
| 47 | */ |
| 48 | static void |
| 49 | OK_Integer1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 50 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 51 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 52 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 53 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 54 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 55 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 56 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 57 | if(!td->per_constraints) |
| 58 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 59 | td->elements = asn_DEF_NativeInteger.elements; |
| 60 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 61 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | void |
| 65 | OK_Integer1_free(asn_TYPE_descriptor_t *td, |
| 66 | void *struct_ptr, int contents_only) { |
| 67 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 68 | td->free_struct(td, struct_ptr, contents_only); |
| 69 | } |
| 70 | |
| 71 | int |
| 72 | OK_Integer1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 73 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 74 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 75 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 76 | } |
| 77 | |
| 78 | asn_dec_rval_t |
| 79 | OK_Integer1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 80 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 81 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 82 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 83 | } |
| 84 | |
| 85 | asn_enc_rval_t |
| 86 | OK_Integer1_encode_der(asn_TYPE_descriptor_t *td, |
| 87 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 88 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 89 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 90 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 91 | } |
| 92 | |
| 93 | asn_dec_rval_t |
| 94 | OK_Integer1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 95 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 96 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 97 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 98 | } |
| 99 | |
| 100 | asn_enc_rval_t |
| 101 | OK_Integer1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 102 | int ilevel, enum xer_encoder_flags_e flags, |
| 103 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 104 | OK_Integer1_1_inherit_TYPE_descriptor(td); |
| 105 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 106 | } |
| 107 | |
| 108 | |
| 109 | /*** <<< STAT-DEFS [OK-Integer1] >>> ***/ |
| 110 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 111 | static ber_tlv_tag_t asn_DEF_OK_Integer1_tags_1[] = { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 112 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 113 | }; |
| 114 | asn_TYPE_descriptor_t asn_DEF_OK_Integer1 = { |
| 115 | "OK-Integer1", |
| 116 | "OK-Integer1", |
| 117 | OK_Integer1_free, |
| 118 | OK_Integer1_print, |
| 119 | OK_Integer1_constraint, |
| 120 | OK_Integer1_decode_ber, |
| 121 | OK_Integer1_encode_der, |
| 122 | OK_Integer1_decode_xer, |
| 123 | OK_Integer1_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 124 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 125 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 126 | asn_DEF_OK_Integer1_tags_1, |
| 127 | sizeof(asn_DEF_OK_Integer1_tags_1) |
| 128 | /sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */ |
| 129 | asn_DEF_OK_Integer1_tags_1, /* Same as above */ |
| 130 | sizeof(asn_DEF_OK_Integer1_tags_1) |
| 131 | /sizeof(asn_DEF_OK_Integer1_tags_1[0]), /* 1 */ |
| 132 | 0, /* No PER visible constraints */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 133 | 0, 0, /* No members */ |
| 134 | 0 /* No specifics */ |
| 135 | }; |
| 136 | |
| 137 | |
| 138 | /*** <<< INCLUDES [OK-Integer2] >>> ***/ |
| 139 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 140 | #include <NativeInteger.h> |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 141 | |
| 142 | /*** <<< TYPE-DECLS [OK-Integer2] >>> ***/ |
| 143 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 144 | typedef long OK_Integer2_t; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 145 | |
| 146 | /*** <<< FUNC-DECLS [OK-Integer2] >>> ***/ |
| 147 | |
| 148 | extern asn_TYPE_descriptor_t asn_DEF_OK_Integer2; |
| 149 | asn_struct_free_f OK_Integer2_free; |
| 150 | asn_struct_print_f OK_Integer2_print; |
| 151 | asn_constr_check_f OK_Integer2_constraint; |
| 152 | ber_type_decoder_f OK_Integer2_decode_ber; |
| 153 | der_type_encoder_f OK_Integer2_encode_der; |
| 154 | xer_type_decoder_f OK_Integer2_decode_xer; |
| 155 | xer_type_encoder_f OK_Integer2_encode_xer; |
| 156 | |
| 157 | /*** <<< CODE [OK-Integer2] >>> ***/ |
| 158 | |
| 159 | int |
| 160 | OK_Integer2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 161 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 162 | |
| 163 | if(!sptr) { |
| 164 | _ASN_ERRLOG(app_errlog, app_key, |
| 165 | "%s: value not given (%s:%d)", |
| 166 | td->name, __FILE__, __LINE__); |
| 167 | return -1; |
| 168 | } |
| 169 | |
| 170 | |
| 171 | if(1 /* No applicable constraints whatsoever */) { |
| 172 | /* Nothing is here. See below */ |
| 173 | } |
| 174 | |
| 175 | /* Replace with underlying type checker */ |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 176 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 177 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 178 | } |
| 179 | |
| 180 | /* |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 181 | * This type is implemented using NativeInteger, |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 182 | * so here we adjust the DEF accordingly. |
| 183 | */ |
| 184 | static void |
| 185 | OK_Integer2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 186 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 187 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 188 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 189 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 190 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 191 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 192 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 193 | if(!td->per_constraints) |
| 194 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 195 | td->elements = asn_DEF_NativeInteger.elements; |
| 196 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 197 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | void |
| 201 | OK_Integer2_free(asn_TYPE_descriptor_t *td, |
| 202 | void *struct_ptr, int contents_only) { |
| 203 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 204 | td->free_struct(td, struct_ptr, contents_only); |
| 205 | } |
| 206 | |
| 207 | int |
| 208 | OK_Integer2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 209 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 210 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 211 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 212 | } |
| 213 | |
| 214 | asn_dec_rval_t |
| 215 | OK_Integer2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 216 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 217 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 218 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 219 | } |
| 220 | |
| 221 | asn_enc_rval_t |
| 222 | OK_Integer2_encode_der(asn_TYPE_descriptor_t *td, |
| 223 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 224 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 225 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 226 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 227 | } |
| 228 | |
| 229 | asn_dec_rval_t |
| 230 | OK_Integer2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 231 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 232 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 233 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 234 | } |
| 235 | |
| 236 | asn_enc_rval_t |
| 237 | OK_Integer2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 238 | int ilevel, enum xer_encoder_flags_e flags, |
| 239 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 240 | OK_Integer2_1_inherit_TYPE_descriptor(td); |
| 241 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 242 | } |
| 243 | |
| 244 | |
| 245 | /*** <<< STAT-DEFS [OK-Integer2] >>> ***/ |
| 246 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 247 | static ber_tlv_tag_t asn_DEF_OK_Integer2_tags_1[] = { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 248 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 249 | }; |
| 250 | asn_TYPE_descriptor_t asn_DEF_OK_Integer2 = { |
| 251 | "OK-Integer2", |
| 252 | "OK-Integer2", |
| 253 | OK_Integer2_free, |
| 254 | OK_Integer2_print, |
| 255 | OK_Integer2_constraint, |
| 256 | OK_Integer2_decode_ber, |
| 257 | OK_Integer2_encode_der, |
| 258 | OK_Integer2_decode_xer, |
| 259 | OK_Integer2_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 260 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 261 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 262 | asn_DEF_OK_Integer2_tags_1, |
| 263 | sizeof(asn_DEF_OK_Integer2_tags_1) |
| 264 | /sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */ |
| 265 | asn_DEF_OK_Integer2_tags_1, /* Same as above */ |
| 266 | sizeof(asn_DEF_OK_Integer2_tags_1) |
| 267 | /sizeof(asn_DEF_OK_Integer2_tags_1[0]), /* 1 */ |
| 268 | 0, /* No PER visible constraints */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 269 | 0, 0, /* No members */ |
| 270 | 0 /* No specifics */ |
| 271 | }; |
| 272 | |
| 273 | |
| 274 | /*** <<< INCLUDES [OK-Integer3] >>> ***/ |
| 275 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 276 | #include <NativeInteger.h> |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 277 | |
| 278 | /*** <<< TYPE-DECLS [OK-Integer3] >>> ***/ |
| 279 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 280 | typedef long OK_Integer3_t; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 281 | |
| 282 | /*** <<< FUNC-DECLS [OK-Integer3] >>> ***/ |
| 283 | |
| 284 | extern asn_TYPE_descriptor_t asn_DEF_OK_Integer3; |
| 285 | asn_struct_free_f OK_Integer3_free; |
| 286 | asn_struct_print_f OK_Integer3_print; |
| 287 | asn_constr_check_f OK_Integer3_constraint; |
| 288 | ber_type_decoder_f OK_Integer3_decode_ber; |
| 289 | der_type_encoder_f OK_Integer3_encode_der; |
| 290 | xer_type_decoder_f OK_Integer3_decode_xer; |
| 291 | xer_type_encoder_f OK_Integer3_encode_xer; |
| 292 | |
| 293 | /*** <<< CODE [OK-Integer3] >>> ***/ |
| 294 | |
| 295 | int |
| 296 | OK_Integer3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 297 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 298 | |
| 299 | if(!sptr) { |
| 300 | _ASN_ERRLOG(app_errlog, app_key, |
| 301 | "%s: value not given (%s:%d)", |
| 302 | td->name, __FILE__, __LINE__); |
| 303 | return -1; |
| 304 | } |
| 305 | |
| 306 | |
| 307 | if(1 /* No applicable constraints whatsoever */) { |
| 308 | /* Nothing is here. See below */ |
| 309 | } |
| 310 | |
| 311 | /* Replace with underlying type checker */ |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 312 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 313 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 314 | } |
| 315 | |
| 316 | /* |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 317 | * This type is implemented using NativeInteger, |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 318 | * so here we adjust the DEF accordingly. |
| 319 | */ |
| 320 | static void |
| 321 | OK_Integer3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 322 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 323 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 324 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 325 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 326 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 327 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 328 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 329 | if(!td->per_constraints) |
| 330 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 331 | td->elements = asn_DEF_NativeInteger.elements; |
| 332 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 333 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 334 | } |
| 335 | |
| 336 | void |
| 337 | OK_Integer3_free(asn_TYPE_descriptor_t *td, |
| 338 | void *struct_ptr, int contents_only) { |
| 339 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 340 | td->free_struct(td, struct_ptr, contents_only); |
| 341 | } |
| 342 | |
| 343 | int |
| 344 | OK_Integer3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 345 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 346 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 347 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 348 | } |
| 349 | |
| 350 | asn_dec_rval_t |
| 351 | OK_Integer3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 352 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 353 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 354 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 355 | } |
| 356 | |
| 357 | asn_enc_rval_t |
| 358 | OK_Integer3_encode_der(asn_TYPE_descriptor_t *td, |
| 359 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 360 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 361 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 362 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 363 | } |
| 364 | |
| 365 | asn_dec_rval_t |
| 366 | OK_Integer3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 367 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 368 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 369 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 370 | } |
| 371 | |
| 372 | asn_enc_rval_t |
| 373 | OK_Integer3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 374 | int ilevel, enum xer_encoder_flags_e flags, |
| 375 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 376 | OK_Integer3_1_inherit_TYPE_descriptor(td); |
| 377 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 378 | } |
| 379 | |
| 380 | |
| 381 | /*** <<< STAT-DEFS [OK-Integer3] >>> ***/ |
| 382 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 383 | static ber_tlv_tag_t asn_DEF_OK_Integer3_tags_1[] = { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 384 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 385 | }; |
| 386 | asn_TYPE_descriptor_t asn_DEF_OK_Integer3 = { |
| 387 | "OK-Integer3", |
| 388 | "OK-Integer3", |
| 389 | OK_Integer3_free, |
| 390 | OK_Integer3_print, |
| 391 | OK_Integer3_constraint, |
| 392 | OK_Integer3_decode_ber, |
| 393 | OK_Integer3_encode_der, |
| 394 | OK_Integer3_decode_xer, |
| 395 | OK_Integer3_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 396 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 397 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 398 | asn_DEF_OK_Integer3_tags_1, |
| 399 | sizeof(asn_DEF_OK_Integer3_tags_1) |
| 400 | /sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */ |
| 401 | asn_DEF_OK_Integer3_tags_1, /* Same as above */ |
| 402 | sizeof(asn_DEF_OK_Integer3_tags_1) |
| 403 | /sizeof(asn_DEF_OK_Integer3_tags_1[0]), /* 1 */ |
| 404 | 0, /* No PER visible constraints */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 405 | 0, 0, /* No members */ |
| 406 | 0 /* No specifics */ |
| 407 | }; |
| 408 | |
| 409 | |
| 410 | /*** <<< INCLUDES [OK-Integer4] >>> ***/ |
| 411 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 412 | #include <NativeInteger.h> |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 413 | |
| 414 | /*** <<< TYPE-DECLS [OK-Integer4] >>> ***/ |
| 415 | |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 416 | typedef long OK_Integer4_t; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 417 | |
| 418 | /*** <<< FUNC-DECLS [OK-Integer4] >>> ***/ |
| 419 | |
| 420 | extern asn_TYPE_descriptor_t asn_DEF_OK_Integer4; |
| 421 | asn_struct_free_f OK_Integer4_free; |
| 422 | asn_struct_print_f OK_Integer4_print; |
| 423 | asn_constr_check_f OK_Integer4_constraint; |
| 424 | ber_type_decoder_f OK_Integer4_decode_ber; |
| 425 | der_type_encoder_f OK_Integer4_encode_der; |
| 426 | xer_type_decoder_f OK_Integer4_decode_xer; |
| 427 | xer_type_encoder_f OK_Integer4_encode_xer; |
| 428 | |
| 429 | /*** <<< CODE [OK-Integer4] >>> ***/ |
| 430 | |
| 431 | int |
| 432 | OK_Integer4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 433 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 434 | |
| 435 | if(!sptr) { |
| 436 | _ASN_ERRLOG(app_errlog, app_key, |
| 437 | "%s: value not given (%s:%d)", |
| 438 | td->name, __FILE__, __LINE__); |
| 439 | return -1; |
| 440 | } |
| 441 | |
| 442 | |
| 443 | if(1 /* No applicable constraints whatsoever */) { |
| 444 | /* Nothing is here. See below */ |
| 445 | } |
| 446 | |
| 447 | /* Replace with underlying type checker */ |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 448 | td->check_constraints = asn_DEF_NativeInteger.check_constraints; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 449 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 450 | } |
| 451 | |
| 452 | /* |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 453 | * This type is implemented using NativeInteger, |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 454 | * so here we adjust the DEF accordingly. |
| 455 | */ |
| 456 | static void |
| 457 | OK_Integer4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 458 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 459 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 460 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 461 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 462 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 463 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 464 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 465 | if(!td->per_constraints) |
| 466 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
vlm | 9c7c480 | 2005-08-14 15:01:10 +0000 | [diff] [blame] | 467 | td->elements = asn_DEF_NativeInteger.elements; |
| 468 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 469 | td->specifics = asn_DEF_NativeInteger.specifics; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 470 | } |
| 471 | |
| 472 | void |
| 473 | OK_Integer4_free(asn_TYPE_descriptor_t *td, |
| 474 | void *struct_ptr, int contents_only) { |
| 475 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 476 | td->free_struct(td, struct_ptr, contents_only); |
| 477 | } |
| 478 | |
| 479 | int |
| 480 | OK_Integer4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 481 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 482 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 483 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 484 | } |
| 485 | |
| 486 | asn_dec_rval_t |
| 487 | OK_Integer4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 488 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 489 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 490 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 491 | } |
| 492 | |
| 493 | asn_enc_rval_t |
| 494 | OK_Integer4_encode_der(asn_TYPE_descriptor_t *td, |
| 495 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 496 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 497 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 498 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 499 | } |
| 500 | |
| 501 | asn_dec_rval_t |
| 502 | OK_Integer4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 503 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 504 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 505 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 506 | } |
| 507 | |
| 508 | asn_enc_rval_t |
| 509 | OK_Integer4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 510 | int ilevel, enum xer_encoder_flags_e flags, |
| 511 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 512 | OK_Integer4_1_inherit_TYPE_descriptor(td); |
| 513 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 514 | } |
| 515 | |
| 516 | |
| 517 | /*** <<< STAT-DEFS [OK-Integer4] >>> ***/ |
| 518 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 519 | static ber_tlv_tag_t asn_DEF_OK_Integer4_tags_1[] = { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 520 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 521 | }; |
| 522 | asn_TYPE_descriptor_t asn_DEF_OK_Integer4 = { |
| 523 | "OK-Integer4", |
| 524 | "OK-Integer4", |
| 525 | OK_Integer4_free, |
| 526 | OK_Integer4_print, |
| 527 | OK_Integer4_constraint, |
| 528 | OK_Integer4_decode_ber, |
| 529 | OK_Integer4_encode_der, |
| 530 | OK_Integer4_decode_xer, |
| 531 | OK_Integer4_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 532 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 533 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 534 | asn_DEF_OK_Integer4_tags_1, |
| 535 | sizeof(asn_DEF_OK_Integer4_tags_1) |
| 536 | /sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */ |
| 537 | asn_DEF_OK_Integer4_tags_1, /* Same as above */ |
| 538 | sizeof(asn_DEF_OK_Integer4_tags_1) |
| 539 | /sizeof(asn_DEF_OK_Integer4_tags_1[0]), /* 1 */ |
| 540 | 0, /* No PER visible constraints */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 541 | 0, 0, /* No members */ |
| 542 | 0 /* No specifics */ |
| 543 | }; |
| 544 | |
| 545 | |
| 546 | /*** <<< INCLUDES [NO-Integer5] >>> ***/ |
| 547 | |
| 548 | #include <INTEGER.h> |
| 549 | |
| 550 | /*** <<< TYPE-DECLS [NO-Integer5] >>> ***/ |
| 551 | |
| 552 | typedef INTEGER_t NO_Integer5_t; |
| 553 | |
| 554 | /*** <<< FUNC-DECLS [NO-Integer5] >>> ***/ |
| 555 | |
| 556 | extern asn_TYPE_descriptor_t asn_DEF_NO_Integer5; |
| 557 | asn_struct_free_f NO_Integer5_free; |
| 558 | asn_struct_print_f NO_Integer5_print; |
| 559 | asn_constr_check_f NO_Integer5_constraint; |
| 560 | ber_type_decoder_f NO_Integer5_decode_ber; |
| 561 | der_type_encoder_f NO_Integer5_encode_der; |
| 562 | xer_type_decoder_f NO_Integer5_decode_xer; |
| 563 | xer_type_encoder_f NO_Integer5_encode_xer; |
| 564 | |
| 565 | /*** <<< CODE [NO-Integer5] >>> ***/ |
| 566 | |
| 567 | int |
| 568 | NO_Integer5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
| 569 | asn_app_consume_bytes_f *app_errlog, void *app_key) { |
| 570 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 571 | |
| 572 | if(!sptr) { |
| 573 | _ASN_ERRLOG(app_errlog, app_key, |
| 574 | "%s: value not given (%s:%d)", |
| 575 | td->name, __FILE__, __LINE__); |
| 576 | return -1; |
| 577 | } |
| 578 | |
| 579 | |
| 580 | if(1 /* No applicable constraints whatsoever */) { |
| 581 | /* Nothing is here. See below */ |
| 582 | } |
| 583 | |
| 584 | /* Replace with underlying type checker */ |
| 585 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
| 586 | return td->check_constraints(td, sptr, app_errlog, app_key); |
| 587 | } |
| 588 | |
| 589 | /* |
| 590 | * This type is implemented using INTEGER, |
| 591 | * so here we adjust the DEF accordingly. |
| 592 | */ |
| 593 | static void |
| 594 | NO_Integer5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 595 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 596 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 597 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 598 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 599 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 600 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 601 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
| 602 | if(!td->per_constraints) |
| 603 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 604 | td->elements = asn_DEF_INTEGER.elements; |
| 605 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 606 | td->specifics = asn_DEF_INTEGER.specifics; |
| 607 | } |
| 608 | |
| 609 | void |
| 610 | NO_Integer5_free(asn_TYPE_descriptor_t *td, |
| 611 | void *struct_ptr, int contents_only) { |
| 612 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 613 | td->free_struct(td, struct_ptr, contents_only); |
| 614 | } |
| 615 | |
| 616 | int |
| 617 | NO_Integer5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 618 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 619 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 620 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 621 | } |
| 622 | |
| 623 | asn_dec_rval_t |
| 624 | NO_Integer5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 625 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 626 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 627 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 628 | } |
| 629 | |
| 630 | asn_enc_rval_t |
| 631 | NO_Integer5_encode_der(asn_TYPE_descriptor_t *td, |
| 632 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 633 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 634 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 635 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 636 | } |
| 637 | |
| 638 | asn_dec_rval_t |
| 639 | NO_Integer5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 640 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 641 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 642 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 643 | } |
| 644 | |
| 645 | asn_enc_rval_t |
| 646 | NO_Integer5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 647 | int ilevel, enum xer_encoder_flags_e flags, |
| 648 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 649 | NO_Integer5_1_inherit_TYPE_descriptor(td); |
| 650 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 651 | } |
| 652 | |
| 653 | |
| 654 | /*** <<< STAT-DEFS [NO-Integer5] >>> ***/ |
| 655 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 656 | static ber_tlv_tag_t asn_DEF_NO_Integer5_tags_1[] = { |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 657 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 658 | }; |
| 659 | asn_TYPE_descriptor_t asn_DEF_NO_Integer5 = { |
| 660 | "NO-Integer5", |
| 661 | "NO-Integer5", |
| 662 | NO_Integer5_free, |
| 663 | NO_Integer5_print, |
| 664 | NO_Integer5_constraint, |
| 665 | NO_Integer5_decode_ber, |
| 666 | NO_Integer5_encode_der, |
| 667 | NO_Integer5_decode_xer, |
| 668 | NO_Integer5_encode_xer, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 669 | 0, /* No PER decoder, -gen-PER to enable */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 670 | 0, /* Use generic outmost tag fetcher */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 671 | asn_DEF_NO_Integer5_tags_1, |
| 672 | sizeof(asn_DEF_NO_Integer5_tags_1) |
| 673 | /sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */ |
| 674 | asn_DEF_NO_Integer5_tags_1, /* Same as above */ |
| 675 | sizeof(asn_DEF_NO_Integer5_tags_1) |
| 676 | /sizeof(asn_DEF_NO_Integer5_tags_1[0]), /* 1 */ |
| 677 | 0, /* No PER visible constraints */ |
vlm | 2702858 | 2005-08-14 14:45:44 +0000 | [diff] [blame] | 678 | 0, 0, /* No members */ |
| 679 | 0 /* No specifics */ |
| 680 | }; |
| 681 | |