Debian Codegraph @

tests/90-cond-int-type-OK.asn1.-Pgen-PER

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