blob: 344c89a084959016875409851cf3a999e2ef342b [file] [log] [blame]
Lev Walkin082cadc2005-08-14 02:18:27 +00001
2/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
3
4#include <NativeInteger.h>
5
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
8typedef long CN_IntegerUnlimited_t;
9
10/*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/
11
12extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited;
13asn_struct_free_f CN_IntegerUnlimited_free;
14asn_struct_print_f CN_IntegerUnlimited_print;
15asn_constr_check_f CN_IntegerUnlimited_constraint;
16ber_type_decoder_f CN_IntegerUnlimited_decode_ber;
17der_type_encoder_f CN_IntegerUnlimited_encode_der;
18xer_type_decoder_f CN_IntegerUnlimited_decode_xer;
19xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
20
21/*** <<< CODE [CN-IntegerUnlimited] >>> ***/
22
23int
24CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000025 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +000026 /* Replace with underlying type checker */
27 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000028 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +000029}
30
31/*
32 * This type is implemented using NativeInteger,
33 * so here we adjust the DEF accordingly.
34 */
35static void
36CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
37 td->free_struct = asn_DEF_NativeInteger.free_struct;
38 td->print_struct = asn_DEF_NativeInteger.print_struct;
39 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
40 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
41 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
42 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000043 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000044 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000045 if(!td->per_constraints)
46 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +000047 td->elements = asn_DEF_NativeInteger.elements;
48 td->elements_count = asn_DEF_NativeInteger.elements_count;
49 td->specifics = asn_DEF_NativeInteger.specifics;
50}
51
52void
53CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
54 void *struct_ptr, int contents_only) {
55 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
56 td->free_struct(td, struct_ptr, contents_only);
57}
58
59int
60CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
61 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
62 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
63 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
64}
65
66asn_dec_rval_t
67CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
68 void **structure, const void *bufptr, size_t size, int tag_mode) {
69 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
70 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
71}
72
73asn_enc_rval_t
74CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
75 void *structure, int tag_mode, ber_tlv_tag_t tag,
76 asn_app_consume_bytes_f *cb, void *app_key) {
77 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
78 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
79}
80
81asn_dec_rval_t
82CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
83 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
84 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
85 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
86}
87
88asn_enc_rval_t
89CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
90 int ilevel, enum xer_encoder_flags_e flags,
91 asn_app_consume_bytes_f *cb, void *app_key) {
92 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
93 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
94}
95
96
97/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
98
Lev Walkin59b176e2005-11-26 11:25:14 +000099static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000100 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
101};
102asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
103 "CN-IntegerUnlimited",
104 "CN-IntegerUnlimited",
105 CN_IntegerUnlimited_free,
106 CN_IntegerUnlimited_print,
107 CN_IntegerUnlimited_constraint,
108 CN_IntegerUnlimited_decode_ber,
109 CN_IntegerUnlimited_encode_der,
110 CN_IntegerUnlimited_decode_xer,
111 CN_IntegerUnlimited_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000112 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000113 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000114 asn_DEF_CN_IntegerUnlimited_tags_1,
115 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
116 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
117 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
118 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
119 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
120 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000121 0, 0, /* No members */
122 0 /* No specifics */
123};
124
125
126/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
127
128#include <NativeInteger.h>
129
130/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
131
132typedef long CN_IntegerMinMax_t;
133
134/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
135
136extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
137asn_struct_free_f CN_IntegerMinMax_free;
138asn_struct_print_f CN_IntegerMinMax_print;
139asn_constr_check_f CN_IntegerMinMax_constraint;
140ber_type_decoder_f CN_IntegerMinMax_decode_ber;
141der_type_encoder_f CN_IntegerMinMax_encode_der;
142xer_type_decoder_f CN_IntegerMinMax_decode_xer;
143xer_type_encoder_f CN_IntegerMinMax_encode_xer;
144
145/*** <<< CODE [CN-IntegerMinMax] >>> ***/
146
147int
148CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000149 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000150
151 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000152 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000153 "%s: value not given (%s:%d)",
154 td->name, __FILE__, __LINE__);
155 return -1;
156 }
157
158
159 if(1 /* No applicable constraints whatsoever */) {
160 /* Nothing is here. See below */
161 }
162
163 /* Replace with underlying type checker */
164 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000165 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +0000166}
167
168/*
169 * This type is implemented using NativeInteger,
170 * so here we adjust the DEF accordingly.
171 */
172static void
173CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
174 td->free_struct = asn_DEF_NativeInteger.free_struct;
175 td->print_struct = asn_DEF_NativeInteger.print_struct;
176 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
177 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
178 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
179 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000180 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000181 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000182 if(!td->per_constraints)
183 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000184 td->elements = asn_DEF_NativeInteger.elements;
185 td->elements_count = asn_DEF_NativeInteger.elements_count;
186 td->specifics = asn_DEF_NativeInteger.specifics;
187}
188
189void
190CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
191 void *struct_ptr, int contents_only) {
192 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
193 td->free_struct(td, struct_ptr, contents_only);
194}
195
196int
197CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
198 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
199 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
200 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
201}
202
203asn_dec_rval_t
204CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
205 void **structure, const void *bufptr, size_t size, int tag_mode) {
206 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
207 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
208}
209
210asn_enc_rval_t
211CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
212 void *structure, int tag_mode, ber_tlv_tag_t tag,
213 asn_app_consume_bytes_f *cb, void *app_key) {
214 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
215 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
216}
217
218asn_dec_rval_t
219CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
220 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
221 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
222 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
223}
224
225asn_enc_rval_t
226CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
227 int ilevel, enum xer_encoder_flags_e flags,
228 asn_app_consume_bytes_f *cb, void *app_key) {
229 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
230 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
231}
232
233
234/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
235
Lev Walkin59b176e2005-11-26 11:25:14 +0000236static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000237 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
238};
239asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
240 "CN-IntegerMinMax",
241 "CN-IntegerMinMax",
242 CN_IntegerMinMax_free,
243 CN_IntegerMinMax_print,
244 CN_IntegerMinMax_constraint,
245 CN_IntegerMinMax_decode_ber,
246 CN_IntegerMinMax_encode_der,
247 CN_IntegerMinMax_decode_xer,
248 CN_IntegerMinMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000249 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000250 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000251 asn_DEF_CN_IntegerMinMax_tags_1,
252 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
253 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
254 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
255 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
256 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
257 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000258 0, 0, /* No members */
259 0 /* No specifics */
260};
261
262
263/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
264
Lev Walkinc3f0b892005-08-14 02:40:04 +0000265#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000266
267/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
268
Lev Walkinc3f0b892005-08-14 02:40:04 +0000269typedef long CN_IntegerMinLow_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000270
271/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
272
273extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
274asn_struct_free_f CN_IntegerMinLow_free;
275asn_struct_print_f CN_IntegerMinLow_print;
276asn_constr_check_f CN_IntegerMinLow_constraint;
277ber_type_decoder_f CN_IntegerMinLow_decode_ber;
278der_type_encoder_f CN_IntegerMinLow_encode_der;
279xer_type_decoder_f CN_IntegerMinLow_decode_xer;
280xer_type_encoder_f CN_IntegerMinLow_encode_xer;
281
282/*** <<< CODE [CN-IntegerMinLow] >>> ***/
283
284int
285CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000286 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000287 long value;
288
289 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000290 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000291 "%s: value not given (%s:%d)",
292 td->name, __FILE__, __LINE__);
293 return -1;
294 }
295
Lev Walkinc3f0b892005-08-14 02:40:04 +0000296 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000297
298 if((value <= 1)) {
299 /* Constraint check succeeded */
300 return 0;
301 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000302 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000303 "%s: constraint failed (%s:%d)",
304 td->name, __FILE__, __LINE__);
305 return -1;
306 }
307}
308
309/*
Lev Walkinc3f0b892005-08-14 02:40:04 +0000310 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000311 * so here we adjust the DEF accordingly.
312 */
313static void
314CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +0000315 td->free_struct = asn_DEF_NativeInteger.free_struct;
316 td->print_struct = asn_DEF_NativeInteger.print_struct;
317 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
318 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
319 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
320 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000321 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000322 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000323 if(!td->per_constraints)
324 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +0000325 td->elements = asn_DEF_NativeInteger.elements;
326 td->elements_count = asn_DEF_NativeInteger.elements_count;
327 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000328}
329
330void
331CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
332 void *struct_ptr, int contents_only) {
333 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
334 td->free_struct(td, struct_ptr, contents_only);
335}
336
337int
338CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
339 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
340 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
341 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
342}
343
344asn_dec_rval_t
345CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
346 void **structure, const void *bufptr, size_t size, int tag_mode) {
347 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
348 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
349}
350
351asn_enc_rval_t
352CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
353 void *structure, int tag_mode, ber_tlv_tag_t tag,
354 asn_app_consume_bytes_f *cb, void *app_key) {
355 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
356 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
357}
358
359asn_dec_rval_t
360CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
361 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
362 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
363 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
364}
365
366asn_enc_rval_t
367CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
368 int ilevel, enum xer_encoder_flags_e flags,
369 asn_app_consume_bytes_f *cb, void *app_key) {
370 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
371 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
372}
373
374
375/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
376
Lev Walkin59b176e2005-11-26 11:25:14 +0000377static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000378 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
379};
380asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
381 "CN-IntegerMinLow",
382 "CN-IntegerMinLow",
383 CN_IntegerMinLow_free,
384 CN_IntegerMinLow_print,
385 CN_IntegerMinLow_constraint,
386 CN_IntegerMinLow_decode_ber,
387 CN_IntegerMinLow_encode_der,
388 CN_IntegerMinLow_decode_xer,
389 CN_IntegerMinLow_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000390 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000391 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000392 asn_DEF_CN_IntegerMinLow_tags_1,
393 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
394 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
395 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
396 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
397 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
398 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000399 0, 0, /* No members */
400 0 /* No specifics */
401};
402
403
404/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
405
406#include <INTEGER.h>
407
408/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
409
410typedef INTEGER_t NO_IntegerMinHigh_t;
411
412/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
413
414extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
415asn_struct_free_f NO_IntegerMinHigh_free;
416asn_struct_print_f NO_IntegerMinHigh_print;
417asn_constr_check_f NO_IntegerMinHigh_constraint;
418ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
419der_type_encoder_f NO_IntegerMinHigh_encode_der;
420xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
421xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
422
423/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
424
425int
426NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000427 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000428 const INTEGER_t *st = (const INTEGER_t *)sptr;
429 long value;
430
431 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000432 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000433 "%s: value not given (%s:%d)",
434 td->name, __FILE__, __LINE__);
435 return -1;
436 }
437
438 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000439 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000440 "%s: value too large (%s:%d)",
441 td->name, __FILE__, __LINE__);
442 return -1;
443 }
444
Lev Walkinc3f0b892005-08-14 02:40:04 +0000445 if((value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000446 /* Constraint check succeeded */
447 return 0;
448 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000449 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000450 "%s: constraint failed (%s:%d)",
451 td->name, __FILE__, __LINE__);
452 return -1;
453 }
454}
455
456/*
457 * This type is implemented using INTEGER,
458 * so here we adjust the DEF accordingly.
459 */
460static void
461NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
462 td->free_struct = asn_DEF_INTEGER.free_struct;
463 td->print_struct = asn_DEF_INTEGER.print_struct;
464 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
465 td->der_encoder = asn_DEF_INTEGER.der_encoder;
466 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
467 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000468 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000469 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000470 if(!td->per_constraints)
471 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000472 td->elements = asn_DEF_INTEGER.elements;
473 td->elements_count = asn_DEF_INTEGER.elements_count;
474 td->specifics = asn_DEF_INTEGER.specifics;
475}
476
477void
478NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
479 void *struct_ptr, int contents_only) {
480 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
481 td->free_struct(td, struct_ptr, contents_only);
482}
483
484int
485NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
486 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
487 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
488 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
489}
490
491asn_dec_rval_t
492NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
493 void **structure, const void *bufptr, size_t size, int tag_mode) {
494 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
495 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
496}
497
498asn_enc_rval_t
499NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
500 void *structure, int tag_mode, ber_tlv_tag_t tag,
501 asn_app_consume_bytes_f *cb, void *app_key) {
502 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
503 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
504}
505
506asn_dec_rval_t
507NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
508 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
509 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
510 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
511}
512
513asn_enc_rval_t
514NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
515 int ilevel, enum xer_encoder_flags_e flags,
516 asn_app_consume_bytes_f *cb, void *app_key) {
517 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
518 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
519}
520
521
522/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
523
Lev Walkin59b176e2005-11-26 11:25:14 +0000524static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000525 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
526};
527asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
528 "NO-IntegerMinHigh",
529 "NO-IntegerMinHigh",
530 NO_IntegerMinHigh_free,
531 NO_IntegerMinHigh_print,
532 NO_IntegerMinHigh_constraint,
533 NO_IntegerMinHigh_decode_ber,
534 NO_IntegerMinHigh_encode_der,
535 NO_IntegerMinHigh_decode_xer,
536 NO_IntegerMinHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000537 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000538 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000539 asn_DEF_NO_IntegerMinHigh_tags_1,
540 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
541 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
542 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
543 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
544 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
545 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000546 0, 0, /* No members */
547 0 /* No specifics */
548};
549
550
551/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
552
553#include <INTEGER.h>
554
555/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
556
557typedef INTEGER_t NO_IntegerLowHigh_t;
558
559/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
560
561extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
562asn_struct_free_f NO_IntegerLowHigh_free;
563asn_struct_print_f NO_IntegerLowHigh_print;
564asn_constr_check_f NO_IntegerLowHigh_constraint;
565ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
566der_type_encoder_f NO_IntegerLowHigh_encode_der;
567xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
568xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
569
570/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
571
572int
573NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000574 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000575 const INTEGER_t *st = (const INTEGER_t *)sptr;
576 long value;
577
578 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000579 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000580 "%s: value not given (%s:%d)",
581 td->name, __FILE__, __LINE__);
582 return -1;
583 }
584
585 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000586 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000587 "%s: value too large (%s:%d)",
588 td->name, __FILE__, __LINE__);
589 return -1;
590 }
591
Lev Walkinc3f0b892005-08-14 02:40:04 +0000592 if((value >= 1 && value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000593 /* Constraint check succeeded */
594 return 0;
595 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000596 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000597 "%s: constraint failed (%s:%d)",
598 td->name, __FILE__, __LINE__);
599 return -1;
600 }
601}
602
603/*
604 * This type is implemented using INTEGER,
605 * so here we adjust the DEF accordingly.
606 */
607static void
608NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
609 td->free_struct = asn_DEF_INTEGER.free_struct;
610 td->print_struct = asn_DEF_INTEGER.print_struct;
611 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
612 td->der_encoder = asn_DEF_INTEGER.der_encoder;
613 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
614 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000615 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000616 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000617 if(!td->per_constraints)
618 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000619 td->elements = asn_DEF_INTEGER.elements;
620 td->elements_count = asn_DEF_INTEGER.elements_count;
621 td->specifics = asn_DEF_INTEGER.specifics;
622}
623
624void
625NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
626 void *struct_ptr, int contents_only) {
627 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
628 td->free_struct(td, struct_ptr, contents_only);
629}
630
631int
632NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
633 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
634 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
635 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
636}
637
638asn_dec_rval_t
639NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
640 void **structure, const void *bufptr, size_t size, int tag_mode) {
641 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
642 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
643}
644
645asn_enc_rval_t
646NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
647 void *structure, int tag_mode, ber_tlv_tag_t tag,
648 asn_app_consume_bytes_f *cb, void *app_key) {
649 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
650 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
651}
652
653asn_dec_rval_t
654NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
655 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
656 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
657 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
658}
659
660asn_enc_rval_t
661NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
662 int ilevel, enum xer_encoder_flags_e flags,
663 asn_app_consume_bytes_f *cb, void *app_key) {
664 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
665 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
666}
667
668
669/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
670
Lev Walkin59b176e2005-11-26 11:25:14 +0000671static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000672 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
673};
674asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
675 "NO-IntegerLowHigh",
676 "NO-IntegerLowHigh",
677 NO_IntegerLowHigh_free,
678 NO_IntegerLowHigh_print,
679 NO_IntegerLowHigh_constraint,
680 NO_IntegerLowHigh_decode_ber,
681 NO_IntegerLowHigh_encode_der,
682 NO_IntegerLowHigh_decode_xer,
683 NO_IntegerLowHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000684 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000685 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000686 asn_DEF_NO_IntegerLowHigh_tags_1,
687 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
688 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
689 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
690 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
691 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
692 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000693 0, 0, /* No members */
694 0 /* No specifics */
695};
696
697
698/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
699
Lev Walkinc3f0b892005-08-14 02:40:04 +0000700#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000701
702/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
703
Lev Walkinc3f0b892005-08-14 02:40:04 +0000704typedef long CN_IntegerLowMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000705
706/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
707
708extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
709asn_struct_free_f CN_IntegerLowMax_free;
710asn_struct_print_f CN_IntegerLowMax_print;
711asn_constr_check_f CN_IntegerLowMax_constraint;
712ber_type_decoder_f CN_IntegerLowMax_decode_ber;
713der_type_encoder_f CN_IntegerLowMax_encode_der;
714xer_type_decoder_f CN_IntegerLowMax_decode_xer;
715xer_type_encoder_f CN_IntegerLowMax_encode_xer;
716
717/*** <<< CODE [CN-IntegerLowMax] >>> ***/
718
719int
720CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000721 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000722 long value;
723
724 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000725 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000726 "%s: value not given (%s:%d)",
727 td->name, __FILE__, __LINE__);
728 return -1;
729 }
730
Lev Walkinc3f0b892005-08-14 02:40:04 +0000731 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000732
733 if((value >= 1)) {
734 /* Constraint check succeeded */
735 return 0;
736 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000737 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000738 "%s: constraint failed (%s:%d)",
739 td->name, __FILE__, __LINE__);
740 return -1;
741 }
742}
743
744/*
Lev Walkinc3f0b892005-08-14 02:40:04 +0000745 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000746 * so here we adjust the DEF accordingly.
747 */
748static void
749CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +0000750 td->free_struct = asn_DEF_NativeInteger.free_struct;
751 td->print_struct = asn_DEF_NativeInteger.print_struct;
752 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
753 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
754 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
755 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000756 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000757 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000758 if(!td->per_constraints)
759 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +0000760 td->elements = asn_DEF_NativeInteger.elements;
761 td->elements_count = asn_DEF_NativeInteger.elements_count;
762 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000763}
764
765void
766CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
767 void *struct_ptr, int contents_only) {
768 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
769 td->free_struct(td, struct_ptr, contents_only);
770}
771
772int
773CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
774 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
775 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
776 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
777}
778
779asn_dec_rval_t
780CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
781 void **structure, const void *bufptr, size_t size, int tag_mode) {
782 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
783 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
784}
785
786asn_enc_rval_t
787CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
788 void *structure, int tag_mode, ber_tlv_tag_t tag,
789 asn_app_consume_bytes_f *cb, void *app_key) {
790 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
791 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
792}
793
794asn_dec_rval_t
795CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
796 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
797 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
798 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
799}
800
801asn_enc_rval_t
802CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
803 int ilevel, enum xer_encoder_flags_e flags,
804 asn_app_consume_bytes_f *cb, void *app_key) {
805 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
806 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
807}
808
809
810/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
811
Lev Walkin59b176e2005-11-26 11:25:14 +0000812static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000813 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
814};
815asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
816 "CN-IntegerLowMax",
817 "CN-IntegerLowMax",
818 CN_IntegerLowMax_free,
819 CN_IntegerLowMax_print,
820 CN_IntegerLowMax_constraint,
821 CN_IntegerLowMax_decode_ber,
822 CN_IntegerLowMax_encode_der,
823 CN_IntegerLowMax_decode_xer,
824 CN_IntegerLowMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000825 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000826 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000827 asn_DEF_CN_IntegerLowMax_tags_1,
828 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
829 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
830 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
831 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
832 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
833 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000834 0, 0, /* No members */
835 0 /* No specifics */
836};
837
838
839/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
840
841#include <INTEGER.h>
842
843/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
844
845typedef INTEGER_t NO_IntegerHighMax_t;
846
847/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
848
849extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
850asn_struct_free_f NO_IntegerHighMax_free;
851asn_struct_print_f NO_IntegerHighMax_print;
852asn_constr_check_f NO_IntegerHighMax_constraint;
853ber_type_decoder_f NO_IntegerHighMax_decode_ber;
854der_type_encoder_f NO_IntegerHighMax_encode_der;
855xer_type_decoder_f NO_IntegerHighMax_decode_xer;
856xer_type_encoder_f NO_IntegerHighMax_encode_xer;
857
858/*** <<< CODE [NO-IntegerHighMax] >>> ***/
859
860int
861NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000862 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000863 const INTEGER_t *st = (const INTEGER_t *)sptr;
864 long value;
865
866 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000867 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000868 "%s: value not given (%s:%d)",
869 td->name, __FILE__, __LINE__);
870 return -1;
871 }
872
873 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000874 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000875 "%s: value too large (%s:%d)",
876 td->name, __FILE__, __LINE__);
877 return -1;
878 }
879
Lev Walkinc3f0b892005-08-14 02:40:04 +0000880 if((value >= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000881 /* Constraint check succeeded */
882 return 0;
883 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000884 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000885 "%s: constraint failed (%s:%d)",
886 td->name, __FILE__, __LINE__);
887 return -1;
888 }
889}
890
891/*
892 * This type is implemented using INTEGER,
893 * so here we adjust the DEF accordingly.
894 */
895static void
896NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
897 td->free_struct = asn_DEF_INTEGER.free_struct;
898 td->print_struct = asn_DEF_INTEGER.print_struct;
899 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
900 td->der_encoder = asn_DEF_INTEGER.der_encoder;
901 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
902 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000903 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000904 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000905 if(!td->per_constraints)
906 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000907 td->elements = asn_DEF_INTEGER.elements;
908 td->elements_count = asn_DEF_INTEGER.elements_count;
909 td->specifics = asn_DEF_INTEGER.specifics;
910}
911
912void
913NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
914 void *struct_ptr, int contents_only) {
915 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
916 td->free_struct(td, struct_ptr, contents_only);
917}
918
919int
920NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
921 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
922 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
923 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
924}
925
926asn_dec_rval_t
927NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
928 void **structure, const void *bufptr, size_t size, int tag_mode) {
929 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
930 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
931}
932
933asn_enc_rval_t
934NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
935 void *structure, int tag_mode, ber_tlv_tag_t tag,
936 asn_app_consume_bytes_f *cb, void *app_key) {
937 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
938 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
939}
940
941asn_dec_rval_t
942NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
943 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
944 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
945 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
946}
947
948asn_enc_rval_t
949NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
950 int ilevel, enum xer_encoder_flags_e flags,
951 asn_app_consume_bytes_f *cb, void *app_key) {
952 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
953 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
954}
955
956
957/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
958
Lev Walkin59b176e2005-11-26 11:25:14 +0000959static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000960 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
961};
962asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
963 "NO-IntegerHighMax",
964 "NO-IntegerHighMax",
965 NO_IntegerHighMax_free,
966 NO_IntegerHighMax_print,
967 NO_IntegerHighMax_constraint,
968 NO_IntegerHighMax_decode_ber,
969 NO_IntegerHighMax_encode_der,
970 NO_IntegerHighMax_decode_xer,
971 NO_IntegerHighMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000972 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000973 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000974 asn_DEF_NO_IntegerHighMax_tags_1,
975 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
976 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
977 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
978 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
979 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
980 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000981 0, 0, /* No members */
982 0 /* No specifics */
983};
984
985
986/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
987
988#include <INTEGER.h>
989
990/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
991
992typedef INTEGER_t NO_IntegerLowestMax_t;
993
994/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
995
996extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
997asn_struct_free_f NO_IntegerLowestMax_free;
998asn_struct_print_f NO_IntegerLowestMax_print;
999asn_constr_check_f NO_IntegerLowestMax_constraint;
1000ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1001der_type_encoder_f NO_IntegerLowestMax_encode_der;
1002xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1003xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1004
1005/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1006
1007int
1008NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001009 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001010 const INTEGER_t *st = (const INTEGER_t *)sptr;
1011 long value;
1012
1013 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001014 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001015 "%s: value not given (%s:%d)",
1016 td->name, __FILE__, __LINE__);
1017 return -1;
1018 }
1019
1020 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001021 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001022 "%s: value too large (%s:%d)",
1023 td->name, __FILE__, __LINE__);
1024 return -1;
1025 }
1026
Lev Walkinc3f0b892005-08-14 02:40:04 +00001027 if((value >= -3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001028 /* Constraint check succeeded */
1029 return 0;
1030 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001031 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001032 "%s: constraint failed (%s:%d)",
1033 td->name, __FILE__, __LINE__);
1034 return -1;
1035 }
1036}
1037
1038/*
1039 * This type is implemented using INTEGER,
1040 * so here we adjust the DEF accordingly.
1041 */
1042static void
1043NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1044 td->free_struct = asn_DEF_INTEGER.free_struct;
1045 td->print_struct = asn_DEF_INTEGER.print_struct;
1046 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1047 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1048 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1049 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001050 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001051 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001052 if(!td->per_constraints)
1053 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001054 td->elements = asn_DEF_INTEGER.elements;
1055 td->elements_count = asn_DEF_INTEGER.elements_count;
1056 td->specifics = asn_DEF_INTEGER.specifics;
1057}
1058
1059void
1060NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1061 void *struct_ptr, int contents_only) {
1062 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1063 td->free_struct(td, struct_ptr, contents_only);
1064}
1065
1066int
1067NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1068 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1069 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1070 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1071}
1072
1073asn_dec_rval_t
1074NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1075 void **structure, const void *bufptr, size_t size, int tag_mode) {
1076 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1077 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1078}
1079
1080asn_enc_rval_t
1081NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1082 void *structure, int tag_mode, ber_tlv_tag_t tag,
1083 asn_app_consume_bytes_f *cb, void *app_key) {
1084 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1085 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1086}
1087
1088asn_dec_rval_t
1089NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1090 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1091 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1092 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1093}
1094
1095asn_enc_rval_t
1096NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1097 int ilevel, enum xer_encoder_flags_e flags,
1098 asn_app_consume_bytes_f *cb, void *app_key) {
1099 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1100 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1101}
1102
1103
1104/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1105
Lev Walkin59b176e2005-11-26 11:25:14 +00001106static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001107 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1108};
1109asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1110 "NO-IntegerLowestMax",
1111 "NO-IntegerLowestMax",
1112 NO_IntegerLowestMax_free,
1113 NO_IntegerLowestMax_print,
1114 NO_IntegerLowestMax_constraint,
1115 NO_IntegerLowestMax_decode_ber,
1116 NO_IntegerLowestMax_encode_der,
1117 NO_IntegerLowestMax_decode_xer,
1118 NO_IntegerLowestMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001119 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001120 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001121 asn_DEF_NO_IntegerLowestMax_tags_1,
1122 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1123 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1124 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1125 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1126 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1127 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001128 0, 0, /* No members */
1129 0 /* No specifics */
1130};
1131
1132
1133/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1134
1135#include <INTEGER.h>
1136
1137/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1138
1139typedef INTEGER_t NO_IntegerOutRange_t;
1140
1141/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1142
1143extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1144asn_struct_free_f NO_IntegerOutRange_free;
1145asn_struct_print_f NO_IntegerOutRange_print;
1146asn_constr_check_f NO_IntegerOutRange_constraint;
1147ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1148der_type_encoder_f NO_IntegerOutRange_encode_der;
1149xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1150xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1151
1152/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1153
1154int
1155NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001156 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001157 const INTEGER_t *st = (const INTEGER_t *)sptr;
1158 long value;
1159
1160 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001161 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001162 "%s: value not given (%s:%d)",
1163 td->name, __FILE__, __LINE__);
1164 return -1;
1165 }
1166
1167 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001168 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001169 "%s: value too large (%s:%d)",
1170 td->name, __FILE__, __LINE__);
1171 return -1;
1172 }
1173
Lev Walkinc3f0b892005-08-14 02:40:04 +00001174 if((value >= 3000000000 && value <= 3000000001)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001175 /* Constraint check succeeded */
1176 return 0;
1177 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001178 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001179 "%s: constraint failed (%s:%d)",
1180 td->name, __FILE__, __LINE__);
1181 return -1;
1182 }
1183}
1184
1185/*
1186 * This type is implemented using INTEGER,
1187 * so here we adjust the DEF accordingly.
1188 */
1189static void
1190NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1191 td->free_struct = asn_DEF_INTEGER.free_struct;
1192 td->print_struct = asn_DEF_INTEGER.print_struct;
1193 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1194 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1195 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1196 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001197 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001198 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001199 if(!td->per_constraints)
1200 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001201 td->elements = asn_DEF_INTEGER.elements;
1202 td->elements_count = asn_DEF_INTEGER.elements_count;
1203 td->specifics = asn_DEF_INTEGER.specifics;
1204}
1205
1206void
1207NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1208 void *struct_ptr, int contents_only) {
1209 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1210 td->free_struct(td, struct_ptr, contents_only);
1211}
1212
1213int
1214NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1215 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1216 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1217 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1218}
1219
1220asn_dec_rval_t
1221NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1222 void **structure, const void *bufptr, size_t size, int tag_mode) {
1223 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1224 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1225}
1226
1227asn_enc_rval_t
1228NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1229 void *structure, int tag_mode, ber_tlv_tag_t tag,
1230 asn_app_consume_bytes_f *cb, void *app_key) {
1231 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1232 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1233}
1234
1235asn_dec_rval_t
1236NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1237 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1238 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1239 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1240}
1241
1242asn_enc_rval_t
1243NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1244 int ilevel, enum xer_encoder_flags_e flags,
1245 asn_app_consume_bytes_f *cb, void *app_key) {
1246 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1247 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1248}
1249
1250
1251/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1252
Lev Walkin59b176e2005-11-26 11:25:14 +00001253static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001254 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1255};
1256asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1257 "NO-IntegerOutRange",
1258 "NO-IntegerOutRange",
1259 NO_IntegerOutRange_free,
1260 NO_IntegerOutRange_print,
1261 NO_IntegerOutRange_constraint,
1262 NO_IntegerOutRange_decode_ber,
1263 NO_IntegerOutRange_encode_der,
1264 NO_IntegerOutRange_decode_xer,
1265 NO_IntegerOutRange_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001266 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001267 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001268 asn_DEF_NO_IntegerOutRange_tags_1,
1269 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1270 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1271 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1272 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1273 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1274 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001275 0, 0, /* No members */
1276 0 /* No specifics */
1277};
1278
1279
1280/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1281
1282#include <INTEGER.h>
1283
1284/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1285
1286typedef INTEGER_t NO_IntegerOutValue_t;
1287
1288/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1289
1290extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1291asn_struct_free_f NO_IntegerOutValue_free;
1292asn_struct_print_f NO_IntegerOutValue_print;
1293asn_constr_check_f NO_IntegerOutValue_constraint;
1294ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1295der_type_encoder_f NO_IntegerOutValue_encode_der;
1296xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1297xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1298
1299/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1300
1301int
1302NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001303 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001304 const INTEGER_t *st = (const INTEGER_t *)sptr;
1305 long value;
1306
1307 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001308 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001309 "%s: value not given (%s:%d)",
1310 td->name, __FILE__, __LINE__);
1311 return -1;
1312 }
1313
1314 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001315 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001316 "%s: value too large (%s:%d)",
1317 td->name, __FILE__, __LINE__);
1318 return -1;
1319 }
1320
Lev Walkinc3f0b892005-08-14 02:40:04 +00001321 if((value == 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001322 /* Constraint check succeeded */
1323 return 0;
1324 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001325 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001326 "%s: constraint failed (%s:%d)",
1327 td->name, __FILE__, __LINE__);
1328 return -1;
1329 }
1330}
1331
1332/*
1333 * This type is implemented using INTEGER,
1334 * so here we adjust the DEF accordingly.
1335 */
1336static void
1337NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1338 td->free_struct = asn_DEF_INTEGER.free_struct;
1339 td->print_struct = asn_DEF_INTEGER.print_struct;
1340 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1341 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1342 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1343 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001344 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001345 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001346 if(!td->per_constraints)
1347 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001348 td->elements = asn_DEF_INTEGER.elements;
1349 td->elements_count = asn_DEF_INTEGER.elements_count;
1350 td->specifics = asn_DEF_INTEGER.specifics;
1351}
1352
1353void
1354NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1355 void *struct_ptr, int contents_only) {
1356 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1357 td->free_struct(td, struct_ptr, contents_only);
1358}
1359
1360int
1361NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1362 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1363 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1364 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1365}
1366
1367asn_dec_rval_t
1368NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1369 void **structure, const void *bufptr, size_t size, int tag_mode) {
1370 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1371 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1372}
1373
1374asn_enc_rval_t
1375NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1376 void *structure, int tag_mode, ber_tlv_tag_t tag,
1377 asn_app_consume_bytes_f *cb, void *app_key) {
1378 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1379 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1380}
1381
1382asn_dec_rval_t
1383NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1384 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1385 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1386 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1387}
1388
1389asn_enc_rval_t
1390NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1391 int ilevel, enum xer_encoder_flags_e flags,
1392 asn_app_consume_bytes_f *cb, void *app_key) {
1393 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1394 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1395}
1396
1397
1398/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1399
Lev Walkin59b176e2005-11-26 11:25:14 +00001400static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001401 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1402};
1403asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1404 "NO-IntegerOutValue",
1405 "NO-IntegerOutValue",
1406 NO_IntegerOutValue_free,
1407 NO_IntegerOutValue_print,
1408 NO_IntegerOutValue_constraint,
1409 NO_IntegerOutValue_decode_ber,
1410 NO_IntegerOutValue_encode_der,
1411 NO_IntegerOutValue_decode_xer,
1412 NO_IntegerOutValue_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001413 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001414 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001415 asn_DEF_NO_IntegerOutValue_tags_1,
1416 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1417 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1418 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1419 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1420 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1421 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001422 0, 0, /* No members */
1423 0 /* No specifics */
1424};
1425
1426
1427/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1428
Lev Walkinc3f0b892005-08-14 02:40:04 +00001429#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001430
1431/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1432
Lev Walkinc3f0b892005-08-14 02:40:04 +00001433typedef long OK_IntegerInRange1_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001434
1435/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1436
1437extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1438asn_struct_free_f OK_IntegerInRange1_free;
1439asn_struct_print_f OK_IntegerInRange1_print;
1440asn_constr_check_f OK_IntegerInRange1_constraint;
1441ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1442der_type_encoder_f OK_IntegerInRange1_encode_der;
1443xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1444xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1445
1446/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1447
1448int
1449OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001450 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001451 long value;
1452
1453 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001454 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001455 "%s: value not given (%s:%d)",
1456 td->name, __FILE__, __LINE__);
1457 return -1;
1458 }
1459
Lev Walkinc3f0b892005-08-14 02:40:04 +00001460 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001461
1462 if((value >= -100 && value <= 100)) {
1463 /* Constraint check succeeded */
1464 return 0;
1465 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001466 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001467 "%s: constraint failed (%s:%d)",
1468 td->name, __FILE__, __LINE__);
1469 return -1;
1470 }
1471}
1472
1473/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001474 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001475 * so here we adjust the DEF accordingly.
1476 */
1477static void
1478OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001479 td->free_struct = asn_DEF_NativeInteger.free_struct;
1480 td->print_struct = asn_DEF_NativeInteger.print_struct;
1481 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1482 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1483 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1484 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001485 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001486 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001487 if(!td->per_constraints)
1488 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001489 td->elements = asn_DEF_NativeInteger.elements;
1490 td->elements_count = asn_DEF_NativeInteger.elements_count;
1491 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001492}
1493
1494void
1495OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1496 void *struct_ptr, int contents_only) {
1497 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1498 td->free_struct(td, struct_ptr, contents_only);
1499}
1500
1501int
1502OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1503 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1504 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1505 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1506}
1507
1508asn_dec_rval_t
1509OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1510 void **structure, const void *bufptr, size_t size, int tag_mode) {
1511 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1512 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1513}
1514
1515asn_enc_rval_t
1516OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1517 void *structure, int tag_mode, ber_tlv_tag_t tag,
1518 asn_app_consume_bytes_f *cb, void *app_key) {
1519 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1520 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1521}
1522
1523asn_dec_rval_t
1524OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1525 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1526 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1527 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1528}
1529
1530asn_enc_rval_t
1531OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1532 int ilevel, enum xer_encoder_flags_e flags,
1533 asn_app_consume_bytes_f *cb, void *app_key) {
1534 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1535 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1536}
1537
1538
1539/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1540
Lev Walkin59b176e2005-11-26 11:25:14 +00001541static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001542 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1543};
1544asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1545 "OK-IntegerInRange1",
1546 "OK-IntegerInRange1",
1547 OK_IntegerInRange1_free,
1548 OK_IntegerInRange1_print,
1549 OK_IntegerInRange1_constraint,
1550 OK_IntegerInRange1_decode_ber,
1551 OK_IntegerInRange1_encode_der,
1552 OK_IntegerInRange1_decode_xer,
1553 OK_IntegerInRange1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001554 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001555 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001556 asn_DEF_OK_IntegerInRange1_tags_1,
1557 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1558 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1559 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1560 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1561 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1562 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001563 0, 0, /* No members */
1564 0 /* No specifics */
1565};
1566
1567
1568/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1569
Lev Walkinc3f0b892005-08-14 02:40:04 +00001570#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001571
1572/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1573
Lev Walkinc3f0b892005-08-14 02:40:04 +00001574typedef long OK_IntegerInRange2_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001575
1576/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1577
1578extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1579asn_struct_free_f OK_IntegerInRange2_free;
1580asn_struct_print_f OK_IntegerInRange2_print;
1581asn_constr_check_f OK_IntegerInRange2_constraint;
1582ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1583der_type_encoder_f OK_IntegerInRange2_encode_der;
1584xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1585xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1586
1587/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1588
1589int
1590OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001591 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001592 long value;
1593
1594 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001595 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001596 "%s: value not given (%s:%d)",
1597 td->name, __FILE__, __LINE__);
1598 return -1;
1599 }
1600
Lev Walkinc3f0b892005-08-14 02:40:04 +00001601 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001602
1603 if(((value == -100) || (value == 100))) {
1604 /* Constraint check succeeded */
1605 return 0;
1606 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001607 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001608 "%s: constraint failed (%s:%d)",
1609 td->name, __FILE__, __LINE__);
1610 return -1;
1611 }
1612}
1613
1614/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001615 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001616 * so here we adjust the DEF accordingly.
1617 */
1618static void
1619OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001620 td->free_struct = asn_DEF_NativeInteger.free_struct;
1621 td->print_struct = asn_DEF_NativeInteger.print_struct;
1622 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1623 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1624 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1625 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001626 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001627 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001628 if(!td->per_constraints)
1629 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001630 td->elements = asn_DEF_NativeInteger.elements;
1631 td->elements_count = asn_DEF_NativeInteger.elements_count;
1632 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001633}
1634
1635void
1636OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1637 void *struct_ptr, int contents_only) {
1638 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1639 td->free_struct(td, struct_ptr, contents_only);
1640}
1641
1642int
1643OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1644 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1645 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1646 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1647}
1648
1649asn_dec_rval_t
1650OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1651 void **structure, const void *bufptr, size_t size, int tag_mode) {
1652 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1653 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1654}
1655
1656asn_enc_rval_t
1657OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1658 void *structure, int tag_mode, ber_tlv_tag_t tag,
1659 asn_app_consume_bytes_f *cb, void *app_key) {
1660 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1661 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1662}
1663
1664asn_dec_rval_t
1665OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1666 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1667 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1668 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1669}
1670
1671asn_enc_rval_t
1672OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1673 int ilevel, enum xer_encoder_flags_e flags,
1674 asn_app_consume_bytes_f *cb, void *app_key) {
1675 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1676 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1677}
1678
1679
1680/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1681
Lev Walkin59b176e2005-11-26 11:25:14 +00001682static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001683 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1684};
1685asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1686 "OK-IntegerInRange2",
1687 "OK-IntegerInRange2",
1688 OK_IntegerInRange2_free,
1689 OK_IntegerInRange2_print,
1690 OK_IntegerInRange2_constraint,
1691 OK_IntegerInRange2_decode_ber,
1692 OK_IntegerInRange2_encode_der,
1693 OK_IntegerInRange2_decode_xer,
1694 OK_IntegerInRange2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001695 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001696 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001697 asn_DEF_OK_IntegerInRange2_tags_1,
1698 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1699 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1700 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
1701 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1702 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1703 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001704 0, 0, /* No members */
1705 0 /* No specifics */
1706};
1707
1708
1709/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
1710
Lev Walkinc3f0b892005-08-14 02:40:04 +00001711#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001712
1713/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
1714
Lev Walkinc3f0b892005-08-14 02:40:04 +00001715typedef long OK_IntegerInRange3_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001716
1717/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
1718
1719extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
1720asn_struct_free_f OK_IntegerInRange3_free;
1721asn_struct_print_f OK_IntegerInRange3_print;
1722asn_constr_check_f OK_IntegerInRange3_constraint;
1723ber_type_decoder_f OK_IntegerInRange3_decode_ber;
1724der_type_encoder_f OK_IntegerInRange3_encode_der;
1725xer_type_decoder_f OK_IntegerInRange3_decode_xer;
1726xer_type_encoder_f OK_IntegerInRange3_encode_xer;
1727
1728/*** <<< CODE [OK-IntegerInRange3] >>> ***/
1729
1730int
1731OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001732 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001733 long value;
1734
1735 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001736 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001737 "%s: value not given (%s:%d)",
1738 td->name, __FILE__, __LINE__);
1739 return -1;
1740 }
1741
Lev Walkinc3f0b892005-08-14 02:40:04 +00001742 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001743
1744 if((value >= -2147483648 && value <= 2147483647)) {
1745 /* Constraint check succeeded */
1746 return 0;
1747 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001748 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001749 "%s: constraint failed (%s:%d)",
1750 td->name, __FILE__, __LINE__);
1751 return -1;
1752 }
1753}
1754
1755/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001756 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001757 * so here we adjust the DEF accordingly.
1758 */
1759static void
1760OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001761 td->free_struct = asn_DEF_NativeInteger.free_struct;
1762 td->print_struct = asn_DEF_NativeInteger.print_struct;
1763 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1764 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1765 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1766 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001767 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001768 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001769 if(!td->per_constraints)
1770 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001771 td->elements = asn_DEF_NativeInteger.elements;
1772 td->elements_count = asn_DEF_NativeInteger.elements_count;
1773 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001774}
1775
1776void
1777OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
1778 void *struct_ptr, int contents_only) {
1779 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1780 td->free_struct(td, struct_ptr, contents_only);
1781}
1782
1783int
1784OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1785 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1786 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1787 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1788}
1789
1790asn_dec_rval_t
1791OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1792 void **structure, const void *bufptr, size_t size, int tag_mode) {
1793 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1794 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1795}
1796
1797asn_enc_rval_t
1798OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
1799 void *structure, int tag_mode, ber_tlv_tag_t tag,
1800 asn_app_consume_bytes_f *cb, void *app_key) {
1801 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1802 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1803}
1804
1805asn_dec_rval_t
1806OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1807 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1808 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1809 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1810}
1811
1812asn_enc_rval_t
1813OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1814 int ilevel, enum xer_encoder_flags_e flags,
1815 asn_app_consume_bytes_f *cb, void *app_key) {
1816 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1817 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1818}
1819
1820
1821/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
1822
Lev Walkin59b176e2005-11-26 11:25:14 +00001823static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001824 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1825};
1826asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
1827 "OK-IntegerInRange3",
1828 "OK-IntegerInRange3",
1829 OK_IntegerInRange3_free,
1830 OK_IntegerInRange3_print,
1831 OK_IntegerInRange3_constraint,
1832 OK_IntegerInRange3_decode_ber,
1833 OK_IntegerInRange3_encode_der,
1834 OK_IntegerInRange3_decode_xer,
1835 OK_IntegerInRange3_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001836 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001837 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001838 asn_DEF_OK_IntegerInRange3_tags_1,
1839 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1840 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1841 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
1842 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1843 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1844 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001845 0, 0, /* No members */
1846 0 /* No specifics */
1847};
1848
1849
1850/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
1851
Lev Walkinc3f0b892005-08-14 02:40:04 +00001852#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001853
1854/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
1855
Lev Walkinc3f0b892005-08-14 02:40:04 +00001856typedef long OK_IntegerInRange4_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001857
1858/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
1859
1860extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
1861asn_struct_free_f OK_IntegerInRange4_free;
1862asn_struct_print_f OK_IntegerInRange4_print;
1863asn_constr_check_f OK_IntegerInRange4_constraint;
1864ber_type_decoder_f OK_IntegerInRange4_decode_ber;
1865der_type_encoder_f OK_IntegerInRange4_encode_der;
1866xer_type_decoder_f OK_IntegerInRange4_decode_xer;
1867xer_type_encoder_f OK_IntegerInRange4_encode_xer;
1868
1869/*** <<< CODE [OK-IntegerInRange4] >>> ***/
1870
1871int
1872OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001873 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001874 long value;
1875
1876 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001877 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001878 "%s: value not given (%s:%d)",
1879 td->name, __FILE__, __LINE__);
1880 return -1;
1881 }
1882
Lev Walkinc3f0b892005-08-14 02:40:04 +00001883 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001884
1885 if(((value == -2147483648) || (value == 2147483647))) {
1886 /* Constraint check succeeded */
1887 return 0;
1888 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001889 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001890 "%s: constraint failed (%s:%d)",
1891 td->name, __FILE__, __LINE__);
1892 return -1;
1893 }
1894}
1895
1896/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001897 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001898 * so here we adjust the DEF accordingly.
1899 */
1900static void
1901OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001902 td->free_struct = asn_DEF_NativeInteger.free_struct;
1903 td->print_struct = asn_DEF_NativeInteger.print_struct;
1904 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1905 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1906 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1907 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001908 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001909 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001910 if(!td->per_constraints)
1911 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001912 td->elements = asn_DEF_NativeInteger.elements;
1913 td->elements_count = asn_DEF_NativeInteger.elements_count;
1914 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001915}
1916
1917void
1918OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
1919 void *struct_ptr, int contents_only) {
1920 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1921 td->free_struct(td, struct_ptr, contents_only);
1922}
1923
1924int
1925OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1926 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1927 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1928 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1929}
1930
1931asn_dec_rval_t
1932OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1933 void **structure, const void *bufptr, size_t size, int tag_mode) {
1934 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1935 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1936}
1937
1938asn_enc_rval_t
1939OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
1940 void *structure, int tag_mode, ber_tlv_tag_t tag,
1941 asn_app_consume_bytes_f *cb, void *app_key) {
1942 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1943 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1944}
1945
1946asn_dec_rval_t
1947OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1948 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1949 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1950 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1951}
1952
1953asn_enc_rval_t
1954OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1955 int ilevel, enum xer_encoder_flags_e flags,
1956 asn_app_consume_bytes_f *cb, void *app_key) {
1957 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1958 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1959}
1960
1961
1962/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
1963
Lev Walkin59b176e2005-11-26 11:25:14 +00001964static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001965 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1966};
1967asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
1968 "OK-IntegerInRange4",
1969 "OK-IntegerInRange4",
1970 OK_IntegerInRange4_free,
1971 OK_IntegerInRange4_print,
1972 OK_IntegerInRange4_constraint,
1973 OK_IntegerInRange4_decode_ber,
1974 OK_IntegerInRange4_encode_der,
1975 OK_IntegerInRange4_decode_xer,
1976 OK_IntegerInRange4_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001977 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001978 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001979 asn_DEF_OK_IntegerInRange4_tags_1,
1980 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1981 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1982 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
1983 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1984 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1985 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001986 0, 0, /* No members */
1987 0 /* No specifics */
1988};
1989
1990
1991/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
1992
Lev Walkinc3f0b892005-08-14 02:40:04 +00001993#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001994
1995/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
1996
Lev Walkinc3f0b892005-08-14 02:40:04 +00001997typedef long OK_IntegerInRange5_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001998
1999/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2000
2001extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2002asn_struct_free_f OK_IntegerInRange5_free;
2003asn_struct_print_f OK_IntegerInRange5_print;
2004asn_constr_check_f OK_IntegerInRange5_constraint;
2005ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2006der_type_encoder_f OK_IntegerInRange5_encode_der;
2007xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2008xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2009
2010/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2011
2012int
2013OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002014 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00002015 long value;
2016
2017 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002018 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002019 "%s: value not given (%s:%d)",
2020 td->name, __FILE__, __LINE__);
2021 return -1;
2022 }
2023
Lev Walkinc3f0b892005-08-14 02:40:04 +00002024 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00002025
2026 if(((value == -2147483648) || (value == 2147483647))) {
2027 /* Constraint check succeeded */
2028 return 0;
2029 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002030 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002031 "%s: constraint failed (%s:%d)",
2032 td->name, __FILE__, __LINE__);
2033 return -1;
2034 }
2035}
2036
2037/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00002038 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00002039 * so here we adjust the DEF accordingly.
2040 */
2041static void
2042OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002043 td->free_struct = asn_DEF_NativeInteger.free_struct;
2044 td->print_struct = asn_DEF_NativeInteger.print_struct;
2045 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2046 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2047 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2048 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002049 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002050 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002051 if(!td->per_constraints)
2052 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002053 td->elements = asn_DEF_NativeInteger.elements;
2054 td->elements_count = asn_DEF_NativeInteger.elements_count;
2055 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00002056}
2057
2058void
2059OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2060 void *struct_ptr, int contents_only) {
2061 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2062 td->free_struct(td, struct_ptr, contents_only);
2063}
2064
2065int
2066OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2067 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2068 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2069 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2070}
2071
2072asn_dec_rval_t
2073OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2074 void **structure, const void *bufptr, size_t size, int tag_mode) {
2075 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2076 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2077}
2078
2079asn_enc_rval_t
2080OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2081 void *structure, int tag_mode, ber_tlv_tag_t tag,
2082 asn_app_consume_bytes_f *cb, void *app_key) {
2083 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2084 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2085}
2086
2087asn_dec_rval_t
2088OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2089 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2090 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2091 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2092}
2093
2094asn_enc_rval_t
2095OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2096 int ilevel, enum xer_encoder_flags_e flags,
2097 asn_app_consume_bytes_f *cb, void *app_key) {
2098 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2099 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2100}
2101
2102
2103/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2104
Lev Walkin59b176e2005-11-26 11:25:14 +00002105static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00002106 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2107};
2108asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2109 "OK-IntegerInRange5",
2110 "OK-IntegerInRange5",
2111 OK_IntegerInRange5_free,
2112 OK_IntegerInRange5_print,
2113 OK_IntegerInRange5_constraint,
2114 OK_IntegerInRange5_decode_ber,
2115 OK_IntegerInRange5_encode_der,
2116 OK_IntegerInRange5_decode_xer,
2117 OK_IntegerInRange5_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002118 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002119 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002120 asn_DEF_OK_IntegerInRange5_tags_1,
2121 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2122 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2123 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2124 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2125 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2126 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002127 0, 0, /* No members */
2128 0 /* No specifics */
2129};
2130
Lev Walkinc3f0b892005-08-14 02:40:04 +00002131
Lev Walkinfee6f712005-08-27 03:13:51 +00002132/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2133
2134#include <INTEGER.h>
2135
2136/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2137
2138typedef INTEGER_t NO_IntegerInRange6_t;
2139
2140/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2141
2142extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2143asn_struct_free_f NO_IntegerInRange6_free;
2144asn_struct_print_f NO_IntegerInRange6_print;
2145asn_constr_check_f NO_IntegerInRange6_constraint;
2146ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2147der_type_encoder_f NO_IntegerInRange6_encode_der;
2148xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2149xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2150
2151/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2152
2153int
2154NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002155 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinfee6f712005-08-27 03:13:51 +00002156 const INTEGER_t *st = (const INTEGER_t *)sptr;
2157 long value;
2158
2159 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002160 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002161 "%s: value not given (%s:%d)",
2162 td->name, __FILE__, __LINE__);
2163 return -1;
2164 }
2165
2166 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002167 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002168 "%s: value too large (%s:%d)",
2169 td->name, __FILE__, __LINE__);
2170 return -1;
2171 }
2172
2173 if((value >= 0 && value <= 4294967295)) {
2174 /* Constraint check succeeded */
2175 return 0;
2176 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002177 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002178 "%s: constraint failed (%s:%d)",
2179 td->name, __FILE__, __LINE__);
2180 return -1;
2181 }
2182}
2183
2184/*
2185 * This type is implemented using INTEGER,
2186 * so here we adjust the DEF accordingly.
2187 */
2188static void
2189NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2190 td->free_struct = asn_DEF_INTEGER.free_struct;
2191 td->print_struct = asn_DEF_INTEGER.print_struct;
2192 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2193 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2194 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2195 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002196 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002197 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002198 if(!td->per_constraints)
2199 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkinfee6f712005-08-27 03:13:51 +00002200 td->elements = asn_DEF_INTEGER.elements;
2201 td->elements_count = asn_DEF_INTEGER.elements_count;
2202 td->specifics = asn_DEF_INTEGER.specifics;
2203}
2204
2205void
2206NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2207 void *struct_ptr, int contents_only) {
2208 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2209 td->free_struct(td, struct_ptr, contents_only);
2210}
2211
2212int
2213NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2214 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2215 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2216 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2217}
2218
2219asn_dec_rval_t
2220NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2221 void **structure, const void *bufptr, size_t size, int tag_mode) {
2222 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2223 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2224}
2225
2226asn_enc_rval_t
2227NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2228 void *structure, int tag_mode, ber_tlv_tag_t tag,
2229 asn_app_consume_bytes_f *cb, void *app_key) {
2230 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2231 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2232}
2233
2234asn_dec_rval_t
2235NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2236 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2237 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2238 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2239}
2240
2241asn_enc_rval_t
2242NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2243 int ilevel, enum xer_encoder_flags_e flags,
2244 asn_app_consume_bytes_f *cb, void *app_key) {
2245 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2246 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2247}
2248
2249
2250/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2251
Lev Walkin59b176e2005-11-26 11:25:14 +00002252static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkinfee6f712005-08-27 03:13:51 +00002253 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2254};
2255asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2256 "NO-IntegerInRange6",
2257 "NO-IntegerInRange6",
2258 NO_IntegerInRange6_free,
2259 NO_IntegerInRange6_print,
2260 NO_IntegerInRange6_constraint,
2261 NO_IntegerInRange6_decode_ber,
2262 NO_IntegerInRange6_encode_der,
2263 NO_IntegerInRange6_decode_xer,
2264 NO_IntegerInRange6_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002265 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinfee6f712005-08-27 03:13:51 +00002266 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002267 asn_DEF_NO_IntegerInRange6_tags_1,
2268 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2269 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2270 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2271 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2272 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2273 0, /* No PER visible constraints */
Lev Walkinfee6f712005-08-27 03:13:51 +00002274 0, 0, /* No members */
2275 0 /* No specifics */
2276};
2277
2278
Lev Walkinc3f0b892005-08-14 02:40:04 +00002279/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2280
2281#include <NativeInteger.h>
2282
2283/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2284
2285typedef enum CN_IntegerEnumerated1 {
2286 CN_IntegerEnumerated1_a = 1,
2287 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002288} e_CN_IntegerEnumerated1;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002289
2290/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2291
2292typedef long CN_IntegerEnumerated1_t;
2293
2294/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2295
2296extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2297asn_struct_free_f CN_IntegerEnumerated1_free;
2298asn_struct_print_f CN_IntegerEnumerated1_print;
2299asn_constr_check_f CN_IntegerEnumerated1_constraint;
2300ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2301der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2302xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2303xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2304
2305/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2306
2307int
2308CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002309 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002310 /* Replace with underlying type checker */
2311 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002312 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002313}
2314
2315/*
2316 * This type is implemented using NativeInteger,
2317 * so here we adjust the DEF accordingly.
2318 */
2319static void
2320CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2321 td->free_struct = asn_DEF_NativeInteger.free_struct;
2322 td->print_struct = asn_DEF_NativeInteger.print_struct;
2323 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2324 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2325 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2326 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002327 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002328 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002329 if(!td->per_constraints)
2330 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002331 td->elements = asn_DEF_NativeInteger.elements;
2332 td->elements_count = asn_DEF_NativeInteger.elements_count;
2333 td->specifics = asn_DEF_NativeInteger.specifics;
2334}
2335
2336void
2337CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2338 void *struct_ptr, int contents_only) {
2339 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2340 td->free_struct(td, struct_ptr, contents_only);
2341}
2342
2343int
2344CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2345 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2346 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2347 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2348}
2349
2350asn_dec_rval_t
2351CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2352 void **structure, const void *bufptr, size_t size, int tag_mode) {
2353 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2354 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2355}
2356
2357asn_enc_rval_t
2358CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2359 void *structure, int tag_mode, ber_tlv_tag_t tag,
2360 asn_app_consume_bytes_f *cb, void *app_key) {
2361 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2362 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2363}
2364
2365asn_dec_rval_t
2366CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2367 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2368 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2369 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2370}
2371
2372asn_enc_rval_t
2373CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2374 int ilevel, enum xer_encoder_flags_e flags,
2375 asn_app_consume_bytes_f *cb, void *app_key) {
2376 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2377 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2378}
2379
2380
2381/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2382
Lev Walkin59b176e2005-11-26 11:25:14 +00002383static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002384 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2385};
2386asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2387 "CN-IntegerEnumerated1",
2388 "CN-IntegerEnumerated1",
2389 CN_IntegerEnumerated1_free,
2390 CN_IntegerEnumerated1_print,
2391 CN_IntegerEnumerated1_constraint,
2392 CN_IntegerEnumerated1_decode_ber,
2393 CN_IntegerEnumerated1_encode_der,
2394 CN_IntegerEnumerated1_decode_xer,
2395 CN_IntegerEnumerated1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002396 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002397 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002398 asn_DEF_CN_IntegerEnumerated1_tags_1,
2399 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2400 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2401 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2402 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2403 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2404 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002405 0, 0, /* Defined elsewhere */
2406 0 /* No specifics */
2407};
2408
2409
2410/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2411
2412#include <INTEGER.h>
2413
2414/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2415
2416typedef enum NO_IntegerEnumerated2 {
2417 NO_IntegerEnumerated2_a = 1,
2418 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002419} e_NO_IntegerEnumerated2;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002420
2421/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2422
2423typedef INTEGER_t NO_IntegerEnumerated2_t;
2424
2425/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2426
2427extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2428asn_struct_free_f NO_IntegerEnumerated2_free;
2429asn_struct_print_f NO_IntegerEnumerated2_print;
2430asn_constr_check_f NO_IntegerEnumerated2_constraint;
2431ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2432der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2433xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2434xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2435
2436/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2437
2438int
2439NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002440 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002441 /* Replace with underlying type checker */
2442 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002443 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002444}
2445
2446/*
2447 * This type is implemented using INTEGER,
2448 * so here we adjust the DEF accordingly.
2449 */
2450static void
2451NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2452 td->free_struct = asn_DEF_INTEGER.free_struct;
2453 td->print_struct = asn_DEF_INTEGER.print_struct;
2454 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2455 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2456 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2457 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002458 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002459 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002460 if(!td->per_constraints)
2461 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002462 td->elements = asn_DEF_INTEGER.elements;
2463 td->elements_count = asn_DEF_INTEGER.elements_count;
2464 td->specifics = asn_DEF_INTEGER.specifics;
2465}
2466
2467void
2468NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2469 void *struct_ptr, int contents_only) {
2470 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2471 td->free_struct(td, struct_ptr, contents_only);
2472}
2473
2474int
2475NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2476 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2477 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2478 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2479}
2480
2481asn_dec_rval_t
2482NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2483 void **structure, const void *bufptr, size_t size, int tag_mode) {
2484 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2485 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2486}
2487
2488asn_enc_rval_t
2489NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2490 void *structure, int tag_mode, ber_tlv_tag_t tag,
2491 asn_app_consume_bytes_f *cb, void *app_key) {
2492 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2493 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2494}
2495
2496asn_dec_rval_t
2497NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2498 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2499 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2500 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2501}
2502
2503asn_enc_rval_t
2504NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2505 int ilevel, enum xer_encoder_flags_e flags,
2506 asn_app_consume_bytes_f *cb, void *app_key) {
2507 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2508 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2509}
2510
2511
2512/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2513
Lev Walkin59b176e2005-11-26 11:25:14 +00002514static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002515 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2516};
2517asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2518 "NO-IntegerEnumerated2",
2519 "NO-IntegerEnumerated2",
2520 NO_IntegerEnumerated2_free,
2521 NO_IntegerEnumerated2_print,
2522 NO_IntegerEnumerated2_constraint,
2523 NO_IntegerEnumerated2_decode_ber,
2524 NO_IntegerEnumerated2_encode_der,
2525 NO_IntegerEnumerated2_decode_xer,
2526 NO_IntegerEnumerated2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002527 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002528 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002529 asn_DEF_NO_IntegerEnumerated2_tags_1,
2530 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2531 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2532 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2533 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2534 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2535 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002536 0, 0, /* Defined elsewhere */
2537 0 /* No specifics */
2538};
2539