blob: 30633fdefeeaacb84c68b939a0904933bdc70a0b [file] [log] [blame]
Lev Walkin082cadc2005-08-14 02:18:27 +00001
2/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
3
Lev Walkin2a744a72013-03-27 01:56:23 -07004#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00005
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
Lev Walkin2a744a72013-03-27 01:56:23 -07008typedef INTEGER_t CN_IntegerUnlimited_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00009
10/*** <<< FUNC-DECLS [CN-IntegerUnlimited] >>> ***/
11
12extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited;
13asn_struct_free_f CN_IntegerUnlimited_free;
14asn_struct_print_f CN_IntegerUnlimited_print;
15asn_constr_check_f CN_IntegerUnlimited_constraint;
16ber_type_decoder_f CN_IntegerUnlimited_decode_ber;
17der_type_encoder_f CN_IntegerUnlimited_encode_der;
18xer_type_decoder_f CN_IntegerUnlimited_decode_xer;
19xer_type_encoder_f CN_IntegerUnlimited_encode_xer;
20
21/*** <<< CODE [CN-IntegerUnlimited] >>> ***/
22
23int
24CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000025 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +000026 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -070027 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000028 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +000029}
30
31/*
Lev Walkin2a744a72013-03-27 01:56:23 -070032 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +000033 * so here we adjust the DEF accordingly.
34 */
35static void
36CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -070037 td->free_struct = asn_DEF_INTEGER.free_struct;
38 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080039 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -070040 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
41 td->der_encoder = asn_DEF_INTEGER.der_encoder;
42 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
43 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
44 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
45 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000046 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -070047 td->per_constraints = asn_DEF_INTEGER.per_constraints;
48 td->elements = asn_DEF_INTEGER.elements;
49 td->elements_count = asn_DEF_INTEGER.elements_count;
50 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +000051}
52
53void
54CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
55 void *struct_ptr, int contents_only) {
56 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
57 td->free_struct(td, struct_ptr, contents_only);
58}
59
60int
61CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
62 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
63 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
64 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
65}
66
67asn_dec_rval_t
68CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
69 void **structure, const void *bufptr, size_t size, int tag_mode) {
70 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
71 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
72}
73
74asn_enc_rval_t
75CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
76 void *structure, int tag_mode, ber_tlv_tag_t tag,
77 asn_app_consume_bytes_f *cb, void *app_key) {
78 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
79 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
80}
81
82asn_dec_rval_t
83CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
84 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
85 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
86 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
87}
88
89asn_enc_rval_t
90CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
91 int ilevel, enum xer_encoder_flags_e flags,
92 asn_app_consume_bytes_f *cb, void *app_key) {
93 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
94 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
95}
96
97
98/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
99
Lev Walkina7591b52014-10-12 18:37:35 -0700100static const ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000101 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
102};
103asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
104 "CN-IntegerUnlimited",
105 "CN-IntegerUnlimited",
106 CN_IntegerUnlimited_free,
107 CN_IntegerUnlimited_print,
108 CN_IntegerUnlimited_constraint,
109 CN_IntegerUnlimited_decode_ber,
110 CN_IntegerUnlimited_encode_der,
111 CN_IntegerUnlimited_decode_xer,
112 CN_IntegerUnlimited_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000113 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000114 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000115 asn_DEF_CN_IntegerUnlimited_tags_1,
116 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
117 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
118 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
119 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
120 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
121 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000122 0, 0, /* No members */
123 0 /* No specifics */
124};
125
126
127/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
128
Lev Walkin2a744a72013-03-27 01:56:23 -0700129#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000130
131/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
132
Lev Walkin2a744a72013-03-27 01:56:23 -0700133typedef INTEGER_t CN_IntegerMinMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000134
135/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
136
137extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
138asn_struct_free_f CN_IntegerMinMax_free;
139asn_struct_print_f CN_IntegerMinMax_print;
140asn_constr_check_f CN_IntegerMinMax_constraint;
141ber_type_decoder_f CN_IntegerMinMax_decode_ber;
142der_type_encoder_f CN_IntegerMinMax_encode_der;
143xer_type_decoder_f CN_IntegerMinMax_decode_xer;
144xer_type_encoder_f CN_IntegerMinMax_encode_xer;
145
146/*** <<< CODE [CN-IntegerMinMax] >>> ***/
147
148int
149CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000150 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700151 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000152
153 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700154 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000155 "%s: value not given (%s:%d)",
156 td->name, __FILE__, __LINE__);
157 return -1;
158 }
159
160
161 if(1 /* No applicable constraints whatsoever */) {
johvikbd3dea92017-05-09 10:20:51 +0200162 (void)st; /* Unused variable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000163 /* Nothing is here. See below */
164 }
165
166 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700167 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000168 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin082cadc2005-08-14 02:18:27 +0000169}
170
171/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700172 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000173 * so here we adjust the DEF accordingly.
174 */
175static void
176CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700177 td->free_struct = asn_DEF_INTEGER.free_struct;
178 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800179 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700180 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
181 td->der_encoder = asn_DEF_INTEGER.der_encoder;
182 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
183 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
184 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
185 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000186 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700187 td->per_constraints = asn_DEF_INTEGER.per_constraints;
188 td->elements = asn_DEF_INTEGER.elements;
189 td->elements_count = asn_DEF_INTEGER.elements_count;
190 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000191}
192
193void
194CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
195 void *struct_ptr, int contents_only) {
196 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
197 td->free_struct(td, struct_ptr, contents_only);
198}
199
200int
201CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
202 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
203 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
204 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
205}
206
207asn_dec_rval_t
208CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
209 void **structure, const void *bufptr, size_t size, int tag_mode) {
210 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
211 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
212}
213
214asn_enc_rval_t
215CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
216 void *structure, int tag_mode, ber_tlv_tag_t tag,
217 asn_app_consume_bytes_f *cb, void *app_key) {
218 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
219 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
220}
221
222asn_dec_rval_t
223CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
224 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
225 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
226 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
227}
228
229asn_enc_rval_t
230CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
231 int ilevel, enum xer_encoder_flags_e flags,
232 asn_app_consume_bytes_f *cb, void *app_key) {
233 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
234 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
235}
236
237
238/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
239
Lev Walkina7591b52014-10-12 18:37:35 -0700240static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000241 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
242};
243asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
244 "CN-IntegerMinMax",
245 "CN-IntegerMinMax",
246 CN_IntegerMinMax_free,
247 CN_IntegerMinMax_print,
248 CN_IntegerMinMax_constraint,
249 CN_IntegerMinMax_decode_ber,
250 CN_IntegerMinMax_encode_der,
251 CN_IntegerMinMax_decode_xer,
252 CN_IntegerMinMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000253 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000254 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000255 asn_DEF_CN_IntegerMinMax_tags_1,
256 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
257 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
258 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
259 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
260 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
261 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000262 0, 0, /* No members */
263 0 /* No specifics */
264};
265
266
267/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
268
Lev Walkin2a744a72013-03-27 01:56:23 -0700269#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000270
271/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
272
Lev Walkin2a744a72013-03-27 01:56:23 -0700273typedef INTEGER_t CN_IntegerMinLow_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000274
275/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
276
277extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
278asn_struct_free_f CN_IntegerMinLow_free;
279asn_struct_print_f CN_IntegerMinLow_print;
280asn_constr_check_f CN_IntegerMinLow_constraint;
281ber_type_decoder_f CN_IntegerMinLow_decode_ber;
282der_type_encoder_f CN_IntegerMinLow_encode_der;
283xer_type_decoder_f CN_IntegerMinLow_decode_xer;
284xer_type_encoder_f CN_IntegerMinLow_encode_xer;
285
286/*** <<< CODE [CN-IntegerMinLow] >>> ***/
287
288int
289CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000290 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700291 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000292 long value;
293
294 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700295 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000296 "%s: value not given (%s:%d)",
297 td->name, __FILE__, __LINE__);
298 return -1;
299 }
300
Lev Walkin2a744a72013-03-27 01:56:23 -0700301 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700302 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin2a744a72013-03-27 01:56:23 -0700303 "%s: value too large (%s:%d)",
304 td->name, __FILE__, __LINE__);
305 return -1;
306 }
Lev Walkin082cadc2005-08-14 02:18:27 +0000307
308 if((value <= 1)) {
309 /* Constraint check succeeded */
310 return 0;
311 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700312 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000313 "%s: constraint failed (%s:%d)",
314 td->name, __FILE__, __LINE__);
315 return -1;
316 }
317}
318
319/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700320 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000321 * so here we adjust the DEF accordingly.
322 */
323static void
324CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700325 td->free_struct = asn_DEF_INTEGER.free_struct;
326 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800327 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700328 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
329 td->der_encoder = asn_DEF_INTEGER.der_encoder;
330 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
331 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
332 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
333 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000334 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700335 td->per_constraints = asn_DEF_INTEGER.per_constraints;
336 td->elements = asn_DEF_INTEGER.elements;
337 td->elements_count = asn_DEF_INTEGER.elements_count;
338 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000339}
340
341void
342CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
343 void *struct_ptr, int contents_only) {
344 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
345 td->free_struct(td, struct_ptr, contents_only);
346}
347
348int
349CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
350 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
351 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
352 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
353}
354
355asn_dec_rval_t
356CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
357 void **structure, const void *bufptr, size_t size, int tag_mode) {
358 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
359 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
360}
361
362asn_enc_rval_t
363CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
364 void *structure, int tag_mode, ber_tlv_tag_t tag,
365 asn_app_consume_bytes_f *cb, void *app_key) {
366 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
367 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
368}
369
370asn_dec_rval_t
371CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
372 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
373 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
374 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
375}
376
377asn_enc_rval_t
378CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
379 int ilevel, enum xer_encoder_flags_e flags,
380 asn_app_consume_bytes_f *cb, void *app_key) {
381 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
382 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
383}
384
385
386/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
387
Lev Walkina7591b52014-10-12 18:37:35 -0700388static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000389 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
390};
391asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
392 "CN-IntegerMinLow",
393 "CN-IntegerMinLow",
394 CN_IntegerMinLow_free,
395 CN_IntegerMinLow_print,
396 CN_IntegerMinLow_constraint,
397 CN_IntegerMinLow_decode_ber,
398 CN_IntegerMinLow_encode_der,
399 CN_IntegerMinLow_decode_xer,
400 CN_IntegerMinLow_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000401 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000402 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000403 asn_DEF_CN_IntegerMinLow_tags_1,
404 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
405 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
406 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
407 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
408 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
409 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000410 0, 0, /* No members */
411 0 /* No specifics */
412};
413
414
415/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
416
417#include <INTEGER.h>
418
419/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
420
421typedef INTEGER_t NO_IntegerMinHigh_t;
422
423/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
424
425extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
426asn_struct_free_f NO_IntegerMinHigh_free;
427asn_struct_print_f NO_IntegerMinHigh_print;
428asn_constr_check_f NO_IntegerMinHigh_constraint;
429ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
430der_type_encoder_f NO_IntegerMinHigh_encode_der;
431xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
432xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
433
434/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
435
436int
437NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000438 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000439 const INTEGER_t *st = (const INTEGER_t *)sptr;
440 long value;
441
442 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700443 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000444 "%s: value not given (%s:%d)",
445 td->name, __FILE__, __LINE__);
446 return -1;
447 }
448
449 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700450 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000451 "%s: value too large (%s:%d)",
452 td->name, __FILE__, __LINE__);
453 return -1;
454 }
455
Lev Walkinc3f0b892005-08-14 02:40:04 +0000456 if((value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000457 /* Constraint check succeeded */
458 return 0;
459 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700460 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000461 "%s: constraint failed (%s:%d)",
462 td->name, __FILE__, __LINE__);
463 return -1;
464 }
465}
466
467/*
468 * This type is implemented using INTEGER,
469 * so here we adjust the DEF accordingly.
470 */
471static void
472NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
473 td->free_struct = asn_DEF_INTEGER.free_struct;
474 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800475 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000476 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
477 td->der_encoder = asn_DEF_INTEGER.der_encoder;
478 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
479 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000480 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000481 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000482 if(!td->per_constraints)
483 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000484 td->elements = asn_DEF_INTEGER.elements;
485 td->elements_count = asn_DEF_INTEGER.elements_count;
486 td->specifics = asn_DEF_INTEGER.specifics;
487}
488
489void
490NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
491 void *struct_ptr, int contents_only) {
492 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
493 td->free_struct(td, struct_ptr, contents_only);
494}
495
496int
497NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
498 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
499 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
500 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
501}
502
503asn_dec_rval_t
504NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
505 void **structure, const void *bufptr, size_t size, int tag_mode) {
506 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
507 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
508}
509
510asn_enc_rval_t
511NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
512 void *structure, int tag_mode, ber_tlv_tag_t tag,
513 asn_app_consume_bytes_f *cb, void *app_key) {
514 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
515 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
516}
517
518asn_dec_rval_t
519NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
520 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
521 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
522 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
523}
524
525asn_enc_rval_t
526NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
527 int ilevel, enum xer_encoder_flags_e flags,
528 asn_app_consume_bytes_f *cb, void *app_key) {
529 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
530 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
531}
532
533
534/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
535
Lev Walkina7591b52014-10-12 18:37:35 -0700536static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000537 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
538};
539asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
540 "NO-IntegerMinHigh",
541 "NO-IntegerMinHigh",
542 NO_IntegerMinHigh_free,
543 NO_IntegerMinHigh_print,
544 NO_IntegerMinHigh_constraint,
545 NO_IntegerMinHigh_decode_ber,
546 NO_IntegerMinHigh_encode_der,
547 NO_IntegerMinHigh_decode_xer,
548 NO_IntegerMinHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000549 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000550 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000551 asn_DEF_NO_IntegerMinHigh_tags_1,
552 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
553 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
554 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
555 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
556 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
557 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000558 0, 0, /* No members */
559 0 /* No specifics */
560};
561
562
563/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
564
Lev Walkin8bb57a22007-12-03 13:41:36 +0000565#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000566
567/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
568
Lev Walkin8bb57a22007-12-03 13:41:36 +0000569typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000570
571/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
572
573extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
574asn_struct_free_f NO_IntegerLowHigh_free;
575asn_struct_print_f NO_IntegerLowHigh_print;
576asn_constr_check_f NO_IntegerLowHigh_constraint;
577ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
578der_type_encoder_f NO_IntegerLowHigh_encode_der;
579xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
580xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
581
582/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
583
584int
585NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000586 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000587 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +0000588
589 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700590 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000591 "%s: value not given (%s:%d)",
592 td->name, __FILE__, __LINE__);
593 return -1;
594 }
595
Lev Walkin8bb57a22007-12-03 13:41:36 +0000596 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000597
Lev Walkinc3f0b892005-08-14 02:40:04 +0000598 if((value >= 1 && value <= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000599 /* Constraint check succeeded */
600 return 0;
601 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700602 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000603 "%s: constraint failed (%s:%d)",
604 td->name, __FILE__, __LINE__);
605 return -1;
606 }
607}
608
609/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000610 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +0000611 * so here we adjust the DEF accordingly.
612 */
613static void
614NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000615 td->free_struct = asn_DEF_NativeInteger.free_struct;
616 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800617 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000618 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
619 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
620 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
621 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
622 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
623 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000624 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000625 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
626 td->elements = asn_DEF_NativeInteger.elements;
627 td->elements_count = asn_DEF_NativeInteger.elements_count;
628 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +0000629}
630
631void
632NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
633 void *struct_ptr, int contents_only) {
634 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
635 td->free_struct(td, struct_ptr, contents_only);
636}
637
638int
639NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
640 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
641 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
642 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
643}
644
645asn_dec_rval_t
646NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
647 void **structure, const void *bufptr, size_t size, int tag_mode) {
648 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
649 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
650}
651
652asn_enc_rval_t
653NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
654 void *structure, int tag_mode, ber_tlv_tag_t tag,
655 asn_app_consume_bytes_f *cb, void *app_key) {
656 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
657 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
658}
659
660asn_dec_rval_t
661NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
662 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
663 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
664 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
665}
666
667asn_enc_rval_t
668NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
669 int ilevel, enum xer_encoder_flags_e flags,
670 asn_app_consume_bytes_f *cb, void *app_key) {
671 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
672 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
673}
674
675
676/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
677
Lev Walkina7591b52014-10-12 18:37:35 -0700678static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000679 0, 0, 0, 0, 0,
680 0, /* Native long size */
681 1 /* Unsigned representation */
682};
Lev Walkina7591b52014-10-12 18:37:35 -0700683static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000684 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
685};
686asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
687 "NO-IntegerLowHigh",
688 "NO-IntegerLowHigh",
689 NO_IntegerLowHigh_free,
690 NO_IntegerLowHigh_print,
691 NO_IntegerLowHigh_constraint,
692 NO_IntegerLowHigh_decode_ber,
693 NO_IntegerLowHigh_encode_der,
694 NO_IntegerLowHigh_decode_xer,
695 NO_IntegerLowHigh_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000696 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000697 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000698 asn_DEF_NO_IntegerLowHigh_tags_1,
699 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
700 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
701 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
702 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
703 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
704 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000705 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000706 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +0000707};
708
709
710/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
711
Lev Walkin2a744a72013-03-27 01:56:23 -0700712#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +0000713
714/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
715
Lev Walkin2a744a72013-03-27 01:56:23 -0700716typedef INTEGER_t CN_IntegerLowMax_t;
Lev Walkin082cadc2005-08-14 02:18:27 +0000717
718/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
719
720extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
721asn_struct_free_f CN_IntegerLowMax_free;
722asn_struct_print_f CN_IntegerLowMax_print;
723asn_constr_check_f CN_IntegerLowMax_constraint;
724ber_type_decoder_f CN_IntegerLowMax_decode_ber;
725der_type_encoder_f CN_IntegerLowMax_encode_der;
726xer_type_decoder_f CN_IntegerLowMax_decode_xer;
727xer_type_encoder_f CN_IntegerLowMax_encode_xer;
728
729/*** <<< CODE [CN-IntegerLowMax] >>> ***/
730
731int
732CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000733 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700734 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +0000735 long value;
736
737 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700738 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000739 "%s: value not given (%s:%d)",
740 td->name, __FILE__, __LINE__);
741 return -1;
742 }
743
Lev Walkin2a744a72013-03-27 01:56:23 -0700744 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700745 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin2a744a72013-03-27 01:56:23 -0700746 "%s: value too large (%s:%d)",
747 td->name, __FILE__, __LINE__);
748 return -1;
749 }
Lev Walkin082cadc2005-08-14 02:18:27 +0000750
751 if((value >= 1)) {
752 /* Constraint check succeeded */
753 return 0;
754 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700755 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000756 "%s: constraint failed (%s:%d)",
757 td->name, __FILE__, __LINE__);
758 return -1;
759 }
760}
761
762/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700763 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +0000764 * so here we adjust the DEF accordingly.
765 */
766static void
767CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700768 td->free_struct = asn_DEF_INTEGER.free_struct;
769 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800770 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700771 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
772 td->der_encoder = asn_DEF_INTEGER.der_encoder;
773 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
774 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
775 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
776 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000777 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700778 td->per_constraints = asn_DEF_INTEGER.per_constraints;
779 td->elements = asn_DEF_INTEGER.elements;
780 td->elements_count = asn_DEF_INTEGER.elements_count;
781 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +0000782}
783
784void
785CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
786 void *struct_ptr, int contents_only) {
787 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
788 td->free_struct(td, struct_ptr, contents_only);
789}
790
791int
792CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
793 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
794 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
795 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
796}
797
798asn_dec_rval_t
799CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
800 void **structure, const void *bufptr, size_t size, int tag_mode) {
801 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
802 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
803}
804
805asn_enc_rval_t
806CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
807 void *structure, int tag_mode, ber_tlv_tag_t tag,
808 asn_app_consume_bytes_f *cb, void *app_key) {
809 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
810 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
811}
812
813asn_dec_rval_t
814CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
815 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
816 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
817 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
818}
819
820asn_enc_rval_t
821CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
822 int ilevel, enum xer_encoder_flags_e flags,
823 asn_app_consume_bytes_f *cb, void *app_key) {
824 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
825 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
826}
827
828
829/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
830
Lev Walkina7591b52014-10-12 18:37:35 -0700831static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000832 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
833};
834asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
835 "CN-IntegerLowMax",
836 "CN-IntegerLowMax",
837 CN_IntegerLowMax_free,
838 CN_IntegerLowMax_print,
839 CN_IntegerLowMax_constraint,
840 CN_IntegerLowMax_decode_ber,
841 CN_IntegerLowMax_encode_der,
842 CN_IntegerLowMax_decode_xer,
843 CN_IntegerLowMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000844 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000845 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000846 asn_DEF_CN_IntegerLowMax_tags_1,
847 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
848 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
849 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
850 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
851 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
852 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +0000853 0, 0, /* No members */
854 0 /* No specifics */
855};
856
857
858/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
859
860#include <INTEGER.h>
861
862/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
863
864typedef INTEGER_t NO_IntegerHighMax_t;
865
866/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
867
868extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
869asn_struct_free_f NO_IntegerHighMax_free;
870asn_struct_print_f NO_IntegerHighMax_print;
871asn_constr_check_f NO_IntegerHighMax_constraint;
872ber_type_decoder_f NO_IntegerHighMax_decode_ber;
873der_type_encoder_f NO_IntegerHighMax_encode_der;
874xer_type_decoder_f NO_IntegerHighMax_decode_xer;
875xer_type_encoder_f NO_IntegerHighMax_encode_xer;
876
877/*** <<< CODE [NO-IntegerHighMax] >>> ***/
878
879int
880NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000881 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000882 const INTEGER_t *st = (const INTEGER_t *)sptr;
883 long value;
884
885 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700886 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000887 "%s: value not given (%s:%d)",
888 td->name, __FILE__, __LINE__);
889 return -1;
890 }
891
892 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700893 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000894 "%s: value too large (%s:%d)",
895 td->name, __FILE__, __LINE__);
896 return -1;
897 }
898
Lev Walkinc3f0b892005-08-14 02:40:04 +0000899 if((value >= 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +0000900 /* Constraint check succeeded */
901 return 0;
902 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700903 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +0000904 "%s: constraint failed (%s:%d)",
905 td->name, __FILE__, __LINE__);
906 return -1;
907 }
908}
909
910/*
911 * This type is implemented using INTEGER,
912 * so here we adjust the DEF accordingly.
913 */
914static void
915NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
916 td->free_struct = asn_DEF_INTEGER.free_struct;
917 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800918 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000919 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
920 td->der_encoder = asn_DEF_INTEGER.der_encoder;
921 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
922 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000923 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000924 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000925 if(!td->per_constraints)
926 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +0000927 td->elements = asn_DEF_INTEGER.elements;
928 td->elements_count = asn_DEF_INTEGER.elements_count;
929 td->specifics = asn_DEF_INTEGER.specifics;
930}
931
932void
933NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
934 void *struct_ptr, int contents_only) {
935 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
936 td->free_struct(td, struct_ptr, contents_only);
937}
938
939int
940NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
941 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
942 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
943 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
944}
945
946asn_dec_rval_t
947NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
948 void **structure, const void *bufptr, size_t size, int tag_mode) {
949 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
950 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
951}
952
953asn_enc_rval_t
954NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
955 void *structure, int tag_mode, ber_tlv_tag_t tag,
956 asn_app_consume_bytes_f *cb, void *app_key) {
957 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
958 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
959}
960
961asn_dec_rval_t
962NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
963 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
964 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
965 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
966}
967
968asn_enc_rval_t
969NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
970 int ilevel, enum xer_encoder_flags_e flags,
971 asn_app_consume_bytes_f *cb, void *app_key) {
972 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
973 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
974}
975
976
977/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
978
Lev Walkina7591b52014-10-12 18:37:35 -0700979static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +0000980 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
981};
982asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
983 "NO-IntegerHighMax",
984 "NO-IntegerHighMax",
985 NO_IntegerHighMax_free,
986 NO_IntegerHighMax_print,
987 NO_IntegerHighMax_constraint,
988 NO_IntegerHighMax_decode_ber,
989 NO_IntegerHighMax_encode_der,
990 NO_IntegerHighMax_decode_xer,
991 NO_IntegerHighMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000992 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +0000993 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +0000994 asn_DEF_NO_IntegerHighMax_tags_1,
995 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
996 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
997 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
998 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
999 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
1000 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001001 0, 0, /* No members */
1002 0 /* No specifics */
1003};
1004
1005
1006/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
1007
1008#include <INTEGER.h>
1009
1010/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
1011
1012typedef INTEGER_t NO_IntegerLowestMax_t;
1013
1014/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1015
1016extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1017asn_struct_free_f NO_IntegerLowestMax_free;
1018asn_struct_print_f NO_IntegerLowestMax_print;
1019asn_constr_check_f NO_IntegerLowestMax_constraint;
1020ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1021der_type_encoder_f NO_IntegerLowestMax_encode_der;
1022xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1023xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1024
1025/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1026
1027int
1028NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001029 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001030 const INTEGER_t *st = (const INTEGER_t *)sptr;
1031 long value;
1032
1033 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001034 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001035 "%s: value not given (%s:%d)",
1036 td->name, __FILE__, __LINE__);
1037 return -1;
1038 }
1039
1040 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001041 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001042 "%s: value too large (%s:%d)",
1043 td->name, __FILE__, __LINE__);
1044 return -1;
1045 }
1046
Lev Walkinc3f0b892005-08-14 02:40:04 +00001047 if((value >= -3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001048 /* Constraint check succeeded */
1049 return 0;
1050 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001051 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001052 "%s: constraint failed (%s:%d)",
1053 td->name, __FILE__, __LINE__);
1054 return -1;
1055 }
1056}
1057
1058/*
1059 * This type is implemented using INTEGER,
1060 * so here we adjust the DEF accordingly.
1061 */
1062static void
1063NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1064 td->free_struct = asn_DEF_INTEGER.free_struct;
1065 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001066 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001067 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1068 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1069 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1070 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001071 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001072 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001073 if(!td->per_constraints)
1074 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkin082cadc2005-08-14 02:18:27 +00001075 td->elements = asn_DEF_INTEGER.elements;
1076 td->elements_count = asn_DEF_INTEGER.elements_count;
1077 td->specifics = asn_DEF_INTEGER.specifics;
1078}
1079
1080void
1081NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1082 void *struct_ptr, int contents_only) {
1083 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1084 td->free_struct(td, struct_ptr, contents_only);
1085}
1086
1087int
1088NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1089 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1090 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1091 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1092}
1093
1094asn_dec_rval_t
1095NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1096 void **structure, const void *bufptr, size_t size, int tag_mode) {
1097 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1098 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1099}
1100
1101asn_enc_rval_t
1102NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1103 void *structure, int tag_mode, ber_tlv_tag_t tag,
1104 asn_app_consume_bytes_f *cb, void *app_key) {
1105 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1106 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1107}
1108
1109asn_dec_rval_t
1110NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1111 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1112 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1113 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1114}
1115
1116asn_enc_rval_t
1117NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1118 int ilevel, enum xer_encoder_flags_e flags,
1119 asn_app_consume_bytes_f *cb, void *app_key) {
1120 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1121 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1122}
1123
1124
1125/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1126
Lev Walkina7591b52014-10-12 18:37:35 -07001127static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001128 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1129};
1130asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1131 "NO-IntegerLowestMax",
1132 "NO-IntegerLowestMax",
1133 NO_IntegerLowestMax_free,
1134 NO_IntegerLowestMax_print,
1135 NO_IntegerLowestMax_constraint,
1136 NO_IntegerLowestMax_decode_ber,
1137 NO_IntegerLowestMax_encode_der,
1138 NO_IntegerLowestMax_decode_xer,
1139 NO_IntegerLowestMax_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001140 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001141 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001142 asn_DEF_NO_IntegerLowestMax_tags_1,
1143 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1144 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1145 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1146 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1147 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1148 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001149 0, 0, /* No members */
1150 0 /* No specifics */
1151};
1152
1153
1154/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1155
Lev Walkin8bb57a22007-12-03 13:41:36 +00001156#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001157
1158/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1159
Lev Walkin8bb57a22007-12-03 13:41:36 +00001160typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001161
1162/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1163
1164extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1165asn_struct_free_f NO_IntegerOutRange_free;
1166asn_struct_print_f NO_IntegerOutRange_print;
1167asn_constr_check_f NO_IntegerOutRange_constraint;
1168ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1169der_type_encoder_f NO_IntegerOutRange_encode_der;
1170xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1171xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1172
1173/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1174
1175int
1176NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001177 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001178 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001179
1180 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001181 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001182 "%s: value not given (%s:%d)",
1183 td->name, __FILE__, __LINE__);
1184 return -1;
1185 }
1186
Lev Walkin8bb57a22007-12-03 13:41:36 +00001187 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001188
Lev Walkinc3f0b892005-08-14 02:40:04 +00001189 if((value >= 3000000000 && value <= 3000000001)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001190 /* Constraint check succeeded */
1191 return 0;
1192 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001193 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001194 "%s: constraint failed (%s:%d)",
1195 td->name, __FILE__, __LINE__);
1196 return -1;
1197 }
1198}
1199
1200/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001201 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001202 * so here we adjust the DEF accordingly.
1203 */
1204static void
1205NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001206 td->free_struct = asn_DEF_NativeInteger.free_struct;
1207 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001208 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001209 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1210 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1211 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1212 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1213 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1214 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001215 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001216 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1217 td->elements = asn_DEF_NativeInteger.elements;
1218 td->elements_count = asn_DEF_NativeInteger.elements_count;
1219 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001220}
1221
1222void
1223NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1224 void *struct_ptr, int contents_only) {
1225 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1226 td->free_struct(td, struct_ptr, contents_only);
1227}
1228
1229int
1230NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1231 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1232 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1233 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1234}
1235
1236asn_dec_rval_t
1237NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1238 void **structure, const void *bufptr, size_t size, int tag_mode) {
1239 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1240 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1241}
1242
1243asn_enc_rval_t
1244NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1245 void *structure, int tag_mode, ber_tlv_tag_t tag,
1246 asn_app_consume_bytes_f *cb, void *app_key) {
1247 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1248 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1249}
1250
1251asn_dec_rval_t
1252NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1253 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1254 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1255 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1256}
1257
1258asn_enc_rval_t
1259NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1260 int ilevel, enum xer_encoder_flags_e flags,
1261 asn_app_consume_bytes_f *cb, void *app_key) {
1262 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1263 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1264}
1265
1266
1267/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1268
Lev Walkina7591b52014-10-12 18:37:35 -07001269static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001270 0, 0, 0, 0, 0,
1271 0, /* Native long size */
1272 1 /* Unsigned representation */
1273};
Lev Walkina7591b52014-10-12 18:37:35 -07001274static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001275 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1276};
1277asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1278 "NO-IntegerOutRange",
1279 "NO-IntegerOutRange",
1280 NO_IntegerOutRange_free,
1281 NO_IntegerOutRange_print,
1282 NO_IntegerOutRange_constraint,
1283 NO_IntegerOutRange_decode_ber,
1284 NO_IntegerOutRange_encode_der,
1285 NO_IntegerOutRange_decode_xer,
1286 NO_IntegerOutRange_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001287 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001288 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001289 asn_DEF_NO_IntegerOutRange_tags_1,
1290 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1291 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1292 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1293 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1294 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1295 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001296 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001297 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001298};
1299
1300
1301/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1302
Lev Walkin8bb57a22007-12-03 13:41:36 +00001303#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001304
1305/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1306
Lev Walkin8bb57a22007-12-03 13:41:36 +00001307typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001308
1309/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1310
1311extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1312asn_struct_free_f NO_IntegerOutValue_free;
1313asn_struct_print_f NO_IntegerOutValue_print;
1314asn_constr_check_f NO_IntegerOutValue_constraint;
1315ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1316der_type_encoder_f NO_IntegerOutValue_encode_der;
1317xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1318xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1319
1320/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1321
1322int
1323NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001324 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001325 unsigned long value;
Lev Walkin082cadc2005-08-14 02:18:27 +00001326
1327 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001328 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001329 "%s: value not given (%s:%d)",
1330 td->name, __FILE__, __LINE__);
1331 return -1;
1332 }
1333
Lev Walkin8bb57a22007-12-03 13:41:36 +00001334 value = *(const unsigned long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001335
Lev Walkinc3f0b892005-08-14 02:40:04 +00001336 if((value == 3000000000)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001337 /* Constraint check succeeded */
1338 return 0;
1339 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001340 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001341 "%s: constraint failed (%s:%d)",
1342 td->name, __FILE__, __LINE__);
1343 return -1;
1344 }
1345}
1346
1347/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001348 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001349 * so here we adjust the DEF accordingly.
1350 */
1351static void
1352NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001353 td->free_struct = asn_DEF_NativeInteger.free_struct;
1354 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001355 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001356 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1357 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1358 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1359 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1360 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1361 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001362 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001363 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1364 td->elements = asn_DEF_NativeInteger.elements;
1365 td->elements_count = asn_DEF_NativeInteger.elements_count;
1366 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin082cadc2005-08-14 02:18:27 +00001367}
1368
1369void
1370NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1371 void *struct_ptr, int contents_only) {
1372 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1373 td->free_struct(td, struct_ptr, contents_only);
1374}
1375
1376int
1377NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1378 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1379 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1380 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1381}
1382
1383asn_dec_rval_t
1384NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1385 void **structure, const void *bufptr, size_t size, int tag_mode) {
1386 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1387 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1388}
1389
1390asn_enc_rval_t
1391NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1392 void *structure, int tag_mode, ber_tlv_tag_t tag,
1393 asn_app_consume_bytes_f *cb, void *app_key) {
1394 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1395 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1396}
1397
1398asn_dec_rval_t
1399NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1400 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1401 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1402 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1403}
1404
1405asn_enc_rval_t
1406NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1407 int ilevel, enum xer_encoder_flags_e flags,
1408 asn_app_consume_bytes_f *cb, void *app_key) {
1409 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1410 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1411}
1412
1413
1414/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1415
Lev Walkina7591b52014-10-12 18:37:35 -07001416static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001417 0, 0, 0, 0, 0,
1418 0, /* Native long size */
1419 1 /* Unsigned representation */
1420};
Lev Walkina7591b52014-10-12 18:37:35 -07001421static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001422 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1423};
1424asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1425 "NO-IntegerOutValue",
1426 "NO-IntegerOutValue",
1427 NO_IntegerOutValue_free,
1428 NO_IntegerOutValue_print,
1429 NO_IntegerOutValue_constraint,
1430 NO_IntegerOutValue_decode_ber,
1431 NO_IntegerOutValue_encode_der,
1432 NO_IntegerOutValue_decode_xer,
1433 NO_IntegerOutValue_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001434 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001435 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001436 asn_DEF_NO_IntegerOutValue_tags_1,
1437 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1438 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1439 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1440 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1441 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1442 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001443 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001444 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin082cadc2005-08-14 02:18:27 +00001445};
1446
1447
1448/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1449
Lev Walkinc3f0b892005-08-14 02:40:04 +00001450#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001451
1452/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1453
Lev Walkinc3f0b892005-08-14 02:40:04 +00001454typedef long OK_IntegerInRange1_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001455
1456/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1457
1458extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1459asn_struct_free_f OK_IntegerInRange1_free;
1460asn_struct_print_f OK_IntegerInRange1_print;
1461asn_constr_check_f OK_IntegerInRange1_constraint;
1462ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1463der_type_encoder_f OK_IntegerInRange1_encode_der;
1464xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1465xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1466
1467/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1468
1469int
1470OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001471 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001472 long value;
1473
1474 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001475 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001476 "%s: value not given (%s:%d)",
1477 td->name, __FILE__, __LINE__);
1478 return -1;
1479 }
1480
Lev Walkinc3f0b892005-08-14 02:40:04 +00001481 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001482
1483 if((value >= -100 && value <= 100)) {
1484 /* Constraint check succeeded */
1485 return 0;
1486 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001487 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001488 "%s: constraint failed (%s:%d)",
1489 td->name, __FILE__, __LINE__);
1490 return -1;
1491 }
1492}
1493
1494/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001495 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001496 * so here we adjust the DEF accordingly.
1497 */
1498static void
1499OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001500 td->free_struct = asn_DEF_NativeInteger.free_struct;
1501 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001502 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001503 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1504 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1505 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1506 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001507 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001508 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001509 if(!td->per_constraints)
1510 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001511 td->elements = asn_DEF_NativeInteger.elements;
1512 td->elements_count = asn_DEF_NativeInteger.elements_count;
1513 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001514}
1515
1516void
1517OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1518 void *struct_ptr, int contents_only) {
1519 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1520 td->free_struct(td, struct_ptr, contents_only);
1521}
1522
1523int
1524OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1525 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1526 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1527 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1528}
1529
1530asn_dec_rval_t
1531OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1532 void **structure, const void *bufptr, size_t size, int tag_mode) {
1533 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1534 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1535}
1536
1537asn_enc_rval_t
1538OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1539 void *structure, int tag_mode, ber_tlv_tag_t tag,
1540 asn_app_consume_bytes_f *cb, void *app_key) {
1541 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1542 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1543}
1544
1545asn_dec_rval_t
1546OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1547 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1548 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1549 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1550}
1551
1552asn_enc_rval_t
1553OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1554 int ilevel, enum xer_encoder_flags_e flags,
1555 asn_app_consume_bytes_f *cb, void *app_key) {
1556 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1557 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1558}
1559
1560
1561/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1562
Lev Walkina7591b52014-10-12 18:37:35 -07001563static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001564 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1565};
1566asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1567 "OK-IntegerInRange1",
1568 "OK-IntegerInRange1",
1569 OK_IntegerInRange1_free,
1570 OK_IntegerInRange1_print,
1571 OK_IntegerInRange1_constraint,
1572 OK_IntegerInRange1_decode_ber,
1573 OK_IntegerInRange1_encode_der,
1574 OK_IntegerInRange1_decode_xer,
1575 OK_IntegerInRange1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001576 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001577 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001578 asn_DEF_OK_IntegerInRange1_tags_1,
1579 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1580 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1581 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1582 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1583 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1584 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001585 0, 0, /* No members */
1586 0 /* No specifics */
1587};
1588
1589
1590/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1591
Lev Walkinc3f0b892005-08-14 02:40:04 +00001592#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001593
1594/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1595
Lev Walkinc3f0b892005-08-14 02:40:04 +00001596typedef long OK_IntegerInRange2_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001597
1598/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1599
1600extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1601asn_struct_free_f OK_IntegerInRange2_free;
1602asn_struct_print_f OK_IntegerInRange2_print;
1603asn_constr_check_f OK_IntegerInRange2_constraint;
1604ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1605der_type_encoder_f OK_IntegerInRange2_encode_der;
1606xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1607xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1608
1609/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1610
1611int
1612OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001613 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001614 long value;
1615
1616 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001617 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001618 "%s: value not given (%s:%d)",
1619 td->name, __FILE__, __LINE__);
1620 return -1;
1621 }
1622
Lev Walkinc3f0b892005-08-14 02:40:04 +00001623 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001624
1625 if(((value == -100) || (value == 100))) {
1626 /* Constraint check succeeded */
1627 return 0;
1628 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001629 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001630 "%s: constraint failed (%s:%d)",
1631 td->name, __FILE__, __LINE__);
1632 return -1;
1633 }
1634}
1635
1636/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001637 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001638 * so here we adjust the DEF accordingly.
1639 */
1640static void
1641OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001642 td->free_struct = asn_DEF_NativeInteger.free_struct;
1643 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001644 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001645 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1646 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1647 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1648 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001649 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001650 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001651 if(!td->per_constraints)
1652 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001653 td->elements = asn_DEF_NativeInteger.elements;
1654 td->elements_count = asn_DEF_NativeInteger.elements_count;
1655 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001656}
1657
1658void
1659OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1660 void *struct_ptr, int contents_only) {
1661 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1662 td->free_struct(td, struct_ptr, contents_only);
1663}
1664
1665int
1666OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1667 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1668 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1669 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1670}
1671
1672asn_dec_rval_t
1673OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1674 void **structure, const void *bufptr, size_t size, int tag_mode) {
1675 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1676 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1677}
1678
1679asn_enc_rval_t
1680OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1681 void *structure, int tag_mode, ber_tlv_tag_t tag,
1682 asn_app_consume_bytes_f *cb, void *app_key) {
1683 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1684 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1685}
1686
1687asn_dec_rval_t
1688OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1689 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1690 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1691 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1692}
1693
1694asn_enc_rval_t
1695OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1696 int ilevel, enum xer_encoder_flags_e flags,
1697 asn_app_consume_bytes_f *cb, void *app_key) {
1698 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1699 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1700}
1701
1702
1703/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1704
Lev Walkina7591b52014-10-12 18:37:35 -07001705static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001706 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1707};
1708asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1709 "OK-IntegerInRange2",
1710 "OK-IntegerInRange2",
1711 OK_IntegerInRange2_free,
1712 OK_IntegerInRange2_print,
1713 OK_IntegerInRange2_constraint,
1714 OK_IntegerInRange2_decode_ber,
1715 OK_IntegerInRange2_encode_der,
1716 OK_IntegerInRange2_decode_xer,
1717 OK_IntegerInRange2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001718 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001719 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001720 asn_DEF_OK_IntegerInRange2_tags_1,
1721 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1722 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1723 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
1724 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
1725 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
1726 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001727 0, 0, /* No members */
1728 0 /* No specifics */
1729};
1730
1731
1732/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
1733
Lev Walkinc3f0b892005-08-14 02:40:04 +00001734#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001735
1736/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
1737
Lev Walkinc3f0b892005-08-14 02:40:04 +00001738typedef long OK_IntegerInRange3_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001739
1740/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
1741
1742extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
1743asn_struct_free_f OK_IntegerInRange3_free;
1744asn_struct_print_f OK_IntegerInRange3_print;
1745asn_constr_check_f OK_IntegerInRange3_constraint;
1746ber_type_decoder_f OK_IntegerInRange3_decode_ber;
1747der_type_encoder_f OK_IntegerInRange3_encode_der;
1748xer_type_decoder_f OK_IntegerInRange3_decode_xer;
1749xer_type_encoder_f OK_IntegerInRange3_encode_xer;
1750
1751/*** <<< CODE [OK-IntegerInRange3] >>> ***/
1752
1753int
1754OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001755 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001756 long value;
1757
1758 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001759 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001760 "%s: value not given (%s:%d)",
1761 td->name, __FILE__, __LINE__);
1762 return -1;
1763 }
1764
Lev Walkinc3f0b892005-08-14 02:40:04 +00001765 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001766
Lev Walkin63b41262007-11-06 01:48:46 +00001767 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001768 /* Constraint check succeeded */
1769 return 0;
1770 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001771 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001772 "%s: constraint failed (%s:%d)",
1773 td->name, __FILE__, __LINE__);
1774 return -1;
1775 }
1776}
1777
1778/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001779 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001780 * so here we adjust the DEF accordingly.
1781 */
1782static void
1783OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001784 td->free_struct = asn_DEF_NativeInteger.free_struct;
1785 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001786 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001787 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1788 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1789 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1790 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001791 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001792 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001793 if(!td->per_constraints)
1794 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001795 td->elements = asn_DEF_NativeInteger.elements;
1796 td->elements_count = asn_DEF_NativeInteger.elements_count;
1797 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001798}
1799
1800void
1801OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
1802 void *struct_ptr, int contents_only) {
1803 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1804 td->free_struct(td, struct_ptr, contents_only);
1805}
1806
1807int
1808OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1809 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1810 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1811 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1812}
1813
1814asn_dec_rval_t
1815OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1816 void **structure, const void *bufptr, size_t size, int tag_mode) {
1817 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1818 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1819}
1820
1821asn_enc_rval_t
1822OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
1823 void *structure, int tag_mode, ber_tlv_tag_t tag,
1824 asn_app_consume_bytes_f *cb, void *app_key) {
1825 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1826 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1827}
1828
1829asn_dec_rval_t
1830OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1831 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1832 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1833 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1834}
1835
1836asn_enc_rval_t
1837OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1838 int ilevel, enum xer_encoder_flags_e flags,
1839 asn_app_consume_bytes_f *cb, void *app_key) {
1840 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
1841 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1842}
1843
1844
1845/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
1846
Lev Walkina7591b52014-10-12 18:37:35 -07001847static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001848 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1849};
1850asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
1851 "OK-IntegerInRange3",
1852 "OK-IntegerInRange3",
1853 OK_IntegerInRange3_free,
1854 OK_IntegerInRange3_print,
1855 OK_IntegerInRange3_constraint,
1856 OK_IntegerInRange3_decode_ber,
1857 OK_IntegerInRange3_encode_der,
1858 OK_IntegerInRange3_decode_xer,
1859 OK_IntegerInRange3_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001860 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00001861 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00001862 asn_DEF_OK_IntegerInRange3_tags_1,
1863 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1864 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1865 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
1866 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
1867 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
1868 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00001869 0, 0, /* No members */
1870 0 /* No specifics */
1871};
1872
1873
1874/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
1875
Lev Walkinc3f0b892005-08-14 02:40:04 +00001876#include <NativeInteger.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00001877
1878/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
1879
Lev Walkinc3f0b892005-08-14 02:40:04 +00001880typedef long OK_IntegerInRange4_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00001881
1882/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
1883
1884extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
1885asn_struct_free_f OK_IntegerInRange4_free;
1886asn_struct_print_f OK_IntegerInRange4_print;
1887asn_constr_check_f OK_IntegerInRange4_constraint;
1888ber_type_decoder_f OK_IntegerInRange4_decode_ber;
1889der_type_encoder_f OK_IntegerInRange4_encode_der;
1890xer_type_decoder_f OK_IntegerInRange4_decode_xer;
1891xer_type_encoder_f OK_IntegerInRange4_encode_xer;
1892
1893/*** <<< CODE [OK-IntegerInRange4] >>> ***/
1894
1895int
1896OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001897 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001898 long value;
1899
1900 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001901 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001902 "%s: value not given (%s:%d)",
1903 td->name, __FILE__, __LINE__);
1904 return -1;
1905 }
1906
Lev Walkinc3f0b892005-08-14 02:40:04 +00001907 value = *(const long *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00001908
Lev Walkin63b41262007-11-06 01:48:46 +00001909 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00001910 /* Constraint check succeeded */
1911 return 0;
1912 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001913 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00001914 "%s: constraint failed (%s:%d)",
1915 td->name, __FILE__, __LINE__);
1916 return -1;
1917 }
1918}
1919
1920/*
Lev Walkinc3f0b892005-08-14 02:40:04 +00001921 * This type is implemented using NativeInteger,
Lev Walkin082cadc2005-08-14 02:18:27 +00001922 * so here we adjust the DEF accordingly.
1923 */
1924static void
1925OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00001926 td->free_struct = asn_DEF_NativeInteger.free_struct;
1927 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001928 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001929 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1930 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1931 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1932 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001933 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001934 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001935 if(!td->per_constraints)
1936 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00001937 td->elements = asn_DEF_NativeInteger.elements;
1938 td->elements_count = asn_DEF_NativeInteger.elements_count;
1939 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00001940}
1941
1942void
1943OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
1944 void *struct_ptr, int contents_only) {
1945 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1946 td->free_struct(td, struct_ptr, contents_only);
1947}
1948
1949int
1950OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1951 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1952 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1953 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1954}
1955
1956asn_dec_rval_t
1957OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1958 void **structure, const void *bufptr, size_t size, int tag_mode) {
1959 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1960 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1961}
1962
1963asn_enc_rval_t
1964OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
1965 void *structure, int tag_mode, ber_tlv_tag_t tag,
1966 asn_app_consume_bytes_f *cb, void *app_key) {
1967 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1968 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1969}
1970
1971asn_dec_rval_t
1972OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1973 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1974 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1975 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1976}
1977
1978asn_enc_rval_t
1979OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1980 int ilevel, enum xer_encoder_flags_e flags,
1981 asn_app_consume_bytes_f *cb, void *app_key) {
1982 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
1983 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1984}
1985
1986
1987/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
1988
Lev Walkina7591b52014-10-12 18:37:35 -07001989static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00001990 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1991};
1992asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
1993 "OK-IntegerInRange4",
1994 "OK-IntegerInRange4",
1995 OK_IntegerInRange4_free,
1996 OK_IntegerInRange4_print,
1997 OK_IntegerInRange4_constraint,
1998 OK_IntegerInRange4_decode_ber,
1999 OK_IntegerInRange4_encode_der,
2000 OK_IntegerInRange4_decode_xer,
2001 OK_IntegerInRange4_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002002 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002003 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002004 asn_DEF_OK_IntegerInRange4_tags_1,
2005 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2006 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2007 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
2008 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2009 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2010 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002011 0, 0, /* No members */
2012 0 /* No specifics */
2013};
2014
2015
2016/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2017
Lev Walkin2a744a72013-03-27 01:56:23 -07002018#include <INTEGER.h>
Lev Walkin082cadc2005-08-14 02:18:27 +00002019
2020/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2021
Lev Walkin2a744a72013-03-27 01:56:23 -07002022typedef INTEGER_t OK_IntegerInRange5_t;
Lev Walkin082cadc2005-08-14 02:18:27 +00002023
2024/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2025
2026extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2027asn_struct_free_f OK_IntegerInRange5_free;
2028asn_struct_print_f OK_IntegerInRange5_print;
2029asn_constr_check_f OK_IntegerInRange5_constraint;
2030ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2031der_type_encoder_f OK_IntegerInRange5_encode_der;
2032xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2033xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2034
2035/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2036
2037int
2038OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002039 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002040 const INTEGER_t *st = (const INTEGER_t *)sptr;
Lev Walkin082cadc2005-08-14 02:18:27 +00002041 long value;
2042
2043 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002044 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002045 "%s: value not given (%s:%d)",
2046 td->name, __FILE__, __LINE__);
2047 return -1;
2048 }
2049
Lev Walkin2a744a72013-03-27 01:56:23 -07002050 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002051 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin2a744a72013-03-27 01:56:23 -07002052 "%s: value too large (%s:%d)",
2053 td->name, __FILE__, __LINE__);
2054 return -1;
2055 }
Lev Walkin082cadc2005-08-14 02:18:27 +00002056
Lev Walkin63b41262007-11-06 01:48:46 +00002057 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin082cadc2005-08-14 02:18:27 +00002058 /* Constraint check succeeded */
2059 return 0;
2060 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002061 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin082cadc2005-08-14 02:18:27 +00002062 "%s: constraint failed (%s:%d)",
2063 td->name, __FILE__, __LINE__);
2064 return -1;
2065 }
2066}
2067
2068/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002069 * This type is implemented using INTEGER,
Lev Walkin082cadc2005-08-14 02:18:27 +00002070 * so here we adjust the DEF accordingly.
2071 */
2072static void
2073OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002074 td->free_struct = asn_DEF_INTEGER.free_struct;
2075 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002076 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002077 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2078 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2079 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2080 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2081 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2082 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002083 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002084 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2085 td->elements = asn_DEF_INTEGER.elements;
2086 td->elements_count = asn_DEF_INTEGER.elements_count;
2087 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkin082cadc2005-08-14 02:18:27 +00002088}
2089
2090void
2091OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2092 void *struct_ptr, int contents_only) {
2093 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2094 td->free_struct(td, struct_ptr, contents_only);
2095}
2096
2097int
2098OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2099 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2100 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2101 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2102}
2103
2104asn_dec_rval_t
2105OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2106 void **structure, const void *bufptr, size_t size, int tag_mode) {
2107 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2108 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2109}
2110
2111asn_enc_rval_t
2112OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2113 void *structure, int tag_mode, ber_tlv_tag_t tag,
2114 asn_app_consume_bytes_f *cb, void *app_key) {
2115 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2116 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2117}
2118
2119asn_dec_rval_t
2120OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2121 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2122 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2123 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2124}
2125
2126asn_enc_rval_t
2127OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2128 int ilevel, enum xer_encoder_flags_e flags,
2129 asn_app_consume_bytes_f *cb, void *app_key) {
2130 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2131 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2132}
2133
2134
2135/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2136
Lev Walkina7591b52014-10-12 18:37:35 -07002137static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin082cadc2005-08-14 02:18:27 +00002138 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2139};
2140asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2141 "OK-IntegerInRange5",
2142 "OK-IntegerInRange5",
2143 OK_IntegerInRange5_free,
2144 OK_IntegerInRange5_print,
2145 OK_IntegerInRange5_constraint,
2146 OK_IntegerInRange5_decode_ber,
2147 OK_IntegerInRange5_encode_der,
2148 OK_IntegerInRange5_decode_xer,
2149 OK_IntegerInRange5_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002150 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkin082cadc2005-08-14 02:18:27 +00002151 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002152 asn_DEF_OK_IntegerInRange5_tags_1,
2153 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2154 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2155 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2156 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2157 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2158 0, /* No PER visible constraints */
Lev Walkin082cadc2005-08-14 02:18:27 +00002159 0, 0, /* No members */
2160 0 /* No specifics */
2161};
2162
Lev Walkinc3f0b892005-08-14 02:40:04 +00002163
Lev Walkinfee6f712005-08-27 03:13:51 +00002164/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2165
Lev Walkin8bb57a22007-12-03 13:41:36 +00002166#include <NativeInteger.h>
Lev Walkinfee6f712005-08-27 03:13:51 +00002167
2168/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2169
Lev Walkin8bb57a22007-12-03 13:41:36 +00002170typedef unsigned long NO_IntegerInRange6_t;
Lev Walkinfee6f712005-08-27 03:13:51 +00002171
2172/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2173
2174extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2175asn_struct_free_f NO_IntegerInRange6_free;
2176asn_struct_print_f NO_IntegerInRange6_print;
2177asn_constr_check_f NO_IntegerInRange6_constraint;
2178ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2179der_type_encoder_f NO_IntegerInRange6_encode_der;
2180xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2181xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2182
2183/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2184
2185int
2186NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002187 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinfee6f712005-08-27 03:13:51 +00002188
2189 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002190 ASN__CTFAIL(app_key, td, sptr,
Lev Walkinfee6f712005-08-27 03:13:51 +00002191 "%s: value not given (%s:%d)",
2192 td->name, __FILE__, __LINE__);
2193 return -1;
2194 }
2195
Lev Walkinfee6f712005-08-27 03:13:51 +00002196
Lev Walkin8bb57a22007-12-03 13:41:36 +00002197 /* Constraint check succeeded */
2198 return 0;
Lev Walkinfee6f712005-08-27 03:13:51 +00002199}
2200
2201/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002202 * This type is implemented using NativeInteger,
Lev Walkinfee6f712005-08-27 03:13:51 +00002203 * so here we adjust the DEF accordingly.
2204 */
2205static void
2206NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002207 td->free_struct = asn_DEF_NativeInteger.free_struct;
2208 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002209 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00002210 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2211 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2212 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2213 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2214 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2215 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002216 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002217 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2218 td->elements = asn_DEF_NativeInteger.elements;
2219 td->elements_count = asn_DEF_NativeInteger.elements_count;
2220 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkinfee6f712005-08-27 03:13:51 +00002221}
2222
2223void
2224NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2225 void *struct_ptr, int contents_only) {
2226 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2227 td->free_struct(td, struct_ptr, contents_only);
2228}
2229
2230int
2231NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2232 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2233 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2234 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2235}
2236
2237asn_dec_rval_t
2238NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2239 void **structure, const void *bufptr, size_t size, int tag_mode) {
2240 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2241 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2242}
2243
2244asn_enc_rval_t
2245NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2246 void *structure, int tag_mode, ber_tlv_tag_t tag,
2247 asn_app_consume_bytes_f *cb, void *app_key) {
2248 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2249 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2250}
2251
2252asn_dec_rval_t
2253NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2254 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2255 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2256 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2257}
2258
2259asn_enc_rval_t
2260NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2261 int ilevel, enum xer_encoder_flags_e flags,
2262 asn_app_consume_bytes_f *cb, void *app_key) {
2263 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2264 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2265}
2266
2267
2268/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2269
Lev Walkina7591b52014-10-12 18:37:35 -07002270static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002271 0, 0, 0, 0, 0,
2272 0, /* Native long size */
2273 1 /* Unsigned representation */
2274};
Lev Walkina7591b52014-10-12 18:37:35 -07002275static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkinfee6f712005-08-27 03:13:51 +00002276 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2277};
2278asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2279 "NO-IntegerInRange6",
2280 "NO-IntegerInRange6",
2281 NO_IntegerInRange6_free,
2282 NO_IntegerInRange6_print,
2283 NO_IntegerInRange6_constraint,
2284 NO_IntegerInRange6_decode_ber,
2285 NO_IntegerInRange6_encode_der,
2286 NO_IntegerInRange6_decode_xer,
2287 NO_IntegerInRange6_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002288 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinfee6f712005-08-27 03:13:51 +00002289 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002290 asn_DEF_NO_IntegerInRange6_tags_1,
2291 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2292 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2293 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2294 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2295 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2296 0, /* No PER visible constraints */
Lev Walkinfee6f712005-08-27 03:13:51 +00002297 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002298 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkinfee6f712005-08-27 03:13:51 +00002299};
2300
2301
Lev Walkinc3f0b892005-08-14 02:40:04 +00002302/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2303
Lev Walkin2a744a72013-03-27 01:56:23 -07002304#include <INTEGER.h>
Lev Walkinc3f0b892005-08-14 02:40:04 +00002305
2306/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2307
2308typedef enum CN_IntegerEnumerated1 {
2309 CN_IntegerEnumerated1_a = 1,
2310 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002311} e_CN_IntegerEnumerated1;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002312
2313/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2314
Lev Walkin2a744a72013-03-27 01:56:23 -07002315typedef INTEGER_t CN_IntegerEnumerated1_t;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002316
2317/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2318
2319extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2320asn_struct_free_f CN_IntegerEnumerated1_free;
2321asn_struct_print_f CN_IntegerEnumerated1_print;
2322asn_constr_check_f CN_IntegerEnumerated1_constraint;
2323ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2324der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2325xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2326xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2327
2328/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2329
2330int
2331CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002332 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002333 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002334 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002335 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002336}
2337
2338/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002339 * This type is implemented using INTEGER,
Lev Walkinc3f0b892005-08-14 02:40:04 +00002340 * so here we adjust the DEF accordingly.
2341 */
2342static void
2343CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002344 td->free_struct = asn_DEF_INTEGER.free_struct;
2345 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002346 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002347 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2348 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2349 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2350 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2351 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
2352 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002353 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002354 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2355 td->elements = asn_DEF_INTEGER.elements;
2356 td->elements_count = asn_DEF_INTEGER.elements_count;
2357 td->specifics = asn_DEF_INTEGER.specifics;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002358}
2359
2360void
2361CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2362 void *struct_ptr, int contents_only) {
2363 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2364 td->free_struct(td, struct_ptr, contents_only);
2365}
2366
2367int
2368CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2369 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2370 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2371 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2372}
2373
2374asn_dec_rval_t
2375CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2376 void **structure, const void *bufptr, size_t size, int tag_mode) {
2377 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2378 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2379}
2380
2381asn_enc_rval_t
2382CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2383 void *structure, int tag_mode, ber_tlv_tag_t tag,
2384 asn_app_consume_bytes_f *cb, void *app_key) {
2385 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2386 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2387}
2388
2389asn_dec_rval_t
2390CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2391 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2392 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2393 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2394}
2395
2396asn_enc_rval_t
2397CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2398 int ilevel, enum xer_encoder_flags_e flags,
2399 asn_app_consume_bytes_f *cb, void *app_key) {
2400 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2401 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2402}
2403
2404
2405/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2406
Lev Walkina7591b52014-10-12 18:37:35 -07002407static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002408 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2409};
2410asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2411 "CN-IntegerEnumerated1",
2412 "CN-IntegerEnumerated1",
2413 CN_IntegerEnumerated1_free,
2414 CN_IntegerEnumerated1_print,
2415 CN_IntegerEnumerated1_constraint,
2416 CN_IntegerEnumerated1_decode_ber,
2417 CN_IntegerEnumerated1_encode_der,
2418 CN_IntegerEnumerated1_decode_xer,
2419 CN_IntegerEnumerated1_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002420 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002421 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002422 asn_DEF_CN_IntegerEnumerated1_tags_1,
2423 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2424 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2425 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2426 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2427 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2428 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002429 0, 0, /* Defined elsewhere */
2430 0 /* No specifics */
2431};
2432
2433
2434/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2435
2436#include <INTEGER.h>
2437
2438/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2439
2440typedef enum NO_IntegerEnumerated2 {
2441 NO_IntegerEnumerated2_a = 1,
2442 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002443} e_NO_IntegerEnumerated2;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002444
2445/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2446
2447typedef INTEGER_t NO_IntegerEnumerated2_t;
2448
2449/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2450
2451extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2452asn_struct_free_f NO_IntegerEnumerated2_free;
2453asn_struct_print_f NO_IntegerEnumerated2_print;
2454asn_constr_check_f NO_IntegerEnumerated2_constraint;
2455ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2456der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2457xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2458xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2459
2460/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2461
2462int
2463NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002464 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002465 /* Replace with underlying type checker */
2466 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002467 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkinc3f0b892005-08-14 02:40:04 +00002468}
2469
2470/*
2471 * This type is implemented using INTEGER,
2472 * so here we adjust the DEF accordingly.
2473 */
2474static void
2475NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2476 td->free_struct = asn_DEF_INTEGER.free_struct;
2477 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002478 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002479 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2480 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2481 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2482 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002483 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002484 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002485 if(!td->per_constraints)
2486 td->per_constraints = asn_DEF_INTEGER.per_constraints;
Lev Walkinc3f0b892005-08-14 02:40:04 +00002487 td->elements = asn_DEF_INTEGER.elements;
2488 td->elements_count = asn_DEF_INTEGER.elements_count;
2489 td->specifics = asn_DEF_INTEGER.specifics;
2490}
2491
2492void
2493NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2494 void *struct_ptr, int contents_only) {
2495 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2496 td->free_struct(td, struct_ptr, contents_only);
2497}
2498
2499int
2500NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2501 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2502 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2503 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2504}
2505
2506asn_dec_rval_t
2507NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2508 void **structure, const void *bufptr, size_t size, int tag_mode) {
2509 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2510 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2511}
2512
2513asn_enc_rval_t
2514NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2515 void *structure, int tag_mode, ber_tlv_tag_t tag,
2516 asn_app_consume_bytes_f *cb, void *app_key) {
2517 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2518 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2519}
2520
2521asn_dec_rval_t
2522NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2523 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2524 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2525 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2526}
2527
2528asn_enc_rval_t
2529NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2530 int ilevel, enum xer_encoder_flags_e flags,
2531 asn_app_consume_bytes_f *cb, void *app_key) {
2532 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2533 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2534}
2535
2536
2537/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2538
Lev Walkina7591b52014-10-12 18:37:35 -07002539static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkinc3f0b892005-08-14 02:40:04 +00002540 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2541};
2542asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2543 "NO-IntegerEnumerated2",
2544 "NO-IntegerEnumerated2",
2545 NO_IntegerEnumerated2_free,
2546 NO_IntegerEnumerated2_print,
2547 NO_IntegerEnumerated2_constraint,
2548 NO_IntegerEnumerated2_decode_ber,
2549 NO_IntegerEnumerated2_encode_der,
2550 NO_IntegerEnumerated2_decode_xer,
2551 NO_IntegerEnumerated2_encode_xer,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002552 0, 0, /* No PER support, use "-gen-PER" to enable */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002553 0, /* Use generic outmost tag fetcher */
Lev Walkin59b176e2005-11-26 11:25:14 +00002554 asn_DEF_NO_IntegerEnumerated2_tags_1,
2555 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2556 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2557 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2558 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2559 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2560 0, /* No PER visible constraints */
Lev Walkinc3f0b892005-08-14 02:40:04 +00002561 0, 0, /* Defined elsewhere */
2562 0 /* No specifics */
2563};
2564