blob: ca7fb6ea1a0dcb0a60c8d113c800590c406c94bc [file] [log] [blame]
Lev Walkin082cadc2005-08-14 02:18:27 +00001
2/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
3
Lev Walkin2a744a72013-03-27 01:56:23 -07004#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00005
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
Lev Walkin2a744a72013-03-27 01:56:23 -07008typedef INTEGER_t CN_IntegerUnlimited_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00009
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 */
Lev Walkin2a744a72013-03-27 01:56:23 -070027 td->check_constraints = asn_DEF_INTEGER.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/*
Lev Walkin2a744a72013-03-27 01:56:23 -070032 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +000033 * so here we adjust the DEF accordingly.
34 */
35static void
36CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -070037 td->free_struct = asn_DEF_INTEGER.free_struct;
38 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080039 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -070040 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
41 td->der_encoder = asn_DEF_INTEGER.der_encoder;
42 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
43 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
44 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
45 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000046 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -070047 td->per_constraints = asn_DEF_INTEGER.per_constraints;
48 td->elements = asn_DEF_INTEGER.elements;
49 td->elements_count = asn_DEF_INTEGER.elements_count;
50 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +000051}
52
53void
54CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
55 void *struct_ptr, int contents_only) {
56 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
57 td->free_struct(td, struct_ptr, contents_only);
58}
59
60int
61CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
62 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
63 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
64 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
65}
66
67asn_dec_rval_t
68CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
69 void **structure, const void *bufptr, size_t size, int tag_mode) {
70 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
71 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
72}
73
74asn_enc_rval_t
75CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
76 void *structure, int tag_mode, ber_tlv_tag_t tag,
77 asn_app_consume_bytes_f *cb, void *app_key) {
78 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
79 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
80}
81
82asn_dec_rval_t
83CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
84 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
85 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
86 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
87}
88
89asn_enc_rval_t
90CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
91 int ilevel, enum xer_encoder_flags_e flags,
92 asn_app_consume_bytes_f *cb, void *app_key) {
93 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
94 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
95}
96
97
98/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
99
Lev Walkina7591b52014-10-12 18:37:35 -0700100static const ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000101 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
102};
103asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
104 "CN-IntegerUnlimited",
105 "CN-IntegerUnlimited",
106 CN_IntegerUnlimited_free,
107 CN_IntegerUnlimited_print,
108 CN_IntegerUnlimited_constraint,
109 CN_IntegerUnlimited_decode_ber,
110 CN_IntegerUnlimited_encode_der,
111 CN_IntegerUnlimited_decode_xer,
112 CN_IntegerUnlimited_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000113 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000114 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000115 asn_DEF_CN_IntegerUnlimited_tags_1,
116 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
117 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
118 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
119 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
120 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
121 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000122 0, 0, /* No members */
123 0 /* No specifics */
124};
125
126
127/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
128
Lev Walkin2a744a72013-03-27 01:56:23 -0700129#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000130
131/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
132
Lev Walkin2a744a72013-03-27 01:56:23 -0700133typedef INTEGER_t CN_IntegerMinMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000134
135/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
136
137extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
138asn_struct_free_f CN_IntegerMinMax_free;
139asn_struct_print_f CN_IntegerMinMax_print;
140asn_constr_check_f CN_IntegerMinMax_constraint;
141ber_type_decoder_f CN_IntegerMinMax_decode_ber;
142der_type_encoder_f CN_IntegerMinMax_encode_der;
143xer_type_decoder_f CN_IntegerMinMax_decode_xer;
144xer_type_encoder_f CN_IntegerMinMax_encode_xer;
145
146/*** <<< CODE [CN-IntegerMinMax] >>> ***/
147
148int
149CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000150 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700151 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000152
153 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000154 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000155 "%s: value not given (%s:%d)",
156 td->name, __FILE__, __LINE__);
157 return -1;
158 }
159
160
161 if(1 /* No applicable constraints whatsoever */) {
162 /* Nothing is here. See below */
163 }
164
165 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700166 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000167 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +0000168}
169
170/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700171 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000172 * so here we adjust the DEF accordingly.
173 */
174static void
175CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700176 td->free_struct = asn_DEF_INTEGER.free_struct;
177 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800178 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700179 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
180 td->der_encoder = asn_DEF_INTEGER.der_encoder;
181 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
182 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
183 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
184 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000185 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700186 td->per_constraints = asn_DEF_INTEGER.per_constraints;
187 td->elements = asn_DEF_INTEGER.elements;
188 td->elements_count = asn_DEF_INTEGER.elements_count;
189 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000190}
191
192void
193CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
194 void *struct_ptr, int contents_only) {
195 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
196 td->free_struct(td, struct_ptr, contents_only);
197}
198
199int
200CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
201 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
202 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
203 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
204}
205
206asn_dec_rval_t
207CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
208 void **structure, const void *bufptr, size_t size, int tag_mode) {
209 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
210 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
211}
212
213asn_enc_rval_t
214CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
215 void *structure, int tag_mode, ber_tlv_tag_t tag,
216 asn_app_consume_bytes_f *cb, void *app_key) {
217 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
218 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
219}
220
221asn_dec_rval_t
222CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
223 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
224 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
225 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
226}
227
228asn_enc_rval_t
229CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
230 int ilevel, enum xer_encoder_flags_e flags,
231 asn_app_consume_bytes_f *cb, void *app_key) {
232 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
233 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
234}
235
236
237/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
238
Lev Walkina7591b52014-10-12 18:37:35 -0700239static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000240 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
241};
242asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
243 "CN-IntegerMinMax",
244 "CN-IntegerMinMax",
245 CN_IntegerMinMax_free,
246 CN_IntegerMinMax_print,
247 CN_IntegerMinMax_constraint,
248 CN_IntegerMinMax_decode_ber,
249 CN_IntegerMinMax_encode_der,
250 CN_IntegerMinMax_decode_xer,
251 CN_IntegerMinMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000252 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000253 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000254 asn_DEF_CN_IntegerMinMax_tags_1,
255 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
256 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
257 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
258 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
259 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
260 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000261 0, 0, /* No members */
262 0 /* No specifics */
263};
264
265
266/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
267
Lev Walkin2a744a72013-03-27 01:56:23 -0700268#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000269
270/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
271
Lev Walkin2a744a72013-03-27 01:56:23 -0700272typedef INTEGER_t CN_IntegerMinLow_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000273
274/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
275
276extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
277asn_struct_free_f CN_IntegerMinLow_free;
278asn_struct_print_f CN_IntegerMinLow_print;
279asn_constr_check_f CN_IntegerMinLow_constraint;
280ber_type_decoder_f CN_IntegerMinLow_decode_ber;
281der_type_encoder_f CN_IntegerMinLow_encode_der;
282xer_type_decoder_f CN_IntegerMinLow_decode_xer;
283xer_type_encoder_f CN_IntegerMinLow_encode_xer;
284
285/*** <<< CODE [CN-IntegerMinLow] >>> ***/
286
287int
288CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000289 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700290 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000291 long value;
292
293 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000294 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000295 "%s: value not given (%s:%d)",
296 td->name, __FILE__, __LINE__);
297 return -1;
298 }
299
Lev Walkin2a744a72013-03-27 01:56:23 -0700300 if(asn_INTEGER2long(st, &value)) {
301 _ASN_CTFAIL(app_key, td, sptr,
302 "%s: value too large (%s:%d)",
303 td->name, __FILE__, __LINE__);
304 return -1;
305 }
Lev Walkin082cadc2005-08-14 02:18:27 +0000306
307 if((value <= 1)) {
308 /* Constraint check succeeded */
309 return 0;
310 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000311 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000312 "%s: constraint failed (%s:%d)",
313 td->name, __FILE__, __LINE__);
314 return -1;
315 }
316}
317
318/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700319 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000320 * so here we adjust the DEF accordingly.
321 */
322static void
323CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700324 td->free_struct = asn_DEF_INTEGER.free_struct;
325 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800326 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700327 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
328 td->der_encoder = asn_DEF_INTEGER.der_encoder;
329 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
330 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
331 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
332 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000333 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700334 td->per_constraints = asn_DEF_INTEGER.per_constraints;
335 td->elements = asn_DEF_INTEGER.elements;
336 td->elements_count = asn_DEF_INTEGER.elements_count;
337 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000338}
339
340void
341CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
342 void *struct_ptr, int contents_only) {
343 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
344 td->free_struct(td, struct_ptr, contents_only);
345}
346
347int
348CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
349 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
350 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
351 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
352}
353
354asn_dec_rval_t
355CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
356 void **structure, const void *bufptr, size_t size, int tag_mode) {
357 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
358 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
359}
360
361asn_enc_rval_t
362CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
363 void *structure, int tag_mode, ber_tlv_tag_t tag,
364 asn_app_consume_bytes_f *cb, void *app_key) {
365 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
366 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
367}
368
369asn_dec_rval_t
370CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
371 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
372 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
373 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
374}
375
376asn_enc_rval_t
377CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
378 int ilevel, enum xer_encoder_flags_e flags,
379 asn_app_consume_bytes_f *cb, void *app_key) {
380 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
381 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
382}
383
384
385/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
386
Lev Walkina7591b52014-10-12 18:37:35 -0700387static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000388 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
389};
390asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
391 "CN-IntegerMinLow",
392 "CN-IntegerMinLow",
393 CN_IntegerMinLow_free,
394 CN_IntegerMinLow_print,
395 CN_IntegerMinLow_constraint,
396 CN_IntegerMinLow_decode_ber,
397 CN_IntegerMinLow_encode_der,
398 CN_IntegerMinLow_decode_xer,
399 CN_IntegerMinLow_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000400 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000401 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000402 asn_DEF_CN_IntegerMinLow_tags_1,
403 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
404 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
405 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
406 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
407 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
408 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000409 0, 0, /* No members */
410 0 /* No specifics */
411};
412
413
414/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
415
416#include <INTEGER.h>
417
418/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
419
420typedef INTEGER_t NO_IntegerMinHigh_t;
421
422/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
423
424extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
425asn_struct_free_f NO_IntegerMinHigh_free;
426asn_struct_print_f NO_IntegerMinHigh_print;
427asn_constr_check_f NO_IntegerMinHigh_constraint;
428ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
429der_type_encoder_f NO_IntegerMinHigh_encode_der;
430xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
431xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
432
433/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
434
435int
436NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000437 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000438 const INTEGER_t *st = (const INTEGER_t *)sptr;
439 long value;
440
441 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000442 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000443 "%s: value not given (%s:%d)",
444 td->name, __FILE__, __LINE__);
445 return -1;
446 }
447
448 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000449 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000450 "%s: value too large (%s:%d)",
451 td->name, __FILE__, __LINE__);
452 return -1;
453 }
454
Lev Walkinc3f0b892005-08-14 02:40:04 +0000455 if((value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000456 /* Constraint check succeeded */
457 return 0;
458 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000459 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000460 "%s: constraint failed (%s:%d)",
461 td->name, __FILE__, __LINE__);
462 return -1;
463 }
464}
465
466/*
467 * This type is implemented using INTEGER,
468 * so here we adjust the DEF accordingly.
469 */
470static void
471NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
472 td->free_struct = asn_DEF_INTEGER.free_struct;
473 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800474 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000475 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
476 td->der_encoder = asn_DEF_INTEGER.der_encoder;
477 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
478 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000479 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000480 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000481 if(!td->per_constraints)
482 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000483 td->elements = asn_DEF_INTEGER.elements;
484 td->elements_count = asn_DEF_INTEGER.elements_count;
485 td->specifics = asn_DEF_INTEGER.specifics;
486}
487
488void
489NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
490 void *struct_ptr, int contents_only) {
491 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
492 td->free_struct(td, struct_ptr, contents_only);
493}
494
495int
496NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
497 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
498 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
499 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
500}
501
502asn_dec_rval_t
503NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
504 void **structure, const void *bufptr, size_t size, int tag_mode) {
505 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
506 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
507}
508
509asn_enc_rval_t
510NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
511 void *structure, int tag_mode, ber_tlv_tag_t tag,
512 asn_app_consume_bytes_f *cb, void *app_key) {
513 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
514 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
515}
516
517asn_dec_rval_t
518NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
519 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
520 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
521 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
522}
523
524asn_enc_rval_t
525NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
526 int ilevel, enum xer_encoder_flags_e flags,
527 asn_app_consume_bytes_f *cb, void *app_key) {
528 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
529 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
530}
531
532
533/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
534
Lev Walkina7591b52014-10-12 18:37:35 -0700535static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000536 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
537};
538asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
539 "NO-IntegerMinHigh",
540 "NO-IntegerMinHigh",
541 NO_IntegerMinHigh_free,
542 NO_IntegerMinHigh_print,
543 NO_IntegerMinHigh_constraint,
544 NO_IntegerMinHigh_decode_ber,
545 NO_IntegerMinHigh_encode_der,
546 NO_IntegerMinHigh_decode_xer,
547 NO_IntegerMinHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000548 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000549 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000550 asn_DEF_NO_IntegerMinHigh_tags_1,
551 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
552 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
553 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
554 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
555 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
556 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000557 0, 0, /* No members */
558 0 /* No specifics */
559};
560
561
562/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
563
Lev Walkin8bb57a22007-12-03 13:41:36 +0000564#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000565
566/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
567
Lev Walkin8bb57a22007-12-03 13:41:36 +0000568typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000569
570/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
571
572extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
573asn_struct_free_f NO_IntegerLowHigh_free;
574asn_struct_print_f NO_IntegerLowHigh_print;
575asn_constr_check_f NO_IntegerLowHigh_constraint;
576ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
577der_type_encoder_f NO_IntegerLowHigh_encode_der;
578xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
579xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
580
581/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
582
583int
584NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000585 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000586 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +0000587
588 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000589 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000590 "%s: value not given (%s:%d)",
591 td->name, __FILE__, __LINE__);
592 return -1;
593 }
594
Lev Walkin8bb57a22007-12-03 13:41:36 +0000595 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000596
Lev Walkinc3f0b892005-08-14 02:40:04 +0000597 if((value >= 1 && value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000598 /* Constraint check succeeded */
599 return 0;
600 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000601 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000602 "%s: constraint failed (%s:%d)",
603 td->name, __FILE__, __LINE__);
604 return -1;
605 }
606}
607
608/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000609 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000610 * so here we adjust the DEF accordingly.
611 */
612static void
613NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000614 td->free_struct = asn_DEF_NativeInteger.free_struct;
615 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800616 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000617 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
618 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
619 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
620 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
621 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
622 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000623 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000624 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
625 td->elements = asn_DEF_NativeInteger.elements;
626 td->elements_count = asn_DEF_NativeInteger.elements_count;
627 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +0000628}
629
630void
631NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
632 void *struct_ptr, int contents_only) {
633 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
634 td->free_struct(td, struct_ptr, contents_only);
635}
636
637int
638NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
639 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
640 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
641 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
642}
643
644asn_dec_rval_t
645NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
646 void **structure, const void *bufptr, size_t size, int tag_mode) {
647 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
648 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
649}
650
651asn_enc_rval_t
652NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
653 void *structure, int tag_mode, ber_tlv_tag_t tag,
654 asn_app_consume_bytes_f *cb, void *app_key) {
655 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
656 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
657}
658
659asn_dec_rval_t
660NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
661 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
662 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
663 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
664}
665
666asn_enc_rval_t
667NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
668 int ilevel, enum xer_encoder_flags_e flags,
669 asn_app_consume_bytes_f *cb, void *app_key) {
670 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
671 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
672}
673
674
675/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
676
Lev Walkina7591b52014-10-12 18:37:35 -0700677static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000678 0, 0, 0, 0, 0,
679 0, /* Native long size */
680 1 /* Unsigned representation */
681};
Lev Walkina7591b52014-10-12 18:37:35 -0700682static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000683 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
684};
685asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
686 "NO-IntegerLowHigh",
687 "NO-IntegerLowHigh",
688 NO_IntegerLowHigh_free,
689 NO_IntegerLowHigh_print,
690 NO_IntegerLowHigh_constraint,
691 NO_IntegerLowHigh_decode_ber,
692 NO_IntegerLowHigh_encode_der,
693 NO_IntegerLowHigh_decode_xer,
694 NO_IntegerLowHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000695 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000696 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000697 asn_DEF_NO_IntegerLowHigh_tags_1,
698 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
699 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
700 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
701 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
702 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
703 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000704 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000705 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +0000706};
707
708
709/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
710
Lev Walkin2a744a72013-03-27 01:56:23 -0700711#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000712
713/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
714
Lev Walkin2a744a72013-03-27 01:56:23 -0700715typedef INTEGER_t CN_IntegerLowMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000716
717/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
718
719extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
720asn_struct_free_f CN_IntegerLowMax_free;
721asn_struct_print_f CN_IntegerLowMax_print;
722asn_constr_check_f CN_IntegerLowMax_constraint;
723ber_type_decoder_f CN_IntegerLowMax_decode_ber;
724der_type_encoder_f CN_IntegerLowMax_encode_der;
725xer_type_decoder_f CN_IntegerLowMax_decode_xer;
726xer_type_encoder_f CN_IntegerLowMax_encode_xer;
727
728/*** <<< CODE [CN-IntegerLowMax] >>> ***/
729
730int
731CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000732 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700733 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000734 long value;
735
736 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000737 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000738 "%s: value not given (%s:%d)",
739 td->name, __FILE__, __LINE__);
740 return -1;
741 }
742
Lev Walkin2a744a72013-03-27 01:56:23 -0700743 if(asn_INTEGER2long(st, &value)) {
744 _ASN_CTFAIL(app_key, td, sptr,
745 "%s: value too large (%s:%d)",
746 td->name, __FILE__, __LINE__);
747 return -1;
748 }
Lev Walkin082cadc2005-08-14 02:18:27 +0000749
750 if((value >= 1)) {
751 /* Constraint check succeeded */
752 return 0;
753 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000754 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000755 "%s: constraint failed (%s:%d)",
756 td->name, __FILE__, __LINE__);
757 return -1;
758 }
759}
760
761/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700762 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000763 * so here we adjust the DEF accordingly.
764 */
765static void
766CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700767 td->free_struct = asn_DEF_INTEGER.free_struct;
768 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800769 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700770 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
771 td->der_encoder = asn_DEF_INTEGER.der_encoder;
772 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
773 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
774 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
775 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000776 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700777 td->per_constraints = asn_DEF_INTEGER.per_constraints;
778 td->elements = asn_DEF_INTEGER.elements;
779 td->elements_count = asn_DEF_INTEGER.elements_count;
780 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000781}
782
783void
784CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
785 void *struct_ptr, int contents_only) {
786 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
787 td->free_struct(td, struct_ptr, contents_only);
788}
789
790int
791CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
792 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
793 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
794 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
795}
796
797asn_dec_rval_t
798CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
799 void **structure, const void *bufptr, size_t size, int tag_mode) {
800 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
801 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
802}
803
804asn_enc_rval_t
805CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
806 void *structure, int tag_mode, ber_tlv_tag_t tag,
807 asn_app_consume_bytes_f *cb, void *app_key) {
808 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
809 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
810}
811
812asn_dec_rval_t
813CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
814 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
815 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
816 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
817}
818
819asn_enc_rval_t
820CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
821 int ilevel, enum xer_encoder_flags_e flags,
822 asn_app_consume_bytes_f *cb, void *app_key) {
823 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
824 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
825}
826
827
828/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
829
Lev Walkina7591b52014-10-12 18:37:35 -0700830static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000831 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
832};
833asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
834 "CN-IntegerLowMax",
835 "CN-IntegerLowMax",
836 CN_IntegerLowMax_free,
837 CN_IntegerLowMax_print,
838 CN_IntegerLowMax_constraint,
839 CN_IntegerLowMax_decode_ber,
840 CN_IntegerLowMax_encode_der,
841 CN_IntegerLowMax_decode_xer,
842 CN_IntegerLowMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000843 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000844 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000845 asn_DEF_CN_IntegerLowMax_tags_1,
846 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
847 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
848 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
849 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
850 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
851 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000852 0, 0, /* No members */
853 0 /* No specifics */
854};
855
856
857/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
858
859#include <INTEGER.h>
860
861/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
862
863typedef INTEGER_t NO_IntegerHighMax_t;
864
865/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
866
867extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
868asn_struct_free_f NO_IntegerHighMax_free;
869asn_struct_print_f NO_IntegerHighMax_print;
870asn_constr_check_f NO_IntegerHighMax_constraint;
871ber_type_decoder_f NO_IntegerHighMax_decode_ber;
872der_type_encoder_f NO_IntegerHighMax_encode_der;
873xer_type_decoder_f NO_IntegerHighMax_decode_xer;
874xer_type_encoder_f NO_IntegerHighMax_encode_xer;
875
876/*** <<< CODE [NO-IntegerHighMax] >>> ***/
877
878int
879NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000880 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000881 const INTEGER_t *st = (const INTEGER_t *)sptr;
882 long value;
883
884 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000885 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000886 "%s: value not given (%s:%d)",
887 td->name, __FILE__, __LINE__);
888 return -1;
889 }
890
891 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000892 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000893 "%s: value too large (%s:%d)",
894 td->name, __FILE__, __LINE__);
895 return -1;
896 }
897
Lev Walkinc3f0b892005-08-14 02:40:04 +0000898 if((value >= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000899 /* Constraint check succeeded */
900 return 0;
901 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000902 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000903 "%s: constraint failed (%s:%d)",
904 td->name, __FILE__, __LINE__);
905 return -1;
906 }
907}
908
909/*
910 * This type is implemented using INTEGER,
911 * so here we adjust the DEF accordingly.
912 */
913static void
914NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
915 td->free_struct = asn_DEF_INTEGER.free_struct;
916 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800917 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000918 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
919 td->der_encoder = asn_DEF_INTEGER.der_encoder;
920 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
921 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000922 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000923 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000924 if(!td->per_constraints)
925 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000926 td->elements = asn_DEF_INTEGER.elements;
927 td->elements_count = asn_DEF_INTEGER.elements_count;
928 td->specifics = asn_DEF_INTEGER.specifics;
929}
930
931void
932NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
933 void *struct_ptr, int contents_only) {
934 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
935 td->free_struct(td, struct_ptr, contents_only);
936}
937
938int
939NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
940 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
941 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
942 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
943}
944
945asn_dec_rval_t
946NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
947 void **structure, const void *bufptr, size_t size, int tag_mode) {
948 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
949 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
950}
951
952asn_enc_rval_t
953NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
954 void *structure, int tag_mode, ber_tlv_tag_t tag,
955 asn_app_consume_bytes_f *cb, void *app_key) {
956 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
957 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
958}
959
960asn_dec_rval_t
961NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
962 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
963 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
964 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
965}
966
967asn_enc_rval_t
968NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
969 int ilevel, enum xer_encoder_flags_e flags,
970 asn_app_consume_bytes_f *cb, void *app_key) {
971 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
972 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
973}
974
975
976/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
977
Lev Walkina7591b52014-10-12 18:37:35 -0700978static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000979 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
980};
981asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
982 "NO-IntegerHighMax",
983 "NO-IntegerHighMax",
984 NO_IntegerHighMax_free,
985 NO_IntegerHighMax_print,
986 NO_IntegerHighMax_constraint,
987 NO_IntegerHighMax_decode_ber,
988 NO_IntegerHighMax_encode_der,
989 NO_IntegerHighMax_decode_xer,
990 NO_IntegerHighMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000991 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000992 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000993 asn_DEF_NO_IntegerHighMax_tags_1,
994 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
995 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
996 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
997 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
998 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
999 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001000 0, 0, /* No members */
1001 0 /* No specifics */
1002};
1003
1004
1005/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
1006
1007#include <INTEGER.h>
1008
1009/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
1010
1011typedef INTEGER_t NO_IntegerLowestMax_t;
1012
1013/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1014
1015extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1016asn_struct_free_f NO_IntegerLowestMax_free;
1017asn_struct_print_f NO_IntegerLowestMax_print;
1018asn_constr_check_f NO_IntegerLowestMax_constraint;
1019ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1020der_type_encoder_f NO_IntegerLowestMax_encode_der;
1021xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1022xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1023
1024/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1025
1026int
1027NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001028 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001029 const INTEGER_t *st = (const INTEGER_t *)sptr;
1030 long value;
1031
1032 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001033 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001034 "%s: value not given (%s:%d)",
1035 td->name, __FILE__, __LINE__);
1036 return -1;
1037 }
1038
1039 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001040 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001041 "%s: value too large (%s:%d)",
1042 td->name, __FILE__, __LINE__);
1043 return -1;
1044 }
1045
Lev Walkinc3f0b892005-08-14 02:40:04 +00001046 if((value >= -3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001047 /* Constraint check succeeded */
1048 return 0;
1049 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001050 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001051 "%s: constraint failed (%s:%d)",
1052 td->name, __FILE__, __LINE__);
1053 return -1;
1054 }
1055}
1056
1057/*
1058 * This type is implemented using INTEGER,
1059 * so here we adjust the DEF accordingly.
1060 */
1061static void
1062NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1063 td->free_struct = asn_DEF_INTEGER.free_struct;
1064 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001065 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001066 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1067 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1068 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1069 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001070 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001071 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001072 if(!td->per_constraints)
1073 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001074 td->elements = asn_DEF_INTEGER.elements;
1075 td->elements_count = asn_DEF_INTEGER.elements_count;
1076 td->specifics = asn_DEF_INTEGER.specifics;
1077}
1078
1079void
1080NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1081 void *struct_ptr, int contents_only) {
1082 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1083 td->free_struct(td, struct_ptr, contents_only);
1084}
1085
1086int
1087NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1088 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1089 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1090 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1091}
1092
1093asn_dec_rval_t
1094NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1095 void **structure, const void *bufptr, size_t size, int tag_mode) {
1096 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1097 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1098}
1099
1100asn_enc_rval_t
1101NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1102 void *structure, int tag_mode, ber_tlv_tag_t tag,
1103 asn_app_consume_bytes_f *cb, void *app_key) {
1104 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1105 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1106}
1107
1108asn_dec_rval_t
1109NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1110 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1111 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1112 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1113}
1114
1115asn_enc_rval_t
1116NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1117 int ilevel, enum xer_encoder_flags_e flags,
1118 asn_app_consume_bytes_f *cb, void *app_key) {
1119 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1120 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1121}
1122
1123
1124/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1125
Lev Walkina7591b52014-10-12 18:37:35 -07001126static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001127 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1128};
1129asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1130 "NO-IntegerLowestMax",
1131 "NO-IntegerLowestMax",
1132 NO_IntegerLowestMax_free,
1133 NO_IntegerLowestMax_print,
1134 NO_IntegerLowestMax_constraint,
1135 NO_IntegerLowestMax_decode_ber,
1136 NO_IntegerLowestMax_encode_der,
1137 NO_IntegerLowestMax_decode_xer,
1138 NO_IntegerLowestMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001139 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001140 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001141 asn_DEF_NO_IntegerLowestMax_tags_1,
1142 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1143 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1144 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1145 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1146 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1147 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001148 0, 0, /* No members */
1149 0 /* No specifics */
1150};
1151
1152
1153/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1154
Lev Walkin8bb57a22007-12-03 13:41:36 +00001155#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001156
1157/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1158
Lev Walkin8bb57a22007-12-03 13:41:36 +00001159typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001160
1161/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1162
1163extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1164asn_struct_free_f NO_IntegerOutRange_free;
1165asn_struct_print_f NO_IntegerOutRange_print;
1166asn_constr_check_f NO_IntegerOutRange_constraint;
1167ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1168der_type_encoder_f NO_IntegerOutRange_encode_der;
1169xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1170xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1171
1172/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1173
1174int
1175NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001176 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001177 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001178
1179 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001180 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001181 "%s: value not given (%s:%d)",
1182 td->name, __FILE__, __LINE__);
1183 return -1;
1184 }
1185
Lev Walkin8bb57a22007-12-03 13:41:36 +00001186 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001187
Lev Walkinc3f0b892005-08-14 02:40:04 +00001188 if((value >= 3000000000 && value <= 3000000001)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001189 /* Constraint check succeeded */
1190 return 0;
1191 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001192 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001193 "%s: constraint failed (%s:%d)",
1194 td->name, __FILE__, __LINE__);
1195 return -1;
1196 }
1197}
1198
1199/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001200 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001201 * so here we adjust the DEF accordingly.
1202 */
1203static void
1204NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001205 td->free_struct = asn_DEF_NativeInteger.free_struct;
1206 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001207 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001208 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1209 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1210 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1211 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1212 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1213 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001214 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001215 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1216 td->elements = asn_DEF_NativeInteger.elements;
1217 td->elements_count = asn_DEF_NativeInteger.elements_count;
1218 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001219}
1220
1221void
1222NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1223 void *struct_ptr, int contents_only) {
1224 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1225 td->free_struct(td, struct_ptr, contents_only);
1226}
1227
1228int
1229NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1230 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1231 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1232 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1233}
1234
1235asn_dec_rval_t
1236NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1237 void **structure, const void *bufptr, size_t size, int tag_mode) {
1238 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1239 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1240}
1241
1242asn_enc_rval_t
1243NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1244 void *structure, int tag_mode, ber_tlv_tag_t tag,
1245 asn_app_consume_bytes_f *cb, void *app_key) {
1246 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1247 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1248}
1249
1250asn_dec_rval_t
1251NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1252 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1253 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1254 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1255}
1256
1257asn_enc_rval_t
1258NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1259 int ilevel, enum xer_encoder_flags_e flags,
1260 asn_app_consume_bytes_f *cb, void *app_key) {
1261 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1262 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1263}
1264
1265
1266/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1267
Lev Walkina7591b52014-10-12 18:37:35 -07001268static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001269 0, 0, 0, 0, 0,
1270 0, /* Native long size */
1271 1 /* Unsigned representation */
1272};
Lev Walkina7591b52014-10-12 18:37:35 -07001273static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001274 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1275};
1276asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1277 "NO-IntegerOutRange",
1278 "NO-IntegerOutRange",
1279 NO_IntegerOutRange_free,
1280 NO_IntegerOutRange_print,
1281 NO_IntegerOutRange_constraint,
1282 NO_IntegerOutRange_decode_ber,
1283 NO_IntegerOutRange_encode_der,
1284 NO_IntegerOutRange_decode_xer,
1285 NO_IntegerOutRange_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001286 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001287 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001288 asn_DEF_NO_IntegerOutRange_tags_1,
1289 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1290 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1291 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1292 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1293 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1294 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001295 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001296 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001297};
1298
1299
1300/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1301
Lev Walkin8bb57a22007-12-03 13:41:36 +00001302#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001303
1304/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1305
Lev Walkin8bb57a22007-12-03 13:41:36 +00001306typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001307
1308/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1309
1310extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1311asn_struct_free_f NO_IntegerOutValue_free;
1312asn_struct_print_f NO_IntegerOutValue_print;
1313asn_constr_check_f NO_IntegerOutValue_constraint;
1314ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1315der_type_encoder_f NO_IntegerOutValue_encode_der;
1316xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1317xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1318
1319/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1320
1321int
1322NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001323 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001324 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001325
1326 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001327 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001328 "%s: value not given (%s:%d)",
1329 td->name, __FILE__, __LINE__);
1330 return -1;
1331 }
1332
Lev Walkin8bb57a22007-12-03 13:41:36 +00001333 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001334
Lev Walkinc3f0b892005-08-14 02:40:04 +00001335 if((value == 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001336 /* Constraint check succeeded */
1337 return 0;
1338 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001339 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001340 "%s: constraint failed (%s:%d)",
1341 td->name, __FILE__, __LINE__);
1342 return -1;
1343 }
1344}
1345
1346/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001347 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001348 * so here we adjust the DEF accordingly.
1349 */
1350static void
1351NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001352 td->free_struct = asn_DEF_NativeInteger.free_struct;
1353 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001354 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001355 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1356 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1357 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1358 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1359 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1360 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001361 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001362 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1363 td->elements = asn_DEF_NativeInteger.elements;
1364 td->elements_count = asn_DEF_NativeInteger.elements_count;
1365 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001366}
1367
1368void
1369NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1370 void *struct_ptr, int contents_only) {
1371 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1372 td->free_struct(td, struct_ptr, contents_only);
1373}
1374
1375int
1376NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1377 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1378 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1379 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1380}
1381
1382asn_dec_rval_t
1383NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1384 void **structure, const void *bufptr, size_t size, int tag_mode) {
1385 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1386 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1387}
1388
1389asn_enc_rval_t
1390NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1391 void *structure, int tag_mode, ber_tlv_tag_t tag,
1392 asn_app_consume_bytes_f *cb, void *app_key) {
1393 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1394 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1395}
1396
1397asn_dec_rval_t
1398NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1399 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1400 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1401 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1402}
1403
1404asn_enc_rval_t
1405NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1406 int ilevel, enum xer_encoder_flags_e flags,
1407 asn_app_consume_bytes_f *cb, void *app_key) {
1408 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1409 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1410}
1411
1412
1413/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1414
Lev Walkina7591b52014-10-12 18:37:35 -07001415static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001416 0, 0, 0, 0, 0,
1417 0, /* Native long size */
1418 1 /* Unsigned representation */
1419};
Lev Walkina7591b52014-10-12 18:37:35 -07001420static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001421 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1422};
1423asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1424 "NO-IntegerOutValue",
1425 "NO-IntegerOutValue",
1426 NO_IntegerOutValue_free,
1427 NO_IntegerOutValue_print,
1428 NO_IntegerOutValue_constraint,
1429 NO_IntegerOutValue_decode_ber,
1430 NO_IntegerOutValue_encode_der,
1431 NO_IntegerOutValue_decode_xer,
1432 NO_IntegerOutValue_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001433 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001434 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001435 asn_DEF_NO_IntegerOutValue_tags_1,
1436 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1437 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1438 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1439 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1440 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1441 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001442 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001443 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001444};
1445
1446
1447/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1448
Lev Walkinc3f0b892005-08-14 02:40:04 +00001449#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001450
1451/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1452
Lev Walkinc3f0b892005-08-14 02:40:04 +00001453typedef long OK_IntegerInRange1_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001454
1455/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1456
1457extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1458asn_struct_free_f OK_IntegerInRange1_free;
1459asn_struct_print_f OK_IntegerInRange1_print;
1460asn_constr_check_f OK_IntegerInRange1_constraint;
1461ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1462der_type_encoder_f OK_IntegerInRange1_encode_der;
1463xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1464xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1465
1466/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1467
1468int
1469OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001470 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001471 long value;
1472
1473 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001474 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001475 "%s: value not given (%s:%d)",
1476 td->name, __FILE__, __LINE__);
1477 return -1;
1478 }
1479
Lev Walkinc3f0b892005-08-14 02:40:04 +00001480 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001481
1482 if((value >= -100 && value <= 100)) {
1483 /* Constraint check succeeded */
1484 return 0;
1485 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001486 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001487 "%s: constraint failed (%s:%d)",
1488 td->name, __FILE__, __LINE__);
1489 return -1;
1490 }
1491}
1492
1493/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001494 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001495 * so here we adjust the DEF accordingly.
1496 */
1497static void
1498OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001499 td->free_struct = asn_DEF_NativeInteger.free_struct;
1500 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001501 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001502 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1503 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1504 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1505 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001506 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001507 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001508 if(!td->per_constraints)
1509 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001510 td->elements = asn_DEF_NativeInteger.elements;
1511 td->elements_count = asn_DEF_NativeInteger.elements_count;
1512 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001513}
1514
1515void
1516OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1517 void *struct_ptr, int contents_only) {
1518 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1519 td->free_struct(td, struct_ptr, contents_only);
1520}
1521
1522int
1523OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1524 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1525 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1526 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1527}
1528
1529asn_dec_rval_t
1530OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1531 void **structure, const void *bufptr, size_t size, int tag_mode) {
1532 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1533 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1534}
1535
1536asn_enc_rval_t
1537OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1538 void *structure, int tag_mode, ber_tlv_tag_t tag,
1539 asn_app_consume_bytes_f *cb, void *app_key) {
1540 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1541 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1542}
1543
1544asn_dec_rval_t
1545OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1546 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1547 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1548 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1549}
1550
1551asn_enc_rval_t
1552OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1553 int ilevel, enum xer_encoder_flags_e flags,
1554 asn_app_consume_bytes_f *cb, void *app_key) {
1555 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1556 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1557}
1558
1559
1560/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1561
Lev Walkina7591b52014-10-12 18:37:35 -07001562static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001563 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1564};
1565asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1566 "OK-IntegerInRange1",
1567 "OK-IntegerInRange1",
1568 OK_IntegerInRange1_free,
1569 OK_IntegerInRange1_print,
1570 OK_IntegerInRange1_constraint,
1571 OK_IntegerInRange1_decode_ber,
1572 OK_IntegerInRange1_encode_der,
1573 OK_IntegerInRange1_decode_xer,
1574 OK_IntegerInRange1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001575 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001576 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001577 asn_DEF_OK_IntegerInRange1_tags_1,
1578 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1579 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1580 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1581 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1582 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1583 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001584 0, 0, /* No members */
1585 0 /* No specifics */
1586};
1587
1588
1589/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1590
Lev Walkinc3f0b892005-08-14 02:40:04 +00001591#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001592
1593/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1594
Lev Walkinc3f0b892005-08-14 02:40:04 +00001595typedef long OK_IntegerInRange2_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001596
1597/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1598
1599extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1600asn_struct_free_f OK_IntegerInRange2_free;
1601asn_struct_print_f OK_IntegerInRange2_print;
1602asn_constr_check_f OK_IntegerInRange2_constraint;
1603ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1604der_type_encoder_f OK_IntegerInRange2_encode_der;
1605xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1606xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1607
1608/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1609
1610int
1611OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001612 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001613 long value;
1614
1615 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001616 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001617 "%s: value not given (%s:%d)",
1618 td->name, __FILE__, __LINE__);
1619 return -1;
1620 }
1621
Lev Walkinc3f0b892005-08-14 02:40:04 +00001622 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001623
1624 if(((value == -100) || (value == 100))) {
1625 /* Constraint check succeeded */
1626 return 0;
1627 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001628 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001629 "%s: constraint failed (%s:%d)",
1630 td->name, __FILE__, __LINE__);
1631 return -1;
1632 }
1633}
1634
1635/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001636 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001637 * so here we adjust the DEF accordingly.
1638 */
1639static void
1640OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001641 td->free_struct = asn_DEF_NativeInteger.free_struct;
1642 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001643 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001644 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1645 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1646 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1647 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001648 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001649 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001650 if(!td->per_constraints)
1651 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001652 td->elements = asn_DEF_NativeInteger.elements;
1653 td->elements_count = asn_DEF_NativeInteger.elements_count;
1654 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001655}
1656
1657void
1658OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1659 void *struct_ptr, int contents_only) {
1660 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1661 td->free_struct(td, struct_ptr, contents_only);
1662}
1663
1664int
1665OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1666 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1667 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1668 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1669}
1670
1671asn_dec_rval_t
1672OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1673 void **structure, const void *bufptr, size_t size, int tag_mode) {
1674 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1675 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1676}
1677
1678asn_enc_rval_t
1679OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1680 void *structure, int tag_mode, ber_tlv_tag_t tag,
1681 asn_app_consume_bytes_f *cb, void *app_key) {
1682 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1683 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1684}
1685
1686asn_dec_rval_t
1687OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1688 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1689 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1690 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1691}
1692
1693asn_enc_rval_t
1694OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1695 int ilevel, enum xer_encoder_flags_e flags,
1696 asn_app_consume_bytes_f *cb, void *app_key) {
1697 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1698 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1699}
1700
1701
1702/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1703
Lev Walkina7591b52014-10-12 18:37:35 -07001704static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001705 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1706};
1707asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1708 "OK-IntegerInRange2",
1709 "OK-IntegerInRange2",
1710 OK_IntegerInRange2_free,
1711 OK_IntegerInRange2_print,
1712 OK_IntegerInRange2_constraint,
1713 OK_IntegerInRange2_decode_ber,
1714 OK_IntegerInRange2_encode_der,
1715 OK_IntegerInRange2_decode_xer,
1716 OK_IntegerInRange2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001717 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001718 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001719 asn_DEF_OK_IntegerInRange2_tags_1,
1720 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1721 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1722 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
1723 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1724 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1725 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001726 0, 0, /* No members */
1727 0 /* No specifics */
1728};
1729
1730
1731/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
1732
Lev Walkinc3f0b892005-08-14 02:40:04 +00001733#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001734
1735/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
1736
Lev Walkinc3f0b892005-08-14 02:40:04 +00001737typedef long OK_IntegerInRange3_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001738
1739/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
1740
1741extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
1742asn_struct_free_f OK_IntegerInRange3_free;
1743asn_struct_print_f OK_IntegerInRange3_print;
1744asn_constr_check_f OK_IntegerInRange3_constraint;
1745ber_type_decoder_f OK_IntegerInRange3_decode_ber;
1746der_type_encoder_f OK_IntegerInRange3_encode_der;
1747xer_type_decoder_f OK_IntegerInRange3_decode_xer;
1748xer_type_encoder_f OK_IntegerInRange3_encode_xer;
1749
1750/*** <<< CODE [OK-IntegerInRange3] >>> ***/
1751
1752int
1753OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001754 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001755 long value;
1756
1757 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001758 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001759 "%s: value not given (%s:%d)",
1760 td->name, __FILE__, __LINE__);
1761 return -1;
1762 }
1763
Lev Walkinc3f0b892005-08-14 02:40:04 +00001764 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001765
Lev Walkin63b41262007-11-06 01:48:46 +00001766 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001767 /* Constraint check succeeded */
1768 return 0;
1769 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001770 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001771 "%s: constraint failed (%s:%d)",
1772 td->name, __FILE__, __LINE__);
1773 return -1;
1774 }
1775}
1776
1777/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001778 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001779 * so here we adjust the DEF accordingly.
1780 */
1781static void
1782OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001783 td->free_struct = asn_DEF_NativeInteger.free_struct;
1784 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001785 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001786 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1787 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1788 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1789 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001790 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001791 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001792 if(!td->per_constraints)
1793 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001794 td->elements = asn_DEF_NativeInteger.elements;
1795 td->elements_count = asn_DEF_NativeInteger.elements_count;
1796 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001797}
1798
1799void
1800OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
1801 void *struct_ptr, int contents_only) {
1802 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1803 td->free_struct(td, struct_ptr, contents_only);
1804}
1805
1806int
1807OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1808 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1809 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1810 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1811}
1812
1813asn_dec_rval_t
1814OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1815 void **structure, const void *bufptr, size_t size, int tag_mode) {
1816 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1817 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1818}
1819
1820asn_enc_rval_t
1821OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
1822 void *structure, int tag_mode, ber_tlv_tag_t tag,
1823 asn_app_consume_bytes_f *cb, void *app_key) {
1824 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1825 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1826}
1827
1828asn_dec_rval_t
1829OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1830 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1831 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1832 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1833}
1834
1835asn_enc_rval_t
1836OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1837 int ilevel, enum xer_encoder_flags_e flags,
1838 asn_app_consume_bytes_f *cb, void *app_key) {
1839 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1840 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1841}
1842
1843
1844/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
1845
Lev Walkina7591b52014-10-12 18:37:35 -07001846static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001847 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1848};
1849asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
1850 "OK-IntegerInRange3",
1851 "OK-IntegerInRange3",
1852 OK_IntegerInRange3_free,
1853 OK_IntegerInRange3_print,
1854 OK_IntegerInRange3_constraint,
1855 OK_IntegerInRange3_decode_ber,
1856 OK_IntegerInRange3_encode_der,
1857 OK_IntegerInRange3_decode_xer,
1858 OK_IntegerInRange3_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001859 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001860 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001861 asn_DEF_OK_IntegerInRange3_tags_1,
1862 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1863 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1864 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
1865 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1866 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1867 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001868 0, 0, /* No members */
1869 0 /* No specifics */
1870};
1871
1872
1873/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
1874
Lev Walkinc3f0b892005-08-14 02:40:04 +00001875#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001876
1877/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
1878
Lev Walkinc3f0b892005-08-14 02:40:04 +00001879typedef long OK_IntegerInRange4_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001880
1881/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
1882
1883extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
1884asn_struct_free_f OK_IntegerInRange4_free;
1885asn_struct_print_f OK_IntegerInRange4_print;
1886asn_constr_check_f OK_IntegerInRange4_constraint;
1887ber_type_decoder_f OK_IntegerInRange4_decode_ber;
1888der_type_encoder_f OK_IntegerInRange4_encode_der;
1889xer_type_decoder_f OK_IntegerInRange4_decode_xer;
1890xer_type_encoder_f OK_IntegerInRange4_encode_xer;
1891
1892/*** <<< CODE [OK-IntegerInRange4] >>> ***/
1893
1894int
1895OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001896 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001897 long value;
1898
1899 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001900 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001901 "%s: value not given (%s:%d)",
1902 td->name, __FILE__, __LINE__);
1903 return -1;
1904 }
1905
Lev Walkinc3f0b892005-08-14 02:40:04 +00001906 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001907
Lev Walkin63b41262007-11-06 01:48:46 +00001908 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001909 /* Constraint check succeeded */
1910 return 0;
1911 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001912 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001913 "%s: constraint failed (%s:%d)",
1914 td->name, __FILE__, __LINE__);
1915 return -1;
1916 }
1917}
1918
1919/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001920 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001921 * so here we adjust the DEF accordingly.
1922 */
1923static void
1924OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001925 td->free_struct = asn_DEF_NativeInteger.free_struct;
1926 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001927 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001928 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1929 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1930 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1931 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001932 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001933 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001934 if(!td->per_constraints)
1935 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001936 td->elements = asn_DEF_NativeInteger.elements;
1937 td->elements_count = asn_DEF_NativeInteger.elements_count;
1938 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001939}
1940
1941void
1942OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
1943 void *struct_ptr, int contents_only) {
1944 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1945 td->free_struct(td, struct_ptr, contents_only);
1946}
1947
1948int
1949OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1950 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1951 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1952 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1953}
1954
1955asn_dec_rval_t
1956OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1957 void **structure, const void *bufptr, size_t size, int tag_mode) {
1958 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1959 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1960}
1961
1962asn_enc_rval_t
1963OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
1964 void *structure, int tag_mode, ber_tlv_tag_t tag,
1965 asn_app_consume_bytes_f *cb, void *app_key) {
1966 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1967 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1968}
1969
1970asn_dec_rval_t
1971OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1972 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1973 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1974 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1975}
1976
1977asn_enc_rval_t
1978OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1979 int ilevel, enum xer_encoder_flags_e flags,
1980 asn_app_consume_bytes_f *cb, void *app_key) {
1981 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1982 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1983}
1984
1985
1986/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
1987
Lev Walkina7591b52014-10-12 18:37:35 -07001988static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001989 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1990};
1991asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
1992 "OK-IntegerInRange4",
1993 "OK-IntegerInRange4",
1994 OK_IntegerInRange4_free,
1995 OK_IntegerInRange4_print,
1996 OK_IntegerInRange4_constraint,
1997 OK_IntegerInRange4_decode_ber,
1998 OK_IntegerInRange4_encode_der,
1999 OK_IntegerInRange4_decode_xer,
2000 OK_IntegerInRange4_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002001 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002002 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002003 asn_DEF_OK_IntegerInRange4_tags_1,
2004 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2005 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2006 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
2007 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2008 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2009 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002010 0, 0, /* No members */
2011 0 /* No specifics */
2012};
2013
2014
2015/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2016
Lev Walkin2a744a72013-03-27 01:56:23 -07002017#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00002018
2019/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2020
Lev Walkin2a744a72013-03-27 01:56:23 -07002021typedef INTEGER_t OK_IntegerInRange5_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00002022
2023/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2024
2025extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2026asn_struct_free_f OK_IntegerInRange5_free;
2027asn_struct_print_f OK_IntegerInRange5_print;
2028asn_constr_check_f OK_IntegerInRange5_constraint;
2029ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2030der_type_encoder_f OK_IntegerInRange5_encode_der;
2031xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2032xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2033
2034/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2035
2036int
2037OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002038 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002039 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00002040 long value;
2041
2042 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002043 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002044 "%s: value not given (%s:%d)",
2045 td->name, __FILE__, __LINE__);
2046 return -1;
2047 }
2048
Lev Walkin2a744a72013-03-27 01:56:23 -07002049 if(asn_INTEGER2long(st, &value)) {
2050 _ASN_CTFAIL(app_key, td, sptr,
2051 "%s: value too large (%s:%d)",
2052 td->name, __FILE__, __LINE__);
2053 return -1;
2054 }
Lev Walkin082cadc2005-08-14 02:18:27 +00002055
Lev Walkin63b41262007-11-06 01:48:46 +00002056 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00002057 /* Constraint check succeeded */
2058 return 0;
2059 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002060 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002061 "%s: constraint failed (%s:%d)",
2062 td->name, __FILE__, __LINE__);
2063 return -1;
2064 }
2065}
2066
2067/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002068 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +00002069 * so here we adjust the DEF accordingly.
2070 */
2071static void
2072OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002073 td->free_struct = asn_DEF_INTEGER.free_struct;
2074 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002075 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002076 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2077 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2078 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2079 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2080 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2081 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002082 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002083 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2084 td->elements = asn_DEF_INTEGER.elements;
2085 td->elements_count = asn_DEF_INTEGER.elements_count;
2086 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00002087}
2088
2089void
2090OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2091 void *struct_ptr, int contents_only) {
2092 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2093 td->free_struct(td, struct_ptr, contents_only);
2094}
2095
2096int
2097OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2098 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2099 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2100 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2101}
2102
2103asn_dec_rval_t
2104OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2105 void **structure, const void *bufptr, size_t size, int tag_mode) {
2106 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2107 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2108}
2109
2110asn_enc_rval_t
2111OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2112 void *structure, int tag_mode, ber_tlv_tag_t tag,
2113 asn_app_consume_bytes_f *cb, void *app_key) {
2114 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2115 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2116}
2117
2118asn_dec_rval_t
2119OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2120 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2121 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2122 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2123}
2124
2125asn_enc_rval_t
2126OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2127 int ilevel, enum xer_encoder_flags_e flags,
2128 asn_app_consume_bytes_f *cb, void *app_key) {
2129 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2130 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2131}
2132
2133
2134/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2135
Lev Walkina7591b52014-10-12 18:37:35 -07002136static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00002137 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2138};
2139asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2140 "OK-IntegerInRange5",
2141 "OK-IntegerInRange5",
2142 OK_IntegerInRange5_free,
2143 OK_IntegerInRange5_print,
2144 OK_IntegerInRange5_constraint,
2145 OK_IntegerInRange5_decode_ber,
2146 OK_IntegerInRange5_encode_der,
2147 OK_IntegerInRange5_decode_xer,
2148 OK_IntegerInRange5_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002149 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002150 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002151 asn_DEF_OK_IntegerInRange5_tags_1,
2152 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2153 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2154 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2155 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2156 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2157 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002158 0, 0, /* No members */
2159 0 /* No specifics */
2160};
2161
Lev Walkinc3f0b892005-08-14 02:40:04 +00002162
Lev Walkinfee6f712005-08-27 03:13:51 +00002163/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2164
Lev Walkin8bb57a22007-12-03 13:41:36 +00002165#include <NativeInteger.h>
Lev Walkinfee6f712005-08-27 03:13:51 +00002166
2167/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2168
Lev Walkin8bb57a22007-12-03 13:41:36 +00002169typedef unsigned long NO_IntegerInRange6_t;
Lev Walkinfee6f712005-08-27 03:13:51 +00002170
2171/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2172
2173extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2174asn_struct_free_f NO_IntegerInRange6_free;
2175asn_struct_print_f NO_IntegerInRange6_print;
2176asn_constr_check_f NO_IntegerInRange6_constraint;
2177ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2178der_type_encoder_f NO_IntegerInRange6_encode_der;
2179xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2180xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2181
2182/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2183
2184int
2185NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002186 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinfee6f712005-08-27 03:13:51 +00002187
2188 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002189 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002190 "%s: value not given (%s:%d)",
2191 td->name, __FILE__, __LINE__);
2192 return -1;
2193 }
2194
Lev Walkinfee6f712005-08-27 03:13:51 +00002195
Lev Walkin8bb57a22007-12-03 13:41:36 +00002196 /* Constraint check succeeded */
2197 return 0;
Lev Walkinfee6f712005-08-27 03:13:51 +00002198}
2199
2200/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002201 * This type is implemented using NativeInteger,
Lev Walkinfee6f712005-08-27 03:13:51 +00002202 * so here we adjust the DEF accordingly.
2203 */
2204static void
2205NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002206 td->free_struct = asn_DEF_NativeInteger.free_struct;
2207 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002208 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00002209 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2210 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2211 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2212 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2213 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2214 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002215 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002216 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2217 td->elements = asn_DEF_NativeInteger.elements;
2218 td->elements_count = asn_DEF_NativeInteger.elements_count;
2219 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkinfee6f712005-08-27 03:13:51 +00002220}
2221
2222void
2223NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2224 void *struct_ptr, int contents_only) {
2225 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2226 td->free_struct(td, struct_ptr, contents_only);
2227}
2228
2229int
2230NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2231 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2232 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2233 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2234}
2235
2236asn_dec_rval_t
2237NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2238 void **structure, const void *bufptr, size_t size, int tag_mode) {
2239 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2240 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2241}
2242
2243asn_enc_rval_t
2244NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2245 void *structure, int tag_mode, ber_tlv_tag_t tag,
2246 asn_app_consume_bytes_f *cb, void *app_key) {
2247 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2248 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2249}
2250
2251asn_dec_rval_t
2252NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2253 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2254 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2255 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2256}
2257
2258asn_enc_rval_t
2259NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2260 int ilevel, enum xer_encoder_flags_e flags,
2261 asn_app_consume_bytes_f *cb, void *app_key) {
2262 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2263 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2264}
2265
2266
2267/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2268
Lev Walkina7591b52014-10-12 18:37:35 -07002269static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002270 0, 0, 0, 0, 0,
2271 0, /* Native long size */
2272 1 /* Unsigned representation */
2273};
Lev Walkina7591b52014-10-12 18:37:35 -07002274static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkinfee6f712005-08-27 03:13:51 +00002275 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2276};
2277asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2278 "NO-IntegerInRange6",
2279 "NO-IntegerInRange6",
2280 NO_IntegerInRange6_free,
2281 NO_IntegerInRange6_print,
2282 NO_IntegerInRange6_constraint,
2283 NO_IntegerInRange6_decode_ber,
2284 NO_IntegerInRange6_encode_der,
2285 NO_IntegerInRange6_decode_xer,
2286 NO_IntegerInRange6_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002287 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinfee6f712005-08-27 03:13:51 +00002288 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002289 asn_DEF_NO_IntegerInRange6_tags_1,
2290 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2291 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2292 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2293 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2294 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2295 0, /* No PER visible constraints */
Lev Walkinfee6f712005-08-27 03:13:51 +00002296 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002297 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkinfee6f712005-08-27 03:13:51 +00002298};
2299
2300
Lev Walkinc3f0b892005-08-14 02:40:04 +00002301/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2302
Lev Walkin2a744a72013-03-27 01:56:23 -07002303#include <INTEGER.h>
Lev Walkinc3f0b892005-08-14 02:40:04 +00002304
2305/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2306
2307typedef enum CN_IntegerEnumerated1 {
2308 CN_IntegerEnumerated1_a = 1,
2309 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002310} e_CN_IntegerEnumerated1;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002311
2312/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2313
Lev Walkin2a744a72013-03-27 01:56:23 -07002314typedef INTEGER_t CN_IntegerEnumerated1_t;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002315
2316/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2317
2318extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2319asn_struct_free_f CN_IntegerEnumerated1_free;
2320asn_struct_print_f CN_IntegerEnumerated1_print;
2321asn_constr_check_f CN_IntegerEnumerated1_constraint;
2322ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2323der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2324xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2325xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2326
2327/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2328
2329int
2330CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002331 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002332 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002333 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002334 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002335}
2336
2337/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002338 * This type is implemented using INTEGER,
Lev Walkinc3f0b892005-08-14 02:40:04 +00002339 * so here we adjust the DEF accordingly.
2340 */
2341static void
2342CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002343 td->free_struct = asn_DEF_INTEGER.free_struct;
2344 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002345 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002346 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2347 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2348 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2349 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2350 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2351 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002352 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002353 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2354 td->elements = asn_DEF_INTEGER.elements;
2355 td->elements_count = asn_DEF_INTEGER.elements_count;
2356 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002357}
2358
2359void
2360CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2361 void *struct_ptr, int contents_only) {
2362 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2363 td->free_struct(td, struct_ptr, contents_only);
2364}
2365
2366int
2367CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2368 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2369 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2370 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2371}
2372
2373asn_dec_rval_t
2374CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2375 void **structure, const void *bufptr, size_t size, int tag_mode) {
2376 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2377 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2378}
2379
2380asn_enc_rval_t
2381CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2382 void *structure, int tag_mode, ber_tlv_tag_t tag,
2383 asn_app_consume_bytes_f *cb, void *app_key) {
2384 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2385 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2386}
2387
2388asn_dec_rval_t
2389CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2390 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2391 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2392 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2393}
2394
2395asn_enc_rval_t
2396CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2397 int ilevel, enum xer_encoder_flags_e flags,
2398 asn_app_consume_bytes_f *cb, void *app_key) {
2399 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2400 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2401}
2402
2403
2404/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2405
Lev Walkina7591b52014-10-12 18:37:35 -07002406static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002407 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2408};
2409asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2410 "CN-IntegerEnumerated1",
2411 "CN-IntegerEnumerated1",
2412 CN_IntegerEnumerated1_free,
2413 CN_IntegerEnumerated1_print,
2414 CN_IntegerEnumerated1_constraint,
2415 CN_IntegerEnumerated1_decode_ber,
2416 CN_IntegerEnumerated1_encode_der,
2417 CN_IntegerEnumerated1_decode_xer,
2418 CN_IntegerEnumerated1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002419 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002420 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002421 asn_DEF_CN_IntegerEnumerated1_tags_1,
2422 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2423 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2424 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2425 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2426 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2427 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002428 0, 0, /* Defined elsewhere */
2429 0 /* No specifics */
2430};
2431
2432
2433/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2434
2435#include <INTEGER.h>
2436
2437/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2438
2439typedef enum NO_IntegerEnumerated2 {
2440 NO_IntegerEnumerated2_a = 1,
2441 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002442} e_NO_IntegerEnumerated2;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002443
2444/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2445
2446typedef INTEGER_t NO_IntegerEnumerated2_t;
2447
2448/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2449
2450extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2451asn_struct_free_f NO_IntegerEnumerated2_free;
2452asn_struct_print_f NO_IntegerEnumerated2_print;
2453asn_constr_check_f NO_IntegerEnumerated2_constraint;
2454ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2455der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2456xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2457xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2458
2459/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2460
2461int
2462NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002463 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002464 /* Replace with underlying type checker */
2465 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002466 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002467}
2468
2469/*
2470 * This type is implemented using INTEGER,
2471 * so here we adjust the DEF accordingly.
2472 */
2473static void
2474NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2475 td->free_struct = asn_DEF_INTEGER.free_struct;
2476 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002477 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002478 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2479 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2480 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2481 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002482 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002483 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002484 if(!td->per_constraints)
2485 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002486 td->elements = asn_DEF_INTEGER.elements;
2487 td->elements_count = asn_DEF_INTEGER.elements_count;
2488 td->specifics = asn_DEF_INTEGER.specifics;
2489}
2490
2491void
2492NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2493 void *struct_ptr, int contents_only) {
2494 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2495 td->free_struct(td, struct_ptr, contents_only);
2496}
2497
2498int
2499NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2500 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2501 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2502 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2503}
2504
2505asn_dec_rval_t
2506NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2507 void **structure, const void *bufptr, size_t size, int tag_mode) {
2508 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2509 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2510}
2511
2512asn_enc_rval_t
2513NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2514 void *structure, int tag_mode, ber_tlv_tag_t tag,
2515 asn_app_consume_bytes_f *cb, void *app_key) {
2516 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2517 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2518}
2519
2520asn_dec_rval_t
2521NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2522 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2523 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2524 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2525}
2526
2527asn_enc_rval_t
2528NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2529 int ilevel, enum xer_encoder_flags_e flags,
2530 asn_app_consume_bytes_f *cb, void *app_key) {
2531 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2532 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2533}
2534
2535
2536/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2537
Lev Walkina7591b52014-10-12 18:37:35 -07002538static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002539 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2540};
2541asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2542 "NO-IntegerEnumerated2",
2543 "NO-IntegerEnumerated2",
2544 NO_IntegerEnumerated2_free,
2545 NO_IntegerEnumerated2_print,
2546 NO_IntegerEnumerated2_constraint,
2547 NO_IntegerEnumerated2_decode_ber,
2548 NO_IntegerEnumerated2_encode_der,
2549 NO_IntegerEnumerated2_decode_xer,
2550 NO_IntegerEnumerated2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002551 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002552 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002553 asn_DEF_NO_IntegerEnumerated2_tags_1,
2554 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2555 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2556 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2557 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2558 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2559 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002560 0, 0, /* Defined elsewhere */
2561 0 /* No specifics */
2562};
2563