blob: 175eacc4ce576d40d5479b4089837e97f5f08df7 [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 <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00005
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
Lev Walkin2a744a72013-03-27 01:56:23 -07008typedef long 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_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000028 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +000029}
30
31/*
Lev Walkin2a744a72013-03-27 01:56:23 -070032 * This type is implemented using NativeInteger,
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_NativeInteger.free_struct;
38 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080039 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -070040 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
41 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
42 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
43 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
44 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
45 td->uper_encoder = asn_DEF_NativeInteger.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_NativeInteger.per_constraints;
48 td->elements = asn_DEF_NativeInteger.elements;
49 td->elements_count = asn_DEF_NativeInteger.elements_count;
50 td->specifics = asn_DEF_NativeInteger.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 <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000130
131/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
132
Lev Walkin2a744a72013-03-27 01:56:23 -0700133typedef long 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 Walkin082cadc2005-08-14 02:18:27 +0000151
152 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000153 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000154 "%s: value not given (%s:%d)",
155 td->name, __FILE__, __LINE__);
156 return -1;
157 }
158
159
160 if(1 /* No applicable constraints whatsoever */) {
161 /* Nothing is here. See below */
162 }
163
164 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700165 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000166 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +0000167}
168
169/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700170 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000171 * so here we adjust the DEF accordingly.
172 */
173static void
174CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700175 td->free_struct = asn_DEF_NativeInteger.free_struct;
176 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800177 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700178 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
179 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
180 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
181 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
182 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
183 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000184 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700185 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
186 td->elements = asn_DEF_NativeInteger.elements;
187 td->elements_count = asn_DEF_NativeInteger.elements_count;
188 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000189}
190
191void
192CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
193 void *struct_ptr, int contents_only) {
194 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
195 td->free_struct(td, struct_ptr, contents_only);
196}
197
198int
199CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
200 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
201 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
202 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
203}
204
205asn_dec_rval_t
206CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
207 void **structure, const void *bufptr, size_t size, int tag_mode) {
208 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
209 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
210}
211
212asn_enc_rval_t
213CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
214 void *structure, int tag_mode, ber_tlv_tag_t tag,
215 asn_app_consume_bytes_f *cb, void *app_key) {
216 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
217 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
218}
219
220asn_dec_rval_t
221CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
222 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
223 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
224 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
225}
226
227asn_enc_rval_t
228CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
229 int ilevel, enum xer_encoder_flags_e flags,
230 asn_app_consume_bytes_f *cb, void *app_key) {
231 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
232 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
233}
234
235
236/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
237
Lev Walkina7591b52014-10-12 18:37:35 -0700238static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000239 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
240};
241asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
242 "CN-IntegerMinMax",
243 "CN-IntegerMinMax",
244 CN_IntegerMinMax_free,
245 CN_IntegerMinMax_print,
246 CN_IntegerMinMax_constraint,
247 CN_IntegerMinMax_decode_ber,
248 CN_IntegerMinMax_encode_der,
249 CN_IntegerMinMax_decode_xer,
250 CN_IntegerMinMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000251 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000252 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000253 asn_DEF_CN_IntegerMinMax_tags_1,
254 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
255 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
256 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
257 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
258 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
259 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000260 0, 0, /* No members */
261 0 /* No specifics */
262};
263
264
265/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
266
Lev Walkin2a744a72013-03-27 01:56:23 -0700267#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000268
269/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
270
Lev Walkin2a744a72013-03-27 01:56:23 -0700271typedef long CN_IntegerMinLow_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000272
273/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
274
275extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
276asn_struct_free_f CN_IntegerMinLow_free;
277asn_struct_print_f CN_IntegerMinLow_print;
278asn_constr_check_f CN_IntegerMinLow_constraint;
279ber_type_decoder_f CN_IntegerMinLow_decode_ber;
280der_type_encoder_f CN_IntegerMinLow_encode_der;
281xer_type_decoder_f CN_IntegerMinLow_decode_xer;
282xer_type_encoder_f CN_IntegerMinLow_encode_xer;
283
284/*** <<< CODE [CN-IntegerMinLow] >>> ***/
285
286int
287CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000288 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000289 long value;
290
291 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000292 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000293 "%s: value not given (%s:%d)",
294 td->name, __FILE__, __LINE__);
295 return -1;
296 }
297
Lev Walkin2a744a72013-03-27 01:56:23 -0700298 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000299
300 if((value <= 1)) {
301 /* Constraint check succeeded */
302 return 0;
303 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000304 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000305 "%s: constraint failed (%s:%d)",
306 td->name, __FILE__, __LINE__);
307 return -1;
308 }
309}
310
311/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700312 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000313 * so here we adjust the DEF accordingly.
314 */
315static void
316CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700317 td->free_struct = asn_DEF_NativeInteger.free_struct;
318 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800319 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700320 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
321 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
322 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
323 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
324 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
325 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000326 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700327 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
328 td->elements = asn_DEF_NativeInteger.elements;
329 td->elements_count = asn_DEF_NativeInteger.elements_count;
330 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000331}
332
333void
334CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
335 void *struct_ptr, int contents_only) {
336 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
337 td->free_struct(td, struct_ptr, contents_only);
338}
339
340int
341CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
342 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
343 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
344 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
345}
346
347asn_dec_rval_t
348CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
349 void **structure, const void *bufptr, size_t size, int tag_mode) {
350 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
351 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
352}
353
354asn_enc_rval_t
355CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
356 void *structure, int tag_mode, ber_tlv_tag_t tag,
357 asn_app_consume_bytes_f *cb, void *app_key) {
358 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
359 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
360}
361
362asn_dec_rval_t
363CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
364 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
365 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
366 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
367}
368
369asn_enc_rval_t
370CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
371 int ilevel, enum xer_encoder_flags_e flags,
372 asn_app_consume_bytes_f *cb, void *app_key) {
373 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
374 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
375}
376
377
378/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
379
Lev Walkina7591b52014-10-12 18:37:35 -0700380static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000381 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
382};
383asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
384 "CN-IntegerMinLow",
385 "CN-IntegerMinLow",
386 CN_IntegerMinLow_free,
387 CN_IntegerMinLow_print,
388 CN_IntegerMinLow_constraint,
389 CN_IntegerMinLow_decode_ber,
390 CN_IntegerMinLow_encode_der,
391 CN_IntegerMinLow_decode_xer,
392 CN_IntegerMinLow_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000393 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000394 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000395 asn_DEF_CN_IntegerMinLow_tags_1,
396 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
397 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
398 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
399 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
400 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
401 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000402 0, 0, /* No members */
403 0 /* No specifics */
404};
405
406
407/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
408
409#include <INTEGER.h>
410
411/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
412
413typedef INTEGER_t NO_IntegerMinHigh_t;
414
415/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
416
417extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
418asn_struct_free_f NO_IntegerMinHigh_free;
419asn_struct_print_f NO_IntegerMinHigh_print;
420asn_constr_check_f NO_IntegerMinHigh_constraint;
421ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
422der_type_encoder_f NO_IntegerMinHigh_encode_der;
423xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
424xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
425
426/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
427
428int
429NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000430 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000431 const INTEGER_t *st = (const INTEGER_t *)sptr;
432 long value;
433
434 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000435 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000436 "%s: value not given (%s:%d)",
437 td->name, __FILE__, __LINE__);
438 return -1;
439 }
440
441 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000442 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000443 "%s: value too large (%s:%d)",
444 td->name, __FILE__, __LINE__);
445 return -1;
446 }
447
Lev Walkinc3f0b892005-08-14 02:40:04 +0000448 if((value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000449 /* Constraint check succeeded */
450 return 0;
451 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000452 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000453 "%s: constraint failed (%s:%d)",
454 td->name, __FILE__, __LINE__);
455 return -1;
456 }
457}
458
459/*
460 * This type is implemented using INTEGER,
461 * so here we adjust the DEF accordingly.
462 */
463static void
464NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
465 td->free_struct = asn_DEF_INTEGER.free_struct;
466 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800467 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000468 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
469 td->der_encoder = asn_DEF_INTEGER.der_encoder;
470 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
471 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000472 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000473 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000474 if(!td->per_constraints)
475 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000476 td->elements = asn_DEF_INTEGER.elements;
477 td->elements_count = asn_DEF_INTEGER.elements_count;
478 td->specifics = asn_DEF_INTEGER.specifics;
479}
480
481void
482NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
483 void *struct_ptr, int contents_only) {
484 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
485 td->free_struct(td, struct_ptr, contents_only);
486}
487
488int
489NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
490 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
491 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
492 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
493}
494
495asn_dec_rval_t
496NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
497 void **structure, const void *bufptr, size_t size, int tag_mode) {
498 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
499 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
500}
501
502asn_enc_rval_t
503NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
504 void *structure, int tag_mode, ber_tlv_tag_t tag,
505 asn_app_consume_bytes_f *cb, void *app_key) {
506 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
507 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
508}
509
510asn_dec_rval_t
511NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
512 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
513 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
514 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
515}
516
517asn_enc_rval_t
518NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
519 int ilevel, enum xer_encoder_flags_e flags,
520 asn_app_consume_bytes_f *cb, void *app_key) {
521 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
522 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
523}
524
525
526/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
527
Lev Walkina7591b52014-10-12 18:37:35 -0700528static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000529 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
530};
531asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
532 "NO-IntegerMinHigh",
533 "NO-IntegerMinHigh",
534 NO_IntegerMinHigh_free,
535 NO_IntegerMinHigh_print,
536 NO_IntegerMinHigh_constraint,
537 NO_IntegerMinHigh_decode_ber,
538 NO_IntegerMinHigh_encode_der,
539 NO_IntegerMinHigh_decode_xer,
540 NO_IntegerMinHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000541 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000542 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000543 asn_DEF_NO_IntegerMinHigh_tags_1,
544 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
545 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
546 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
547 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
548 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
549 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000550 0, 0, /* No members */
551 0 /* No specifics */
552};
553
554
555/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
556
Lev Walkin8bb57a22007-12-03 13:41:36 +0000557#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000558
559/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
560
Lev Walkin8bb57a22007-12-03 13:41:36 +0000561typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000562
563/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
564
565extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
566asn_struct_free_f NO_IntegerLowHigh_free;
567asn_struct_print_f NO_IntegerLowHigh_print;
568asn_constr_check_f NO_IntegerLowHigh_constraint;
569ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
570der_type_encoder_f NO_IntegerLowHigh_encode_der;
571xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
572xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
573
574/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
575
576int
577NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000578 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000579 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +0000580
581 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000582 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000583 "%s: value not given (%s:%d)",
584 td->name, __FILE__, __LINE__);
585 return -1;
586 }
587
Lev Walkin8bb57a22007-12-03 13:41:36 +0000588 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000589
Lev Walkinc3f0b892005-08-14 02:40:04 +0000590 if((value >= 1 && value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000591 /* Constraint check succeeded */
592 return 0;
593 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000594 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000595 "%s: constraint failed (%s:%d)",
596 td->name, __FILE__, __LINE__);
597 return -1;
598 }
599}
600
601/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000602 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000603 * so here we adjust the DEF accordingly.
604 */
605static void
606NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000607 td->free_struct = asn_DEF_NativeInteger.free_struct;
608 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800609 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000610 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
611 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
612 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
613 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
614 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
615 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000616 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000617 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
618 td->elements = asn_DEF_NativeInteger.elements;
619 td->elements_count = asn_DEF_NativeInteger.elements_count;
620 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +0000621}
622
623void
624NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
625 void *struct_ptr, int contents_only) {
626 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
627 td->free_struct(td, struct_ptr, contents_only);
628}
629
630int
631NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
632 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
633 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
634 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
635}
636
637asn_dec_rval_t
638NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
639 void **structure, const void *bufptr, size_t size, int tag_mode) {
640 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
641 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
642}
643
644asn_enc_rval_t
645NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
646 void *structure, int tag_mode, ber_tlv_tag_t tag,
647 asn_app_consume_bytes_f *cb, void *app_key) {
648 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
649 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
650}
651
652asn_dec_rval_t
653NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
654 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
655 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
656 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
657}
658
659asn_enc_rval_t
660NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
661 int ilevel, enum xer_encoder_flags_e flags,
662 asn_app_consume_bytes_f *cb, void *app_key) {
663 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
664 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
665}
666
667
668/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
669
Lev Walkina7591b52014-10-12 18:37:35 -0700670static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000671 0, 0, 0, 0, 0,
672 0, /* Native long size */
673 1 /* Unsigned representation */
674};
Lev Walkina7591b52014-10-12 18:37:35 -0700675static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000676 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
677};
678asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
679 "NO-IntegerLowHigh",
680 "NO-IntegerLowHigh",
681 NO_IntegerLowHigh_free,
682 NO_IntegerLowHigh_print,
683 NO_IntegerLowHigh_constraint,
684 NO_IntegerLowHigh_decode_ber,
685 NO_IntegerLowHigh_encode_der,
686 NO_IntegerLowHigh_decode_xer,
687 NO_IntegerLowHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000688 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000689 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000690 asn_DEF_NO_IntegerLowHigh_tags_1,
691 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
692 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
693 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
694 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
695 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
696 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000697 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000698 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +0000699};
700
701
702/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
703
Lev Walkin2a744a72013-03-27 01:56:23 -0700704#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000705
706/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
707
Lev Walkin2a744a72013-03-27 01:56:23 -0700708typedef long CN_IntegerLowMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000709
710/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
711
712extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
713asn_struct_free_f CN_IntegerLowMax_free;
714asn_struct_print_f CN_IntegerLowMax_print;
715asn_constr_check_f CN_IntegerLowMax_constraint;
716ber_type_decoder_f CN_IntegerLowMax_decode_ber;
717der_type_encoder_f CN_IntegerLowMax_encode_der;
718xer_type_decoder_f CN_IntegerLowMax_decode_xer;
719xer_type_encoder_f CN_IntegerLowMax_encode_xer;
720
721/*** <<< CODE [CN-IntegerLowMax] >>> ***/
722
723int
724CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000725 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000726 long value;
727
728 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000729 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000730 "%s: value not given (%s:%d)",
731 td->name, __FILE__, __LINE__);
732 return -1;
733 }
734
Lev Walkin2a744a72013-03-27 01:56:23 -0700735 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000736
737 if((value >= 1)) {
738 /* Constraint check succeeded */
739 return 0;
740 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000741 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000742 "%s: constraint failed (%s:%d)",
743 td->name, __FILE__, __LINE__);
744 return -1;
745 }
746}
747
748/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700749 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000750 * so here we adjust the DEF accordingly.
751 */
752static void
753CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700754 td->free_struct = asn_DEF_NativeInteger.free_struct;
755 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800756 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700757 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
758 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
759 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
760 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
761 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
762 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000763 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700764 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
765 td->elements = asn_DEF_NativeInteger.elements;
766 td->elements_count = asn_DEF_NativeInteger.elements_count;
767 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000768}
769
770void
771CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
772 void *struct_ptr, int contents_only) {
773 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
774 td->free_struct(td, struct_ptr, contents_only);
775}
776
777int
778CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
779 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
780 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
781 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
782}
783
784asn_dec_rval_t
785CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
786 void **structure, const void *bufptr, size_t size, int tag_mode) {
787 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
788 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
789}
790
791asn_enc_rval_t
792CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
793 void *structure, int tag_mode, ber_tlv_tag_t tag,
794 asn_app_consume_bytes_f *cb, void *app_key) {
795 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
796 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
797}
798
799asn_dec_rval_t
800CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
801 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
802 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
803 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
804}
805
806asn_enc_rval_t
807CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
808 int ilevel, enum xer_encoder_flags_e flags,
809 asn_app_consume_bytes_f *cb, void *app_key) {
810 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
811 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
812}
813
814
815/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
816
Lev Walkina7591b52014-10-12 18:37:35 -0700817static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000818 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
819};
820asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
821 "CN-IntegerLowMax",
822 "CN-IntegerLowMax",
823 CN_IntegerLowMax_free,
824 CN_IntegerLowMax_print,
825 CN_IntegerLowMax_constraint,
826 CN_IntegerLowMax_decode_ber,
827 CN_IntegerLowMax_encode_der,
828 CN_IntegerLowMax_decode_xer,
829 CN_IntegerLowMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000830 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000831 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000832 asn_DEF_CN_IntegerLowMax_tags_1,
833 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
834 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
835 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
836 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
837 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
838 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000839 0, 0, /* No members */
840 0 /* No specifics */
841};
842
843
844/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
845
846#include <INTEGER.h>
847
848/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
849
850typedef INTEGER_t NO_IntegerHighMax_t;
851
852/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
853
854extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
855asn_struct_free_f NO_IntegerHighMax_free;
856asn_struct_print_f NO_IntegerHighMax_print;
857asn_constr_check_f NO_IntegerHighMax_constraint;
858ber_type_decoder_f NO_IntegerHighMax_decode_ber;
859der_type_encoder_f NO_IntegerHighMax_encode_der;
860xer_type_decoder_f NO_IntegerHighMax_decode_xer;
861xer_type_encoder_f NO_IntegerHighMax_encode_xer;
862
863/*** <<< CODE [NO-IntegerHighMax] >>> ***/
864
865int
866NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000867 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000868 const INTEGER_t *st = (const INTEGER_t *)sptr;
869 long value;
870
871 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000872 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000873 "%s: value not given (%s:%d)",
874 td->name, __FILE__, __LINE__);
875 return -1;
876 }
877
878 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000879 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000880 "%s: value too large (%s:%d)",
881 td->name, __FILE__, __LINE__);
882 return -1;
883 }
884
Lev Walkinc3f0b892005-08-14 02:40:04 +0000885 if((value >= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000886 /* Constraint check succeeded */
887 return 0;
888 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000889 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000890 "%s: constraint failed (%s:%d)",
891 td->name, __FILE__, __LINE__);
892 return -1;
893 }
894}
895
896/*
897 * This type is implemented using INTEGER,
898 * so here we adjust the DEF accordingly.
899 */
900static void
901NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
902 td->free_struct = asn_DEF_INTEGER.free_struct;
903 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800904 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000905 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
906 td->der_encoder = asn_DEF_INTEGER.der_encoder;
907 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
908 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000909 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000910 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000911 if(!td->per_constraints)
912 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000913 td->elements = asn_DEF_INTEGER.elements;
914 td->elements_count = asn_DEF_INTEGER.elements_count;
915 td->specifics = asn_DEF_INTEGER.specifics;
916}
917
918void
919NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
920 void *struct_ptr, int contents_only) {
921 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
922 td->free_struct(td, struct_ptr, contents_only);
923}
924
925int
926NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
927 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
928 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
929 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
930}
931
932asn_dec_rval_t
933NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
934 void **structure, const void *bufptr, size_t size, int tag_mode) {
935 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
936 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
937}
938
939asn_enc_rval_t
940NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
941 void *structure, int tag_mode, ber_tlv_tag_t tag,
942 asn_app_consume_bytes_f *cb, void *app_key) {
943 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
944 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
945}
946
947asn_dec_rval_t
948NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
949 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
950 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
951 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
952}
953
954asn_enc_rval_t
955NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
956 int ilevel, enum xer_encoder_flags_e flags,
957 asn_app_consume_bytes_f *cb, void *app_key) {
958 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
959 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
960}
961
962
963/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
964
Lev Walkina7591b52014-10-12 18:37:35 -0700965static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000966 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
967};
968asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
969 "NO-IntegerHighMax",
970 "NO-IntegerHighMax",
971 NO_IntegerHighMax_free,
972 NO_IntegerHighMax_print,
973 NO_IntegerHighMax_constraint,
974 NO_IntegerHighMax_decode_ber,
975 NO_IntegerHighMax_encode_der,
976 NO_IntegerHighMax_decode_xer,
977 NO_IntegerHighMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000978 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000979 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000980 asn_DEF_NO_IntegerHighMax_tags_1,
981 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
982 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
983 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
984 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
985 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
986 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000987 0, 0, /* No members */
988 0 /* No specifics */
989};
990
991
992/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
993
994#include <INTEGER.h>
995
996/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
997
998typedef INTEGER_t NO_IntegerLowestMax_t;
999
1000/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1001
1002extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1003asn_struct_free_f NO_IntegerLowestMax_free;
1004asn_struct_print_f NO_IntegerLowestMax_print;
1005asn_constr_check_f NO_IntegerLowestMax_constraint;
1006ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1007der_type_encoder_f NO_IntegerLowestMax_encode_der;
1008xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1009xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1010
1011/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1012
1013int
1014NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001015 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001016 const INTEGER_t *st = (const INTEGER_t *)sptr;
1017 long value;
1018
1019 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001020 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001021 "%s: value not given (%s:%d)",
1022 td->name, __FILE__, __LINE__);
1023 return -1;
1024 }
1025
1026 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001027 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001028 "%s: value too large (%s:%d)",
1029 td->name, __FILE__, __LINE__);
1030 return -1;
1031 }
1032
Lev Walkinc3f0b892005-08-14 02:40:04 +00001033 if((value >= -3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001034 /* Constraint check succeeded */
1035 return 0;
1036 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001037 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001038 "%s: constraint failed (%s:%d)",
1039 td->name, __FILE__, __LINE__);
1040 return -1;
1041 }
1042}
1043
1044/*
1045 * This type is implemented using INTEGER,
1046 * so here we adjust the DEF accordingly.
1047 */
1048static void
1049NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1050 td->free_struct = asn_DEF_INTEGER.free_struct;
1051 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001052 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001053 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1054 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1055 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1056 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001057 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001058 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001059 if(!td->per_constraints)
1060 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001061 td->elements = asn_DEF_INTEGER.elements;
1062 td->elements_count = asn_DEF_INTEGER.elements_count;
1063 td->specifics = asn_DEF_INTEGER.specifics;
1064}
1065
1066void
1067NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1068 void *struct_ptr, int contents_only) {
1069 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1070 td->free_struct(td, struct_ptr, contents_only);
1071}
1072
1073int
1074NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1075 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1076 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1077 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1078}
1079
1080asn_dec_rval_t
1081NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1082 void **structure, const void *bufptr, size_t size, int tag_mode) {
1083 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1084 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1085}
1086
1087asn_enc_rval_t
1088NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1089 void *structure, int tag_mode, ber_tlv_tag_t tag,
1090 asn_app_consume_bytes_f *cb, void *app_key) {
1091 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1092 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1093}
1094
1095asn_dec_rval_t
1096NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1097 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1098 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1099 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1100}
1101
1102asn_enc_rval_t
1103NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1104 int ilevel, enum xer_encoder_flags_e flags,
1105 asn_app_consume_bytes_f *cb, void *app_key) {
1106 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1107 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1108}
1109
1110
1111/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1112
Lev Walkina7591b52014-10-12 18:37:35 -07001113static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001114 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1115};
1116asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1117 "NO-IntegerLowestMax",
1118 "NO-IntegerLowestMax",
1119 NO_IntegerLowestMax_free,
1120 NO_IntegerLowestMax_print,
1121 NO_IntegerLowestMax_constraint,
1122 NO_IntegerLowestMax_decode_ber,
1123 NO_IntegerLowestMax_encode_der,
1124 NO_IntegerLowestMax_decode_xer,
1125 NO_IntegerLowestMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001126 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001127 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001128 asn_DEF_NO_IntegerLowestMax_tags_1,
1129 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1130 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1131 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1132 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1133 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1134 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001135 0, 0, /* No members */
1136 0 /* No specifics */
1137};
1138
1139
1140/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1141
Lev Walkin8bb57a22007-12-03 13:41:36 +00001142#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001143
1144/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1145
Lev Walkin8bb57a22007-12-03 13:41:36 +00001146typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001147
1148/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1149
1150extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1151asn_struct_free_f NO_IntegerOutRange_free;
1152asn_struct_print_f NO_IntegerOutRange_print;
1153asn_constr_check_f NO_IntegerOutRange_constraint;
1154ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1155der_type_encoder_f NO_IntegerOutRange_encode_der;
1156xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1157xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1158
1159/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1160
1161int
1162NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001163 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001164 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001165
1166 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001167 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001168 "%s: value not given (%s:%d)",
1169 td->name, __FILE__, __LINE__);
1170 return -1;
1171 }
1172
Lev Walkin8bb57a22007-12-03 13:41:36 +00001173 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001174
Lev Walkinc3f0b892005-08-14 02:40:04 +00001175 if((value >= 3000000000 && value <= 3000000001)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001176 /* Constraint check succeeded */
1177 return 0;
1178 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001179 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001180 "%s: constraint failed (%s:%d)",
1181 td->name, __FILE__, __LINE__);
1182 return -1;
1183 }
1184}
1185
1186/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001187 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001188 * so here we adjust the DEF accordingly.
1189 */
1190static void
1191NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001192 td->free_struct = asn_DEF_NativeInteger.free_struct;
1193 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001194 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001195 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1196 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1197 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1198 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1199 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1200 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001201 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001202 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1203 td->elements = asn_DEF_NativeInteger.elements;
1204 td->elements_count = asn_DEF_NativeInteger.elements_count;
1205 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001206}
1207
1208void
1209NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1210 void *struct_ptr, int contents_only) {
1211 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1212 td->free_struct(td, struct_ptr, contents_only);
1213}
1214
1215int
1216NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1217 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1218 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1219 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1220}
1221
1222asn_dec_rval_t
1223NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1224 void **structure, const void *bufptr, size_t size, int tag_mode) {
1225 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1226 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1227}
1228
1229asn_enc_rval_t
1230NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1231 void *structure, int tag_mode, ber_tlv_tag_t tag,
1232 asn_app_consume_bytes_f *cb, void *app_key) {
1233 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1234 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1235}
1236
1237asn_dec_rval_t
1238NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1239 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1240 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1241 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1242}
1243
1244asn_enc_rval_t
1245NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1246 int ilevel, enum xer_encoder_flags_e flags,
1247 asn_app_consume_bytes_f *cb, void *app_key) {
1248 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1249 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1250}
1251
1252
1253/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1254
Lev Walkina7591b52014-10-12 18:37:35 -07001255static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001256 0, 0, 0, 0, 0,
1257 0, /* Native long size */
1258 1 /* Unsigned representation */
1259};
Lev Walkina7591b52014-10-12 18:37:35 -07001260static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001261 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1262};
1263asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1264 "NO-IntegerOutRange",
1265 "NO-IntegerOutRange",
1266 NO_IntegerOutRange_free,
1267 NO_IntegerOutRange_print,
1268 NO_IntegerOutRange_constraint,
1269 NO_IntegerOutRange_decode_ber,
1270 NO_IntegerOutRange_encode_der,
1271 NO_IntegerOutRange_decode_xer,
1272 NO_IntegerOutRange_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001273 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001274 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001275 asn_DEF_NO_IntegerOutRange_tags_1,
1276 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1277 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1278 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1279 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1280 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1281 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001282 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001283 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001284};
1285
1286
1287/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1288
Lev Walkin8bb57a22007-12-03 13:41:36 +00001289#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001290
1291/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1292
Lev Walkin8bb57a22007-12-03 13:41:36 +00001293typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001294
1295/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1296
1297extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1298asn_struct_free_f NO_IntegerOutValue_free;
1299asn_struct_print_f NO_IntegerOutValue_print;
1300asn_constr_check_f NO_IntegerOutValue_constraint;
1301ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1302der_type_encoder_f NO_IntegerOutValue_encode_der;
1303xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1304xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1305
1306/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1307
1308int
1309NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001310 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001311 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001312
1313 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001314 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001315 "%s: value not given (%s:%d)",
1316 td->name, __FILE__, __LINE__);
1317 return -1;
1318 }
1319
Lev Walkin8bb57a22007-12-03 13:41:36 +00001320 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001321
Lev Walkinc3f0b892005-08-14 02:40:04 +00001322 if((value == 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001323 /* Constraint check succeeded */
1324 return 0;
1325 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001326 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001327 "%s: constraint failed (%s:%d)",
1328 td->name, __FILE__, __LINE__);
1329 return -1;
1330 }
1331}
1332
1333/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001334 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001335 * so here we adjust the DEF accordingly.
1336 */
1337static void
1338NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001339 td->free_struct = asn_DEF_NativeInteger.free_struct;
1340 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001341 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001342 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1343 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1344 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1345 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1346 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1347 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001348 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001349 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1350 td->elements = asn_DEF_NativeInteger.elements;
1351 td->elements_count = asn_DEF_NativeInteger.elements_count;
1352 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001353}
1354
1355void
1356NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1357 void *struct_ptr, int contents_only) {
1358 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1359 td->free_struct(td, struct_ptr, contents_only);
1360}
1361
1362int
1363NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1364 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1365 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1366 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1367}
1368
1369asn_dec_rval_t
1370NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1371 void **structure, const void *bufptr, size_t size, int tag_mode) {
1372 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1373 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1374}
1375
1376asn_enc_rval_t
1377NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1378 void *structure, int tag_mode, ber_tlv_tag_t tag,
1379 asn_app_consume_bytes_f *cb, void *app_key) {
1380 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1381 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1382}
1383
1384asn_dec_rval_t
1385NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1386 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1387 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1388 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1389}
1390
1391asn_enc_rval_t
1392NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1393 int ilevel, enum xer_encoder_flags_e flags,
1394 asn_app_consume_bytes_f *cb, void *app_key) {
1395 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1396 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1397}
1398
1399
1400/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1401
Lev Walkina7591b52014-10-12 18:37:35 -07001402static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001403 0, 0, 0, 0, 0,
1404 0, /* Native long size */
1405 1 /* Unsigned representation */
1406};
Lev Walkina7591b52014-10-12 18:37:35 -07001407static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001408 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1409};
1410asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1411 "NO-IntegerOutValue",
1412 "NO-IntegerOutValue",
1413 NO_IntegerOutValue_free,
1414 NO_IntegerOutValue_print,
1415 NO_IntegerOutValue_constraint,
1416 NO_IntegerOutValue_decode_ber,
1417 NO_IntegerOutValue_encode_der,
1418 NO_IntegerOutValue_decode_xer,
1419 NO_IntegerOutValue_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001420 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001421 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001422 asn_DEF_NO_IntegerOutValue_tags_1,
1423 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1424 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1425 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1426 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1427 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1428 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001429 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001430 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001431};
1432
1433
1434/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1435
Lev Walkinc3f0b892005-08-14 02:40:04 +00001436#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001437
1438/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1439
Lev Walkinc3f0b892005-08-14 02:40:04 +00001440typedef long OK_IntegerInRange1_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001441
1442/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1443
1444extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1445asn_struct_free_f OK_IntegerInRange1_free;
1446asn_struct_print_f OK_IntegerInRange1_print;
1447asn_constr_check_f OK_IntegerInRange1_constraint;
1448ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1449der_type_encoder_f OK_IntegerInRange1_encode_der;
1450xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1451xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1452
1453/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1454
1455int
1456OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001457 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001458 long value;
1459
1460 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001461 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001462 "%s: value not given (%s:%d)",
1463 td->name, __FILE__, __LINE__);
1464 return -1;
1465 }
1466
Lev Walkinc3f0b892005-08-14 02:40:04 +00001467 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001468
1469 if((value >= -100 && value <= 100)) {
1470 /* Constraint check succeeded */
1471 return 0;
1472 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001473 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001474 "%s: constraint failed (%s:%d)",
1475 td->name, __FILE__, __LINE__);
1476 return -1;
1477 }
1478}
1479
1480/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001481 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001482 * so here we adjust the DEF accordingly.
1483 */
1484static void
1485OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001486 td->free_struct = asn_DEF_NativeInteger.free_struct;
1487 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001488 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001489 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1490 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1491 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1492 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001493 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001494 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001495 if(!td->per_constraints)
1496 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001497 td->elements = asn_DEF_NativeInteger.elements;
1498 td->elements_count = asn_DEF_NativeInteger.elements_count;
1499 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001500}
1501
1502void
1503OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1504 void *struct_ptr, int contents_only) {
1505 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1506 td->free_struct(td, struct_ptr, contents_only);
1507}
1508
1509int
1510OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1511 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1512 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1513 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1514}
1515
1516asn_dec_rval_t
1517OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1518 void **structure, const void *bufptr, size_t size, int tag_mode) {
1519 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1520 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1521}
1522
1523asn_enc_rval_t
1524OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1525 void *structure, int tag_mode, ber_tlv_tag_t tag,
1526 asn_app_consume_bytes_f *cb, void *app_key) {
1527 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1528 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1529}
1530
1531asn_dec_rval_t
1532OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1533 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1534 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1535 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1536}
1537
1538asn_enc_rval_t
1539OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1540 int ilevel, enum xer_encoder_flags_e flags,
1541 asn_app_consume_bytes_f *cb, void *app_key) {
1542 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1543 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1544}
1545
1546
1547/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1548
Lev Walkina7591b52014-10-12 18:37:35 -07001549static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001550 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1551};
1552asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1553 "OK-IntegerInRange1",
1554 "OK-IntegerInRange1",
1555 OK_IntegerInRange1_free,
1556 OK_IntegerInRange1_print,
1557 OK_IntegerInRange1_constraint,
1558 OK_IntegerInRange1_decode_ber,
1559 OK_IntegerInRange1_encode_der,
1560 OK_IntegerInRange1_decode_xer,
1561 OK_IntegerInRange1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001562 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001563 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001564 asn_DEF_OK_IntegerInRange1_tags_1,
1565 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1566 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1567 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1568 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1569 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1570 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001571 0, 0, /* No members */
1572 0 /* No specifics */
1573};
1574
1575
1576/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1577
Lev Walkinc3f0b892005-08-14 02:40:04 +00001578#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001579
1580/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1581
Lev Walkinc3f0b892005-08-14 02:40:04 +00001582typedef long OK_IntegerInRange2_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001583
1584/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1585
1586extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1587asn_struct_free_f OK_IntegerInRange2_free;
1588asn_struct_print_f OK_IntegerInRange2_print;
1589asn_constr_check_f OK_IntegerInRange2_constraint;
1590ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1591der_type_encoder_f OK_IntegerInRange2_encode_der;
1592xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1593xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1594
1595/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1596
1597int
1598OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001599 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001600 long value;
1601
1602 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001603 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001604 "%s: value not given (%s:%d)",
1605 td->name, __FILE__, __LINE__);
1606 return -1;
1607 }
1608
Lev Walkinc3f0b892005-08-14 02:40:04 +00001609 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001610
1611 if(((value == -100) || (value == 100))) {
1612 /* Constraint check succeeded */
1613 return 0;
1614 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001615 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001616 "%s: constraint failed (%s:%d)",
1617 td->name, __FILE__, __LINE__);
1618 return -1;
1619 }
1620}
1621
1622/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001623 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001624 * so here we adjust the DEF accordingly.
1625 */
1626static void
1627OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001628 td->free_struct = asn_DEF_NativeInteger.free_struct;
1629 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001630 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001631 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1632 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1633 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1634 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001635 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001636 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001637 if(!td->per_constraints)
1638 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001639 td->elements = asn_DEF_NativeInteger.elements;
1640 td->elements_count = asn_DEF_NativeInteger.elements_count;
1641 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001642}
1643
1644void
1645OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1646 void *struct_ptr, int contents_only) {
1647 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1648 td->free_struct(td, struct_ptr, contents_only);
1649}
1650
1651int
1652OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1653 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1654 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1655 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1656}
1657
1658asn_dec_rval_t
1659OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1660 void **structure, const void *bufptr, size_t size, int tag_mode) {
1661 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1662 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1663}
1664
1665asn_enc_rval_t
1666OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1667 void *structure, int tag_mode, ber_tlv_tag_t tag,
1668 asn_app_consume_bytes_f *cb, void *app_key) {
1669 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1670 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1671}
1672
1673asn_dec_rval_t
1674OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1675 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1676 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1677 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1678}
1679
1680asn_enc_rval_t
1681OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1682 int ilevel, enum xer_encoder_flags_e flags,
1683 asn_app_consume_bytes_f *cb, void *app_key) {
1684 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1685 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1686}
1687
1688
1689/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1690
Lev Walkina7591b52014-10-12 18:37:35 -07001691static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001692 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1693};
1694asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1695 "OK-IntegerInRange2",
1696 "OK-IntegerInRange2",
1697 OK_IntegerInRange2_free,
1698 OK_IntegerInRange2_print,
1699 OK_IntegerInRange2_constraint,
1700 OK_IntegerInRange2_decode_ber,
1701 OK_IntegerInRange2_encode_der,
1702 OK_IntegerInRange2_decode_xer,
1703 OK_IntegerInRange2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001704 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001705 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001706 asn_DEF_OK_IntegerInRange2_tags_1,
1707 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1708 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1709 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
1710 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1711 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1712 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001713 0, 0, /* No members */
1714 0 /* No specifics */
1715};
1716
1717
1718/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
1719
Lev Walkinc3f0b892005-08-14 02:40:04 +00001720#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001721
1722/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
1723
Lev Walkinc3f0b892005-08-14 02:40:04 +00001724typedef long OK_IntegerInRange3_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001725
1726/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
1727
1728extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
1729asn_struct_free_f OK_IntegerInRange3_free;
1730asn_struct_print_f OK_IntegerInRange3_print;
1731asn_constr_check_f OK_IntegerInRange3_constraint;
1732ber_type_decoder_f OK_IntegerInRange3_decode_ber;
1733der_type_encoder_f OK_IntegerInRange3_encode_der;
1734xer_type_decoder_f OK_IntegerInRange3_decode_xer;
1735xer_type_encoder_f OK_IntegerInRange3_encode_xer;
1736
1737/*** <<< CODE [OK-IntegerInRange3] >>> ***/
1738
1739int
1740OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001741 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001742 long value;
1743
1744 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001745 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001746 "%s: value not given (%s:%d)",
1747 td->name, __FILE__, __LINE__);
1748 return -1;
1749 }
1750
Lev Walkinc3f0b892005-08-14 02:40:04 +00001751 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001752
Lev Walkin63b41262007-11-06 01:48:46 +00001753 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001754 /* Constraint check succeeded */
1755 return 0;
1756 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001757 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001758 "%s: constraint failed (%s:%d)",
1759 td->name, __FILE__, __LINE__);
1760 return -1;
1761 }
1762}
1763
1764/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001765 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001766 * so here we adjust the DEF accordingly.
1767 */
1768static void
1769OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001770 td->free_struct = asn_DEF_NativeInteger.free_struct;
1771 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001772 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001773 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1774 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1775 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1776 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001777 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001778 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001779 if(!td->per_constraints)
1780 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001781 td->elements = asn_DEF_NativeInteger.elements;
1782 td->elements_count = asn_DEF_NativeInteger.elements_count;
1783 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001784}
1785
1786void
1787OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
1788 void *struct_ptr, int contents_only) {
1789 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1790 td->free_struct(td, struct_ptr, contents_only);
1791}
1792
1793int
1794OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1795 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1796 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1797 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1798}
1799
1800asn_dec_rval_t
1801OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1802 void **structure, const void *bufptr, size_t size, int tag_mode) {
1803 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1804 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1805}
1806
1807asn_enc_rval_t
1808OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
1809 void *structure, int tag_mode, ber_tlv_tag_t tag,
1810 asn_app_consume_bytes_f *cb, void *app_key) {
1811 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1812 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1813}
1814
1815asn_dec_rval_t
1816OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1817 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1818 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1819 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1820}
1821
1822asn_enc_rval_t
1823OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1824 int ilevel, enum xer_encoder_flags_e flags,
1825 asn_app_consume_bytes_f *cb, void *app_key) {
1826 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1827 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1828}
1829
1830
1831/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
1832
Lev Walkina7591b52014-10-12 18:37:35 -07001833static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001834 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1835};
1836asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
1837 "OK-IntegerInRange3",
1838 "OK-IntegerInRange3",
1839 OK_IntegerInRange3_free,
1840 OK_IntegerInRange3_print,
1841 OK_IntegerInRange3_constraint,
1842 OK_IntegerInRange3_decode_ber,
1843 OK_IntegerInRange3_encode_der,
1844 OK_IntegerInRange3_decode_xer,
1845 OK_IntegerInRange3_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001846 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001847 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001848 asn_DEF_OK_IntegerInRange3_tags_1,
1849 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1850 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1851 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
1852 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1853 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1854 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001855 0, 0, /* No members */
1856 0 /* No specifics */
1857};
1858
1859
1860/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
1861
Lev Walkinc3f0b892005-08-14 02:40:04 +00001862#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001863
1864/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
1865
Lev Walkinc3f0b892005-08-14 02:40:04 +00001866typedef long OK_IntegerInRange4_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001867
1868/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
1869
1870extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
1871asn_struct_free_f OK_IntegerInRange4_free;
1872asn_struct_print_f OK_IntegerInRange4_print;
1873asn_constr_check_f OK_IntegerInRange4_constraint;
1874ber_type_decoder_f OK_IntegerInRange4_decode_ber;
1875der_type_encoder_f OK_IntegerInRange4_encode_der;
1876xer_type_decoder_f OK_IntegerInRange4_decode_xer;
1877xer_type_encoder_f OK_IntegerInRange4_encode_xer;
1878
1879/*** <<< CODE [OK-IntegerInRange4] >>> ***/
1880
1881int
1882OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001883 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001884 long value;
1885
1886 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001887 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001888 "%s: value not given (%s:%d)",
1889 td->name, __FILE__, __LINE__);
1890 return -1;
1891 }
1892
Lev Walkinc3f0b892005-08-14 02:40:04 +00001893 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001894
Lev Walkin63b41262007-11-06 01:48:46 +00001895 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001896 /* Constraint check succeeded */
1897 return 0;
1898 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001899 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001900 "%s: constraint failed (%s:%d)",
1901 td->name, __FILE__, __LINE__);
1902 return -1;
1903 }
1904}
1905
1906/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001907 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001908 * so here we adjust the DEF accordingly.
1909 */
1910static void
1911OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001912 td->free_struct = asn_DEF_NativeInteger.free_struct;
1913 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001914 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001915 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1916 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1917 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1918 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001919 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001920 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001921 if(!td->per_constraints)
1922 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001923 td->elements = asn_DEF_NativeInteger.elements;
1924 td->elements_count = asn_DEF_NativeInteger.elements_count;
1925 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001926}
1927
1928void
1929OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
1930 void *struct_ptr, int contents_only) {
1931 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1932 td->free_struct(td, struct_ptr, contents_only);
1933}
1934
1935int
1936OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1937 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1938 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1939 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1940}
1941
1942asn_dec_rval_t
1943OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1944 void **structure, const void *bufptr, size_t size, int tag_mode) {
1945 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1946 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1947}
1948
1949asn_enc_rval_t
1950OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
1951 void *structure, int tag_mode, ber_tlv_tag_t tag,
1952 asn_app_consume_bytes_f *cb, void *app_key) {
1953 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1954 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1955}
1956
1957asn_dec_rval_t
1958OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1959 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1960 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1961 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1962}
1963
1964asn_enc_rval_t
1965OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1966 int ilevel, enum xer_encoder_flags_e flags,
1967 asn_app_consume_bytes_f *cb, void *app_key) {
1968 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1969 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1970}
1971
1972
1973/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
1974
Lev Walkina7591b52014-10-12 18:37:35 -07001975static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001976 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1977};
1978asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
1979 "OK-IntegerInRange4",
1980 "OK-IntegerInRange4",
1981 OK_IntegerInRange4_free,
1982 OK_IntegerInRange4_print,
1983 OK_IntegerInRange4_constraint,
1984 OK_IntegerInRange4_decode_ber,
1985 OK_IntegerInRange4_encode_der,
1986 OK_IntegerInRange4_decode_xer,
1987 OK_IntegerInRange4_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001988 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001989 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001990 asn_DEF_OK_IntegerInRange4_tags_1,
1991 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1992 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1993 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
1994 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
1995 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
1996 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001997 0, 0, /* No members */
1998 0 /* No specifics */
1999};
2000
2001
2002/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2003
Lev Walkin2a744a72013-03-27 01:56:23 -07002004#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00002005
2006/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2007
Lev Walkin2a744a72013-03-27 01:56:23 -07002008typedef long OK_IntegerInRange5_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00002009
2010/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2011
2012extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2013asn_struct_free_f OK_IntegerInRange5_free;
2014asn_struct_print_f OK_IntegerInRange5_print;
2015asn_constr_check_f OK_IntegerInRange5_constraint;
2016ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2017der_type_encoder_f OK_IntegerInRange5_encode_der;
2018xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2019xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2020
2021/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2022
2023int
2024OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002025 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00002026 long value;
2027
2028 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002029 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002030 "%s: value not given (%s:%d)",
2031 td->name, __FILE__, __LINE__);
2032 return -1;
2033 }
2034
Lev Walkin2a744a72013-03-27 01:56:23 -07002035 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00002036
Lev Walkin63b41262007-11-06 01:48:46 +00002037 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00002038 /* Constraint check succeeded */
2039 return 0;
2040 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002041 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002042 "%s: constraint failed (%s:%d)",
2043 td->name, __FILE__, __LINE__);
2044 return -1;
2045 }
2046}
2047
2048/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002049 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00002050 * so here we adjust the DEF accordingly.
2051 */
2052static void
2053OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002054 td->free_struct = asn_DEF_NativeInteger.free_struct;
2055 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002056 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002057 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2058 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2059 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2060 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2061 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2062 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002063 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002064 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2065 td->elements = asn_DEF_NativeInteger.elements;
2066 td->elements_count = asn_DEF_NativeInteger.elements_count;
2067 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00002068}
2069
2070void
2071OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2072 void *struct_ptr, int contents_only) {
2073 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2074 td->free_struct(td, struct_ptr, contents_only);
2075}
2076
2077int
2078OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2079 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2080 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2081 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2082}
2083
2084asn_dec_rval_t
2085OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2086 void **structure, const void *bufptr, size_t size, int tag_mode) {
2087 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2088 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2089}
2090
2091asn_enc_rval_t
2092OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2093 void *structure, int tag_mode, ber_tlv_tag_t tag,
2094 asn_app_consume_bytes_f *cb, void *app_key) {
2095 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2096 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2097}
2098
2099asn_dec_rval_t
2100OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2101 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2102 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2103 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2104}
2105
2106asn_enc_rval_t
2107OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2108 int ilevel, enum xer_encoder_flags_e flags,
2109 asn_app_consume_bytes_f *cb, void *app_key) {
2110 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2111 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2112}
2113
2114
2115/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2116
Lev Walkina7591b52014-10-12 18:37:35 -07002117static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00002118 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2119};
2120asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2121 "OK-IntegerInRange5",
2122 "OK-IntegerInRange5",
2123 OK_IntegerInRange5_free,
2124 OK_IntegerInRange5_print,
2125 OK_IntegerInRange5_constraint,
2126 OK_IntegerInRange5_decode_ber,
2127 OK_IntegerInRange5_encode_der,
2128 OK_IntegerInRange5_decode_xer,
2129 OK_IntegerInRange5_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002130 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002131 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002132 asn_DEF_OK_IntegerInRange5_tags_1,
2133 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2134 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2135 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2136 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2137 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2138 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002139 0, 0, /* No members */
2140 0 /* No specifics */
2141};
2142
Lev Walkinc3f0b892005-08-14 02:40:04 +00002143
Lev Walkinfee6f712005-08-27 03:13:51 +00002144/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2145
Lev Walkin8bb57a22007-12-03 13:41:36 +00002146#include <NativeInteger.h>
Lev Walkinfee6f712005-08-27 03:13:51 +00002147
2148/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2149
Lev Walkin8bb57a22007-12-03 13:41:36 +00002150typedef unsigned long NO_IntegerInRange6_t;
Lev Walkinfee6f712005-08-27 03:13:51 +00002151
2152/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2153
2154extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2155asn_struct_free_f NO_IntegerInRange6_free;
2156asn_struct_print_f NO_IntegerInRange6_print;
2157asn_constr_check_f NO_IntegerInRange6_constraint;
2158ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2159der_type_encoder_f NO_IntegerInRange6_encode_der;
2160xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2161xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2162
2163/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2164
2165int
2166NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002167 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinfee6f712005-08-27 03:13:51 +00002168
2169 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002170 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002171 "%s: value not given (%s:%d)",
2172 td->name, __FILE__, __LINE__);
2173 return -1;
2174 }
2175
Lev Walkinfee6f712005-08-27 03:13:51 +00002176
Lev Walkin8bb57a22007-12-03 13:41:36 +00002177 /* Constraint check succeeded */
2178 return 0;
Lev Walkinfee6f712005-08-27 03:13:51 +00002179}
2180
2181/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002182 * This type is implemented using NativeInteger,
Lev Walkinfee6f712005-08-27 03:13:51 +00002183 * so here we adjust the DEF accordingly.
2184 */
2185static void
2186NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002187 td->free_struct = asn_DEF_NativeInteger.free_struct;
2188 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002189 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00002190 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2191 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2192 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2193 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2194 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2195 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002196 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002197 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2198 td->elements = asn_DEF_NativeInteger.elements;
2199 td->elements_count = asn_DEF_NativeInteger.elements_count;
2200 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkinfee6f712005-08-27 03:13:51 +00002201}
2202
2203void
2204NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2205 void *struct_ptr, int contents_only) {
2206 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2207 td->free_struct(td, struct_ptr, contents_only);
2208}
2209
2210int
2211NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2212 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2213 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2214 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2215}
2216
2217asn_dec_rval_t
2218NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2219 void **structure, const void *bufptr, size_t size, int tag_mode) {
2220 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2221 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2222}
2223
2224asn_enc_rval_t
2225NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2226 void *structure, int tag_mode, ber_tlv_tag_t tag,
2227 asn_app_consume_bytes_f *cb, void *app_key) {
2228 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2229 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2230}
2231
2232asn_dec_rval_t
2233NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2234 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2235 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2236 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2237}
2238
2239asn_enc_rval_t
2240NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2241 int ilevel, enum xer_encoder_flags_e flags,
2242 asn_app_consume_bytes_f *cb, void *app_key) {
2243 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2244 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2245}
2246
2247
2248/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2249
Lev Walkina7591b52014-10-12 18:37:35 -07002250static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002251 0, 0, 0, 0, 0,
2252 0, /* Native long size */
2253 1 /* Unsigned representation */
2254};
Lev Walkina7591b52014-10-12 18:37:35 -07002255static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkinfee6f712005-08-27 03:13:51 +00002256 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2257};
2258asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2259 "NO-IntegerInRange6",
2260 "NO-IntegerInRange6",
2261 NO_IntegerInRange6_free,
2262 NO_IntegerInRange6_print,
2263 NO_IntegerInRange6_constraint,
2264 NO_IntegerInRange6_decode_ber,
2265 NO_IntegerInRange6_encode_der,
2266 NO_IntegerInRange6_decode_xer,
2267 NO_IntegerInRange6_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002268 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinfee6f712005-08-27 03:13:51 +00002269 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002270 asn_DEF_NO_IntegerInRange6_tags_1,
2271 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2272 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2273 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2274 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2275 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2276 0, /* No PER visible constraints */
Lev Walkinfee6f712005-08-27 03:13:51 +00002277 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002278 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkinfee6f712005-08-27 03:13:51 +00002279};
2280
2281
Lev Walkinc3f0b892005-08-14 02:40:04 +00002282/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2283
Lev Walkin2a744a72013-03-27 01:56:23 -07002284#include <NativeInteger.h>
Lev Walkinc3f0b892005-08-14 02:40:04 +00002285
2286/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2287
2288typedef enum CN_IntegerEnumerated1 {
2289 CN_IntegerEnumerated1_a = 1,
2290 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002291} e_CN_IntegerEnumerated1;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002292
2293/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2294
Lev Walkin2a744a72013-03-27 01:56:23 -07002295typedef long CN_IntegerEnumerated1_t;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002296
2297/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2298
2299extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2300asn_struct_free_f CN_IntegerEnumerated1_free;
2301asn_struct_print_f CN_IntegerEnumerated1_print;
2302asn_constr_check_f CN_IntegerEnumerated1_constraint;
2303ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2304der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2305xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2306xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2307
2308/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2309
2310int
2311CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002312 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002313 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002314 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002315 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002316}
2317
2318/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002319 * This type is implemented using NativeInteger,
Lev Walkinc3f0b892005-08-14 02:40:04 +00002320 * so here we adjust the DEF accordingly.
2321 */
2322static void
2323CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002324 td->free_struct = asn_DEF_NativeInteger.free_struct;
2325 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002326 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002327 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2328 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2329 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2330 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2331 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2332 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002333 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002334 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2335 td->elements = asn_DEF_NativeInteger.elements;
2336 td->elements_count = asn_DEF_NativeInteger.elements_count;
2337 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002338}
2339
2340void
2341CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2342 void *struct_ptr, int contents_only) {
2343 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2344 td->free_struct(td, struct_ptr, contents_only);
2345}
2346
2347int
2348CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2349 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2350 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2351 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2352}
2353
2354asn_dec_rval_t
2355CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2356 void **structure, const void *bufptr, size_t size, int tag_mode) {
2357 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2358 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2359}
2360
2361asn_enc_rval_t
2362CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2363 void *structure, int tag_mode, ber_tlv_tag_t tag,
2364 asn_app_consume_bytes_f *cb, void *app_key) {
2365 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2366 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2367}
2368
2369asn_dec_rval_t
2370CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2371 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2372 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2373 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2374}
2375
2376asn_enc_rval_t
2377CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2378 int ilevel, enum xer_encoder_flags_e flags,
2379 asn_app_consume_bytes_f *cb, void *app_key) {
2380 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2381 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2382}
2383
2384
2385/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2386
Lev Walkina7591b52014-10-12 18:37:35 -07002387static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002388 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2389};
2390asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2391 "CN-IntegerEnumerated1",
2392 "CN-IntegerEnumerated1",
2393 CN_IntegerEnumerated1_free,
2394 CN_IntegerEnumerated1_print,
2395 CN_IntegerEnumerated1_constraint,
2396 CN_IntegerEnumerated1_decode_ber,
2397 CN_IntegerEnumerated1_encode_der,
2398 CN_IntegerEnumerated1_decode_xer,
2399 CN_IntegerEnumerated1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002400 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002401 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002402 asn_DEF_CN_IntegerEnumerated1_tags_1,
2403 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2404 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2405 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2406 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2407 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2408 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002409 0, 0, /* Defined elsewhere */
2410 0 /* No specifics */
2411};
2412
2413
2414/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2415
2416#include <INTEGER.h>
2417
2418/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2419
2420typedef enum NO_IntegerEnumerated2 {
2421 NO_IntegerEnumerated2_a = 1,
2422 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002423} e_NO_IntegerEnumerated2;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002424
2425/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2426
2427typedef INTEGER_t NO_IntegerEnumerated2_t;
2428
2429/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2430
2431extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2432asn_struct_free_f NO_IntegerEnumerated2_free;
2433asn_struct_print_f NO_IntegerEnumerated2_print;
2434asn_constr_check_f NO_IntegerEnumerated2_constraint;
2435ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2436der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2437xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2438xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2439
2440/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2441
2442int
2443NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002444 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002445 /* Replace with underlying type checker */
2446 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002447 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002448}
2449
2450/*
2451 * This type is implemented using INTEGER,
2452 * so here we adjust the DEF accordingly.
2453 */
2454static void
2455NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2456 td->free_struct = asn_DEF_INTEGER.free_struct;
2457 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002458 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002459 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2460 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2461 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2462 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002463 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002464 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002465 if(!td->per_constraints)
2466 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002467 td->elements = asn_DEF_INTEGER.elements;
2468 td->elements_count = asn_DEF_INTEGER.elements_count;
2469 td->specifics = asn_DEF_INTEGER.specifics;
2470}
2471
2472void
2473NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2474 void *struct_ptr, int contents_only) {
2475 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2476 td->free_struct(td, struct_ptr, contents_only);
2477}
2478
2479int
2480NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2481 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2482 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2483 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2484}
2485
2486asn_dec_rval_t
2487NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2488 void **structure, const void *bufptr, size_t size, int tag_mode) {
2489 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2490 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2491}
2492
2493asn_enc_rval_t
2494NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2495 void *structure, int tag_mode, ber_tlv_tag_t tag,
2496 asn_app_consume_bytes_f *cb, void *app_key) {
2497 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2498 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2499}
2500
2501asn_dec_rval_t
2502NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2503 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2504 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2505 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2506}
2507
2508asn_enc_rval_t
2509NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2510 int ilevel, enum xer_encoder_flags_e flags,
2511 asn_app_consume_bytes_f *cb, void *app_key) {
2512 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2513 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2514}
2515
2516
2517/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2518
Lev Walkina7591b52014-10-12 18:37:35 -07002519static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002520 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2521};
2522asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2523 "NO-IntegerEnumerated2",
2524 "NO-IntegerEnumerated2",
2525 NO_IntegerEnumerated2_free,
2526 NO_IntegerEnumerated2_print,
2527 NO_IntegerEnumerated2_constraint,
2528 NO_IntegerEnumerated2_decode_ber,
2529 NO_IntegerEnumerated2_encode_der,
2530 NO_IntegerEnumerated2_decode_xer,
2531 NO_IntegerEnumerated2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002532 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002533 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002534 asn_DEF_NO_IntegerEnumerated2_tags_1,
2535 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2536 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2537 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2538 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2539 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2540 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002541 0, 0, /* Defined elsewhere */
2542 0 /* No specifics */
2543};
2544