blob: aae3b12636f2a4cde8f69f9007e695acff123676 [file] [log] [blame]
vlm75b3a532005-08-14 02:18:27 +00001
2/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
3
4#include <INTEGER.h>
5
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
8typedef INTEGER_t CN_IntegerUnlimited_t;
9
10/*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/
11
12extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited;
13asn_struct_free_f CN_IntegerUnlimited_free;
14asn_struct_print_f CN_IntegerUnlimited_print;
15asn_constr_check_f CN_IntegerUnlimited_constraint;
16ber_type_decoder_f CN_IntegerUnlimited_decode_ber;
17der_type_encoder_f CN_IntegerUnlimited_encode_der;
18xer_type_decoder_f CN_IntegerUnlimited_decode_xer;
19xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
20
21/*** <<< CODE [CN-IntegerUnlimited] >>> ***/
22
23int
24CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
25 asn_app_consume_bytes_f *app_errlog, void *app_key) {
26 /* Replace with underlying type checker */
27 td->check_constraints = asn_DEF_INTEGER.check_constraints;
28 return td->check_constraints(td, sptr, app_errlog, app_key);
29}
30
31/*
32 * This type is implemented using INTEGER,
33 * so here we adjust the DEF accordingly.
34 */
35static void
36CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
37 td->free_struct = asn_DEF_INTEGER.free_struct;
38 td->print_struct = asn_DEF_INTEGER.print_struct;
39 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
40 td->der_encoder = asn_DEF_INTEGER.der_encoder;
41 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
42 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +000043 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
44 if(!td->per_constraints)
45 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +000046 td->elements = asn_DEF_INTEGER.elements;
47 td->elements_count = asn_DEF_INTEGER.elements_count;
48 td->specifics = asn_DEF_INTEGER.specifics;
49}
50
51void
52CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
53 void *struct_ptr, int contents_only) {
54 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
55 td->free_struct(td, struct_ptr, contents_only);
56}
57
58int
59CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
60 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
61 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
62 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
63}
64
65asn_dec_rval_t
66CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
67 void **structure, const void *bufptr, size_t size, int tag_mode) {
68 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
69 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
70}
71
72asn_enc_rval_t
73CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
74 void *structure, int tag_mode, ber_tlv_tag_t tag,
75 asn_app_consume_bytes_f *cb, void *app_key) {
76 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
77 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
78}
79
80asn_dec_rval_t
81CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
82 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
83 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
84 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
85}
86
87asn_enc_rval_t
88CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
89 int ilevel, enum xer_encoder_flags_e flags,
90 asn_app_consume_bytes_f *cb, void *app_key) {
91 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
92 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
93}
94
95
96/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
97
vlm337167e2005-11-26 11:25:14 +000098static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +000099 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
100};
101asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
102 "CN-IntegerUnlimited",
103 "CN-IntegerUnlimited",
104 CN_IntegerUnlimited_free,
105 CN_IntegerUnlimited_print,
106 CN_IntegerUnlimited_constraint,
107 CN_IntegerUnlimited_decode_ber,
108 CN_IntegerUnlimited_encode_der,
109 CN_IntegerUnlimited_decode_xer,
110 CN_IntegerUnlimited_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000111 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000112 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000113 asn_DEF_CN_IntegerUnlimited_tags_1,
114 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
115 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
116 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
117 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
118 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
119 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000120 0, 0, /* No members */
121 0 /* No specifics */
122};
123
124
125/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
126
127#include <INTEGER.h>
128
129/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
130
131typedef INTEGER_t CN_IntegerMinMax_t;
132
133/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
134
135extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
136asn_struct_free_f CN_IntegerMinMax_free;
137asn_struct_print_f CN_IntegerMinMax_print;
138asn_constr_check_f CN_IntegerMinMax_constraint;
139ber_type_decoder_f CN_IntegerMinMax_decode_ber;
140der_type_encoder_f CN_IntegerMinMax_encode_der;
141xer_type_decoder_f CN_IntegerMinMax_decode_xer;
142xer_type_encoder_f CN_IntegerMinMax_encode_xer;
143
144/*** <<< CODE [CN-IntegerMinMax] >>> ***/
145
146int
147CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
148 asn_app_consume_bytes_f *app_errlog, void *app_key) {
149 const INTEGER_t *st = (const INTEGER_t *)sptr;
150
151 if(!sptr) {
152 _ASN_ERRLOG(app_errlog, app_key,
153 "%s: value not given (%s:%d)",
154 td->name, __FILE__, __LINE__);
155 return -1;
156 }
157
158
159 if(1 /* No applicable constraints whatsoever */) {
160 /* Nothing is here. See below */
161 }
162
163 /* Replace with underlying type checker */
164 td->check_constraints = asn_DEF_INTEGER.check_constraints;
165 return td->check_constraints(td, sptr, app_errlog, app_key);
166}
167
168/*
169 * This type is implemented using INTEGER,
170 * so here we adjust the DEF accordingly.
171 */
172static void
173CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
174 td->free_struct = asn_DEF_INTEGER.free_struct;
175 td->print_struct = asn_DEF_INTEGER.print_struct;
176 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
177 td->der_encoder = asn_DEF_INTEGER.der_encoder;
178 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
179 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000180 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
181 if(!td->per_constraints)
182 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000183 td->elements = asn_DEF_INTEGER.elements;
184 td->elements_count = asn_DEF_INTEGER.elements_count;
185 td->specifics = asn_DEF_INTEGER.specifics;
186}
187
188void
189CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
190 void *struct_ptr, int contents_only) {
191 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
192 td->free_struct(td, struct_ptr, contents_only);
193}
194
195int
196CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
197 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
198 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
199 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
200}
201
202asn_dec_rval_t
203CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
204 void **structure, const void *bufptr, size_t size, int tag_mode) {
205 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
206 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
207}
208
209asn_enc_rval_t
210CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
211 void *structure, int tag_mode, ber_tlv_tag_t tag,
212 asn_app_consume_bytes_f *cb, void *app_key) {
213 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
214 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
215}
216
217asn_dec_rval_t
218CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
219 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
220 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
221 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
222}
223
224asn_enc_rval_t
225CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
226 int ilevel, enum xer_encoder_flags_e flags,
227 asn_app_consume_bytes_f *cb, void *app_key) {
228 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
229 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
230}
231
232
233/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
234
vlm337167e2005-11-26 11:25:14 +0000235static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000236 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
237};
238asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
239 "CN-IntegerMinMax",
240 "CN-IntegerMinMax",
241 CN_IntegerMinMax_free,
242 CN_IntegerMinMax_print,
243 CN_IntegerMinMax_constraint,
244 CN_IntegerMinMax_decode_ber,
245 CN_IntegerMinMax_encode_der,
246 CN_IntegerMinMax_decode_xer,
247 CN_IntegerMinMax_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000248 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000249 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000250 asn_DEF_CN_IntegerMinMax_tags_1,
251 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
252 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
253 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
254 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
255 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
256 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000257 0, 0, /* No members */
258 0 /* No specifics */
259};
260
261
262/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
263
264#include <INTEGER.h>
265
266/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
267
268typedef INTEGER_t CN_IntegerMinLow_t;
269
270/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
271
272extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
273asn_struct_free_f CN_IntegerMinLow_free;
274asn_struct_print_f CN_IntegerMinLow_print;
275asn_constr_check_f CN_IntegerMinLow_constraint;
276ber_type_decoder_f CN_IntegerMinLow_decode_ber;
277der_type_encoder_f CN_IntegerMinLow_encode_der;
278xer_type_decoder_f CN_IntegerMinLow_decode_xer;
279xer_type_encoder_f CN_IntegerMinLow_encode_xer;
280
281/*** <<< CODE [CN-IntegerMinLow] >>> ***/
282
283int
284CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
285 asn_app_consume_bytes_f *app_errlog, void *app_key) {
286 const INTEGER_t *st = (const INTEGER_t *)sptr;
287 long value;
288
289 if(!sptr) {
290 _ASN_ERRLOG(app_errlog, app_key,
291 "%s: value not given (%s:%d)",
292 td->name, __FILE__, __LINE__);
293 return -1;
294 }
295
296 if(asn_INTEGER2long(st, &value)) {
297 _ASN_ERRLOG(app_errlog, app_key,
298 "%s: value too large (%s:%d)",
299 td->name, __FILE__, __LINE__);
300 return -1;
301 }
302
303 if((value <= 1)) {
304 /* Constraint check succeeded */
305 return 0;
306 } else {
307 _ASN_ERRLOG(app_errlog, app_key,
308 "%s: constraint failed (%s:%d)",
309 td->name, __FILE__, __LINE__);
310 return -1;
311 }
312}
313
314/*
315 * This type is implemented using INTEGER,
316 * so here we adjust the DEF accordingly.
317 */
318static void
319CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
320 td->free_struct = asn_DEF_INTEGER.free_struct;
321 td->print_struct = asn_DEF_INTEGER.print_struct;
322 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
323 td->der_encoder = asn_DEF_INTEGER.der_encoder;
324 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
325 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000326 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
327 if(!td->per_constraints)
328 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000329 td->elements = asn_DEF_INTEGER.elements;
330 td->elements_count = asn_DEF_INTEGER.elements_count;
331 td->specifics = asn_DEF_INTEGER.specifics;
332}
333
334void
335CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
336 void *struct_ptr, int contents_only) {
337 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
338 td->free_struct(td, struct_ptr, contents_only);
339}
340
341int
342CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
343 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
344 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
345 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
346}
347
348asn_dec_rval_t
349CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
350 void **structure, const void *bufptr, size_t size, int tag_mode) {
351 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
352 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
353}
354
355asn_enc_rval_t
356CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
357 void *structure, int tag_mode, ber_tlv_tag_t tag,
358 asn_app_consume_bytes_f *cb, void *app_key) {
359 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
360 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
361}
362
363asn_dec_rval_t
364CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
365 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
366 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
367 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
368}
369
370asn_enc_rval_t
371CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
372 int ilevel, enum xer_encoder_flags_e flags,
373 asn_app_consume_bytes_f *cb, void *app_key) {
374 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
375 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
376}
377
378
379/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
380
vlm337167e2005-11-26 11:25:14 +0000381static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000382 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
383};
384asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
385 "CN-IntegerMinLow",
386 "CN-IntegerMinLow",
387 CN_IntegerMinLow_free,
388 CN_IntegerMinLow_print,
389 CN_IntegerMinLow_constraint,
390 CN_IntegerMinLow_decode_ber,
391 CN_IntegerMinLow_encode_der,
392 CN_IntegerMinLow_decode_xer,
393 CN_IntegerMinLow_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000394 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000395 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000396 asn_DEF_CN_IntegerMinLow_tags_1,
397 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
398 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
399 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
400 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
401 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
402 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000403 0, 0, /* No members */
404 0 /* No specifics */
405};
406
407
408/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
409
410#include <INTEGER.h>
411
412/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
413
414typedef INTEGER_t NO_IntegerMinHigh_t;
415
416/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
417
418extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
419asn_struct_free_f NO_IntegerMinHigh_free;
420asn_struct_print_f NO_IntegerMinHigh_print;
421asn_constr_check_f NO_IntegerMinHigh_constraint;
422ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
423der_type_encoder_f NO_IntegerMinHigh_encode_der;
424xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
425xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
426
427/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
428
429int
430NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
431 asn_app_consume_bytes_f *app_errlog, void *app_key) {
432 const INTEGER_t *st = (const INTEGER_t *)sptr;
433 long value;
434
435 if(!sptr) {
436 _ASN_ERRLOG(app_errlog, app_key,
437 "%s: value not given (%s:%d)",
438 td->name, __FILE__, __LINE__);
439 return -1;
440 }
441
442 if(asn_INTEGER2long(st, &value)) {
443 _ASN_ERRLOG(app_errlog, app_key,
444 "%s: value too large (%s:%d)",
445 td->name, __FILE__, __LINE__);
446 return -1;
447 }
448
vlma33a2162005-08-14 02:40:04 +0000449 if((value <= 3000000000)) {
vlm75b3a532005-08-14 02:18:27 +0000450 /* Constraint check succeeded */
451 return 0;
452 } else {
453 _ASN_ERRLOG(app_errlog, app_key,
454 "%s: constraint failed (%s:%d)",
455 td->name, __FILE__, __LINE__);
456 return -1;
457 }
458}
459
460/*
461 * This type is implemented using INTEGER,
462 * so here we adjust the DEF accordingly.
463 */
464static void
465NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
466 td->free_struct = asn_DEF_INTEGER.free_struct;
467 td->print_struct = asn_DEF_INTEGER.print_struct;
468 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
469 td->der_encoder = asn_DEF_INTEGER.der_encoder;
470 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
471 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000472 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
473 if(!td->per_constraints)
474 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000475 td->elements = asn_DEF_INTEGER.elements;
476 td->elements_count = asn_DEF_INTEGER.elements_count;
477 td->specifics = asn_DEF_INTEGER.specifics;
478}
479
480void
481NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
482 void *struct_ptr, int contents_only) {
483 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
484 td->free_struct(td, struct_ptr, contents_only);
485}
486
487int
488NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
489 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
490 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
491 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
492}
493
494asn_dec_rval_t
495NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
496 void **structure, const void *bufptr, size_t size, int tag_mode) {
497 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
498 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
499}
500
501asn_enc_rval_t
502NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
503 void *structure, int tag_mode, ber_tlv_tag_t tag,
504 asn_app_consume_bytes_f *cb, void *app_key) {
505 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
506 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
507}
508
509asn_dec_rval_t
510NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
511 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
512 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
513 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
514}
515
516asn_enc_rval_t
517NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
518 int ilevel, enum xer_encoder_flags_e flags,
519 asn_app_consume_bytes_f *cb, void *app_key) {
520 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
521 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
522}
523
524
525/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
526
vlm337167e2005-11-26 11:25:14 +0000527static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000528 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
529};
530asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
531 "NO-IntegerMinHigh",
532 "NO-IntegerMinHigh",
533 NO_IntegerMinHigh_free,
534 NO_IntegerMinHigh_print,
535 NO_IntegerMinHigh_constraint,
536 NO_IntegerMinHigh_decode_ber,
537 NO_IntegerMinHigh_encode_der,
538 NO_IntegerMinHigh_decode_xer,
539 NO_IntegerMinHigh_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000540 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000541 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000542 asn_DEF_NO_IntegerMinHigh_tags_1,
543 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
544 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
545 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
546 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
547 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
548 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000549 0, 0, /* No members */
550 0 /* No specifics */
551};
552
553
554/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
555
556#include <INTEGER.h>
557
558/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
559
560typedef INTEGER_t NO_IntegerLowHigh_t;
561
562/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
563
564extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
565asn_struct_free_f NO_IntegerLowHigh_free;
566asn_struct_print_f NO_IntegerLowHigh_print;
567asn_constr_check_f NO_IntegerLowHigh_constraint;
568ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
569der_type_encoder_f NO_IntegerLowHigh_encode_der;
570xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
571xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
572
573/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
574
575int
576NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
577 asn_app_consume_bytes_f *app_errlog, void *app_key) {
578 const INTEGER_t *st = (const INTEGER_t *)sptr;
579 long value;
580
581 if(!sptr) {
582 _ASN_ERRLOG(app_errlog, app_key,
583 "%s: value not given (%s:%d)",
584 td->name, __FILE__, __LINE__);
585 return -1;
586 }
587
588 if(asn_INTEGER2long(st, &value)) {
589 _ASN_ERRLOG(app_errlog, app_key,
590 "%s: value too large (%s:%d)",
591 td->name, __FILE__, __LINE__);
592 return -1;
593 }
594
vlma33a2162005-08-14 02:40:04 +0000595 if((value >= 1 && value <= 3000000000)) {
vlm75b3a532005-08-14 02:18:27 +0000596 /* Constraint check succeeded */
597 return 0;
598 } else {
599 _ASN_ERRLOG(app_errlog, app_key,
600 "%s: constraint failed (%s:%d)",
601 td->name, __FILE__, __LINE__);
602 return -1;
603 }
604}
605
606/*
607 * This type is implemented using INTEGER,
608 * so here we adjust the DEF accordingly.
609 */
610static void
611NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
612 td->free_struct = asn_DEF_INTEGER.free_struct;
613 td->print_struct = asn_DEF_INTEGER.print_struct;
614 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
615 td->der_encoder = asn_DEF_INTEGER.der_encoder;
616 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
617 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000618 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
619 if(!td->per_constraints)
620 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000621 td->elements = asn_DEF_INTEGER.elements;
622 td->elements_count = asn_DEF_INTEGER.elements_count;
623 td->specifics = asn_DEF_INTEGER.specifics;
624}
625
626void
627NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
628 void *struct_ptr, int contents_only) {
629 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
630 td->free_struct(td, struct_ptr, contents_only);
631}
632
633int
634NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
635 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
636 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
637 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
638}
639
640asn_dec_rval_t
641NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
642 void **structure, const void *bufptr, size_t size, int tag_mode) {
643 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
644 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
645}
646
647asn_enc_rval_t
648NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
649 void *structure, int tag_mode, ber_tlv_tag_t tag,
650 asn_app_consume_bytes_f *cb, void *app_key) {
651 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
652 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
653}
654
655asn_dec_rval_t
656NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
657 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
658 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
659 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
660}
661
662asn_enc_rval_t
663NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
664 int ilevel, enum xer_encoder_flags_e flags,
665 asn_app_consume_bytes_f *cb, void *app_key) {
666 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
667 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
668}
669
670
671/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
672
vlm337167e2005-11-26 11:25:14 +0000673static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000674 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
675};
676asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
677 "NO-IntegerLowHigh",
678 "NO-IntegerLowHigh",
679 NO_IntegerLowHigh_free,
680 NO_IntegerLowHigh_print,
681 NO_IntegerLowHigh_constraint,
682 NO_IntegerLowHigh_decode_ber,
683 NO_IntegerLowHigh_encode_der,
684 NO_IntegerLowHigh_decode_xer,
685 NO_IntegerLowHigh_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000686 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000687 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000688 asn_DEF_NO_IntegerLowHigh_tags_1,
689 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
690 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
691 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
692 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
693 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
694 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000695 0, 0, /* No members */
696 0 /* No specifics */
697};
698
699
700/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
701
702#include <INTEGER.h>
703
704/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
705
706typedef INTEGER_t CN_IntegerLowMax_t;
707
708/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
709
710extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
711asn_struct_free_f CN_IntegerLowMax_free;
712asn_struct_print_f CN_IntegerLowMax_print;
713asn_constr_check_f CN_IntegerLowMax_constraint;
714ber_type_decoder_f CN_IntegerLowMax_decode_ber;
715der_type_encoder_f CN_IntegerLowMax_encode_der;
716xer_type_decoder_f CN_IntegerLowMax_decode_xer;
717xer_type_encoder_f CN_IntegerLowMax_encode_xer;
718
719/*** <<< CODE [CN-IntegerLowMax] >>> ***/
720
721int
722CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
723 asn_app_consume_bytes_f *app_errlog, void *app_key) {
724 const INTEGER_t *st = (const INTEGER_t *)sptr;
725 long value;
726
727 if(!sptr) {
728 _ASN_ERRLOG(app_errlog, app_key,
729 "%s: value not given (%s:%d)",
730 td->name, __FILE__, __LINE__);
731 return -1;
732 }
733
734 if(asn_INTEGER2long(st, &value)) {
735 _ASN_ERRLOG(app_errlog, app_key,
736 "%s: value too large (%s:%d)",
737 td->name, __FILE__, __LINE__);
738 return -1;
739 }
740
741 if((value >= 1)) {
742 /* Constraint check succeeded */
743 return 0;
744 } else {
745 _ASN_ERRLOG(app_errlog, app_key,
746 "%s: constraint failed (%s:%d)",
747 td->name, __FILE__, __LINE__);
748 return -1;
749 }
750}
751
752/*
753 * This type is implemented using INTEGER,
754 * so here we adjust the DEF accordingly.
755 */
756static void
757CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
758 td->free_struct = asn_DEF_INTEGER.free_struct;
759 td->print_struct = asn_DEF_INTEGER.print_struct;
760 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
761 td->der_encoder = asn_DEF_INTEGER.der_encoder;
762 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
763 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000764 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
765 if(!td->per_constraints)
766 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000767 td->elements = asn_DEF_INTEGER.elements;
768 td->elements_count = asn_DEF_INTEGER.elements_count;
769 td->specifics = asn_DEF_INTEGER.specifics;
770}
771
772void
773CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
774 void *struct_ptr, int contents_only) {
775 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
776 td->free_struct(td, struct_ptr, contents_only);
777}
778
779int
780CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
781 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
782 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
783 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
784}
785
786asn_dec_rval_t
787CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
788 void **structure, const void *bufptr, size_t size, int tag_mode) {
789 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
790 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
791}
792
793asn_enc_rval_t
794CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
795 void *structure, int tag_mode, ber_tlv_tag_t tag,
796 asn_app_consume_bytes_f *cb, void *app_key) {
797 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
798 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
799}
800
801asn_dec_rval_t
802CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
803 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
804 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
805 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
806}
807
808asn_enc_rval_t
809CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
810 int ilevel, enum xer_encoder_flags_e flags,
811 asn_app_consume_bytes_f *cb, void *app_key) {
812 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
813 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
814}
815
816
817/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
818
vlm337167e2005-11-26 11:25:14 +0000819static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000820 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
821};
822asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
823 "CN-IntegerLowMax",
824 "CN-IntegerLowMax",
825 CN_IntegerLowMax_free,
826 CN_IntegerLowMax_print,
827 CN_IntegerLowMax_constraint,
828 CN_IntegerLowMax_decode_ber,
829 CN_IntegerLowMax_encode_der,
830 CN_IntegerLowMax_decode_xer,
831 CN_IntegerLowMax_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000832 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000833 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000834 asn_DEF_CN_IntegerLowMax_tags_1,
835 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
836 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
837 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
838 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
839 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
840 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000841 0, 0, /* No members */
842 0 /* No specifics */
843};
844
845
846/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
847
848#include <INTEGER.h>
849
850/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
851
852typedef INTEGER_t NO_IntegerHighMax_t;
853
854/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
855
856extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
857asn_struct_free_f NO_IntegerHighMax_free;
858asn_struct_print_f NO_IntegerHighMax_print;
859asn_constr_check_f NO_IntegerHighMax_constraint;
860ber_type_decoder_f NO_IntegerHighMax_decode_ber;
861der_type_encoder_f NO_IntegerHighMax_encode_der;
862xer_type_decoder_f NO_IntegerHighMax_decode_xer;
863xer_type_encoder_f NO_IntegerHighMax_encode_xer;
864
865/*** <<< CODE [NO-IntegerHighMax] >>> ***/
866
867int
868NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
869 asn_app_consume_bytes_f *app_errlog, void *app_key) {
870 const INTEGER_t *st = (const INTEGER_t *)sptr;
871 long value;
872
873 if(!sptr) {
874 _ASN_ERRLOG(app_errlog, app_key,
875 "%s: value not given (%s:%d)",
876 td->name, __FILE__, __LINE__);
877 return -1;
878 }
879
880 if(asn_INTEGER2long(st, &value)) {
881 _ASN_ERRLOG(app_errlog, app_key,
882 "%s: value too large (%s:%d)",
883 td->name, __FILE__, __LINE__);
884 return -1;
885 }
886
vlma33a2162005-08-14 02:40:04 +0000887 if((value >= 3000000000)) {
vlm75b3a532005-08-14 02:18:27 +0000888 /* Constraint check succeeded */
889 return 0;
890 } else {
891 _ASN_ERRLOG(app_errlog, app_key,
892 "%s: constraint failed (%s:%d)",
893 td->name, __FILE__, __LINE__);
894 return -1;
895 }
896}
897
898/*
899 * This type is implemented using INTEGER,
900 * so here we adjust the DEF accordingly.
901 */
902static void
903NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
904 td->free_struct = asn_DEF_INTEGER.free_struct;
905 td->print_struct = asn_DEF_INTEGER.print_struct;
906 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
907 td->der_encoder = asn_DEF_INTEGER.der_encoder;
908 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
909 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +0000910 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
911 if(!td->per_constraints)
912 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +0000913 td->elements = asn_DEF_INTEGER.elements;
914 td->elements_count = asn_DEF_INTEGER.elements_count;
915 td->specifics = asn_DEF_INTEGER.specifics;
916}
917
918void
919NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
920 void *struct_ptr, int contents_only) {
921 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
922 td->free_struct(td, struct_ptr, contents_only);
923}
924
925int
926NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
927 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
928 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
929 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
930}
931
932asn_dec_rval_t
933NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
934 void **structure, const void *bufptr, size_t size, int tag_mode) {
935 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
936 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
937}
938
939asn_enc_rval_t
940NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
941 void *structure, int tag_mode, ber_tlv_tag_t tag,
942 asn_app_consume_bytes_f *cb, void *app_key) {
943 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
944 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
945}
946
947asn_dec_rval_t
948NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
949 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
950 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
951 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
952}
953
954asn_enc_rval_t
955NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
956 int ilevel, enum xer_encoder_flags_e flags,
957 asn_app_consume_bytes_f *cb, void *app_key) {
958 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
959 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
960}
961
962
963/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
964
vlm337167e2005-11-26 11:25:14 +0000965static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +0000966 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
967};
968asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
969 "NO-IntegerHighMax",
970 "NO-IntegerHighMax",
971 NO_IntegerHighMax_free,
972 NO_IntegerHighMax_print,
973 NO_IntegerHighMax_constraint,
974 NO_IntegerHighMax_decode_ber,
975 NO_IntegerHighMax_encode_der,
976 NO_IntegerHighMax_decode_xer,
977 NO_IntegerHighMax_encode_xer,
vlm337167e2005-11-26 11:25:14 +0000978 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +0000979 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +0000980 asn_DEF_NO_IntegerHighMax_tags_1,
981 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
982 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
983 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
984 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
985 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
986 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +0000987 0, 0, /* No members */
988 0 /* No specifics */
989};
990
991
992/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
993
994#include <INTEGER.h>
995
996/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
997
998typedef INTEGER_t NO_IntegerLowestMax_t;
999
1000/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1001
1002extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1003asn_struct_free_f NO_IntegerLowestMax_free;
1004asn_struct_print_f NO_IntegerLowestMax_print;
1005asn_constr_check_f NO_IntegerLowestMax_constraint;
1006ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1007der_type_encoder_f NO_IntegerLowestMax_encode_der;
1008xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1009xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1010
1011/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1012
1013int
1014NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1015 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1016 const INTEGER_t *st = (const INTEGER_t *)sptr;
1017 long value;
1018
1019 if(!sptr) {
1020 _ASN_ERRLOG(app_errlog, app_key,
1021 "%s: value not given (%s:%d)",
1022 td->name, __FILE__, __LINE__);
1023 return -1;
1024 }
1025
1026 if(asn_INTEGER2long(st, &value)) {
1027 _ASN_ERRLOG(app_errlog, app_key,
1028 "%s: value too large (%s:%d)",
1029 td->name, __FILE__, __LINE__);
1030 return -1;
1031 }
1032
vlma33a2162005-08-14 02:40:04 +00001033 if((value >= -3000000000)) {
vlm75b3a532005-08-14 02:18:27 +00001034 /* Constraint check succeeded */
1035 return 0;
1036 } else {
1037 _ASN_ERRLOG(app_errlog, app_key,
1038 "%s: constraint failed (%s:%d)",
1039 td->name, __FILE__, __LINE__);
1040 return -1;
1041 }
1042}
1043
1044/*
1045 * This type is implemented using INTEGER,
1046 * so here we adjust the DEF accordingly.
1047 */
1048static void
1049NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1050 td->free_struct = asn_DEF_INTEGER.free_struct;
1051 td->print_struct = asn_DEF_INTEGER.print_struct;
1052 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1053 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1054 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1055 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001056 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
1057 if(!td->per_constraints)
1058 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +00001059 td->elements = asn_DEF_INTEGER.elements;
1060 td->elements_count = asn_DEF_INTEGER.elements_count;
1061 td->specifics = asn_DEF_INTEGER.specifics;
1062}
1063
1064void
1065NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1066 void *struct_ptr, int contents_only) {
1067 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1068 td->free_struct(td, struct_ptr, contents_only);
1069}
1070
1071int
1072NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1073 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1074 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1075 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1076}
1077
1078asn_dec_rval_t
1079NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1080 void **structure, const void *bufptr, size_t size, int tag_mode) {
1081 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1082 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1083}
1084
1085asn_enc_rval_t
1086NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1087 void *structure, int tag_mode, ber_tlv_tag_t tag,
1088 asn_app_consume_bytes_f *cb, void *app_key) {
1089 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1090 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1091}
1092
1093asn_dec_rval_t
1094NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1095 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1096 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1097 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1098}
1099
1100asn_enc_rval_t
1101NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1102 int ilevel, enum xer_encoder_flags_e flags,
1103 asn_app_consume_bytes_f *cb, void *app_key) {
1104 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1105 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1106}
1107
1108
1109/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1110
vlm337167e2005-11-26 11:25:14 +00001111static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001112 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1113};
1114asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1115 "NO-IntegerLowestMax",
1116 "NO-IntegerLowestMax",
1117 NO_IntegerLowestMax_free,
1118 NO_IntegerLowestMax_print,
1119 NO_IntegerLowestMax_constraint,
1120 NO_IntegerLowestMax_decode_ber,
1121 NO_IntegerLowestMax_encode_der,
1122 NO_IntegerLowestMax_decode_xer,
1123 NO_IntegerLowestMax_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001124 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001125 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001126 asn_DEF_NO_IntegerLowestMax_tags_1,
1127 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1128 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1129 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1130 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1131 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1132 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001133 0, 0, /* No members */
1134 0 /* No specifics */
1135};
1136
1137
1138/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1139
1140#include <INTEGER.h>
1141
1142/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1143
1144typedef INTEGER_t NO_IntegerOutRange_t;
1145
1146/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1147
1148extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1149asn_struct_free_f NO_IntegerOutRange_free;
1150asn_struct_print_f NO_IntegerOutRange_print;
1151asn_constr_check_f NO_IntegerOutRange_constraint;
1152ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1153der_type_encoder_f NO_IntegerOutRange_encode_der;
1154xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1155xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1156
1157/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1158
1159int
1160NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1161 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1162 const INTEGER_t *st = (const INTEGER_t *)sptr;
1163 long value;
1164
1165 if(!sptr) {
1166 _ASN_ERRLOG(app_errlog, app_key,
1167 "%s: value not given (%s:%d)",
1168 td->name, __FILE__, __LINE__);
1169 return -1;
1170 }
1171
1172 if(asn_INTEGER2long(st, &value)) {
1173 _ASN_ERRLOG(app_errlog, app_key,
1174 "%s: value too large (%s:%d)",
1175 td->name, __FILE__, __LINE__);
1176 return -1;
1177 }
1178
vlma33a2162005-08-14 02:40:04 +00001179 if((value >= 3000000000 && value <= 3000000001)) {
vlm75b3a532005-08-14 02:18:27 +00001180 /* Constraint check succeeded */
1181 return 0;
1182 } else {
1183 _ASN_ERRLOG(app_errlog, app_key,
1184 "%s: constraint failed (%s:%d)",
1185 td->name, __FILE__, __LINE__);
1186 return -1;
1187 }
1188}
1189
1190/*
1191 * This type is implemented using INTEGER,
1192 * so here we adjust the DEF accordingly.
1193 */
1194static void
1195NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1196 td->free_struct = asn_DEF_INTEGER.free_struct;
1197 td->print_struct = asn_DEF_INTEGER.print_struct;
1198 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1199 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1200 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1201 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001202 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
1203 if(!td->per_constraints)
1204 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +00001205 td->elements = asn_DEF_INTEGER.elements;
1206 td->elements_count = asn_DEF_INTEGER.elements_count;
1207 td->specifics = asn_DEF_INTEGER.specifics;
1208}
1209
1210void
1211NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1212 void *struct_ptr, int contents_only) {
1213 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1214 td->free_struct(td, struct_ptr, contents_only);
1215}
1216
1217int
1218NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1219 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1220 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1221 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1222}
1223
1224asn_dec_rval_t
1225NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1226 void **structure, const void *bufptr, size_t size, int tag_mode) {
1227 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1228 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1229}
1230
1231asn_enc_rval_t
1232NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1233 void *structure, int tag_mode, ber_tlv_tag_t tag,
1234 asn_app_consume_bytes_f *cb, void *app_key) {
1235 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1236 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1237}
1238
1239asn_dec_rval_t
1240NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1241 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1242 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1243 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1244}
1245
1246asn_enc_rval_t
1247NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1248 int ilevel, enum xer_encoder_flags_e flags,
1249 asn_app_consume_bytes_f *cb, void *app_key) {
1250 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1251 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1252}
1253
1254
1255/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1256
vlm337167e2005-11-26 11:25:14 +00001257static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001258 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1259};
1260asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1261 "NO-IntegerOutRange",
1262 "NO-IntegerOutRange",
1263 NO_IntegerOutRange_free,
1264 NO_IntegerOutRange_print,
1265 NO_IntegerOutRange_constraint,
1266 NO_IntegerOutRange_decode_ber,
1267 NO_IntegerOutRange_encode_der,
1268 NO_IntegerOutRange_decode_xer,
1269 NO_IntegerOutRange_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001270 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001271 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001272 asn_DEF_NO_IntegerOutRange_tags_1,
1273 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1274 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1275 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1276 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1277 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1278 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001279 0, 0, /* No members */
1280 0 /* No specifics */
1281};
1282
1283
1284/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1285
1286#include <INTEGER.h>
1287
1288/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1289
1290typedef INTEGER_t NO_IntegerOutValue_t;
1291
1292/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1293
1294extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1295asn_struct_free_f NO_IntegerOutValue_free;
1296asn_struct_print_f NO_IntegerOutValue_print;
1297asn_constr_check_f NO_IntegerOutValue_constraint;
1298ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1299der_type_encoder_f NO_IntegerOutValue_encode_der;
1300xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1301xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1302
1303/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1304
1305int
1306NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1307 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1308 const INTEGER_t *st = (const INTEGER_t *)sptr;
1309 long value;
1310
1311 if(!sptr) {
1312 _ASN_ERRLOG(app_errlog, app_key,
1313 "%s: value not given (%s:%d)",
1314 td->name, __FILE__, __LINE__);
1315 return -1;
1316 }
1317
1318 if(asn_INTEGER2long(st, &value)) {
1319 _ASN_ERRLOG(app_errlog, app_key,
1320 "%s: value too large (%s:%d)",
1321 td->name, __FILE__, __LINE__);
1322 return -1;
1323 }
1324
vlma33a2162005-08-14 02:40:04 +00001325 if((value == 3000000000)) {
vlm75b3a532005-08-14 02:18:27 +00001326 /* Constraint check succeeded */
1327 return 0;
1328 } else {
1329 _ASN_ERRLOG(app_errlog, app_key,
1330 "%s: constraint failed (%s:%d)",
1331 td->name, __FILE__, __LINE__);
1332 return -1;
1333 }
1334}
1335
1336/*
1337 * This type is implemented using INTEGER,
1338 * so here we adjust the DEF accordingly.
1339 */
1340static void
1341NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1342 td->free_struct = asn_DEF_INTEGER.free_struct;
1343 td->print_struct = asn_DEF_INTEGER.print_struct;
1344 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1345 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1346 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1347 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001348 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
1349 if(!td->per_constraints)
1350 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +00001351 td->elements = asn_DEF_INTEGER.elements;
1352 td->elements_count = asn_DEF_INTEGER.elements_count;
1353 td->specifics = asn_DEF_INTEGER.specifics;
1354}
1355
1356void
1357NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1358 void *struct_ptr, int contents_only) {
1359 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1360 td->free_struct(td, struct_ptr, contents_only);
1361}
1362
1363int
1364NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1365 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1366 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1367 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1368}
1369
1370asn_dec_rval_t
1371NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1372 void **structure, const void *bufptr, size_t size, int tag_mode) {
1373 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1374 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1375}
1376
1377asn_enc_rval_t
1378NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1379 void *structure, int tag_mode, ber_tlv_tag_t tag,
1380 asn_app_consume_bytes_f *cb, void *app_key) {
1381 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1382 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1383}
1384
1385asn_dec_rval_t
1386NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1387 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1388 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1389 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1390}
1391
1392asn_enc_rval_t
1393NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1394 int ilevel, enum xer_encoder_flags_e flags,
1395 asn_app_consume_bytes_f *cb, void *app_key) {
1396 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1397 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1398}
1399
1400
1401/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1402
vlm337167e2005-11-26 11:25:14 +00001403static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001404 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1405};
1406asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1407 "NO-IntegerOutValue",
1408 "NO-IntegerOutValue",
1409 NO_IntegerOutValue_free,
1410 NO_IntegerOutValue_print,
1411 NO_IntegerOutValue_constraint,
1412 NO_IntegerOutValue_decode_ber,
1413 NO_IntegerOutValue_encode_der,
1414 NO_IntegerOutValue_decode_xer,
1415 NO_IntegerOutValue_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001416 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001417 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001418 asn_DEF_NO_IntegerOutValue_tags_1,
1419 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1420 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1421 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1422 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1423 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1424 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001425 0, 0, /* No members */
1426 0 /* No specifics */
1427};
1428
1429
1430/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1431
vlma33a2162005-08-14 02:40:04 +00001432#include <NativeInteger.h>
vlm75b3a532005-08-14 02:18:27 +00001433
1434/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1435
vlma33a2162005-08-14 02:40:04 +00001436typedef long OK_IntegerInRange1_t;
vlm75b3a532005-08-14 02:18:27 +00001437
1438/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1439
1440extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1441asn_struct_free_f OK_IntegerInRange1_free;
1442asn_struct_print_f OK_IntegerInRange1_print;
1443asn_constr_check_f OK_IntegerInRange1_constraint;
1444ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1445der_type_encoder_f OK_IntegerInRange1_encode_der;
1446xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1447xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1448
1449/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1450
1451int
1452OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1453 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm75b3a532005-08-14 02:18:27 +00001454 long value;
1455
1456 if(!sptr) {
1457 _ASN_ERRLOG(app_errlog, app_key,
1458 "%s: value not given (%s:%d)",
1459 td->name, __FILE__, __LINE__);
1460 return -1;
1461 }
1462
vlma33a2162005-08-14 02:40:04 +00001463 value = *(const long *)sptr;
vlm75b3a532005-08-14 02:18:27 +00001464
1465 if((value >= -100 && value <= 100)) {
1466 /* Constraint check succeeded */
1467 return 0;
1468 } else {
1469 _ASN_ERRLOG(app_errlog, app_key,
1470 "%s: constraint failed (%s:%d)",
1471 td->name, __FILE__, __LINE__);
1472 return -1;
1473 }
1474}
1475
1476/*
vlma33a2162005-08-14 02:40:04 +00001477 * This type is implemented using NativeInteger,
vlm75b3a532005-08-14 02:18:27 +00001478 * so here we adjust the DEF accordingly.
1479 */
1480static void
1481OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlma33a2162005-08-14 02:40:04 +00001482 td->free_struct = asn_DEF_NativeInteger.free_struct;
1483 td->print_struct = asn_DEF_NativeInteger.print_struct;
1484 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1485 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1486 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1487 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001488 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1489 if(!td->per_constraints)
1490 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
vlma33a2162005-08-14 02:40:04 +00001491 td->elements = asn_DEF_NativeInteger.elements;
1492 td->elements_count = asn_DEF_NativeInteger.elements_count;
1493 td->specifics = asn_DEF_NativeInteger.specifics;
vlm75b3a532005-08-14 02:18:27 +00001494}
1495
1496void
1497OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1498 void *struct_ptr, int contents_only) {
1499 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1500 td->free_struct(td, struct_ptr, contents_only);
1501}
1502
1503int
1504OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1505 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1506 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1507 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1508}
1509
1510asn_dec_rval_t
1511OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1512 void **structure, const void *bufptr, size_t size, int tag_mode) {
1513 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1514 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1515}
1516
1517asn_enc_rval_t
1518OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1519 void *structure, int tag_mode, ber_tlv_tag_t tag,
1520 asn_app_consume_bytes_f *cb, void *app_key) {
1521 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1522 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1523}
1524
1525asn_dec_rval_t
1526OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1527 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1528 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1529 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1530}
1531
1532asn_enc_rval_t
1533OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1534 int ilevel, enum xer_encoder_flags_e flags,
1535 asn_app_consume_bytes_f *cb, void *app_key) {
1536 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1537 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1538}
1539
1540
1541/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1542
vlm337167e2005-11-26 11:25:14 +00001543static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001544 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1545};
1546asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1547 "OK-IntegerInRange1",
1548 "OK-IntegerInRange1",
1549 OK_IntegerInRange1_free,
1550 OK_IntegerInRange1_print,
1551 OK_IntegerInRange1_constraint,
1552 OK_IntegerInRange1_decode_ber,
1553 OK_IntegerInRange1_encode_der,
1554 OK_IntegerInRange1_decode_xer,
1555 OK_IntegerInRange1_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001556 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001557 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001558 asn_DEF_OK_IntegerInRange1_tags_1,
1559 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1560 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1561 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1562 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1563 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1564 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001565 0, 0, /* No members */
1566 0 /* No specifics */
1567};
1568
1569
1570/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1571
vlma33a2162005-08-14 02:40:04 +00001572#include <NativeInteger.h>
vlm75b3a532005-08-14 02:18:27 +00001573
1574/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1575
vlma33a2162005-08-14 02:40:04 +00001576typedef long OK_IntegerInRange2_t;
vlm75b3a532005-08-14 02:18:27 +00001577
1578/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1579
1580extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1581asn_struct_free_f OK_IntegerInRange2_free;
1582asn_struct_print_f OK_IntegerInRange2_print;
1583asn_constr_check_f OK_IntegerInRange2_constraint;
1584ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1585der_type_encoder_f OK_IntegerInRange2_encode_der;
1586xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1587xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1588
1589/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1590
1591int
1592OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1593 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm75b3a532005-08-14 02:18:27 +00001594 long value;
1595
1596 if(!sptr) {
1597 _ASN_ERRLOG(app_errlog, app_key,
1598 "%s: value not given (%s:%d)",
1599 td->name, __FILE__, __LINE__);
1600 return -1;
1601 }
1602
vlma33a2162005-08-14 02:40:04 +00001603 value = *(const long *)sptr;
vlm75b3a532005-08-14 02:18:27 +00001604
1605 if(((value == -100) || (value == 100))) {
1606 /* Constraint check succeeded */
1607 return 0;
1608 } else {
1609 _ASN_ERRLOG(app_errlog, app_key,
1610 "%s: constraint failed (%s:%d)",
1611 td->name, __FILE__, __LINE__);
1612 return -1;
1613 }
1614}
1615
1616/*
vlma33a2162005-08-14 02:40:04 +00001617 * This type is implemented using NativeInteger,
vlm75b3a532005-08-14 02:18:27 +00001618 * so here we adjust the DEF accordingly.
1619 */
1620static void
1621OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlma33a2162005-08-14 02:40:04 +00001622 td->free_struct = asn_DEF_NativeInteger.free_struct;
1623 td->print_struct = asn_DEF_NativeInteger.print_struct;
1624 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1625 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1626 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1627 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001628 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1629 if(!td->per_constraints)
1630 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
vlma33a2162005-08-14 02:40:04 +00001631 td->elements = asn_DEF_NativeInteger.elements;
1632 td->elements_count = asn_DEF_NativeInteger.elements_count;
1633 td->specifics = asn_DEF_NativeInteger.specifics;
vlm75b3a532005-08-14 02:18:27 +00001634}
1635
1636void
1637OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1638 void *struct_ptr, int contents_only) {
1639 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1640 td->free_struct(td, struct_ptr, contents_only);
1641}
1642
1643int
1644OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1645 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1646 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1647 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1648}
1649
1650asn_dec_rval_t
1651OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1652 void **structure, const void *bufptr, size_t size, int tag_mode) {
1653 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1654 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1655}
1656
1657asn_enc_rval_t
1658OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1659 void *structure, int tag_mode, ber_tlv_tag_t tag,
1660 asn_app_consume_bytes_f *cb, void *app_key) {
1661 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1662 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1663}
1664
1665asn_dec_rval_t
1666OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1667 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1668 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1669 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1670}
1671
1672asn_enc_rval_t
1673OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1674 int ilevel, enum xer_encoder_flags_e flags,
1675 asn_app_consume_bytes_f *cb, void *app_key) {
1676 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1677 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1678}
1679
1680
1681/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1682
vlm337167e2005-11-26 11:25:14 +00001683static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001684 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1685};
1686asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1687 "OK-IntegerInRange2",
1688 "OK-IntegerInRange2",
1689 OK_IntegerInRange2_free,
1690 OK_IntegerInRange2_print,
1691 OK_IntegerInRange2_constraint,
1692 OK_IntegerInRange2_decode_ber,
1693 OK_IntegerInRange2_encode_der,
1694 OK_IntegerInRange2_decode_xer,
1695 OK_IntegerInRange2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001696 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001697 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001698 asn_DEF_OK_IntegerInRange2_tags_1,
1699 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1700 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1701 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
1702 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1703 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1704 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001705 0, 0, /* No members */
1706 0 /* No specifics */
1707};
1708
1709
1710/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
1711
vlma33a2162005-08-14 02:40:04 +00001712#include <NativeInteger.h>
vlm75b3a532005-08-14 02:18:27 +00001713
1714/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
1715
vlma33a2162005-08-14 02:40:04 +00001716typedef long OK_IntegerInRange3_t;
vlm75b3a532005-08-14 02:18:27 +00001717
1718/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
1719
1720extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
1721asn_struct_free_f OK_IntegerInRange3_free;
1722asn_struct_print_f OK_IntegerInRange3_print;
1723asn_constr_check_f OK_IntegerInRange3_constraint;
1724ber_type_decoder_f OK_IntegerInRange3_decode_ber;
1725der_type_encoder_f OK_IntegerInRange3_encode_der;
1726xer_type_decoder_f OK_IntegerInRange3_decode_xer;
1727xer_type_encoder_f OK_IntegerInRange3_encode_xer;
1728
1729/*** <<< CODE [OK-IntegerInRange3] >>> ***/
1730
1731int
1732OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1733 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm75b3a532005-08-14 02:18:27 +00001734 long value;
1735
1736 if(!sptr) {
1737 _ASN_ERRLOG(app_errlog, app_key,
1738 "%s: value not given (%s:%d)",
1739 td->name, __FILE__, __LINE__);
1740 return -1;
1741 }
1742
vlma33a2162005-08-14 02:40:04 +00001743 value = *(const long *)sptr;
vlm75b3a532005-08-14 02:18:27 +00001744
1745 if((value >= -2147483648 && value <= 2147483647)) {
1746 /* Constraint check succeeded */
1747 return 0;
1748 } else {
1749 _ASN_ERRLOG(app_errlog, app_key,
1750 "%s: constraint failed (%s:%d)",
1751 td->name, __FILE__, __LINE__);
1752 return -1;
1753 }
1754}
1755
1756/*
vlma33a2162005-08-14 02:40:04 +00001757 * This type is implemented using NativeInteger,
vlm75b3a532005-08-14 02:18:27 +00001758 * so here we adjust the DEF accordingly.
1759 */
1760static void
1761OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlma33a2162005-08-14 02:40:04 +00001762 td->free_struct = asn_DEF_NativeInteger.free_struct;
1763 td->print_struct = asn_DEF_NativeInteger.print_struct;
1764 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1765 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1766 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1767 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001768 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1769 if(!td->per_constraints)
1770 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
vlma33a2162005-08-14 02:40:04 +00001771 td->elements = asn_DEF_NativeInteger.elements;
1772 td->elements_count = asn_DEF_NativeInteger.elements_count;
1773 td->specifics = asn_DEF_NativeInteger.specifics;
vlm75b3a532005-08-14 02:18:27 +00001774}
1775
1776void
1777OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
1778 void *struct_ptr, int contents_only) {
1779 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1780 td->free_struct(td, struct_ptr, contents_only);
1781}
1782
1783int
1784OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1785 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1786 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1787 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1788}
1789
1790asn_dec_rval_t
1791OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1792 void **structure, const void *bufptr, size_t size, int tag_mode) {
1793 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1794 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1795}
1796
1797asn_enc_rval_t
1798OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
1799 void *structure, int tag_mode, ber_tlv_tag_t tag,
1800 asn_app_consume_bytes_f *cb, void *app_key) {
1801 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1802 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1803}
1804
1805asn_dec_rval_t
1806OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1807 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1808 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1809 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1810}
1811
1812asn_enc_rval_t
1813OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1814 int ilevel, enum xer_encoder_flags_e flags,
1815 asn_app_consume_bytes_f *cb, void *app_key) {
1816 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1817 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1818}
1819
1820
1821/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
1822
vlm337167e2005-11-26 11:25:14 +00001823static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001824 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1825};
1826asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
1827 "OK-IntegerInRange3",
1828 "OK-IntegerInRange3",
1829 OK_IntegerInRange3_free,
1830 OK_IntegerInRange3_print,
1831 OK_IntegerInRange3_constraint,
1832 OK_IntegerInRange3_decode_ber,
1833 OK_IntegerInRange3_encode_der,
1834 OK_IntegerInRange3_decode_xer,
1835 OK_IntegerInRange3_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001836 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001837 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001838 asn_DEF_OK_IntegerInRange3_tags_1,
1839 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1840 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1841 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
1842 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1843 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1844 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001845 0, 0, /* No members */
1846 0 /* No specifics */
1847};
1848
1849
1850/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
1851
vlma33a2162005-08-14 02:40:04 +00001852#include <NativeInteger.h>
vlm75b3a532005-08-14 02:18:27 +00001853
1854/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
1855
vlma33a2162005-08-14 02:40:04 +00001856typedef long OK_IntegerInRange4_t;
vlm75b3a532005-08-14 02:18:27 +00001857
1858/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
1859
1860extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
1861asn_struct_free_f OK_IntegerInRange4_free;
1862asn_struct_print_f OK_IntegerInRange4_print;
1863asn_constr_check_f OK_IntegerInRange4_constraint;
1864ber_type_decoder_f OK_IntegerInRange4_decode_ber;
1865der_type_encoder_f OK_IntegerInRange4_encode_der;
1866xer_type_decoder_f OK_IntegerInRange4_decode_xer;
1867xer_type_encoder_f OK_IntegerInRange4_encode_xer;
1868
1869/*** <<< CODE [OK-IntegerInRange4] >>> ***/
1870
1871int
1872OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1873 asn_app_consume_bytes_f *app_errlog, void *app_key) {
vlm75b3a532005-08-14 02:18:27 +00001874 long value;
1875
1876 if(!sptr) {
1877 _ASN_ERRLOG(app_errlog, app_key,
1878 "%s: value not given (%s:%d)",
1879 td->name, __FILE__, __LINE__);
1880 return -1;
1881 }
1882
vlma33a2162005-08-14 02:40:04 +00001883 value = *(const long *)sptr;
vlm75b3a532005-08-14 02:18:27 +00001884
1885 if(((value == -2147483648) || (value == 2147483647))) {
1886 /* Constraint check succeeded */
1887 return 0;
1888 } else {
1889 _ASN_ERRLOG(app_errlog, app_key,
1890 "%s: constraint failed (%s:%d)",
1891 td->name, __FILE__, __LINE__);
1892 return -1;
1893 }
1894}
1895
1896/*
vlma33a2162005-08-14 02:40:04 +00001897 * This type is implemented using NativeInteger,
vlm75b3a532005-08-14 02:18:27 +00001898 * so here we adjust the DEF accordingly.
1899 */
1900static void
1901OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
vlma33a2162005-08-14 02:40:04 +00001902 td->free_struct = asn_DEF_NativeInteger.free_struct;
1903 td->print_struct = asn_DEF_NativeInteger.print_struct;
1904 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1905 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1906 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1907 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00001908 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1909 if(!td->per_constraints)
1910 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
vlma33a2162005-08-14 02:40:04 +00001911 td->elements = asn_DEF_NativeInteger.elements;
1912 td->elements_count = asn_DEF_NativeInteger.elements_count;
1913 td->specifics = asn_DEF_NativeInteger.specifics;
vlm75b3a532005-08-14 02:18:27 +00001914}
1915
1916void
1917OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
1918 void *struct_ptr, int contents_only) {
1919 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1920 td->free_struct(td, struct_ptr, contents_only);
1921}
1922
1923int
1924OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1925 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1926 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1927 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1928}
1929
1930asn_dec_rval_t
1931OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1932 void **structure, const void *bufptr, size_t size, int tag_mode) {
1933 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1934 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1935}
1936
1937asn_enc_rval_t
1938OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
1939 void *structure, int tag_mode, ber_tlv_tag_t tag,
1940 asn_app_consume_bytes_f *cb, void *app_key) {
1941 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1942 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1943}
1944
1945asn_dec_rval_t
1946OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1947 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1948 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1949 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1950}
1951
1952asn_enc_rval_t
1953OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1954 int ilevel, enum xer_encoder_flags_e flags,
1955 asn_app_consume_bytes_f *cb, void *app_key) {
1956 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1957 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1958}
1959
1960
1961/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
1962
vlm337167e2005-11-26 11:25:14 +00001963static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00001964 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1965};
1966asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
1967 "OK-IntegerInRange4",
1968 "OK-IntegerInRange4",
1969 OK_IntegerInRange4_free,
1970 OK_IntegerInRange4_print,
1971 OK_IntegerInRange4_constraint,
1972 OK_IntegerInRange4_decode_ber,
1973 OK_IntegerInRange4_encode_der,
1974 OK_IntegerInRange4_decode_xer,
1975 OK_IntegerInRange4_encode_xer,
vlm337167e2005-11-26 11:25:14 +00001976 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00001977 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00001978 asn_DEF_OK_IntegerInRange4_tags_1,
1979 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1980 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1981 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
1982 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1983 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1984 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00001985 0, 0, /* No members */
1986 0 /* No specifics */
1987};
1988
1989
1990/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
1991
1992#include <INTEGER.h>
1993
1994/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
1995
1996typedef INTEGER_t OK_IntegerInRange5_t;
1997
1998/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
1999
2000extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2001asn_struct_free_f OK_IntegerInRange5_free;
2002asn_struct_print_f OK_IntegerInRange5_print;
2003asn_constr_check_f OK_IntegerInRange5_constraint;
2004ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2005der_type_encoder_f OK_IntegerInRange5_encode_der;
2006xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2007xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2008
2009/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2010
2011int
2012OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2013 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2014 const INTEGER_t *st = (const INTEGER_t *)sptr;
2015 long value;
2016
2017 if(!sptr) {
2018 _ASN_ERRLOG(app_errlog, app_key,
2019 "%s: value not given (%s:%d)",
2020 td->name, __FILE__, __LINE__);
2021 return -1;
2022 }
2023
2024 if(asn_INTEGER2long(st, &value)) {
2025 _ASN_ERRLOG(app_errlog, app_key,
2026 "%s: value too large (%s:%d)",
2027 td->name, __FILE__, __LINE__);
2028 return -1;
2029 }
2030
2031 if(((value == -2147483648) || (value == 2147483647))) {
2032 /* Constraint check succeeded */
2033 return 0;
2034 } else {
2035 _ASN_ERRLOG(app_errlog, app_key,
2036 "%s: constraint failed (%s:%d)",
2037 td->name, __FILE__, __LINE__);
2038 return -1;
2039 }
2040}
2041
2042/*
2043 * This type is implemented using INTEGER,
2044 * so here we adjust the DEF accordingly.
2045 */
2046static void
2047OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2048 td->free_struct = asn_DEF_INTEGER.free_struct;
2049 td->print_struct = asn_DEF_INTEGER.print_struct;
2050 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2051 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2052 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2053 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002054 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2055 if(!td->per_constraints)
2056 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm75b3a532005-08-14 02:18:27 +00002057 td->elements = asn_DEF_INTEGER.elements;
2058 td->elements_count = asn_DEF_INTEGER.elements_count;
2059 td->specifics = asn_DEF_INTEGER.specifics;
2060}
2061
2062void
2063OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2064 void *struct_ptr, int contents_only) {
2065 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2066 td->free_struct(td, struct_ptr, contents_only);
2067}
2068
2069int
2070OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2071 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2072 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2073 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2074}
2075
2076asn_dec_rval_t
2077OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2078 void **structure, const void *bufptr, size_t size, int tag_mode) {
2079 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2080 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2081}
2082
2083asn_enc_rval_t
2084OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2085 void *structure, int tag_mode, ber_tlv_tag_t tag,
2086 asn_app_consume_bytes_f *cb, void *app_key) {
2087 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2088 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2089}
2090
2091asn_dec_rval_t
2092OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2093 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2094 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2095 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2096}
2097
2098asn_enc_rval_t
2099OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2100 int ilevel, enum xer_encoder_flags_e flags,
2101 asn_app_consume_bytes_f *cb, void *app_key) {
2102 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2103 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2104}
2105
2106
2107/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2108
vlm337167e2005-11-26 11:25:14 +00002109static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
vlm75b3a532005-08-14 02:18:27 +00002110 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2111};
2112asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2113 "OK-IntegerInRange5",
2114 "OK-IntegerInRange5",
2115 OK_IntegerInRange5_free,
2116 OK_IntegerInRange5_print,
2117 OK_IntegerInRange5_constraint,
2118 OK_IntegerInRange5_decode_ber,
2119 OK_IntegerInRange5_encode_der,
2120 OK_IntegerInRange5_decode_xer,
2121 OK_IntegerInRange5_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002122 0, /* No PER decoder, -gen-PER to enable */
vlm75b3a532005-08-14 02:18:27 +00002123 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002124 asn_DEF_OK_IntegerInRange5_tags_1,
2125 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2126 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2127 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2128 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2129 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2130 0, /* No PER visible constraints */
vlm75b3a532005-08-14 02:18:27 +00002131 0, 0, /* No members */
2132 0 /* No specifics */
2133};
2134
vlma33a2162005-08-14 02:40:04 +00002135
vlm93023842005-08-27 03:13:51 +00002136/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2137
2138#include <INTEGER.h>
2139
2140/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2141
2142typedef INTEGER_t NO_IntegerInRange6_t;
2143
2144/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2145
2146extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2147asn_struct_free_f NO_IntegerInRange6_free;
2148asn_struct_print_f NO_IntegerInRange6_print;
2149asn_constr_check_f NO_IntegerInRange6_constraint;
2150ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2151der_type_encoder_f NO_IntegerInRange6_encode_der;
2152xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2153xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2154
2155/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2156
2157int
2158NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2159 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2160 const INTEGER_t *st = (const INTEGER_t *)sptr;
2161 long value;
2162
2163 if(!sptr) {
2164 _ASN_ERRLOG(app_errlog, app_key,
2165 "%s: value not given (%s:%d)",
2166 td->name, __FILE__, __LINE__);
2167 return -1;
2168 }
2169
2170 if(asn_INTEGER2long(st, &value)) {
2171 _ASN_ERRLOG(app_errlog, app_key,
2172 "%s: value too large (%s:%d)",
2173 td->name, __FILE__, __LINE__);
2174 return -1;
2175 }
2176
2177 if((value >= 0 && value <= 4294967295)) {
2178 /* Constraint check succeeded */
2179 return 0;
2180 } else {
2181 _ASN_ERRLOG(app_errlog, app_key,
2182 "%s: constraint failed (%s:%d)",
2183 td->name, __FILE__, __LINE__);
2184 return -1;
2185 }
2186}
2187
2188/*
2189 * This type is implemented using INTEGER,
2190 * so here we adjust the DEF accordingly.
2191 */
2192static void
2193NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2194 td->free_struct = asn_DEF_INTEGER.free_struct;
2195 td->print_struct = asn_DEF_INTEGER.print_struct;
2196 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2197 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2198 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2199 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002200 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2201 if(!td->per_constraints)
2202 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlm93023842005-08-27 03:13:51 +00002203 td->elements = asn_DEF_INTEGER.elements;
2204 td->elements_count = asn_DEF_INTEGER.elements_count;
2205 td->specifics = asn_DEF_INTEGER.specifics;
2206}
2207
2208void
2209NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2210 void *struct_ptr, int contents_only) {
2211 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2212 td->free_struct(td, struct_ptr, contents_only);
2213}
2214
2215int
2216NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2217 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2218 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2219 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2220}
2221
2222asn_dec_rval_t
2223NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2224 void **structure, const void *bufptr, size_t size, int tag_mode) {
2225 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2226 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2227}
2228
2229asn_enc_rval_t
2230NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2231 void *structure, int tag_mode, ber_tlv_tag_t tag,
2232 asn_app_consume_bytes_f *cb, void *app_key) {
2233 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2234 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2235}
2236
2237asn_dec_rval_t
2238NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2239 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2240 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2241 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2242}
2243
2244asn_enc_rval_t
2245NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2246 int ilevel, enum xer_encoder_flags_e flags,
2247 asn_app_consume_bytes_f *cb, void *app_key) {
2248 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2249 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2250}
2251
2252
2253/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2254
vlm337167e2005-11-26 11:25:14 +00002255static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
vlm93023842005-08-27 03:13:51 +00002256 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2257};
2258asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2259 "NO-IntegerInRange6",
2260 "NO-IntegerInRange6",
2261 NO_IntegerInRange6_free,
2262 NO_IntegerInRange6_print,
2263 NO_IntegerInRange6_constraint,
2264 NO_IntegerInRange6_decode_ber,
2265 NO_IntegerInRange6_encode_der,
2266 NO_IntegerInRange6_decode_xer,
2267 NO_IntegerInRange6_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002268 0, /* No PER decoder, -gen-PER to enable */
vlm93023842005-08-27 03:13:51 +00002269 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002270 asn_DEF_NO_IntegerInRange6_tags_1,
2271 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2272 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2273 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2274 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2275 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2276 0, /* No PER visible constraints */
vlm93023842005-08-27 03:13:51 +00002277 0, 0, /* No members */
2278 0 /* No specifics */
2279};
2280
2281
vlma33a2162005-08-14 02:40:04 +00002282/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2283
2284#include <INTEGER.h>
2285
2286/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2287
2288typedef enum CN_IntegerEnumerated1 {
2289 CN_IntegerEnumerated1_a = 1,
2290 CN_IntegerEnumerated1_b = 2
vlm7c8aa5e2006-03-21 07:25:18 +00002291} e_CN_IntegerEnumerated1;
vlma33a2162005-08-14 02:40:04 +00002292
2293/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2294
2295typedef INTEGER_t CN_IntegerEnumerated1_t;
2296
2297/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2298
2299extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2300asn_struct_free_f CN_IntegerEnumerated1_free;
2301asn_struct_print_f CN_IntegerEnumerated1_print;
2302asn_constr_check_f CN_IntegerEnumerated1_constraint;
2303ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2304der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2305xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2306xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2307
2308/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2309
2310int
2311CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2312 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2313 /* Replace with underlying type checker */
2314 td->check_constraints = asn_DEF_INTEGER.check_constraints;
2315 return td->check_constraints(td, sptr, app_errlog, app_key);
2316}
2317
2318/*
2319 * This type is implemented using INTEGER,
2320 * so here we adjust the DEF accordingly.
2321 */
2322static void
2323CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2324 td->free_struct = asn_DEF_INTEGER.free_struct;
2325 td->print_struct = asn_DEF_INTEGER.print_struct;
2326 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2327 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2328 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2329 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002330 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2331 if(!td->per_constraints)
2332 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlma33a2162005-08-14 02:40:04 +00002333 td->elements = asn_DEF_INTEGER.elements;
2334 td->elements_count = asn_DEF_INTEGER.elements_count;
2335 td->specifics = asn_DEF_INTEGER.specifics;
2336}
2337
2338void
2339CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2340 void *struct_ptr, int contents_only) {
2341 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2342 td->free_struct(td, struct_ptr, contents_only);
2343}
2344
2345int
2346CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2347 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2348 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2349 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2350}
2351
2352asn_dec_rval_t
2353CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2354 void **structure, const void *bufptr, size_t size, int tag_mode) {
2355 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2356 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2357}
2358
2359asn_enc_rval_t
2360CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2361 void *structure, int tag_mode, ber_tlv_tag_t tag,
2362 asn_app_consume_bytes_f *cb, void *app_key) {
2363 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2364 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2365}
2366
2367asn_dec_rval_t
2368CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2369 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2370 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2371 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2372}
2373
2374asn_enc_rval_t
2375CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2376 int ilevel, enum xer_encoder_flags_e flags,
2377 asn_app_consume_bytes_f *cb, void *app_key) {
2378 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2379 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2380}
2381
2382
2383/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2384
vlm337167e2005-11-26 11:25:14 +00002385static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
vlma33a2162005-08-14 02:40:04 +00002386 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2387};
2388asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2389 "CN-IntegerEnumerated1",
2390 "CN-IntegerEnumerated1",
2391 CN_IntegerEnumerated1_free,
2392 CN_IntegerEnumerated1_print,
2393 CN_IntegerEnumerated1_constraint,
2394 CN_IntegerEnumerated1_decode_ber,
2395 CN_IntegerEnumerated1_encode_der,
2396 CN_IntegerEnumerated1_decode_xer,
2397 CN_IntegerEnumerated1_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002398 0, /* No PER decoder, -gen-PER to enable */
vlma33a2162005-08-14 02:40:04 +00002399 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002400 asn_DEF_CN_IntegerEnumerated1_tags_1,
2401 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2402 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2403 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2404 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2405 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2406 0, /* No PER visible constraints */
vlma33a2162005-08-14 02:40:04 +00002407 0, 0, /* Defined elsewhere */
2408 0 /* No specifics */
2409};
2410
2411
2412/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2413
2414#include <INTEGER.h>
2415
2416/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2417
2418typedef enum NO_IntegerEnumerated2 {
2419 NO_IntegerEnumerated2_a = 1,
2420 NO_IntegerEnumerated2_b = 3000000000
vlm7c8aa5e2006-03-21 07:25:18 +00002421} e_NO_IntegerEnumerated2;
vlma33a2162005-08-14 02:40:04 +00002422
2423/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2424
2425typedef INTEGER_t NO_IntegerEnumerated2_t;
2426
2427/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2428
2429extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2430asn_struct_free_f NO_IntegerEnumerated2_free;
2431asn_struct_print_f NO_IntegerEnumerated2_print;
2432asn_constr_check_f NO_IntegerEnumerated2_constraint;
2433ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2434der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2435xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2436xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2437
2438/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2439
2440int
2441NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2442 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2443 /* Replace with underlying type checker */
2444 td->check_constraints = asn_DEF_INTEGER.check_constraints;
2445 return td->check_constraints(td, sptr, app_errlog, app_key);
2446}
2447
2448/*
2449 * This type is implemented using INTEGER,
2450 * so here we adjust the DEF accordingly.
2451 */
2452static void
2453NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2454 td->free_struct = asn_DEF_INTEGER.free_struct;
2455 td->print_struct = asn_DEF_INTEGER.print_struct;
2456 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2457 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2458 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2459 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
vlm337167e2005-11-26 11:25:14 +00002460 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2461 if(!td->per_constraints)
2462 td->per_constraints = asn_DEF_INTEGER.per_constraints;
vlma33a2162005-08-14 02:40:04 +00002463 td->elements = asn_DEF_INTEGER.elements;
2464 td->elements_count = asn_DEF_INTEGER.elements_count;
2465 td->specifics = asn_DEF_INTEGER.specifics;
2466}
2467
2468void
2469NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2470 void *struct_ptr, int contents_only) {
2471 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2472 td->free_struct(td, struct_ptr, contents_only);
2473}
2474
2475int
2476NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2477 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2478 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2479 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2480}
2481
2482asn_dec_rval_t
2483NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2484 void **structure, const void *bufptr, size_t size, int tag_mode) {
2485 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2486 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2487}
2488
2489asn_enc_rval_t
2490NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2491 void *structure, int tag_mode, ber_tlv_tag_t tag,
2492 asn_app_consume_bytes_f *cb, void *app_key) {
2493 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2494 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2495}
2496
2497asn_dec_rval_t
2498NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2499 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2500 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2501 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2502}
2503
2504asn_enc_rval_t
2505NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2506 int ilevel, enum xer_encoder_flags_e flags,
2507 asn_app_consume_bytes_f *cb, void *app_key) {
2508 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2509 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2510}
2511
2512
2513/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2514
vlm337167e2005-11-26 11:25:14 +00002515static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
vlma33a2162005-08-14 02:40:04 +00002516 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2517};
2518asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2519 "NO-IntegerEnumerated2",
2520 "NO-IntegerEnumerated2",
2521 NO_IntegerEnumerated2_free,
2522 NO_IntegerEnumerated2_print,
2523 NO_IntegerEnumerated2_constraint,
2524 NO_IntegerEnumerated2_decode_ber,
2525 NO_IntegerEnumerated2_encode_der,
2526 NO_IntegerEnumerated2_decode_xer,
2527 NO_IntegerEnumerated2_encode_xer,
vlm337167e2005-11-26 11:25:14 +00002528 0, /* No PER decoder, -gen-PER to enable */
vlma33a2162005-08-14 02:40:04 +00002529 0, /* Use generic outmost tag fetcher */
vlm337167e2005-11-26 11:25:14 +00002530 asn_DEF_NO_IntegerEnumerated2_tags_1,
2531 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2532 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2533 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2534 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2535 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2536 0, /* No PER visible constraints */
vlma33a2162005-08-14 02:40:04 +00002537 0, 0, /* Defined elsewhere */
2538 0 /* No specifics */
2539};
2540