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