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