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