vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1 | |
| 2 | /*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/ |
| 3 | |
| 4 | #include <INTEGER.h> |
| 5 | |
| 6 | /*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/ |
| 7 | |
| 8 | typedef INTEGER_t CN_IntegerUnlimited_t; |
| 9 | |
| 10 | /*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/ |
| 11 | |
| 12 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited; |
| 13 | asn_struct_free_f CN_IntegerUnlimited_free; |
| 14 | asn_struct_print_f CN_IntegerUnlimited_print; |
| 15 | asn_constr_check_f CN_IntegerUnlimited_constraint; |
| 16 | ber_type_decoder_f CN_IntegerUnlimited_decode_ber; |
| 17 | der_type_encoder_f CN_IntegerUnlimited_encode_der; |
| 18 | xer_type_decoder_f CN_IntegerUnlimited_decode_xer; |
| 19 | xer_type_encoder_f CN_IntegerUnlimited_encode_xer; |
| 20 | per_type_decoder_f CN_IntegerUnlimited_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 21 | per_type_encoder_f CN_IntegerUnlimited_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 22 | |
| 23 | /*** <<< CODE [CN-IntegerUnlimited] >>> ***/ |
| 24 | |
| 25 | int |
| 26 | CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 27 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 28 | /* Replace with underlying type checker */ |
| 29 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 30 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | /* |
| 34 | * This type is implemented using INTEGER, |
| 35 | * so here we adjust the DEF accordingly. |
| 36 | */ |
| 37 | static void |
| 38 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 39 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 40 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 41 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 42 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 43 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 44 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 45 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 46 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 47 | if(!td->per_constraints) |
| 48 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 49 | td->elements = asn_DEF_INTEGER.elements; |
| 50 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 51 | td->specifics = asn_DEF_INTEGER.specifics; |
| 52 | } |
| 53 | |
| 54 | void |
| 55 | CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td, |
| 56 | void *struct_ptr, int contents_only) { |
| 57 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 58 | td->free_struct(td, struct_ptr, contents_only); |
| 59 | } |
| 60 | |
| 61 | int |
| 62 | CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 63 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 64 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 65 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 66 | } |
| 67 | |
| 68 | asn_dec_rval_t |
| 69 | CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 70 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 71 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 72 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 73 | } |
| 74 | |
| 75 | asn_enc_rval_t |
| 76 | CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td, |
| 77 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 78 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 79 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 80 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 81 | } |
| 82 | |
| 83 | asn_dec_rval_t |
| 84 | CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 85 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 86 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 87 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 88 | } |
| 89 | |
| 90 | asn_enc_rval_t |
| 91 | CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 92 | int ilevel, enum xer_encoder_flags_e flags, |
| 93 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 94 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 95 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 96 | } |
| 97 | |
| 98 | asn_dec_rval_t |
| 99 | CN_IntegerUnlimited_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 100 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 101 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 102 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 103 | } |
| 104 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 105 | asn_enc_rval_t |
| 106 | CN_IntegerUnlimited_encode_uper(asn_TYPE_descriptor_t *td, |
| 107 | asn_per_constraints_t *constraints, |
| 108 | void *structure, asn_per_outp_t *per_out) { |
| 109 | CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td); |
| 110 | return td->uper_encoder(td, constraints, structure, per_out); |
| 111 | } |
| 112 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 113 | |
| 114 | /*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/ |
| 115 | |
| 116 | static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = { |
| 117 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 118 | }; |
| 119 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = { |
| 120 | "CN-IntegerUnlimited", |
| 121 | "CN-IntegerUnlimited", |
| 122 | CN_IntegerUnlimited_free, |
| 123 | CN_IntegerUnlimited_print, |
| 124 | CN_IntegerUnlimited_constraint, |
| 125 | CN_IntegerUnlimited_decode_ber, |
| 126 | CN_IntegerUnlimited_encode_der, |
| 127 | CN_IntegerUnlimited_decode_xer, |
| 128 | CN_IntegerUnlimited_encode_xer, |
| 129 | CN_IntegerUnlimited_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 130 | CN_IntegerUnlimited_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 131 | 0, /* Use generic outmost tag fetcher */ |
| 132 | asn_DEF_CN_IntegerUnlimited_tags_1, |
| 133 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 134 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
| 135 | asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */ |
| 136 | sizeof(asn_DEF_CN_IntegerUnlimited_tags_1) |
| 137 | /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */ |
| 138 | 0, /* No PER visible constraints */ |
| 139 | 0, 0, /* No members */ |
| 140 | 0 /* No specifics */ |
| 141 | }; |
| 142 | |
| 143 | |
| 144 | /*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/ |
| 145 | |
| 146 | #include <INTEGER.h> |
| 147 | |
| 148 | /*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/ |
| 149 | |
| 150 | typedef INTEGER_t CN_IntegerMinMax_t; |
| 151 | |
| 152 | /*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/ |
| 153 | |
| 154 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax; |
| 155 | asn_struct_free_f CN_IntegerMinMax_free; |
| 156 | asn_struct_print_f CN_IntegerMinMax_print; |
| 157 | asn_constr_check_f CN_IntegerMinMax_constraint; |
| 158 | ber_type_decoder_f CN_IntegerMinMax_decode_ber; |
| 159 | der_type_encoder_f CN_IntegerMinMax_encode_der; |
| 160 | xer_type_decoder_f CN_IntegerMinMax_decode_xer; |
| 161 | xer_type_encoder_f CN_IntegerMinMax_encode_xer; |
| 162 | per_type_decoder_f CN_IntegerMinMax_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 163 | per_type_encoder_f CN_IntegerMinMax_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 164 | |
| 165 | /*** <<< CODE [CN-IntegerMinMax] >>> ***/ |
| 166 | |
| 167 | int |
| 168 | CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 169 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 170 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 171 | |
| 172 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 173 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 174 | "%s: value not given (%s:%d)", |
| 175 | td->name, __FILE__, __LINE__); |
| 176 | return -1; |
| 177 | } |
| 178 | |
| 179 | |
| 180 | if(1 /* No applicable constraints whatsoever */) { |
| 181 | /* Nothing is here. See below */ |
| 182 | } |
| 183 | |
| 184 | /* Replace with underlying type checker */ |
| 185 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 186 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 187 | } |
| 188 | |
| 189 | /* |
| 190 | * This type is implemented using INTEGER, |
| 191 | * so here we adjust the DEF accordingly. |
| 192 | */ |
| 193 | static void |
| 194 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 195 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 196 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 197 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 198 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 199 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 200 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 201 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 202 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 203 | if(!td->per_constraints) |
| 204 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 205 | td->elements = asn_DEF_INTEGER.elements; |
| 206 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 207 | td->specifics = asn_DEF_INTEGER.specifics; |
| 208 | } |
| 209 | |
| 210 | void |
| 211 | CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td, |
| 212 | void *struct_ptr, int contents_only) { |
| 213 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 214 | td->free_struct(td, struct_ptr, contents_only); |
| 215 | } |
| 216 | |
| 217 | int |
| 218 | CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 219 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 220 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 221 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 222 | } |
| 223 | |
| 224 | asn_dec_rval_t |
| 225 | CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 226 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 227 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 228 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 229 | } |
| 230 | |
| 231 | asn_enc_rval_t |
| 232 | CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td, |
| 233 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 234 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 235 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 236 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 237 | } |
| 238 | |
| 239 | asn_dec_rval_t |
| 240 | CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 241 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 242 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 243 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 244 | } |
| 245 | |
| 246 | asn_enc_rval_t |
| 247 | CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 248 | int ilevel, enum xer_encoder_flags_e flags, |
| 249 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 250 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 251 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 252 | } |
| 253 | |
| 254 | asn_dec_rval_t |
| 255 | CN_IntegerMinMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 256 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 257 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 258 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 259 | } |
| 260 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 261 | asn_enc_rval_t |
| 262 | CN_IntegerMinMax_encode_uper(asn_TYPE_descriptor_t *td, |
| 263 | asn_per_constraints_t *constraints, |
| 264 | void *structure, asn_per_outp_t *per_out) { |
| 265 | CN_IntegerMinMax_1_inherit_TYPE_descriptor(td); |
| 266 | return td->uper_encoder(td, constraints, structure, per_out); |
| 267 | } |
| 268 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 269 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 270 | /*** <<< CTDEFS [CN-IntegerMinMax] >>> ***/ |
| 271 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 272 | static asn_per_constraints_t asn_PER_type_CN_IntegerMinMax_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 273 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 274 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 275 | 0, 0 /* No PER value map */ |
| 276 | }; |
| 277 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 278 | /*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/ |
| 279 | |
| 280 | static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = { |
| 281 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 282 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 283 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = { |
| 284 | "CN-IntegerMinMax", |
| 285 | "CN-IntegerMinMax", |
| 286 | CN_IntegerMinMax_free, |
| 287 | CN_IntegerMinMax_print, |
| 288 | CN_IntegerMinMax_constraint, |
| 289 | CN_IntegerMinMax_decode_ber, |
| 290 | CN_IntegerMinMax_encode_der, |
| 291 | CN_IntegerMinMax_decode_xer, |
| 292 | CN_IntegerMinMax_encode_xer, |
| 293 | CN_IntegerMinMax_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 294 | CN_IntegerMinMax_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 295 | 0, /* Use generic outmost tag fetcher */ |
| 296 | asn_DEF_CN_IntegerMinMax_tags_1, |
| 297 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 298 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
| 299 | asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */ |
| 300 | sizeof(asn_DEF_CN_IntegerMinMax_tags_1) |
| 301 | /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 302 | &asn_PER_type_CN_IntegerMinMax_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 303 | 0, 0, /* No members */ |
| 304 | 0 /* No specifics */ |
| 305 | }; |
| 306 | |
| 307 | |
| 308 | /*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/ |
| 309 | |
| 310 | #include <INTEGER.h> |
| 311 | |
| 312 | /*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/ |
| 313 | |
| 314 | typedef INTEGER_t CN_IntegerMinLow_t; |
| 315 | |
| 316 | /*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/ |
| 317 | |
| 318 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow; |
| 319 | asn_struct_free_f CN_IntegerMinLow_free; |
| 320 | asn_struct_print_f CN_IntegerMinLow_print; |
| 321 | asn_constr_check_f CN_IntegerMinLow_constraint; |
| 322 | ber_type_decoder_f CN_IntegerMinLow_decode_ber; |
| 323 | der_type_encoder_f CN_IntegerMinLow_encode_der; |
| 324 | xer_type_decoder_f CN_IntegerMinLow_decode_xer; |
| 325 | xer_type_encoder_f CN_IntegerMinLow_encode_xer; |
| 326 | per_type_decoder_f CN_IntegerMinLow_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 327 | per_type_encoder_f CN_IntegerMinLow_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 328 | |
| 329 | /*** <<< CODE [CN-IntegerMinLow] >>> ***/ |
| 330 | |
| 331 | int |
| 332 | CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 333 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 334 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 335 | long value; |
| 336 | |
| 337 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 338 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 339 | "%s: value not given (%s:%d)", |
| 340 | td->name, __FILE__, __LINE__); |
| 341 | return -1; |
| 342 | } |
| 343 | |
| 344 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 345 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 346 | "%s: value too large (%s:%d)", |
| 347 | td->name, __FILE__, __LINE__); |
| 348 | return -1; |
| 349 | } |
| 350 | |
| 351 | if((value <= 1)) { |
| 352 | /* Constraint check succeeded */ |
| 353 | return 0; |
| 354 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 355 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 356 | "%s: constraint failed (%s:%d)", |
| 357 | td->name, __FILE__, __LINE__); |
| 358 | return -1; |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | /* |
| 363 | * This type is implemented using INTEGER, |
| 364 | * so here we adjust the DEF accordingly. |
| 365 | */ |
| 366 | static void |
| 367 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 368 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 369 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 370 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 371 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 372 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 373 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 374 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 375 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 376 | if(!td->per_constraints) |
| 377 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 378 | td->elements = asn_DEF_INTEGER.elements; |
| 379 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 380 | td->specifics = asn_DEF_INTEGER.specifics; |
| 381 | } |
| 382 | |
| 383 | void |
| 384 | CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td, |
| 385 | void *struct_ptr, int contents_only) { |
| 386 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 387 | td->free_struct(td, struct_ptr, contents_only); |
| 388 | } |
| 389 | |
| 390 | int |
| 391 | CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 392 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 393 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 394 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 395 | } |
| 396 | |
| 397 | asn_dec_rval_t |
| 398 | CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 399 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 400 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 401 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 402 | } |
| 403 | |
| 404 | asn_enc_rval_t |
| 405 | CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td, |
| 406 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 407 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 408 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 409 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 410 | } |
| 411 | |
| 412 | asn_dec_rval_t |
| 413 | CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 414 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 415 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 416 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 417 | } |
| 418 | |
| 419 | asn_enc_rval_t |
| 420 | CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 421 | int ilevel, enum xer_encoder_flags_e flags, |
| 422 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 423 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 424 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 425 | } |
| 426 | |
| 427 | asn_dec_rval_t |
| 428 | CN_IntegerMinLow_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 429 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 430 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 431 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 432 | } |
| 433 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 434 | asn_enc_rval_t |
| 435 | CN_IntegerMinLow_encode_uper(asn_TYPE_descriptor_t *td, |
| 436 | asn_per_constraints_t *constraints, |
| 437 | void *structure, asn_per_outp_t *per_out) { |
| 438 | CN_IntegerMinLow_1_inherit_TYPE_descriptor(td); |
| 439 | return td->uper_encoder(td, constraints, structure, per_out); |
| 440 | } |
| 441 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 442 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 443 | /*** <<< CTDEFS [CN-IntegerMinLow] >>> ***/ |
| 444 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 445 | static asn_per_constraints_t asn_PER_type_CN_IntegerMinLow_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 446 | { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..1) */, |
| 447 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 448 | 0, 0 /* No PER value map */ |
| 449 | }; |
| 450 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 451 | /*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/ |
| 452 | |
| 453 | static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = { |
| 454 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 455 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 456 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = { |
| 457 | "CN-IntegerMinLow", |
| 458 | "CN-IntegerMinLow", |
| 459 | CN_IntegerMinLow_free, |
| 460 | CN_IntegerMinLow_print, |
| 461 | CN_IntegerMinLow_constraint, |
| 462 | CN_IntegerMinLow_decode_ber, |
| 463 | CN_IntegerMinLow_encode_der, |
| 464 | CN_IntegerMinLow_decode_xer, |
| 465 | CN_IntegerMinLow_encode_xer, |
| 466 | CN_IntegerMinLow_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 467 | CN_IntegerMinLow_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 468 | 0, /* Use generic outmost tag fetcher */ |
| 469 | asn_DEF_CN_IntegerMinLow_tags_1, |
| 470 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 471 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
| 472 | asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */ |
| 473 | sizeof(asn_DEF_CN_IntegerMinLow_tags_1) |
| 474 | /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 475 | &asn_PER_type_CN_IntegerMinLow_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 476 | 0, 0, /* No members */ |
| 477 | 0 /* No specifics */ |
| 478 | }; |
| 479 | |
| 480 | |
| 481 | /*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/ |
| 482 | |
| 483 | #include <INTEGER.h> |
| 484 | |
| 485 | /*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 486 | |
| 487 | typedef INTEGER_t NO_IntegerMinHigh_t; |
| 488 | |
| 489 | /*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/ |
| 490 | |
| 491 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh; |
| 492 | asn_struct_free_f NO_IntegerMinHigh_free; |
| 493 | asn_struct_print_f NO_IntegerMinHigh_print; |
| 494 | asn_constr_check_f NO_IntegerMinHigh_constraint; |
| 495 | ber_type_decoder_f NO_IntegerMinHigh_decode_ber; |
| 496 | der_type_encoder_f NO_IntegerMinHigh_encode_der; |
| 497 | xer_type_decoder_f NO_IntegerMinHigh_decode_xer; |
| 498 | xer_type_encoder_f NO_IntegerMinHigh_encode_xer; |
| 499 | per_type_decoder_f NO_IntegerMinHigh_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 500 | per_type_encoder_f NO_IntegerMinHigh_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 501 | |
| 502 | /*** <<< CODE [NO-IntegerMinHigh] >>> ***/ |
| 503 | |
| 504 | int |
| 505 | NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 506 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 507 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 508 | long value; |
| 509 | |
| 510 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 511 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 512 | "%s: value not given (%s:%d)", |
| 513 | td->name, __FILE__, __LINE__); |
| 514 | return -1; |
| 515 | } |
| 516 | |
| 517 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 518 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 519 | "%s: value too large (%s:%d)", |
| 520 | td->name, __FILE__, __LINE__); |
| 521 | return -1; |
| 522 | } |
| 523 | |
| 524 | if((value <= 3000000000)) { |
| 525 | /* Constraint check succeeded */ |
| 526 | return 0; |
| 527 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 528 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 529 | "%s: constraint failed (%s:%d)", |
| 530 | td->name, __FILE__, __LINE__); |
| 531 | return -1; |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | /* |
| 536 | * This type is implemented using INTEGER, |
| 537 | * so here we adjust the DEF accordingly. |
| 538 | */ |
| 539 | static void |
| 540 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 541 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 542 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 543 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 544 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 545 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 546 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 547 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 548 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 549 | if(!td->per_constraints) |
| 550 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 551 | td->elements = asn_DEF_INTEGER.elements; |
| 552 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 553 | td->specifics = asn_DEF_INTEGER.specifics; |
| 554 | } |
| 555 | |
| 556 | void |
| 557 | NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td, |
| 558 | void *struct_ptr, int contents_only) { |
| 559 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 560 | td->free_struct(td, struct_ptr, contents_only); |
| 561 | } |
| 562 | |
| 563 | int |
| 564 | NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 565 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 566 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 567 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 568 | } |
| 569 | |
| 570 | asn_dec_rval_t |
| 571 | NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 572 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 573 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 574 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 575 | } |
| 576 | |
| 577 | asn_enc_rval_t |
| 578 | NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td, |
| 579 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 580 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 581 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 582 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 583 | } |
| 584 | |
| 585 | asn_dec_rval_t |
| 586 | NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 587 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 588 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 589 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 590 | } |
| 591 | |
| 592 | asn_enc_rval_t |
| 593 | NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 594 | int ilevel, enum xer_encoder_flags_e flags, |
| 595 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 596 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 597 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 598 | } |
| 599 | |
| 600 | asn_dec_rval_t |
| 601 | NO_IntegerMinHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 602 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 603 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 604 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 605 | } |
| 606 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 607 | asn_enc_rval_t |
| 608 | NO_IntegerMinHigh_encode_uper(asn_TYPE_descriptor_t *td, |
| 609 | asn_per_constraints_t *constraints, |
| 610 | void *structure, asn_per_outp_t *per_out) { |
| 611 | NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td); |
| 612 | return td->uper_encoder(td, constraints, structure, per_out); |
| 613 | } |
| 614 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 615 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 616 | /*** <<< CTDEFS [NO-IntegerMinHigh] >>> ***/ |
| 617 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 618 | static asn_per_constraints_t asn_PER_type_NO_IntegerMinHigh_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 619 | { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..3000000000) */, |
| 620 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 621 | 0, 0 /* No PER value map */ |
| 622 | }; |
| 623 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 624 | /*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/ |
| 625 | |
| 626 | static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = { |
| 627 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 628 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 629 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = { |
| 630 | "NO-IntegerMinHigh", |
| 631 | "NO-IntegerMinHigh", |
| 632 | NO_IntegerMinHigh_free, |
| 633 | NO_IntegerMinHigh_print, |
| 634 | NO_IntegerMinHigh_constraint, |
| 635 | NO_IntegerMinHigh_decode_ber, |
| 636 | NO_IntegerMinHigh_encode_der, |
| 637 | NO_IntegerMinHigh_decode_xer, |
| 638 | NO_IntegerMinHigh_encode_xer, |
| 639 | NO_IntegerMinHigh_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 640 | NO_IntegerMinHigh_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 641 | 0, /* Use generic outmost tag fetcher */ |
| 642 | asn_DEF_NO_IntegerMinHigh_tags_1, |
| 643 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 644 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
| 645 | asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */ |
| 646 | sizeof(asn_DEF_NO_IntegerMinHigh_tags_1) |
| 647 | /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 648 | &asn_PER_type_NO_IntegerMinHigh_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 649 | 0, 0, /* No members */ |
| 650 | 0 /* No specifics */ |
| 651 | }; |
| 652 | |
| 653 | |
| 654 | /*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/ |
| 655 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 656 | #include <NativeInteger.h> |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 657 | |
| 658 | /*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 659 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 660 | typedef unsigned long NO_IntegerLowHigh_t; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 661 | |
| 662 | /*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/ |
| 663 | |
| 664 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh; |
| 665 | asn_struct_free_f NO_IntegerLowHigh_free; |
| 666 | asn_struct_print_f NO_IntegerLowHigh_print; |
| 667 | asn_constr_check_f NO_IntegerLowHigh_constraint; |
| 668 | ber_type_decoder_f NO_IntegerLowHigh_decode_ber; |
| 669 | der_type_encoder_f NO_IntegerLowHigh_encode_der; |
| 670 | xer_type_decoder_f NO_IntegerLowHigh_decode_xer; |
| 671 | xer_type_encoder_f NO_IntegerLowHigh_encode_xer; |
| 672 | per_type_decoder_f NO_IntegerLowHigh_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 673 | per_type_encoder_f NO_IntegerLowHigh_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 674 | |
| 675 | /*** <<< CODE [NO-IntegerLowHigh] >>> ***/ |
| 676 | |
| 677 | int |
| 678 | NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 679 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 680 | unsigned long value; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 681 | |
| 682 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 683 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 684 | "%s: value not given (%s:%d)", |
| 685 | td->name, __FILE__, __LINE__); |
| 686 | return -1; |
| 687 | } |
| 688 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 689 | value = *(const unsigned long *)sptr; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 690 | |
| 691 | if((value >= 1 && value <= 3000000000)) { |
| 692 | /* Constraint check succeeded */ |
| 693 | return 0; |
| 694 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 695 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 696 | "%s: constraint failed (%s:%d)", |
| 697 | td->name, __FILE__, __LINE__); |
| 698 | return -1; |
| 699 | } |
| 700 | } |
| 701 | |
| 702 | /* |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 703 | * This type is implemented using NativeInteger, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 704 | * so here we adjust the DEF accordingly. |
| 705 | */ |
| 706 | static void |
| 707 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 708 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 709 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 710 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 711 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 712 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 713 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 714 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 715 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 716 | if(!td->per_constraints) |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 717 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 718 | td->elements = asn_DEF_NativeInteger.elements; |
| 719 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 720 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 721 | } |
| 722 | |
| 723 | void |
| 724 | NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td, |
| 725 | void *struct_ptr, int contents_only) { |
| 726 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 727 | td->free_struct(td, struct_ptr, contents_only); |
| 728 | } |
| 729 | |
| 730 | int |
| 731 | NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 732 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 733 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 734 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 735 | } |
| 736 | |
| 737 | asn_dec_rval_t |
| 738 | NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 739 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 740 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 741 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 742 | } |
| 743 | |
| 744 | asn_enc_rval_t |
| 745 | NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td, |
| 746 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 747 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 748 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 749 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 750 | } |
| 751 | |
| 752 | asn_dec_rval_t |
| 753 | NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 754 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 755 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 756 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 757 | } |
| 758 | |
| 759 | asn_enc_rval_t |
| 760 | NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 761 | int ilevel, enum xer_encoder_flags_e flags, |
| 762 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 763 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 764 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 765 | } |
| 766 | |
| 767 | asn_dec_rval_t |
| 768 | NO_IntegerLowHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 769 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 770 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 771 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 772 | } |
| 773 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 774 | asn_enc_rval_t |
| 775 | NO_IntegerLowHigh_encode_uper(asn_TYPE_descriptor_t *td, |
| 776 | asn_per_constraints_t *constraints, |
| 777 | void *structure, asn_per_outp_t *per_out) { |
| 778 | NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td); |
| 779 | return td->uper_encoder(td, constraints, structure, per_out); |
| 780 | } |
| 781 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 782 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 783 | /*** <<< CTDEFS [NO-IntegerLowHigh] >>> ***/ |
| 784 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 785 | static asn_per_constraints_t asn_PER_type_NO_IntegerLowHigh_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 786 | { APC_CONSTRAINED, 32, -1, 1, 3000000000 } /* (1..3000000000) */, |
| 787 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 788 | 0, 0 /* No PER value map */ |
| 789 | }; |
| 790 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 791 | /*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/ |
| 792 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 793 | static asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = { |
| 794 | 0, 0, 0, 0, 0, |
| 795 | 0, /* Native long size */ |
| 796 | 1 /* Unsigned representation */ |
| 797 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 798 | static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = { |
| 799 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 800 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 801 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = { |
| 802 | "NO-IntegerLowHigh", |
| 803 | "NO-IntegerLowHigh", |
| 804 | NO_IntegerLowHigh_free, |
| 805 | NO_IntegerLowHigh_print, |
| 806 | NO_IntegerLowHigh_constraint, |
| 807 | NO_IntegerLowHigh_decode_ber, |
| 808 | NO_IntegerLowHigh_encode_der, |
| 809 | NO_IntegerLowHigh_decode_xer, |
| 810 | NO_IntegerLowHigh_encode_xer, |
| 811 | NO_IntegerLowHigh_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 812 | NO_IntegerLowHigh_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 813 | 0, /* Use generic outmost tag fetcher */ |
| 814 | asn_DEF_NO_IntegerLowHigh_tags_1, |
| 815 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 816 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
| 817 | asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */ |
| 818 | sizeof(asn_DEF_NO_IntegerLowHigh_tags_1) |
| 819 | /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 820 | &asn_PER_type_NO_IntegerLowHigh_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 821 | 0, 0, /* No members */ |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 822 | &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 823 | }; |
| 824 | |
| 825 | |
| 826 | /*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/ |
| 827 | |
| 828 | #include <INTEGER.h> |
| 829 | |
| 830 | /*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/ |
| 831 | |
| 832 | typedef INTEGER_t CN_IntegerLowMax_t; |
| 833 | |
| 834 | /*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/ |
| 835 | |
| 836 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax; |
| 837 | asn_struct_free_f CN_IntegerLowMax_free; |
| 838 | asn_struct_print_f CN_IntegerLowMax_print; |
| 839 | asn_constr_check_f CN_IntegerLowMax_constraint; |
| 840 | ber_type_decoder_f CN_IntegerLowMax_decode_ber; |
| 841 | der_type_encoder_f CN_IntegerLowMax_encode_der; |
| 842 | xer_type_decoder_f CN_IntegerLowMax_decode_xer; |
| 843 | xer_type_encoder_f CN_IntegerLowMax_encode_xer; |
| 844 | per_type_decoder_f CN_IntegerLowMax_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 845 | per_type_encoder_f CN_IntegerLowMax_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 846 | |
| 847 | /*** <<< CODE [CN-IntegerLowMax] >>> ***/ |
| 848 | |
| 849 | int |
| 850 | CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 851 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 852 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 853 | long value; |
| 854 | |
| 855 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 856 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 857 | "%s: value not given (%s:%d)", |
| 858 | td->name, __FILE__, __LINE__); |
| 859 | return -1; |
| 860 | } |
| 861 | |
| 862 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 863 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 864 | "%s: value too large (%s:%d)", |
| 865 | td->name, __FILE__, __LINE__); |
| 866 | return -1; |
| 867 | } |
| 868 | |
| 869 | if((value >= 1)) { |
| 870 | /* Constraint check succeeded */ |
| 871 | return 0; |
| 872 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 873 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 874 | "%s: constraint failed (%s:%d)", |
| 875 | td->name, __FILE__, __LINE__); |
| 876 | return -1; |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | /* |
| 881 | * This type is implemented using INTEGER, |
| 882 | * so here we adjust the DEF accordingly. |
| 883 | */ |
| 884 | static void |
| 885 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 886 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 887 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 888 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 889 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 890 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 891 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 892 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 893 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 894 | if(!td->per_constraints) |
| 895 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 896 | td->elements = asn_DEF_INTEGER.elements; |
| 897 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 898 | td->specifics = asn_DEF_INTEGER.specifics; |
| 899 | } |
| 900 | |
| 901 | void |
| 902 | CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td, |
| 903 | void *struct_ptr, int contents_only) { |
| 904 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 905 | td->free_struct(td, struct_ptr, contents_only); |
| 906 | } |
| 907 | |
| 908 | int |
| 909 | CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 910 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 911 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 912 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 913 | } |
| 914 | |
| 915 | asn_dec_rval_t |
| 916 | CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 917 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 918 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 919 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 920 | } |
| 921 | |
| 922 | asn_enc_rval_t |
| 923 | CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td, |
| 924 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 925 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 926 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 927 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 928 | } |
| 929 | |
| 930 | asn_dec_rval_t |
| 931 | CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 932 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 933 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 934 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 935 | } |
| 936 | |
| 937 | asn_enc_rval_t |
| 938 | CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 939 | int ilevel, enum xer_encoder_flags_e flags, |
| 940 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 941 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 942 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 943 | } |
| 944 | |
| 945 | asn_dec_rval_t |
| 946 | CN_IntegerLowMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 947 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 948 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 949 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 950 | } |
| 951 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 952 | asn_enc_rval_t |
| 953 | CN_IntegerLowMax_encode_uper(asn_TYPE_descriptor_t *td, |
| 954 | asn_per_constraints_t *constraints, |
| 955 | void *structure, asn_per_outp_t *per_out) { |
| 956 | CN_IntegerLowMax_1_inherit_TYPE_descriptor(td); |
| 957 | return td->uper_encoder(td, constraints, structure, per_out); |
| 958 | } |
| 959 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 960 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 961 | /*** <<< CTDEFS [CN-IntegerLowMax] >>> ***/ |
| 962 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 963 | static asn_per_constraints_t asn_PER_type_CN_IntegerLowMax_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 964 | { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (1..MAX) */, |
| 965 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 966 | 0, 0 /* No PER value map */ |
| 967 | }; |
| 968 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 969 | /*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/ |
| 970 | |
| 971 | static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = { |
| 972 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 973 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 974 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = { |
| 975 | "CN-IntegerLowMax", |
| 976 | "CN-IntegerLowMax", |
| 977 | CN_IntegerLowMax_free, |
| 978 | CN_IntegerLowMax_print, |
| 979 | CN_IntegerLowMax_constraint, |
| 980 | CN_IntegerLowMax_decode_ber, |
| 981 | CN_IntegerLowMax_encode_der, |
| 982 | CN_IntegerLowMax_decode_xer, |
| 983 | CN_IntegerLowMax_encode_xer, |
| 984 | CN_IntegerLowMax_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 985 | CN_IntegerLowMax_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 986 | 0, /* Use generic outmost tag fetcher */ |
| 987 | asn_DEF_CN_IntegerLowMax_tags_1, |
| 988 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 989 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
| 990 | asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */ |
| 991 | sizeof(asn_DEF_CN_IntegerLowMax_tags_1) |
| 992 | /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 993 | &asn_PER_type_CN_IntegerLowMax_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 994 | 0, 0, /* No members */ |
| 995 | 0 /* No specifics */ |
| 996 | }; |
| 997 | |
| 998 | |
| 999 | /*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/ |
| 1000 | |
| 1001 | #include <INTEGER.h> |
| 1002 | |
| 1003 | /*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/ |
| 1004 | |
| 1005 | typedef INTEGER_t NO_IntegerHighMax_t; |
| 1006 | |
| 1007 | /*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/ |
| 1008 | |
| 1009 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax; |
| 1010 | asn_struct_free_f NO_IntegerHighMax_free; |
| 1011 | asn_struct_print_f NO_IntegerHighMax_print; |
| 1012 | asn_constr_check_f NO_IntegerHighMax_constraint; |
| 1013 | ber_type_decoder_f NO_IntegerHighMax_decode_ber; |
| 1014 | der_type_encoder_f NO_IntegerHighMax_encode_der; |
| 1015 | xer_type_decoder_f NO_IntegerHighMax_decode_xer; |
| 1016 | xer_type_encoder_f NO_IntegerHighMax_encode_xer; |
| 1017 | per_type_decoder_f NO_IntegerHighMax_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1018 | per_type_encoder_f NO_IntegerHighMax_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1019 | |
| 1020 | /*** <<< CODE [NO-IntegerHighMax] >>> ***/ |
| 1021 | |
| 1022 | int |
| 1023 | NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1024 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1025 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 1026 | long value; |
| 1027 | |
| 1028 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1029 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1030 | "%s: value not given (%s:%d)", |
| 1031 | td->name, __FILE__, __LINE__); |
| 1032 | return -1; |
| 1033 | } |
| 1034 | |
| 1035 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1036 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1037 | "%s: value too large (%s:%d)", |
| 1038 | td->name, __FILE__, __LINE__); |
| 1039 | return -1; |
| 1040 | } |
| 1041 | |
| 1042 | if((value >= 3000000000)) { |
| 1043 | /* Constraint check succeeded */ |
| 1044 | return 0; |
| 1045 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1046 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1047 | "%s: constraint failed (%s:%d)", |
| 1048 | td->name, __FILE__, __LINE__); |
| 1049 | return -1; |
| 1050 | } |
| 1051 | } |
| 1052 | |
| 1053 | /* |
| 1054 | * This type is implemented using INTEGER, |
| 1055 | * so here we adjust the DEF accordingly. |
| 1056 | */ |
| 1057 | static void |
| 1058 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1059 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 1060 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 1061 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 1062 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 1063 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 1064 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 1065 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1066 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1067 | if(!td->per_constraints) |
| 1068 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 1069 | td->elements = asn_DEF_INTEGER.elements; |
| 1070 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 1071 | td->specifics = asn_DEF_INTEGER.specifics; |
| 1072 | } |
| 1073 | |
| 1074 | void |
| 1075 | NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td, |
| 1076 | void *struct_ptr, int contents_only) { |
| 1077 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1078 | td->free_struct(td, struct_ptr, contents_only); |
| 1079 | } |
| 1080 | |
| 1081 | int |
| 1082 | NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1083 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1084 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1085 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1086 | } |
| 1087 | |
| 1088 | asn_dec_rval_t |
| 1089 | NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1090 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1091 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1092 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1093 | } |
| 1094 | |
| 1095 | asn_enc_rval_t |
| 1096 | NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td, |
| 1097 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1098 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1099 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1100 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1101 | } |
| 1102 | |
| 1103 | asn_dec_rval_t |
| 1104 | NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1105 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1106 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1107 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1108 | } |
| 1109 | |
| 1110 | asn_enc_rval_t |
| 1111 | NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1112 | int ilevel, enum xer_encoder_flags_e flags, |
| 1113 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1114 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1115 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1116 | } |
| 1117 | |
| 1118 | asn_dec_rval_t |
| 1119 | NO_IntegerHighMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1120 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1121 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1122 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1123 | } |
| 1124 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1125 | asn_enc_rval_t |
| 1126 | NO_IntegerHighMax_encode_uper(asn_TYPE_descriptor_t *td, |
| 1127 | asn_per_constraints_t *constraints, |
| 1128 | void *structure, asn_per_outp_t *per_out) { |
| 1129 | NO_IntegerHighMax_1_inherit_TYPE_descriptor(td); |
| 1130 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1131 | } |
| 1132 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1133 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1134 | /*** <<< CTDEFS [NO-IntegerHighMax] >>> ***/ |
| 1135 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1136 | static asn_per_constraints_t asn_PER_type_NO_IntegerHighMax_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1137 | { APC_SEMI_CONSTRAINED, -1, -1, 3000000000, 0 } /* (3000000000..MAX) */, |
| 1138 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1139 | 0, 0 /* No PER value map */ |
| 1140 | }; |
| 1141 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1142 | /*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/ |
| 1143 | |
| 1144 | static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = { |
| 1145 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1146 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1147 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = { |
| 1148 | "NO-IntegerHighMax", |
| 1149 | "NO-IntegerHighMax", |
| 1150 | NO_IntegerHighMax_free, |
| 1151 | NO_IntegerHighMax_print, |
| 1152 | NO_IntegerHighMax_constraint, |
| 1153 | NO_IntegerHighMax_decode_ber, |
| 1154 | NO_IntegerHighMax_encode_der, |
| 1155 | NO_IntegerHighMax_decode_xer, |
| 1156 | NO_IntegerHighMax_encode_xer, |
| 1157 | NO_IntegerHighMax_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1158 | NO_IntegerHighMax_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1159 | 0, /* Use generic outmost tag fetcher */ |
| 1160 | asn_DEF_NO_IntegerHighMax_tags_1, |
| 1161 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 1162 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
| 1163 | asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */ |
| 1164 | sizeof(asn_DEF_NO_IntegerHighMax_tags_1) |
| 1165 | /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1166 | &asn_PER_type_NO_IntegerHighMax_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1167 | 0, 0, /* No members */ |
| 1168 | 0 /* No specifics */ |
| 1169 | }; |
| 1170 | |
| 1171 | |
| 1172 | /*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/ |
| 1173 | |
| 1174 | #include <INTEGER.h> |
| 1175 | |
| 1176 | /*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 1177 | |
| 1178 | typedef INTEGER_t NO_IntegerLowestMax_t; |
| 1179 | |
| 1180 | /*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/ |
| 1181 | |
| 1182 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax; |
| 1183 | asn_struct_free_f NO_IntegerLowestMax_free; |
| 1184 | asn_struct_print_f NO_IntegerLowestMax_print; |
| 1185 | asn_constr_check_f NO_IntegerLowestMax_constraint; |
| 1186 | ber_type_decoder_f NO_IntegerLowestMax_decode_ber; |
| 1187 | der_type_encoder_f NO_IntegerLowestMax_encode_der; |
| 1188 | xer_type_decoder_f NO_IntegerLowestMax_decode_xer; |
| 1189 | xer_type_encoder_f NO_IntegerLowestMax_encode_xer; |
| 1190 | per_type_decoder_f NO_IntegerLowestMax_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1191 | per_type_encoder_f NO_IntegerLowestMax_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1192 | |
| 1193 | /*** <<< CODE [NO-IntegerLowestMax] >>> ***/ |
| 1194 | |
| 1195 | int |
| 1196 | NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1197 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1198 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 1199 | long value; |
| 1200 | |
| 1201 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1202 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1203 | "%s: value not given (%s:%d)", |
| 1204 | td->name, __FILE__, __LINE__); |
| 1205 | return -1; |
| 1206 | } |
| 1207 | |
| 1208 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1209 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1210 | "%s: value too large (%s:%d)", |
| 1211 | td->name, __FILE__, __LINE__); |
| 1212 | return -1; |
| 1213 | } |
| 1214 | |
| 1215 | if((value >= -3000000000)) { |
| 1216 | /* Constraint check succeeded */ |
| 1217 | return 0; |
| 1218 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1219 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1220 | "%s: constraint failed (%s:%d)", |
| 1221 | td->name, __FILE__, __LINE__); |
| 1222 | return -1; |
| 1223 | } |
| 1224 | } |
| 1225 | |
| 1226 | /* |
| 1227 | * This type is implemented using INTEGER, |
| 1228 | * so here we adjust the DEF accordingly. |
| 1229 | */ |
| 1230 | static void |
| 1231 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1232 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 1233 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 1234 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 1235 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 1236 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 1237 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 1238 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1239 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1240 | if(!td->per_constraints) |
| 1241 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 1242 | td->elements = asn_DEF_INTEGER.elements; |
| 1243 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 1244 | td->specifics = asn_DEF_INTEGER.specifics; |
| 1245 | } |
| 1246 | |
| 1247 | void |
| 1248 | NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td, |
| 1249 | void *struct_ptr, int contents_only) { |
| 1250 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1251 | td->free_struct(td, struct_ptr, contents_only); |
| 1252 | } |
| 1253 | |
| 1254 | int |
| 1255 | NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1256 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1257 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1258 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1259 | } |
| 1260 | |
| 1261 | asn_dec_rval_t |
| 1262 | NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1263 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1264 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1265 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1266 | } |
| 1267 | |
| 1268 | asn_enc_rval_t |
| 1269 | NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td, |
| 1270 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1271 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1272 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1273 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1274 | } |
| 1275 | |
| 1276 | asn_dec_rval_t |
| 1277 | NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1278 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1279 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1280 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1281 | } |
| 1282 | |
| 1283 | asn_enc_rval_t |
| 1284 | NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1285 | int ilevel, enum xer_encoder_flags_e flags, |
| 1286 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1287 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1288 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1289 | } |
| 1290 | |
| 1291 | asn_dec_rval_t |
| 1292 | NO_IntegerLowestMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1293 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1294 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1295 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1296 | } |
| 1297 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1298 | asn_enc_rval_t |
| 1299 | NO_IntegerLowestMax_encode_uper(asn_TYPE_descriptor_t *td, |
| 1300 | asn_per_constraints_t *constraints, |
| 1301 | void *structure, asn_per_outp_t *per_out) { |
| 1302 | NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td); |
| 1303 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1304 | } |
| 1305 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1306 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1307 | /*** <<< CTDEFS [NO-IntegerLowestMax] >>> ***/ |
| 1308 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1309 | static asn_per_constraints_t asn_PER_type_NO_IntegerLowestMax_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1310 | { APC_SEMI_CONSTRAINED, -1, -1, -3000000000, 0 } /* (-3000000000..MAX) */, |
| 1311 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1312 | 0, 0 /* No PER value map */ |
| 1313 | }; |
| 1314 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1315 | /*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/ |
| 1316 | |
| 1317 | static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = { |
| 1318 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1319 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1320 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = { |
| 1321 | "NO-IntegerLowestMax", |
| 1322 | "NO-IntegerLowestMax", |
| 1323 | NO_IntegerLowestMax_free, |
| 1324 | NO_IntegerLowestMax_print, |
| 1325 | NO_IntegerLowestMax_constraint, |
| 1326 | NO_IntegerLowestMax_decode_ber, |
| 1327 | NO_IntegerLowestMax_encode_der, |
| 1328 | NO_IntegerLowestMax_decode_xer, |
| 1329 | NO_IntegerLowestMax_encode_xer, |
| 1330 | NO_IntegerLowestMax_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1331 | NO_IntegerLowestMax_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1332 | 0, /* Use generic outmost tag fetcher */ |
| 1333 | asn_DEF_NO_IntegerLowestMax_tags_1, |
| 1334 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 1335 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
| 1336 | asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */ |
| 1337 | sizeof(asn_DEF_NO_IntegerLowestMax_tags_1) |
| 1338 | /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1339 | &asn_PER_type_NO_IntegerLowestMax_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1340 | 0, 0, /* No members */ |
| 1341 | 0 /* No specifics */ |
| 1342 | }; |
| 1343 | |
| 1344 | |
| 1345 | /*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/ |
| 1346 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1347 | #include <NativeInteger.h> |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1348 | |
| 1349 | /*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/ |
| 1350 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1351 | typedef unsigned long NO_IntegerOutRange_t; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1352 | |
| 1353 | /*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/ |
| 1354 | |
| 1355 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange; |
| 1356 | asn_struct_free_f NO_IntegerOutRange_free; |
| 1357 | asn_struct_print_f NO_IntegerOutRange_print; |
| 1358 | asn_constr_check_f NO_IntegerOutRange_constraint; |
| 1359 | ber_type_decoder_f NO_IntegerOutRange_decode_ber; |
| 1360 | der_type_encoder_f NO_IntegerOutRange_encode_der; |
| 1361 | xer_type_decoder_f NO_IntegerOutRange_decode_xer; |
| 1362 | xer_type_encoder_f NO_IntegerOutRange_encode_xer; |
| 1363 | per_type_decoder_f NO_IntegerOutRange_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1364 | per_type_encoder_f NO_IntegerOutRange_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1365 | |
| 1366 | /*** <<< CODE [NO-IntegerOutRange] >>> ***/ |
| 1367 | |
| 1368 | int |
| 1369 | NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1370 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1371 | unsigned long value; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1372 | |
| 1373 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1374 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1375 | "%s: value not given (%s:%d)", |
| 1376 | td->name, __FILE__, __LINE__); |
| 1377 | return -1; |
| 1378 | } |
| 1379 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1380 | value = *(const unsigned long *)sptr; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1381 | |
| 1382 | if((value >= 3000000000 && value <= 3000000001)) { |
| 1383 | /* Constraint check succeeded */ |
| 1384 | return 0; |
| 1385 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1386 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1387 | "%s: constraint failed (%s:%d)", |
| 1388 | td->name, __FILE__, __LINE__); |
| 1389 | return -1; |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | /* |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1394 | * This type is implemented using NativeInteger, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1395 | * so here we adjust the DEF accordingly. |
| 1396 | */ |
| 1397 | static void |
| 1398 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1399 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1400 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1401 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1402 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1403 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1404 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1405 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1406 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1407 | if(!td->per_constraints) |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1408 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1409 | td->elements = asn_DEF_NativeInteger.elements; |
| 1410 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1411 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1412 | } |
| 1413 | |
| 1414 | void |
| 1415 | NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td, |
| 1416 | void *struct_ptr, int contents_only) { |
| 1417 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1418 | td->free_struct(td, struct_ptr, contents_only); |
| 1419 | } |
| 1420 | |
| 1421 | int |
| 1422 | NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1423 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1424 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1425 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1426 | } |
| 1427 | |
| 1428 | asn_dec_rval_t |
| 1429 | NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1430 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1431 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1432 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1433 | } |
| 1434 | |
| 1435 | asn_enc_rval_t |
| 1436 | NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td, |
| 1437 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1438 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1439 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1440 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1441 | } |
| 1442 | |
| 1443 | asn_dec_rval_t |
| 1444 | NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1445 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1446 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1447 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1448 | } |
| 1449 | |
| 1450 | asn_enc_rval_t |
| 1451 | NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1452 | int ilevel, enum xer_encoder_flags_e flags, |
| 1453 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1454 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1455 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1456 | } |
| 1457 | |
| 1458 | asn_dec_rval_t |
| 1459 | NO_IntegerOutRange_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1460 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1461 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1462 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1463 | } |
| 1464 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1465 | asn_enc_rval_t |
| 1466 | NO_IntegerOutRange_encode_uper(asn_TYPE_descriptor_t *td, |
| 1467 | asn_per_constraints_t *constraints, |
| 1468 | void *structure, asn_per_outp_t *per_out) { |
| 1469 | NO_IntegerOutRange_1_inherit_TYPE_descriptor(td); |
| 1470 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1471 | } |
| 1472 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1473 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1474 | /*** <<< CTDEFS [NO-IntegerOutRange] >>> ***/ |
| 1475 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1476 | static asn_per_constraints_t asn_PER_type_NO_IntegerOutRange_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1477 | { APC_CONSTRAINED, 1, -1, 3000000000, 3000000001 } /* (3000000000..3000000001) */, |
| 1478 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1479 | 0, 0 /* No PER value map */ |
| 1480 | }; |
| 1481 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1482 | /*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/ |
| 1483 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1484 | static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = { |
| 1485 | 0, 0, 0, 0, 0, |
| 1486 | 0, /* Native long size */ |
| 1487 | 1 /* Unsigned representation */ |
| 1488 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1489 | static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = { |
| 1490 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1491 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1492 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = { |
| 1493 | "NO-IntegerOutRange", |
| 1494 | "NO-IntegerOutRange", |
| 1495 | NO_IntegerOutRange_free, |
| 1496 | NO_IntegerOutRange_print, |
| 1497 | NO_IntegerOutRange_constraint, |
| 1498 | NO_IntegerOutRange_decode_ber, |
| 1499 | NO_IntegerOutRange_encode_der, |
| 1500 | NO_IntegerOutRange_decode_xer, |
| 1501 | NO_IntegerOutRange_encode_xer, |
| 1502 | NO_IntegerOutRange_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1503 | NO_IntegerOutRange_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1504 | 0, /* Use generic outmost tag fetcher */ |
| 1505 | asn_DEF_NO_IntegerOutRange_tags_1, |
| 1506 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 1507 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
| 1508 | asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */ |
| 1509 | sizeof(asn_DEF_NO_IntegerOutRange_tags_1) |
| 1510 | /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1511 | &asn_PER_type_NO_IntegerOutRange_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1512 | 0, 0, /* No members */ |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1513 | &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1514 | }; |
| 1515 | |
| 1516 | |
| 1517 | /*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/ |
| 1518 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1519 | #include <NativeInteger.h> |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1520 | |
| 1521 | /*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/ |
| 1522 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1523 | typedef unsigned long NO_IntegerOutValue_t; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1524 | |
| 1525 | /*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/ |
| 1526 | |
| 1527 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue; |
| 1528 | asn_struct_free_f NO_IntegerOutValue_free; |
| 1529 | asn_struct_print_f NO_IntegerOutValue_print; |
| 1530 | asn_constr_check_f NO_IntegerOutValue_constraint; |
| 1531 | ber_type_decoder_f NO_IntegerOutValue_decode_ber; |
| 1532 | der_type_encoder_f NO_IntegerOutValue_encode_der; |
| 1533 | xer_type_decoder_f NO_IntegerOutValue_decode_xer; |
| 1534 | xer_type_encoder_f NO_IntegerOutValue_encode_xer; |
| 1535 | per_type_decoder_f NO_IntegerOutValue_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1536 | per_type_encoder_f NO_IntegerOutValue_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1537 | |
| 1538 | /*** <<< CODE [NO-IntegerOutValue] >>> ***/ |
| 1539 | |
| 1540 | int |
| 1541 | NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1542 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1543 | unsigned long value; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1544 | |
| 1545 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1546 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1547 | "%s: value not given (%s:%d)", |
| 1548 | td->name, __FILE__, __LINE__); |
| 1549 | return -1; |
| 1550 | } |
| 1551 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1552 | value = *(const unsigned long *)sptr; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1553 | |
| 1554 | if((value == 3000000000)) { |
| 1555 | /* Constraint check succeeded */ |
| 1556 | return 0; |
| 1557 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1558 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1559 | "%s: constraint failed (%s:%d)", |
| 1560 | td->name, __FILE__, __LINE__); |
| 1561 | return -1; |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | /* |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1566 | * This type is implemented using NativeInteger, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1567 | * so here we adjust the DEF accordingly. |
| 1568 | */ |
| 1569 | static void |
| 1570 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1571 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1572 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1573 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1574 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1575 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1576 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1577 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 1578 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1579 | if(!td->per_constraints) |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1580 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1581 | td->elements = asn_DEF_NativeInteger.elements; |
| 1582 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1583 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1584 | } |
| 1585 | |
| 1586 | void |
| 1587 | NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td, |
| 1588 | void *struct_ptr, int contents_only) { |
| 1589 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1590 | td->free_struct(td, struct_ptr, contents_only); |
| 1591 | } |
| 1592 | |
| 1593 | int |
| 1594 | NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1595 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1596 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1597 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1598 | } |
| 1599 | |
| 1600 | asn_dec_rval_t |
| 1601 | NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1602 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1603 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1604 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1605 | } |
| 1606 | |
| 1607 | asn_enc_rval_t |
| 1608 | NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td, |
| 1609 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1610 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1611 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1612 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1613 | } |
| 1614 | |
| 1615 | asn_dec_rval_t |
| 1616 | NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1617 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1618 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1619 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1620 | } |
| 1621 | |
| 1622 | asn_enc_rval_t |
| 1623 | NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1624 | int ilevel, enum xer_encoder_flags_e flags, |
| 1625 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1626 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1627 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1628 | } |
| 1629 | |
| 1630 | asn_dec_rval_t |
| 1631 | NO_IntegerOutValue_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1632 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1633 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1634 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1635 | } |
| 1636 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1637 | asn_enc_rval_t |
| 1638 | NO_IntegerOutValue_encode_uper(asn_TYPE_descriptor_t *td, |
| 1639 | asn_per_constraints_t *constraints, |
| 1640 | void *structure, asn_per_outp_t *per_out) { |
| 1641 | NO_IntegerOutValue_1_inherit_TYPE_descriptor(td); |
| 1642 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1643 | } |
| 1644 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1645 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1646 | /*** <<< CTDEFS [NO-IntegerOutValue] >>> ***/ |
| 1647 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1648 | static asn_per_constraints_t asn_PER_type_NO_IntegerOutValue_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1649 | { APC_CONSTRAINED, 0, -1, 3000000000, 3000000000 } /* (3000000000..3000000000) */, |
| 1650 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1651 | 0, 0 /* No PER value map */ |
| 1652 | }; |
| 1653 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1654 | /*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/ |
| 1655 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1656 | static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = { |
| 1657 | 0, 0, 0, 0, 0, |
| 1658 | 0, /* Native long size */ |
| 1659 | 1 /* Unsigned representation */ |
| 1660 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1661 | static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = { |
| 1662 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1663 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1664 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = { |
| 1665 | "NO-IntegerOutValue", |
| 1666 | "NO-IntegerOutValue", |
| 1667 | NO_IntegerOutValue_free, |
| 1668 | NO_IntegerOutValue_print, |
| 1669 | NO_IntegerOutValue_constraint, |
| 1670 | NO_IntegerOutValue_decode_ber, |
| 1671 | NO_IntegerOutValue_encode_der, |
| 1672 | NO_IntegerOutValue_decode_xer, |
| 1673 | NO_IntegerOutValue_encode_xer, |
| 1674 | NO_IntegerOutValue_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1675 | NO_IntegerOutValue_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1676 | 0, /* Use generic outmost tag fetcher */ |
| 1677 | asn_DEF_NO_IntegerOutValue_tags_1, |
| 1678 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 1679 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
| 1680 | asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */ |
| 1681 | sizeof(asn_DEF_NO_IntegerOutValue_tags_1) |
| 1682 | /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1683 | &asn_PER_type_NO_IntegerOutValue_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1684 | 0, 0, /* No members */ |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 1685 | &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1686 | }; |
| 1687 | |
| 1688 | |
| 1689 | /*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/ |
| 1690 | |
| 1691 | #include <NativeInteger.h> |
| 1692 | |
| 1693 | /*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/ |
| 1694 | |
| 1695 | typedef long OK_IntegerInRange1_t; |
| 1696 | |
| 1697 | /*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/ |
| 1698 | |
| 1699 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1; |
| 1700 | asn_struct_free_f OK_IntegerInRange1_free; |
| 1701 | asn_struct_print_f OK_IntegerInRange1_print; |
| 1702 | asn_constr_check_f OK_IntegerInRange1_constraint; |
| 1703 | ber_type_decoder_f OK_IntegerInRange1_decode_ber; |
| 1704 | der_type_encoder_f OK_IntegerInRange1_encode_der; |
| 1705 | xer_type_decoder_f OK_IntegerInRange1_decode_xer; |
| 1706 | xer_type_encoder_f OK_IntegerInRange1_encode_xer; |
| 1707 | per_type_decoder_f OK_IntegerInRange1_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1708 | per_type_encoder_f OK_IntegerInRange1_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1709 | |
| 1710 | /*** <<< CODE [OK-IntegerInRange1] >>> ***/ |
| 1711 | |
| 1712 | int |
| 1713 | OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1714 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1715 | long value; |
| 1716 | |
| 1717 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1718 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1719 | "%s: value not given (%s:%d)", |
| 1720 | td->name, __FILE__, __LINE__); |
| 1721 | return -1; |
| 1722 | } |
| 1723 | |
| 1724 | value = *(const long *)sptr; |
| 1725 | |
| 1726 | if((value >= -100 && value <= 100)) { |
| 1727 | /* Constraint check succeeded */ |
| 1728 | return 0; |
| 1729 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1730 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1731 | "%s: constraint failed (%s:%d)", |
| 1732 | td->name, __FILE__, __LINE__); |
| 1733 | return -1; |
| 1734 | } |
| 1735 | } |
| 1736 | |
| 1737 | /* |
| 1738 | * This type is implemented using NativeInteger, |
| 1739 | * so here we adjust the DEF accordingly. |
| 1740 | */ |
| 1741 | static void |
| 1742 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1743 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1744 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1745 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1746 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1747 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1748 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1749 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1750 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1751 | if(!td->per_constraints) |
| 1752 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1753 | td->elements = asn_DEF_NativeInteger.elements; |
| 1754 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1755 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1756 | } |
| 1757 | |
| 1758 | void |
| 1759 | OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td, |
| 1760 | void *struct_ptr, int contents_only) { |
| 1761 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1762 | td->free_struct(td, struct_ptr, contents_only); |
| 1763 | } |
| 1764 | |
| 1765 | int |
| 1766 | OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1767 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1768 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1769 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1770 | } |
| 1771 | |
| 1772 | asn_dec_rval_t |
| 1773 | OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1774 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1775 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1776 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1777 | } |
| 1778 | |
| 1779 | asn_enc_rval_t |
| 1780 | OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td, |
| 1781 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1782 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1783 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1784 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1785 | } |
| 1786 | |
| 1787 | asn_dec_rval_t |
| 1788 | OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1789 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1790 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1791 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1792 | } |
| 1793 | |
| 1794 | asn_enc_rval_t |
| 1795 | OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1796 | int ilevel, enum xer_encoder_flags_e flags, |
| 1797 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1798 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1799 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1800 | } |
| 1801 | |
| 1802 | asn_dec_rval_t |
| 1803 | OK_IntegerInRange1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1804 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1805 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1806 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1807 | } |
| 1808 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1809 | asn_enc_rval_t |
| 1810 | OK_IntegerInRange1_encode_uper(asn_TYPE_descriptor_t *td, |
| 1811 | asn_per_constraints_t *constraints, |
| 1812 | void *structure, asn_per_outp_t *per_out) { |
| 1813 | OK_IntegerInRange1_1_inherit_TYPE_descriptor(td); |
| 1814 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1815 | } |
| 1816 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1817 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1818 | /*** <<< CTDEFS [OK-IntegerInRange1] >>> ***/ |
| 1819 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1820 | static asn_per_constraints_t asn_PER_type_OK_IntegerInRange1_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1821 | { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */, |
| 1822 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1823 | 0, 0 /* No PER value map */ |
| 1824 | }; |
| 1825 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1826 | /*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/ |
| 1827 | |
| 1828 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = { |
| 1829 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1830 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1831 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = { |
| 1832 | "OK-IntegerInRange1", |
| 1833 | "OK-IntegerInRange1", |
| 1834 | OK_IntegerInRange1_free, |
| 1835 | OK_IntegerInRange1_print, |
| 1836 | OK_IntegerInRange1_constraint, |
| 1837 | OK_IntegerInRange1_decode_ber, |
| 1838 | OK_IntegerInRange1_encode_der, |
| 1839 | OK_IntegerInRange1_decode_xer, |
| 1840 | OK_IntegerInRange1_encode_xer, |
| 1841 | OK_IntegerInRange1_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1842 | OK_IntegerInRange1_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1843 | 0, /* Use generic outmost tag fetcher */ |
| 1844 | asn_DEF_OK_IntegerInRange1_tags_1, |
| 1845 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 1846 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
| 1847 | asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */ |
| 1848 | sizeof(asn_DEF_OK_IntegerInRange1_tags_1) |
| 1849 | /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1850 | &asn_PER_type_OK_IntegerInRange1_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1851 | 0, 0, /* No members */ |
| 1852 | 0 /* No specifics */ |
| 1853 | }; |
| 1854 | |
| 1855 | |
| 1856 | /*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/ |
| 1857 | |
| 1858 | #include <NativeInteger.h> |
| 1859 | |
| 1860 | /*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/ |
| 1861 | |
| 1862 | typedef long OK_IntegerInRange2_t; |
| 1863 | |
| 1864 | /*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/ |
| 1865 | |
| 1866 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2; |
| 1867 | asn_struct_free_f OK_IntegerInRange2_free; |
| 1868 | asn_struct_print_f OK_IntegerInRange2_print; |
| 1869 | asn_constr_check_f OK_IntegerInRange2_constraint; |
| 1870 | ber_type_decoder_f OK_IntegerInRange2_decode_ber; |
| 1871 | der_type_encoder_f OK_IntegerInRange2_encode_der; |
| 1872 | xer_type_decoder_f OK_IntegerInRange2_decode_xer; |
| 1873 | xer_type_encoder_f OK_IntegerInRange2_encode_xer; |
| 1874 | per_type_decoder_f OK_IntegerInRange2_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1875 | per_type_encoder_f OK_IntegerInRange2_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1876 | |
| 1877 | /*** <<< CODE [OK-IntegerInRange2] >>> ***/ |
| 1878 | |
| 1879 | int |
| 1880 | OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 1881 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1882 | long value; |
| 1883 | |
| 1884 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1885 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1886 | "%s: value not given (%s:%d)", |
| 1887 | td->name, __FILE__, __LINE__); |
| 1888 | return -1; |
| 1889 | } |
| 1890 | |
| 1891 | value = *(const long *)sptr; |
| 1892 | |
| 1893 | if(((value == -100) || (value == 100))) { |
| 1894 | /* Constraint check succeeded */ |
| 1895 | return 0; |
| 1896 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 1897 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1898 | "%s: constraint failed (%s:%d)", |
| 1899 | td->name, __FILE__, __LINE__); |
| 1900 | return -1; |
| 1901 | } |
| 1902 | } |
| 1903 | |
| 1904 | /* |
| 1905 | * This type is implemented using NativeInteger, |
| 1906 | * so here we adjust the DEF accordingly. |
| 1907 | */ |
| 1908 | static void |
| 1909 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 1910 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 1911 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 1912 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 1913 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 1914 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 1915 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 1916 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1917 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1918 | if(!td->per_constraints) |
| 1919 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 1920 | td->elements = asn_DEF_NativeInteger.elements; |
| 1921 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 1922 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 1923 | } |
| 1924 | |
| 1925 | void |
| 1926 | OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td, |
| 1927 | void *struct_ptr, int contents_only) { |
| 1928 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1929 | td->free_struct(td, struct_ptr, contents_only); |
| 1930 | } |
| 1931 | |
| 1932 | int |
| 1933 | OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 1934 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 1935 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1936 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 1937 | } |
| 1938 | |
| 1939 | asn_dec_rval_t |
| 1940 | OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1941 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 1942 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1943 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 1944 | } |
| 1945 | |
| 1946 | asn_enc_rval_t |
| 1947 | OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td, |
| 1948 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 1949 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1950 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1951 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 1952 | } |
| 1953 | |
| 1954 | asn_dec_rval_t |
| 1955 | OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1956 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 1957 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1958 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 1959 | } |
| 1960 | |
| 1961 | asn_enc_rval_t |
| 1962 | OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 1963 | int ilevel, enum xer_encoder_flags_e flags, |
| 1964 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 1965 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1966 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 1967 | } |
| 1968 | |
| 1969 | asn_dec_rval_t |
| 1970 | OK_IntegerInRange2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 1971 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 1972 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1973 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 1974 | } |
| 1975 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 1976 | asn_enc_rval_t |
| 1977 | OK_IntegerInRange2_encode_uper(asn_TYPE_descriptor_t *td, |
| 1978 | asn_per_constraints_t *constraints, |
| 1979 | void *structure, asn_per_outp_t *per_out) { |
| 1980 | OK_IntegerInRange2_1_inherit_TYPE_descriptor(td); |
| 1981 | return td->uper_encoder(td, constraints, structure, per_out); |
| 1982 | } |
| 1983 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1984 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1985 | /*** <<< CTDEFS [OK-IntegerInRange2] >>> ***/ |
| 1986 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 1987 | static asn_per_constraints_t asn_PER_type_OK_IntegerInRange2_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 1988 | { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */, |
| 1989 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 1990 | 0, 0 /* No PER value map */ |
| 1991 | }; |
| 1992 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1993 | /*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/ |
| 1994 | |
| 1995 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = { |
| 1996 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 1997 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 1998 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = { |
| 1999 | "OK-IntegerInRange2", |
| 2000 | "OK-IntegerInRange2", |
| 2001 | OK_IntegerInRange2_free, |
| 2002 | OK_IntegerInRange2_print, |
| 2003 | OK_IntegerInRange2_constraint, |
| 2004 | OK_IntegerInRange2_decode_ber, |
| 2005 | OK_IntegerInRange2_encode_der, |
| 2006 | OK_IntegerInRange2_decode_xer, |
| 2007 | OK_IntegerInRange2_encode_xer, |
| 2008 | OK_IntegerInRange2_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2009 | OK_IntegerInRange2_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2010 | 0, /* Use generic outmost tag fetcher */ |
| 2011 | asn_DEF_OK_IntegerInRange2_tags_1, |
| 2012 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 2013 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
| 2014 | asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */ |
| 2015 | sizeof(asn_DEF_OK_IntegerInRange2_tags_1) |
| 2016 | /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2017 | &asn_PER_type_OK_IntegerInRange2_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2018 | 0, 0, /* No members */ |
| 2019 | 0 /* No specifics */ |
| 2020 | }; |
| 2021 | |
| 2022 | |
| 2023 | /*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/ |
| 2024 | |
| 2025 | #include <NativeInteger.h> |
| 2026 | |
| 2027 | /*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/ |
| 2028 | |
| 2029 | typedef long OK_IntegerInRange3_t; |
| 2030 | |
| 2031 | /*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/ |
| 2032 | |
| 2033 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3; |
| 2034 | asn_struct_free_f OK_IntegerInRange3_free; |
| 2035 | asn_struct_print_f OK_IntegerInRange3_print; |
| 2036 | asn_constr_check_f OK_IntegerInRange3_constraint; |
| 2037 | ber_type_decoder_f OK_IntegerInRange3_decode_ber; |
| 2038 | der_type_encoder_f OK_IntegerInRange3_encode_der; |
| 2039 | xer_type_decoder_f OK_IntegerInRange3_decode_xer; |
| 2040 | xer_type_encoder_f OK_IntegerInRange3_encode_xer; |
| 2041 | per_type_decoder_f OK_IntegerInRange3_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2042 | per_type_encoder_f OK_IntegerInRange3_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2043 | |
| 2044 | /*** <<< CODE [OK-IntegerInRange3] >>> ***/ |
| 2045 | |
| 2046 | int |
| 2047 | OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2048 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2049 | long value; |
| 2050 | |
| 2051 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2052 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2053 | "%s: value not given (%s:%d)", |
| 2054 | td->name, __FILE__, __LINE__); |
| 2055 | return -1; |
| 2056 | } |
| 2057 | |
| 2058 | value = *(const long *)sptr; |
| 2059 | |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2060 | if((value >= (-2147483647L - 1) && value <= 2147483647)) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2061 | /* Constraint check succeeded */ |
| 2062 | return 0; |
| 2063 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2064 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2065 | "%s: constraint failed (%s:%d)", |
| 2066 | td->name, __FILE__, __LINE__); |
| 2067 | return -1; |
| 2068 | } |
| 2069 | } |
| 2070 | |
| 2071 | /* |
| 2072 | * This type is implemented using NativeInteger, |
| 2073 | * so here we adjust the DEF accordingly. |
| 2074 | */ |
| 2075 | static void |
| 2076 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2077 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2078 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2079 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2080 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2081 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2082 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2083 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2084 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2085 | if(!td->per_constraints) |
| 2086 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2087 | td->elements = asn_DEF_NativeInteger.elements; |
| 2088 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2089 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 2090 | } |
| 2091 | |
| 2092 | void |
| 2093 | OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td, |
| 2094 | void *struct_ptr, int contents_only) { |
| 2095 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2096 | td->free_struct(td, struct_ptr, contents_only); |
| 2097 | } |
| 2098 | |
| 2099 | int |
| 2100 | OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2101 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2102 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2103 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2104 | } |
| 2105 | |
| 2106 | asn_dec_rval_t |
| 2107 | OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2108 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2109 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2110 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2111 | } |
| 2112 | |
| 2113 | asn_enc_rval_t |
| 2114 | OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td, |
| 2115 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2116 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2117 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2118 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2119 | } |
| 2120 | |
| 2121 | asn_dec_rval_t |
| 2122 | OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2123 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2124 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2125 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2126 | } |
| 2127 | |
| 2128 | asn_enc_rval_t |
| 2129 | OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2130 | int ilevel, enum xer_encoder_flags_e flags, |
| 2131 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2132 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2133 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2134 | } |
| 2135 | |
| 2136 | asn_dec_rval_t |
| 2137 | OK_IntegerInRange3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2138 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2139 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2140 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2141 | } |
| 2142 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2143 | asn_enc_rval_t |
| 2144 | OK_IntegerInRange3_encode_uper(asn_TYPE_descriptor_t *td, |
| 2145 | asn_per_constraints_t *constraints, |
| 2146 | void *structure, asn_per_outp_t *per_out) { |
| 2147 | OK_IntegerInRange3_1_inherit_TYPE_descriptor(td); |
| 2148 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2149 | } |
| 2150 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2151 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2152 | /*** <<< CTDEFS [OK-IntegerInRange3] >>> ***/ |
| 2153 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2154 | static asn_per_constraints_t asn_PER_type_OK_IntegerInRange3_constr_1 = { |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2155 | { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */, |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2156 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 2157 | 0, 0 /* No PER value map */ |
| 2158 | }; |
| 2159 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2160 | /*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/ |
| 2161 | |
| 2162 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = { |
| 2163 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2164 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2165 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = { |
| 2166 | "OK-IntegerInRange3", |
| 2167 | "OK-IntegerInRange3", |
| 2168 | OK_IntegerInRange3_free, |
| 2169 | OK_IntegerInRange3_print, |
| 2170 | OK_IntegerInRange3_constraint, |
| 2171 | OK_IntegerInRange3_decode_ber, |
| 2172 | OK_IntegerInRange3_encode_der, |
| 2173 | OK_IntegerInRange3_decode_xer, |
| 2174 | OK_IntegerInRange3_encode_xer, |
| 2175 | OK_IntegerInRange3_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2176 | OK_IntegerInRange3_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2177 | 0, /* Use generic outmost tag fetcher */ |
| 2178 | asn_DEF_OK_IntegerInRange3_tags_1, |
| 2179 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 2180 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
| 2181 | asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */ |
| 2182 | sizeof(asn_DEF_OK_IntegerInRange3_tags_1) |
| 2183 | /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2184 | &asn_PER_type_OK_IntegerInRange3_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2185 | 0, 0, /* No members */ |
| 2186 | 0 /* No specifics */ |
| 2187 | }; |
| 2188 | |
| 2189 | |
| 2190 | /*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/ |
| 2191 | |
| 2192 | #include <NativeInteger.h> |
| 2193 | |
| 2194 | /*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/ |
| 2195 | |
| 2196 | typedef long OK_IntegerInRange4_t; |
| 2197 | |
| 2198 | /*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/ |
| 2199 | |
| 2200 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4; |
| 2201 | asn_struct_free_f OK_IntegerInRange4_free; |
| 2202 | asn_struct_print_f OK_IntegerInRange4_print; |
| 2203 | asn_constr_check_f OK_IntegerInRange4_constraint; |
| 2204 | ber_type_decoder_f OK_IntegerInRange4_decode_ber; |
| 2205 | der_type_encoder_f OK_IntegerInRange4_encode_der; |
| 2206 | xer_type_decoder_f OK_IntegerInRange4_decode_xer; |
| 2207 | xer_type_encoder_f OK_IntegerInRange4_encode_xer; |
| 2208 | per_type_decoder_f OK_IntegerInRange4_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2209 | per_type_encoder_f OK_IntegerInRange4_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2210 | |
| 2211 | /*** <<< CODE [OK-IntegerInRange4] >>> ***/ |
| 2212 | |
| 2213 | int |
| 2214 | OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2215 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2216 | long value; |
| 2217 | |
| 2218 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2219 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2220 | "%s: value not given (%s:%d)", |
| 2221 | td->name, __FILE__, __LINE__); |
| 2222 | return -1; |
| 2223 | } |
| 2224 | |
| 2225 | value = *(const long *)sptr; |
| 2226 | |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2227 | if(((value == (-2147483647L - 1)) || (value == 2147483647))) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2228 | /* Constraint check succeeded */ |
| 2229 | return 0; |
| 2230 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2231 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2232 | "%s: constraint failed (%s:%d)", |
| 2233 | td->name, __FILE__, __LINE__); |
| 2234 | return -1; |
| 2235 | } |
| 2236 | } |
| 2237 | |
| 2238 | /* |
| 2239 | * This type is implemented using NativeInteger, |
| 2240 | * so here we adjust the DEF accordingly. |
| 2241 | */ |
| 2242 | static void |
| 2243 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2244 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2245 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2246 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2247 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2248 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2249 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2250 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2251 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2252 | if(!td->per_constraints) |
| 2253 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2254 | td->elements = asn_DEF_NativeInteger.elements; |
| 2255 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2256 | td->specifics = asn_DEF_NativeInteger.specifics; |
| 2257 | } |
| 2258 | |
| 2259 | void |
| 2260 | OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td, |
| 2261 | void *struct_ptr, int contents_only) { |
| 2262 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2263 | td->free_struct(td, struct_ptr, contents_only); |
| 2264 | } |
| 2265 | |
| 2266 | int |
| 2267 | OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2268 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2269 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2270 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2271 | } |
| 2272 | |
| 2273 | asn_dec_rval_t |
| 2274 | OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2275 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2276 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2277 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2278 | } |
| 2279 | |
| 2280 | asn_enc_rval_t |
| 2281 | OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td, |
| 2282 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2283 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2284 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2285 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2286 | } |
| 2287 | |
| 2288 | asn_dec_rval_t |
| 2289 | OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2290 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2291 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2292 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2293 | } |
| 2294 | |
| 2295 | asn_enc_rval_t |
| 2296 | OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2297 | int ilevel, enum xer_encoder_flags_e flags, |
| 2298 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2299 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2300 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2301 | } |
| 2302 | |
| 2303 | asn_dec_rval_t |
| 2304 | OK_IntegerInRange4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2305 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2306 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2307 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2308 | } |
| 2309 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2310 | asn_enc_rval_t |
| 2311 | OK_IntegerInRange4_encode_uper(asn_TYPE_descriptor_t *td, |
| 2312 | asn_per_constraints_t *constraints, |
| 2313 | void *structure, asn_per_outp_t *per_out) { |
| 2314 | OK_IntegerInRange4_1_inherit_TYPE_descriptor(td); |
| 2315 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2316 | } |
| 2317 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2318 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2319 | /*** <<< CTDEFS [OK-IntegerInRange4] >>> ***/ |
| 2320 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2321 | static asn_per_constraints_t asn_PER_type_OK_IntegerInRange4_constr_1 = { |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2322 | { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */, |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2323 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 2324 | 0, 0 /* No PER value map */ |
| 2325 | }; |
| 2326 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2327 | /*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/ |
| 2328 | |
| 2329 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = { |
| 2330 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2331 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2332 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = { |
| 2333 | "OK-IntegerInRange4", |
| 2334 | "OK-IntegerInRange4", |
| 2335 | OK_IntegerInRange4_free, |
| 2336 | OK_IntegerInRange4_print, |
| 2337 | OK_IntegerInRange4_constraint, |
| 2338 | OK_IntegerInRange4_decode_ber, |
| 2339 | OK_IntegerInRange4_encode_der, |
| 2340 | OK_IntegerInRange4_decode_xer, |
| 2341 | OK_IntegerInRange4_encode_xer, |
| 2342 | OK_IntegerInRange4_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2343 | OK_IntegerInRange4_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2344 | 0, /* Use generic outmost tag fetcher */ |
| 2345 | asn_DEF_OK_IntegerInRange4_tags_1, |
| 2346 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 2347 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
| 2348 | asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */ |
| 2349 | sizeof(asn_DEF_OK_IntegerInRange4_tags_1) |
| 2350 | /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2351 | &asn_PER_type_OK_IntegerInRange4_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2352 | 0, 0, /* No members */ |
| 2353 | 0 /* No specifics */ |
| 2354 | }; |
| 2355 | |
| 2356 | |
| 2357 | /*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/ |
| 2358 | |
| 2359 | #include <INTEGER.h> |
| 2360 | |
| 2361 | /*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/ |
| 2362 | |
| 2363 | typedef INTEGER_t OK_IntegerInRange5_t; |
| 2364 | |
| 2365 | /*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/ |
| 2366 | |
| 2367 | extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5; |
| 2368 | asn_struct_free_f OK_IntegerInRange5_free; |
| 2369 | asn_struct_print_f OK_IntegerInRange5_print; |
| 2370 | asn_constr_check_f OK_IntegerInRange5_constraint; |
| 2371 | ber_type_decoder_f OK_IntegerInRange5_decode_ber; |
| 2372 | der_type_encoder_f OK_IntegerInRange5_encode_der; |
| 2373 | xer_type_decoder_f OK_IntegerInRange5_decode_xer; |
| 2374 | xer_type_encoder_f OK_IntegerInRange5_encode_xer; |
| 2375 | per_type_decoder_f OK_IntegerInRange5_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2376 | per_type_encoder_f OK_IntegerInRange5_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2377 | |
| 2378 | /*** <<< CODE [OK-IntegerInRange5] >>> ***/ |
| 2379 | |
| 2380 | int |
| 2381 | OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2382 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2383 | const INTEGER_t *st = (const INTEGER_t *)sptr; |
| 2384 | long value; |
| 2385 | |
| 2386 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2387 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2388 | "%s: value not given (%s:%d)", |
| 2389 | td->name, __FILE__, __LINE__); |
| 2390 | return -1; |
| 2391 | } |
| 2392 | |
| 2393 | if(asn_INTEGER2long(st, &value)) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2394 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2395 | "%s: value too large (%s:%d)", |
| 2396 | td->name, __FILE__, __LINE__); |
| 2397 | return -1; |
| 2398 | } |
| 2399 | |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2400 | if(((value == (-2147483647L - 1)) || (value == 2147483647))) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2401 | /* Constraint check succeeded */ |
| 2402 | return 0; |
| 2403 | } else { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2404 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2405 | "%s: constraint failed (%s:%d)", |
| 2406 | td->name, __FILE__, __LINE__); |
| 2407 | return -1; |
| 2408 | } |
| 2409 | } |
| 2410 | |
| 2411 | /* |
| 2412 | * This type is implemented using INTEGER, |
| 2413 | * so here we adjust the DEF accordingly. |
| 2414 | */ |
| 2415 | static void |
| 2416 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2417 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2418 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2419 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2420 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2421 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2422 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 2423 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2424 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2425 | if(!td->per_constraints) |
| 2426 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 2427 | td->elements = asn_DEF_INTEGER.elements; |
| 2428 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2429 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2430 | } |
| 2431 | |
| 2432 | void |
| 2433 | OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td, |
| 2434 | void *struct_ptr, int contents_only) { |
| 2435 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2436 | td->free_struct(td, struct_ptr, contents_only); |
| 2437 | } |
| 2438 | |
| 2439 | int |
| 2440 | OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2441 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2442 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2443 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2444 | } |
| 2445 | |
| 2446 | asn_dec_rval_t |
| 2447 | OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2448 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2449 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2450 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2451 | } |
| 2452 | |
| 2453 | asn_enc_rval_t |
| 2454 | OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td, |
| 2455 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2456 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2457 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2458 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2459 | } |
| 2460 | |
| 2461 | asn_dec_rval_t |
| 2462 | OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2463 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2464 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2465 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2466 | } |
| 2467 | |
| 2468 | asn_enc_rval_t |
| 2469 | OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2470 | int ilevel, enum xer_encoder_flags_e flags, |
| 2471 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2472 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2473 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2474 | } |
| 2475 | |
| 2476 | asn_dec_rval_t |
| 2477 | OK_IntegerInRange5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2478 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2479 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2480 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2481 | } |
| 2482 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2483 | asn_enc_rval_t |
| 2484 | OK_IntegerInRange5_encode_uper(asn_TYPE_descriptor_t *td, |
| 2485 | asn_per_constraints_t *constraints, |
| 2486 | void *structure, asn_per_outp_t *per_out) { |
| 2487 | OK_IntegerInRange5_1_inherit_TYPE_descriptor(td); |
| 2488 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2489 | } |
| 2490 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2491 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2492 | /*** <<< CTDEFS [OK-IntegerInRange5] >>> ***/ |
| 2493 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2494 | static asn_per_constraints_t asn_PER_type_OK_IntegerInRange5_constr_1 = { |
vlm | fea6602 | 2007-11-06 01:48:46 +0000 | [diff] [blame] | 2495 | { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647,...) */, |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2496 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 2497 | 0, 0 /* No PER value map */ |
| 2498 | }; |
| 2499 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2500 | /*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/ |
| 2501 | |
| 2502 | static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = { |
| 2503 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2504 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2505 | asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = { |
| 2506 | "OK-IntegerInRange5", |
| 2507 | "OK-IntegerInRange5", |
| 2508 | OK_IntegerInRange5_free, |
| 2509 | OK_IntegerInRange5_print, |
| 2510 | OK_IntegerInRange5_constraint, |
| 2511 | OK_IntegerInRange5_decode_ber, |
| 2512 | OK_IntegerInRange5_encode_der, |
| 2513 | OK_IntegerInRange5_decode_xer, |
| 2514 | OK_IntegerInRange5_encode_xer, |
| 2515 | OK_IntegerInRange5_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2516 | OK_IntegerInRange5_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2517 | 0, /* Use generic outmost tag fetcher */ |
| 2518 | asn_DEF_OK_IntegerInRange5_tags_1, |
| 2519 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 2520 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
| 2521 | asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */ |
| 2522 | sizeof(asn_DEF_OK_IntegerInRange5_tags_1) |
| 2523 | /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2524 | &asn_PER_type_OK_IntegerInRange5_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2525 | 0, 0, /* No members */ |
| 2526 | 0 /* No specifics */ |
| 2527 | }; |
| 2528 | |
| 2529 | |
| 2530 | /*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/ |
| 2531 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2532 | #include <NativeInteger.h> |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2533 | |
| 2534 | /*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/ |
| 2535 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2536 | typedef unsigned long NO_IntegerInRange6_t; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2537 | |
| 2538 | /*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/ |
| 2539 | |
| 2540 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6; |
| 2541 | asn_struct_free_f NO_IntegerInRange6_free; |
| 2542 | asn_struct_print_f NO_IntegerInRange6_print; |
| 2543 | asn_constr_check_f NO_IntegerInRange6_constraint; |
| 2544 | ber_type_decoder_f NO_IntegerInRange6_decode_ber; |
| 2545 | der_type_encoder_f NO_IntegerInRange6_encode_der; |
| 2546 | xer_type_decoder_f NO_IntegerInRange6_decode_xer; |
| 2547 | xer_type_encoder_f NO_IntegerInRange6_encode_xer; |
| 2548 | per_type_decoder_f NO_IntegerInRange6_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2549 | per_type_encoder_f NO_IntegerInRange6_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2550 | |
| 2551 | /*** <<< CODE [NO-IntegerInRange6] >>> ***/ |
| 2552 | |
| 2553 | int |
| 2554 | NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2555 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2556 | unsigned long value; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2557 | |
| 2558 | if(!sptr) { |
vlm | d4ae41c | 2006-07-13 13:28:32 +0000 | [diff] [blame] | 2559 | _ASN_CTFAIL(app_key, td, sptr, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2560 | "%s: value not given (%s:%d)", |
| 2561 | td->name, __FILE__, __LINE__); |
| 2562 | return -1; |
| 2563 | } |
| 2564 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2565 | value = *(const unsigned long *)sptr; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2566 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2567 | /* Constraint check succeeded */ |
| 2568 | return 0; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2569 | } |
| 2570 | |
| 2571 | /* |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2572 | * This type is implemented using NativeInteger, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2573 | * so here we adjust the DEF accordingly. |
| 2574 | */ |
| 2575 | static void |
| 2576 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2577 | td->free_struct = asn_DEF_NativeInteger.free_struct; |
| 2578 | td->print_struct = asn_DEF_NativeInteger.print_struct; |
| 2579 | td->ber_decoder = asn_DEF_NativeInteger.ber_decoder; |
| 2580 | td->der_encoder = asn_DEF_NativeInteger.der_encoder; |
| 2581 | td->xer_decoder = asn_DEF_NativeInteger.xer_decoder; |
| 2582 | td->xer_encoder = asn_DEF_NativeInteger.xer_encoder; |
| 2583 | td->uper_decoder = asn_DEF_NativeInteger.uper_decoder; |
| 2584 | td->uper_encoder = asn_DEF_NativeInteger.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2585 | if(!td->per_constraints) |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2586 | td->per_constraints = asn_DEF_NativeInteger.per_constraints; |
| 2587 | td->elements = asn_DEF_NativeInteger.elements; |
| 2588 | td->elements_count = asn_DEF_NativeInteger.elements_count; |
| 2589 | /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2590 | } |
| 2591 | |
| 2592 | void |
| 2593 | NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td, |
| 2594 | void *struct_ptr, int contents_only) { |
| 2595 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2596 | td->free_struct(td, struct_ptr, contents_only); |
| 2597 | } |
| 2598 | |
| 2599 | int |
| 2600 | NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2601 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2602 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2603 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2604 | } |
| 2605 | |
| 2606 | asn_dec_rval_t |
| 2607 | NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2608 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2609 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2610 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2611 | } |
| 2612 | |
| 2613 | asn_enc_rval_t |
| 2614 | NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td, |
| 2615 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2616 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2617 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2618 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2619 | } |
| 2620 | |
| 2621 | asn_dec_rval_t |
| 2622 | NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2623 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2624 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2625 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2626 | } |
| 2627 | |
| 2628 | asn_enc_rval_t |
| 2629 | NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2630 | int ilevel, enum xer_encoder_flags_e flags, |
| 2631 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2632 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2633 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2634 | } |
| 2635 | |
| 2636 | asn_dec_rval_t |
| 2637 | NO_IntegerInRange6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2638 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2639 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2640 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2641 | } |
| 2642 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2643 | asn_enc_rval_t |
| 2644 | NO_IntegerInRange6_encode_uper(asn_TYPE_descriptor_t *td, |
| 2645 | asn_per_constraints_t *constraints, |
| 2646 | void *structure, asn_per_outp_t *per_out) { |
| 2647 | NO_IntegerInRange6_1_inherit_TYPE_descriptor(td); |
| 2648 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2649 | } |
| 2650 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2651 | |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2652 | /*** <<< CTDEFS [NO-IntegerInRange6] >>> ***/ |
| 2653 | |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2654 | static asn_per_constraints_t asn_PER_type_NO_IntegerInRange6_constr_1 = { |
vlm | 86380d3 | 2006-10-09 12:07:58 +0000 | [diff] [blame] | 2655 | { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, |
| 2656 | { APC_UNCONSTRAINED, -1, -1, 0, 0 }, |
| 2657 | 0, 0 /* No PER value map */ |
| 2658 | }; |
| 2659 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2660 | /*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/ |
| 2661 | |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2662 | static asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = { |
| 2663 | 0, 0, 0, 0, 0, |
| 2664 | 0, /* Native long size */ |
| 2665 | 1 /* Unsigned representation */ |
| 2666 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2667 | static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = { |
| 2668 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2669 | }; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2670 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = { |
| 2671 | "NO-IntegerInRange6", |
| 2672 | "NO-IntegerInRange6", |
| 2673 | NO_IntegerInRange6_free, |
| 2674 | NO_IntegerInRange6_print, |
| 2675 | NO_IntegerInRange6_constraint, |
| 2676 | NO_IntegerInRange6_decode_ber, |
| 2677 | NO_IntegerInRange6_encode_der, |
| 2678 | NO_IntegerInRange6_decode_xer, |
| 2679 | NO_IntegerInRange6_encode_xer, |
| 2680 | NO_IntegerInRange6_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2681 | NO_IntegerInRange6_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2682 | 0, /* Use generic outmost tag fetcher */ |
| 2683 | asn_DEF_NO_IntegerInRange6_tags_1, |
| 2684 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 2685 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
| 2686 | asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */ |
| 2687 | sizeof(asn_DEF_NO_IntegerInRange6_tags_1) |
| 2688 | /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */ |
vlm | a0da1a3 | 2006-10-09 12:27:44 +0000 | [diff] [blame] | 2689 | &asn_PER_type_NO_IntegerInRange6_constr_1, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2690 | 0, 0, /* No members */ |
vlm | 12164c4 | 2007-12-03 13:41:36 +0000 | [diff] [blame] | 2691 | &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */ |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2692 | }; |
| 2693 | |
| 2694 | |
| 2695 | /*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/ |
| 2696 | |
| 2697 | #include <INTEGER.h> |
| 2698 | |
| 2699 | /*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/ |
| 2700 | |
| 2701 | typedef enum CN_IntegerEnumerated1 { |
| 2702 | CN_IntegerEnumerated1_a = 1, |
| 2703 | CN_IntegerEnumerated1_b = 2 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 2704 | } e_CN_IntegerEnumerated1; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2705 | |
| 2706 | /*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 2707 | |
| 2708 | typedef INTEGER_t CN_IntegerEnumerated1_t; |
| 2709 | |
| 2710 | /*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/ |
| 2711 | |
| 2712 | extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1; |
| 2713 | asn_struct_free_f CN_IntegerEnumerated1_free; |
| 2714 | asn_struct_print_f CN_IntegerEnumerated1_print; |
| 2715 | asn_constr_check_f CN_IntegerEnumerated1_constraint; |
| 2716 | ber_type_decoder_f CN_IntegerEnumerated1_decode_ber; |
| 2717 | der_type_encoder_f CN_IntegerEnumerated1_encode_der; |
| 2718 | xer_type_decoder_f CN_IntegerEnumerated1_decode_xer; |
| 2719 | xer_type_encoder_f CN_IntegerEnumerated1_encode_xer; |
| 2720 | per_type_decoder_f CN_IntegerEnumerated1_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2721 | per_type_encoder_f CN_IntegerEnumerated1_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2722 | |
| 2723 | /*** <<< CODE [CN-IntegerEnumerated1] >>> ***/ |
| 2724 | |
| 2725 | int |
| 2726 | CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2727 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2728 | /* Replace with underlying type checker */ |
| 2729 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2730 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2731 | } |
| 2732 | |
| 2733 | /* |
| 2734 | * This type is implemented using INTEGER, |
| 2735 | * so here we adjust the DEF accordingly. |
| 2736 | */ |
| 2737 | static void |
| 2738 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2739 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2740 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2741 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2742 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2743 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2744 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 2745 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2746 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2747 | if(!td->per_constraints) |
| 2748 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 2749 | td->elements = asn_DEF_INTEGER.elements; |
| 2750 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2751 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2752 | } |
| 2753 | |
| 2754 | void |
| 2755 | CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td, |
| 2756 | void *struct_ptr, int contents_only) { |
| 2757 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2758 | td->free_struct(td, struct_ptr, contents_only); |
| 2759 | } |
| 2760 | |
| 2761 | int |
| 2762 | CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2763 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2764 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2765 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2766 | } |
| 2767 | |
| 2768 | asn_dec_rval_t |
| 2769 | CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2770 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2771 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2772 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2773 | } |
| 2774 | |
| 2775 | asn_enc_rval_t |
| 2776 | CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td, |
| 2777 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2778 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2779 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2780 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2781 | } |
| 2782 | |
| 2783 | asn_dec_rval_t |
| 2784 | CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2785 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2786 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2787 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2788 | } |
| 2789 | |
| 2790 | asn_enc_rval_t |
| 2791 | CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2792 | int ilevel, enum xer_encoder_flags_e flags, |
| 2793 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2794 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2795 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2796 | } |
| 2797 | |
| 2798 | asn_dec_rval_t |
| 2799 | CN_IntegerEnumerated1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2800 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2801 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2802 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2803 | } |
| 2804 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2805 | asn_enc_rval_t |
| 2806 | CN_IntegerEnumerated1_encode_uper(asn_TYPE_descriptor_t *td, |
| 2807 | asn_per_constraints_t *constraints, |
| 2808 | void *structure, asn_per_outp_t *per_out) { |
| 2809 | CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td); |
| 2810 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2811 | } |
| 2812 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2813 | |
| 2814 | /*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/ |
| 2815 | |
| 2816 | static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = { |
| 2817 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2818 | }; |
| 2819 | asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = { |
| 2820 | "CN-IntegerEnumerated1", |
| 2821 | "CN-IntegerEnumerated1", |
| 2822 | CN_IntegerEnumerated1_free, |
| 2823 | CN_IntegerEnumerated1_print, |
| 2824 | CN_IntegerEnumerated1_constraint, |
| 2825 | CN_IntegerEnumerated1_decode_ber, |
| 2826 | CN_IntegerEnumerated1_encode_der, |
| 2827 | CN_IntegerEnumerated1_decode_xer, |
| 2828 | CN_IntegerEnumerated1_encode_xer, |
| 2829 | CN_IntegerEnumerated1_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2830 | CN_IntegerEnumerated1_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2831 | 0, /* Use generic outmost tag fetcher */ |
| 2832 | asn_DEF_CN_IntegerEnumerated1_tags_1, |
| 2833 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 2834 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
| 2835 | asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */ |
| 2836 | sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1) |
| 2837 | /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */ |
| 2838 | 0, /* No PER visible constraints */ |
| 2839 | 0, 0, /* Defined elsewhere */ |
| 2840 | 0 /* No specifics */ |
| 2841 | }; |
| 2842 | |
| 2843 | |
| 2844 | /*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/ |
| 2845 | |
| 2846 | #include <INTEGER.h> |
| 2847 | |
| 2848 | /*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/ |
| 2849 | |
| 2850 | typedef enum NO_IntegerEnumerated2 { |
| 2851 | NO_IntegerEnumerated2_a = 1, |
| 2852 | NO_IntegerEnumerated2_b = 3000000000 |
vlm | 7c8aa5e | 2006-03-21 07:25:18 +0000 | [diff] [blame] | 2853 | } e_NO_IntegerEnumerated2; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2854 | |
| 2855 | /*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 2856 | |
| 2857 | typedef INTEGER_t NO_IntegerEnumerated2_t; |
| 2858 | |
| 2859 | /*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/ |
| 2860 | |
| 2861 | extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2; |
| 2862 | asn_struct_free_f NO_IntegerEnumerated2_free; |
| 2863 | asn_struct_print_f NO_IntegerEnumerated2_print; |
| 2864 | asn_constr_check_f NO_IntegerEnumerated2_constraint; |
| 2865 | ber_type_decoder_f NO_IntegerEnumerated2_decode_ber; |
| 2866 | der_type_encoder_f NO_IntegerEnumerated2_encode_der; |
| 2867 | xer_type_decoder_f NO_IntegerEnumerated2_decode_xer; |
| 2868 | xer_type_encoder_f NO_IntegerEnumerated2_encode_xer; |
| 2869 | per_type_decoder_f NO_IntegerEnumerated2_decode_uper; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2870 | per_type_encoder_f NO_IntegerEnumerated2_encode_uper; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2871 | |
| 2872 | /*** <<< CODE [NO-IntegerEnumerated2] >>> ***/ |
| 2873 | |
| 2874 | int |
| 2875 | NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr, |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2876 | asn_app_constraint_failed_f *ctfailcb, void *app_key) { |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2877 | /* Replace with underlying type checker */ |
| 2878 | td->check_constraints = asn_DEF_INTEGER.check_constraints; |
vlm | af68ef5 | 2006-07-13 11:19:01 +0000 | [diff] [blame] | 2879 | return td->check_constraints(td, sptr, ctfailcb, app_key); |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2880 | } |
| 2881 | |
| 2882 | /* |
| 2883 | * This type is implemented using INTEGER, |
| 2884 | * so here we adjust the DEF accordingly. |
| 2885 | */ |
| 2886 | static void |
| 2887 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) { |
| 2888 | td->free_struct = asn_DEF_INTEGER.free_struct; |
| 2889 | td->print_struct = asn_DEF_INTEGER.print_struct; |
| 2890 | td->ber_decoder = asn_DEF_INTEGER.ber_decoder; |
| 2891 | td->der_encoder = asn_DEF_INTEGER.der_encoder; |
| 2892 | td->xer_decoder = asn_DEF_INTEGER.xer_decoder; |
| 2893 | td->xer_encoder = asn_DEF_INTEGER.xer_encoder; |
| 2894 | td->uper_decoder = asn_DEF_INTEGER.uper_decoder; |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2895 | td->uper_encoder = asn_DEF_INTEGER.uper_encoder; |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2896 | if(!td->per_constraints) |
| 2897 | td->per_constraints = asn_DEF_INTEGER.per_constraints; |
| 2898 | td->elements = asn_DEF_INTEGER.elements; |
| 2899 | td->elements_count = asn_DEF_INTEGER.elements_count; |
| 2900 | td->specifics = asn_DEF_INTEGER.specifics; |
| 2901 | } |
| 2902 | |
| 2903 | void |
| 2904 | NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td, |
| 2905 | void *struct_ptr, int contents_only) { |
| 2906 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2907 | td->free_struct(td, struct_ptr, contents_only); |
| 2908 | } |
| 2909 | |
| 2910 | int |
| 2911 | NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, |
| 2912 | int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { |
| 2913 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2914 | return td->print_struct(td, struct_ptr, ilevel, cb, app_key); |
| 2915 | } |
| 2916 | |
| 2917 | asn_dec_rval_t |
| 2918 | NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2919 | void **structure, const void *bufptr, size_t size, int tag_mode) { |
| 2920 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2921 | return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode); |
| 2922 | } |
| 2923 | |
| 2924 | asn_enc_rval_t |
| 2925 | NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td, |
| 2926 | void *structure, int tag_mode, ber_tlv_tag_t tag, |
| 2927 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2928 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2929 | return td->der_encoder(td, structure, tag_mode, tag, cb, app_key); |
| 2930 | } |
| 2931 | |
| 2932 | asn_dec_rval_t |
| 2933 | NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2934 | void **structure, const char *opt_mname, const void *bufptr, size_t size) { |
| 2935 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2936 | return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size); |
| 2937 | } |
| 2938 | |
| 2939 | asn_enc_rval_t |
| 2940 | NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure, |
| 2941 | int ilevel, enum xer_encoder_flags_e flags, |
| 2942 | asn_app_consume_bytes_f *cb, void *app_key) { |
| 2943 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2944 | return td->xer_encoder(td, structure, ilevel, flags, cb, app_key); |
| 2945 | } |
| 2946 | |
| 2947 | asn_dec_rval_t |
| 2948 | NO_IntegerEnumerated2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, |
| 2949 | asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) { |
| 2950 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2951 | return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data); |
| 2952 | } |
| 2953 | |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2954 | asn_enc_rval_t |
| 2955 | NO_IntegerEnumerated2_encode_uper(asn_TYPE_descriptor_t *td, |
| 2956 | asn_per_constraints_t *constraints, |
| 2957 | void *structure, asn_per_outp_t *per_out) { |
| 2958 | NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td); |
| 2959 | return td->uper_encoder(td, constraints, structure, per_out); |
| 2960 | } |
| 2961 | |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2962 | |
| 2963 | /*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/ |
| 2964 | |
| 2965 | static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = { |
| 2966 | (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) |
| 2967 | }; |
| 2968 | asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = { |
| 2969 | "NO-IntegerEnumerated2", |
| 2970 | "NO-IntegerEnumerated2", |
| 2971 | NO_IntegerEnumerated2_free, |
| 2972 | NO_IntegerEnumerated2_print, |
| 2973 | NO_IntegerEnumerated2_constraint, |
| 2974 | NO_IntegerEnumerated2_decode_ber, |
| 2975 | NO_IntegerEnumerated2_encode_der, |
| 2976 | NO_IntegerEnumerated2_decode_xer, |
| 2977 | NO_IntegerEnumerated2_encode_xer, |
| 2978 | NO_IntegerEnumerated2_decode_uper, |
vlm | b1b193e | 2006-08-18 01:46:46 +0000 | [diff] [blame] | 2979 | NO_IntegerEnumerated2_encode_uper, |
vlm | 337167e | 2005-11-26 11:25:14 +0000 | [diff] [blame] | 2980 | 0, /* Use generic outmost tag fetcher */ |
| 2981 | asn_DEF_NO_IntegerEnumerated2_tags_1, |
| 2982 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 2983 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
| 2984 | asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */ |
| 2985 | sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1) |
| 2986 | /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */ |
| 2987 | 0, /* No PER visible constraints */ |
| 2988 | 0, 0, /* Defined elsewhere */ |
| 2989 | 0 /* No specifics */ |
| 2990 | }; |
| 2991 | |