blob: 770ab8fdb131e2df9b4c2c6272465e55bbc49109 [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [CN-IntegerUnlimited] >>> ***/
3
Lev Walkin2a744a72013-03-27 01:56:23 -07004#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00005
6/*** <<< TYPE-DECLS [CN-IntegerUnlimited] >>> ***/
7
Lev Walkin2a744a72013-03-27 01:56:23 -07008typedef long CN_IntegerUnlimited_t;
Lev Walkin59b176e2005-11-26 11:25:14 +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;
20per_type_decoder_f CN_IntegerUnlimited_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +000021per_type_encoder_f CN_IntegerUnlimited_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +000022
23/*** <<< CODE [CN-IntegerUnlimited] >>> ***/
24
25int
26CN_IntegerUnlimited_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +000027 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +000028 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -070029 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +000030 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +000031}
32
33/*
Lev Walkin2a744a72013-03-27 01:56:23 -070034 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +000035 * so here we adjust the DEF accordingly.
36 */
37static void
38CN_IntegerUnlimited_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -070039 td->free_struct = asn_DEF_NativeInteger.free_struct;
40 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -080041 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -070042 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
43 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
44 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
45 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
46 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
47 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -070048 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
49 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +040050 if(!td->oer_constraints)
51 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +000052 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -070053 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
54 td->elements = asn_DEF_NativeInteger.elements;
55 td->elements_count = asn_DEF_NativeInteger.elements_count;
56 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +000057}
58
59void
60CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
61 void *struct_ptr, int contents_only) {
62 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
63 td->free_struct(td, struct_ptr, contents_only);
64}
65
66int
67CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
68 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
69 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
70 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
71}
72
73asn_dec_rval_t
74CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
75 void **structure, const void *bufptr, size_t size, int tag_mode) {
76 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
77 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
78}
79
80asn_enc_rval_t
81CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
82 void *structure, int tag_mode, ber_tlv_tag_t tag,
83 asn_app_consume_bytes_f *cb, void *app_key) {
84 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
85 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
86}
87
88asn_dec_rval_t
89CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
90 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
91 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
92 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
93}
94
95asn_enc_rval_t
96CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
97 int ilevel, enum xer_encoder_flags_e flags,
98 asn_app_consume_bytes_f *cb, void *app_key) {
99 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
100 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
101}
102
103asn_dec_rval_t
104CN_IntegerUnlimited_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
105 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
106 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
107 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
108}
109
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000110asn_enc_rval_t
111CN_IntegerUnlimited_encode_uper(asn_TYPE_descriptor_t *td,
112 asn_per_constraints_t *constraints,
113 void *structure, asn_per_outp_t *per_out) {
114 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
115 return td->uper_encoder(td, constraints, structure, per_out);
116}
117
Lev Walkin59b176e2005-11-26 11:25:14 +0000118
119/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
120
Lev Walkina7591b52014-10-12 18:37:35 -0700121static const ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000122 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
123};
124asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
125 "CN-IntegerUnlimited",
126 "CN-IntegerUnlimited",
127 CN_IntegerUnlimited_free,
128 CN_IntegerUnlimited_print,
129 CN_IntegerUnlimited_constraint,
130 CN_IntegerUnlimited_decode_ber,
131 CN_IntegerUnlimited_encode_der,
132 CN_IntegerUnlimited_decode_xer,
133 CN_IntegerUnlimited_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400134 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000135 CN_IntegerUnlimited_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000136 CN_IntegerUnlimited_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000137 0, /* Use generic outmost tag fetcher */
138 asn_DEF_CN_IntegerUnlimited_tags_1,
139 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
140 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
141 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
142 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
143 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400144 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +0000145 0, /* No PER visible constraints */
146 0, 0, /* No members */
147 0 /* No specifics */
148};
149
150
151/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
152
Lev Walkin2a744a72013-03-27 01:56:23 -0700153#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000154
155/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
156
Lev Walkin2a744a72013-03-27 01:56:23 -0700157typedef long CN_IntegerMinMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000158
159/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
160
161extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
162asn_struct_free_f CN_IntegerMinMax_free;
163asn_struct_print_f CN_IntegerMinMax_print;
164asn_constr_check_f CN_IntegerMinMax_constraint;
165ber_type_decoder_f CN_IntegerMinMax_decode_ber;
166der_type_encoder_f CN_IntegerMinMax_encode_der;
167xer_type_decoder_f CN_IntegerMinMax_decode_xer;
168xer_type_encoder_f CN_IntegerMinMax_encode_xer;
169per_type_decoder_f CN_IntegerMinMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000170per_type_encoder_f CN_IntegerMinMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000171
172/*** <<< CODE [CN-IntegerMinMax] >>> ***/
173
174int
175CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000176 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000177
178 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700179 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000180 "%s: value not given (%s:%d)",
181 td->name, __FILE__, __LINE__);
182 return -1;
183 }
184
185
186 if(1 /* No applicable constraints whatsoever */) {
187 /* Nothing is here. See below */
188 }
189
190 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700191 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000192 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +0000193}
194
195/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700196 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000197 * so here we adjust the DEF accordingly.
198 */
199static void
200CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700201 td->free_struct = asn_DEF_NativeInteger.free_struct;
202 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800203 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700204 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
205 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
206 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
207 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
208 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
209 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700210 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
211 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400212 if(!td->oer_constraints)
213 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000214 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700215 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
216 td->elements = asn_DEF_NativeInteger.elements;
217 td->elements_count = asn_DEF_NativeInteger.elements_count;
218 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000219}
220
221void
222CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
223 void *struct_ptr, int contents_only) {
224 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
225 td->free_struct(td, struct_ptr, contents_only);
226}
227
228int
229CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
230 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
231 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
232 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
233}
234
235asn_dec_rval_t
236CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
237 void **structure, const void *bufptr, size_t size, int tag_mode) {
238 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
239 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
240}
241
242asn_enc_rval_t
243CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
244 void *structure, int tag_mode, ber_tlv_tag_t tag,
245 asn_app_consume_bytes_f *cb, void *app_key) {
246 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
247 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
248}
249
250asn_dec_rval_t
251CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
252 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
253 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
254 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
255}
256
257asn_enc_rval_t
258CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
259 int ilevel, enum xer_encoder_flags_e flags,
260 asn_app_consume_bytes_f *cb, void *app_key) {
261 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
262 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
263}
264
265asn_dec_rval_t
266CN_IntegerMinMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
267 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
268 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
269 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
270}
271
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000272asn_enc_rval_t
273CN_IntegerMinMax_encode_uper(asn_TYPE_descriptor_t *td,
274 asn_per_constraints_t *constraints,
275 void *structure, asn_per_outp_t *per_out) {
276 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
277 return td->uper_encoder(td, constraints, structure, per_out);
278}
279
Lev Walkin59b176e2005-11-26 11:25:14 +0000280
Lev Walkin725883b2006-10-09 12:07:58 +0000281/*** <<< CTDEFS [CN-IntegerMinMax] >>> ***/
282
Lev Walkin2fce55d2013-03-28 05:00:39 -0700283static asn_per_constraints_t asn_PER_type_CN_IntegerMinMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000284 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
285 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
286 0, 0 /* No PER value map */
287};
288
Lev Walkin59b176e2005-11-26 11:25:14 +0000289/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
290
Lev Walkina7591b52014-10-12 18:37:35 -0700291static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000292 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
293};
Lev Walkin59b176e2005-11-26 11:25:14 +0000294asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
295 "CN-IntegerMinMax",
296 "CN-IntegerMinMax",
297 CN_IntegerMinMax_free,
298 CN_IntegerMinMax_print,
299 CN_IntegerMinMax_constraint,
300 CN_IntegerMinMax_decode_ber,
301 CN_IntegerMinMax_encode_der,
302 CN_IntegerMinMax_decode_xer,
303 CN_IntegerMinMax_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400304 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000305 CN_IntegerMinMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000306 CN_IntegerMinMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000307 0, /* Use generic outmost tag fetcher */
308 asn_DEF_CN_IntegerMinMax_tags_1,
309 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
310 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
311 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
312 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
313 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400314 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000315 &asn_PER_type_CN_IntegerMinMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000316 0, 0, /* No members */
317 0 /* No specifics */
318};
319
320
321/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
322
Lev Walkin2a744a72013-03-27 01:56:23 -0700323#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000324
325/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
326
Lev Walkin2a744a72013-03-27 01:56:23 -0700327typedef long CN_IntegerMinLow_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000328
329/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
330
331extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
332asn_struct_free_f CN_IntegerMinLow_free;
333asn_struct_print_f CN_IntegerMinLow_print;
334asn_constr_check_f CN_IntegerMinLow_constraint;
335ber_type_decoder_f CN_IntegerMinLow_decode_ber;
336der_type_encoder_f CN_IntegerMinLow_encode_der;
337xer_type_decoder_f CN_IntegerMinLow_decode_xer;
338xer_type_encoder_f CN_IntegerMinLow_encode_xer;
339per_type_decoder_f CN_IntegerMinLow_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000340per_type_encoder_f CN_IntegerMinLow_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000341
342/*** <<< CODE [CN-IntegerMinLow] >>> ***/
343
344int
345CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000346 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000347 long value;
348
349 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700350 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000351 "%s: value not given (%s:%d)",
352 td->name, __FILE__, __LINE__);
353 return -1;
354 }
355
Lev Walkin2a744a72013-03-27 01:56:23 -0700356 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000357
358 if((value <= 1)) {
359 /* Constraint check succeeded */
360 return 0;
361 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700362 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000363 "%s: constraint failed (%s:%d)",
364 td->name, __FILE__, __LINE__);
365 return -1;
366 }
367}
368
369/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700370 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000371 * so here we adjust the DEF accordingly.
372 */
373static void
374CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700375 td->free_struct = asn_DEF_NativeInteger.free_struct;
376 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800377 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700378 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
379 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
380 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
381 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
382 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
383 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700384 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
385 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400386 if(!td->oer_constraints)
387 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000388 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700389 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
390 td->elements = asn_DEF_NativeInteger.elements;
391 td->elements_count = asn_DEF_NativeInteger.elements_count;
392 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000393}
394
395void
396CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
397 void *struct_ptr, int contents_only) {
398 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
399 td->free_struct(td, struct_ptr, contents_only);
400}
401
402int
403CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
404 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
405 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
406 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
407}
408
409asn_dec_rval_t
410CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
411 void **structure, const void *bufptr, size_t size, int tag_mode) {
412 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
413 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
414}
415
416asn_enc_rval_t
417CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
418 void *structure, int tag_mode, ber_tlv_tag_t tag,
419 asn_app_consume_bytes_f *cb, void *app_key) {
420 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
421 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
422}
423
424asn_dec_rval_t
425CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
426 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
427 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
428 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
429}
430
431asn_enc_rval_t
432CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
433 int ilevel, enum xer_encoder_flags_e flags,
434 asn_app_consume_bytes_f *cb, void *app_key) {
435 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
436 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
437}
438
439asn_dec_rval_t
440CN_IntegerMinLow_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
441 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
442 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
443 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
444}
445
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000446asn_enc_rval_t
447CN_IntegerMinLow_encode_uper(asn_TYPE_descriptor_t *td,
448 asn_per_constraints_t *constraints,
449 void *structure, asn_per_outp_t *per_out) {
450 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
451 return td->uper_encoder(td, constraints, structure, per_out);
452}
453
Lev Walkin59b176e2005-11-26 11:25:14 +0000454
Lev Walkin725883b2006-10-09 12:07:58 +0000455/*** <<< CTDEFS [CN-IntegerMinLow] >>> ***/
456
Lev Walkin2fce55d2013-03-28 05:00:39 -0700457static asn_per_constraints_t asn_PER_type_CN_IntegerMinLow_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000458 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..1) */,
459 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
460 0, 0 /* No PER value map */
461};
462
Lev Walkin59b176e2005-11-26 11:25:14 +0000463/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
464
Lev Walkina7591b52014-10-12 18:37:35 -0700465static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000466 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
467};
Lev Walkin59b176e2005-11-26 11:25:14 +0000468asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
469 "CN-IntegerMinLow",
470 "CN-IntegerMinLow",
471 CN_IntegerMinLow_free,
472 CN_IntegerMinLow_print,
473 CN_IntegerMinLow_constraint,
474 CN_IntegerMinLow_decode_ber,
475 CN_IntegerMinLow_encode_der,
476 CN_IntegerMinLow_decode_xer,
477 CN_IntegerMinLow_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400478 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000479 CN_IntegerMinLow_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000480 CN_IntegerMinLow_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000481 0, /* Use generic outmost tag fetcher */
482 asn_DEF_CN_IntegerMinLow_tags_1,
483 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
484 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
485 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
486 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
487 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400488 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000489 &asn_PER_type_CN_IntegerMinLow_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000490 0, 0, /* No members */
491 0 /* No specifics */
492};
493
494
495/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
496
497#include <INTEGER.h>
498
499/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
500
501typedef INTEGER_t NO_IntegerMinHigh_t;
502
503/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
504
505extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
506asn_struct_free_f NO_IntegerMinHigh_free;
507asn_struct_print_f NO_IntegerMinHigh_print;
508asn_constr_check_f NO_IntegerMinHigh_constraint;
509ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
510der_type_encoder_f NO_IntegerMinHigh_encode_der;
511xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
512xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
513per_type_decoder_f NO_IntegerMinHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000514per_type_encoder_f NO_IntegerMinHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000515
516/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
517
518int
519NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000520 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000521 const INTEGER_t *st = (const INTEGER_t *)sptr;
522 long value;
523
524 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700525 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000526 "%s: value not given (%s:%d)",
527 td->name, __FILE__, __LINE__);
528 return -1;
529 }
530
531 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700532 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000533 "%s: value too large (%s:%d)",
534 td->name, __FILE__, __LINE__);
535 return -1;
536 }
537
538 if((value <= 3000000000)) {
539 /* Constraint check succeeded */
540 return 0;
541 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700542 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000543 "%s: constraint failed (%s:%d)",
544 td->name, __FILE__, __LINE__);
545 return -1;
546 }
547}
548
549/*
550 * This type is implemented using INTEGER,
551 * so here we adjust the DEF accordingly.
552 */
553static void
554NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
555 td->free_struct = asn_DEF_INTEGER.free_struct;
556 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800557 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000558 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
559 td->der_encoder = asn_DEF_INTEGER.der_encoder;
560 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
561 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
562 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000563 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700564 td->oer_decoder = asn_DEF_INTEGER.oer_decoder;
565 td->oer_encoder = asn_DEF_INTEGER.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400566 if(!td->oer_constraints)
567 td->oer_constraints = asn_DEF_INTEGER.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000568 if(!td->per_constraints)
569 td->per_constraints = asn_DEF_INTEGER.per_constraints;
570 td->elements = asn_DEF_INTEGER.elements;
571 td->elements_count = asn_DEF_INTEGER.elements_count;
572 td->specifics = asn_DEF_INTEGER.specifics;
573}
574
575void
576NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
577 void *struct_ptr, int contents_only) {
578 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
579 td->free_struct(td, struct_ptr, contents_only);
580}
581
582int
583NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
584 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
585 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
586 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
587}
588
589asn_dec_rval_t
590NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
591 void **structure, const void *bufptr, size_t size, int tag_mode) {
592 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
593 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
594}
595
596asn_enc_rval_t
597NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
598 void *structure, int tag_mode, ber_tlv_tag_t tag,
599 asn_app_consume_bytes_f *cb, void *app_key) {
600 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
601 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
602}
603
604asn_dec_rval_t
605NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
606 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
607 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
608 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
609}
610
611asn_enc_rval_t
612NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
613 int ilevel, enum xer_encoder_flags_e flags,
614 asn_app_consume_bytes_f *cb, void *app_key) {
615 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
616 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
617}
618
619asn_dec_rval_t
620NO_IntegerMinHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
621 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
622 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
623 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
624}
625
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000626asn_enc_rval_t
627NO_IntegerMinHigh_encode_uper(asn_TYPE_descriptor_t *td,
628 asn_per_constraints_t *constraints,
629 void *structure, asn_per_outp_t *per_out) {
630 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
631 return td->uper_encoder(td, constraints, structure, per_out);
632}
633
Lev Walkin59b176e2005-11-26 11:25:14 +0000634
Lev Walkin725883b2006-10-09 12:07:58 +0000635/*** <<< CTDEFS [NO-IntegerMinHigh] >>> ***/
636
Lev Walkin2fce55d2013-03-28 05:00:39 -0700637static asn_per_constraints_t asn_PER_type_NO_IntegerMinHigh_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000638 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..3000000000) */,
639 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
640 0, 0 /* No PER value map */
641};
642
Lev Walkin59b176e2005-11-26 11:25:14 +0000643/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
644
Lev Walkina7591b52014-10-12 18:37:35 -0700645static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000646 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
647};
Lev Walkin59b176e2005-11-26 11:25:14 +0000648asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
649 "NO-IntegerMinHigh",
650 "NO-IntegerMinHigh",
651 NO_IntegerMinHigh_free,
652 NO_IntegerMinHigh_print,
653 NO_IntegerMinHigh_constraint,
654 NO_IntegerMinHigh_decode_ber,
655 NO_IntegerMinHigh_encode_der,
656 NO_IntegerMinHigh_decode_xer,
657 NO_IntegerMinHigh_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400658 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000659 NO_IntegerMinHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000660 NO_IntegerMinHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000661 0, /* Use generic outmost tag fetcher */
662 asn_DEF_NO_IntegerMinHigh_tags_1,
663 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
664 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
665 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
666 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
667 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400668 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000669 &asn_PER_type_NO_IntegerMinHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000670 0, 0, /* No members */
671 0 /* No specifics */
672};
673
674
675/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
676
Lev Walkin8bb57a22007-12-03 13:41:36 +0000677#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000678
679/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
680
Lev Walkin8bb57a22007-12-03 13:41:36 +0000681typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000682
683/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
684
685extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
686asn_struct_free_f NO_IntegerLowHigh_free;
687asn_struct_print_f NO_IntegerLowHigh_print;
688asn_constr_check_f NO_IntegerLowHigh_constraint;
689ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
690der_type_encoder_f NO_IntegerLowHigh_encode_der;
691xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
692xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
693per_type_decoder_f NO_IntegerLowHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000694per_type_encoder_f NO_IntegerLowHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000695
696/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
697
698int
699NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000700 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000701 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +0000702
703 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700704 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000705 "%s: value not given (%s:%d)",
706 td->name, __FILE__, __LINE__);
707 return -1;
708 }
709
Lev Walkin8bb57a22007-12-03 13:41:36 +0000710 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000711
712 if((value >= 1 && value <= 3000000000)) {
713 /* Constraint check succeeded */
714 return 0;
715 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700716 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000717 "%s: constraint failed (%s:%d)",
718 td->name, __FILE__, __LINE__);
719 return -1;
720 }
721}
722
723/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000724 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000725 * so here we adjust the DEF accordingly.
726 */
727static void
728NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000729 td->free_struct = asn_DEF_NativeInteger.free_struct;
730 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800731 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000732 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
733 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
734 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
735 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
736 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
737 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700738 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
739 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400740 if(!td->oer_constraints)
741 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000742 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000743 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
744 td->elements = asn_DEF_NativeInteger.elements;
745 td->elements_count = asn_DEF_NativeInteger.elements_count;
746 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +0000747}
748
749void
750NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
751 void *struct_ptr, int contents_only) {
752 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
753 td->free_struct(td, struct_ptr, contents_only);
754}
755
756int
757NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
758 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
759 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
760 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
761}
762
763asn_dec_rval_t
764NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
765 void **structure, const void *bufptr, size_t size, int tag_mode) {
766 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
767 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
768}
769
770asn_enc_rval_t
771NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
772 void *structure, int tag_mode, ber_tlv_tag_t tag,
773 asn_app_consume_bytes_f *cb, void *app_key) {
774 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
775 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
776}
777
778asn_dec_rval_t
779NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
780 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
781 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
782 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
783}
784
785asn_enc_rval_t
786NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
787 int ilevel, enum xer_encoder_flags_e flags,
788 asn_app_consume_bytes_f *cb, void *app_key) {
789 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
790 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
791}
792
793asn_dec_rval_t
794NO_IntegerLowHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
795 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
796 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
797 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
798}
799
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000800asn_enc_rval_t
801NO_IntegerLowHigh_encode_uper(asn_TYPE_descriptor_t *td,
802 asn_per_constraints_t *constraints,
803 void *structure, asn_per_outp_t *per_out) {
804 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
805 return td->uper_encoder(td, constraints, structure, per_out);
806}
807
Lev Walkin59b176e2005-11-26 11:25:14 +0000808
Lev Walkin725883b2006-10-09 12:07:58 +0000809/*** <<< CTDEFS [NO-IntegerLowHigh] >>> ***/
810
Lev Walkin2fce55d2013-03-28 05:00:39 -0700811static asn_per_constraints_t asn_PER_type_NO_IntegerLowHigh_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000812 { APC_CONSTRAINED, 32, -1, 1, 3000000000 } /* (1..3000000000) */,
813 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
814 0, 0 /* No PER value map */
815};
816
Lev Walkin59b176e2005-11-26 11:25:14 +0000817/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
818
johvike70c4072017-05-09 11:06:12 +0200819static asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000820 0, 0, 0, 0, 0,
821 0, /* Native long size */
822 1 /* Unsigned representation */
823};
Lev Walkina7591b52014-10-12 18:37:35 -0700824static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000825 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
826};
Lev Walkin59b176e2005-11-26 11:25:14 +0000827asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
828 "NO-IntegerLowHigh",
829 "NO-IntegerLowHigh",
830 NO_IntegerLowHigh_free,
831 NO_IntegerLowHigh_print,
832 NO_IntegerLowHigh_constraint,
833 NO_IntegerLowHigh_decode_ber,
834 NO_IntegerLowHigh_encode_der,
835 NO_IntegerLowHigh_decode_xer,
836 NO_IntegerLowHigh_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +0400837 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +0000838 NO_IntegerLowHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000839 NO_IntegerLowHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000840 0, /* Use generic outmost tag fetcher */
841 asn_DEF_NO_IntegerLowHigh_tags_1,
842 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
843 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
844 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
845 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
846 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +0400847 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000848 &asn_PER_type_NO_IntegerLowHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000849 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000850 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +0000851};
852
853
854/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
855
Lev Walkin2a744a72013-03-27 01:56:23 -0700856#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000857
858/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
859
Lev Walkin2a744a72013-03-27 01:56:23 -0700860typedef long CN_IntegerLowMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000861
862/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
863
864extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
865asn_struct_free_f CN_IntegerLowMax_free;
866asn_struct_print_f CN_IntegerLowMax_print;
867asn_constr_check_f CN_IntegerLowMax_constraint;
868ber_type_decoder_f CN_IntegerLowMax_decode_ber;
869der_type_encoder_f CN_IntegerLowMax_encode_der;
870xer_type_decoder_f CN_IntegerLowMax_decode_xer;
871xer_type_encoder_f CN_IntegerLowMax_encode_xer;
872per_type_decoder_f CN_IntegerLowMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000873per_type_encoder_f CN_IntegerLowMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000874
875/*** <<< CODE [CN-IntegerLowMax] >>> ***/
876
877int
878CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000879 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000880 long value;
881
882 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700883 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000884 "%s: value not given (%s:%d)",
885 td->name, __FILE__, __LINE__);
886 return -1;
887 }
888
Lev Walkin2a744a72013-03-27 01:56:23 -0700889 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000890
891 if((value >= 1)) {
892 /* Constraint check succeeded */
893 return 0;
894 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -0700895 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000896 "%s: constraint failed (%s:%d)",
897 td->name, __FILE__, __LINE__);
898 return -1;
899 }
900}
901
902/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700903 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000904 * so here we adjust the DEF accordingly.
905 */
906static void
907CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700908 td->free_struct = asn_DEF_NativeInteger.free_struct;
909 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800910 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700911 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
912 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
913 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
914 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
915 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
916 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -0700917 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
918 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +0400919 if(!td->oer_constraints)
920 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000921 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700922 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
923 td->elements = asn_DEF_NativeInteger.elements;
924 td->elements_count = asn_DEF_NativeInteger.elements_count;
925 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000926}
927
928void
929CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
930 void *struct_ptr, int contents_only) {
931 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
932 td->free_struct(td, struct_ptr, contents_only);
933}
934
935int
936CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
937 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
938 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
939 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
940}
941
942asn_dec_rval_t
943CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
944 void **structure, const void *bufptr, size_t size, int tag_mode) {
945 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
946 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
947}
948
949asn_enc_rval_t
950CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
951 void *structure, int tag_mode, ber_tlv_tag_t tag,
952 asn_app_consume_bytes_f *cb, void *app_key) {
953 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
954 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
955}
956
957asn_dec_rval_t
958CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
959 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
960 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
961 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
962}
963
964asn_enc_rval_t
965CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
966 int ilevel, enum xer_encoder_flags_e flags,
967 asn_app_consume_bytes_f *cb, void *app_key) {
968 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
969 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
970}
971
972asn_dec_rval_t
973CN_IntegerLowMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
974 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
975 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
976 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
977}
978
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000979asn_enc_rval_t
980CN_IntegerLowMax_encode_uper(asn_TYPE_descriptor_t *td,
981 asn_per_constraints_t *constraints,
982 void *structure, asn_per_outp_t *per_out) {
983 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
984 return td->uper_encoder(td, constraints, structure, per_out);
985}
986
Lev Walkin59b176e2005-11-26 11:25:14 +0000987
Lev Walkin725883b2006-10-09 12:07:58 +0000988/*** <<< CTDEFS [CN-IntegerLowMax] >>> ***/
989
Lev Walkin2fce55d2013-03-28 05:00:39 -0700990static asn_per_constraints_t asn_PER_type_CN_IntegerLowMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000991 { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (1..MAX) */,
992 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
993 0, 0 /* No PER value map */
994};
995
Lev Walkin59b176e2005-11-26 11:25:14 +0000996/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
997
Lev Walkina7591b52014-10-12 18:37:35 -0700998static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000999 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1000};
Lev Walkin59b176e2005-11-26 11:25:14 +00001001asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
1002 "CN-IntegerLowMax",
1003 "CN-IntegerLowMax",
1004 CN_IntegerLowMax_free,
1005 CN_IntegerLowMax_print,
1006 CN_IntegerLowMax_constraint,
1007 CN_IntegerLowMax_decode_ber,
1008 CN_IntegerLowMax_encode_der,
1009 CN_IntegerLowMax_decode_xer,
1010 CN_IntegerLowMax_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001011 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001012 CN_IntegerLowMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001013 CN_IntegerLowMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001014 0, /* Use generic outmost tag fetcher */
1015 asn_DEF_CN_IntegerLowMax_tags_1,
1016 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
1017 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
1018 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
1019 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
1020 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001021 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001022 &asn_PER_type_CN_IntegerLowMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001023 0, 0, /* No members */
1024 0 /* No specifics */
1025};
1026
1027
1028/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
1029
1030#include <INTEGER.h>
1031
1032/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
1033
1034typedef INTEGER_t NO_IntegerHighMax_t;
1035
1036/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
1037
1038extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
1039asn_struct_free_f NO_IntegerHighMax_free;
1040asn_struct_print_f NO_IntegerHighMax_print;
1041asn_constr_check_f NO_IntegerHighMax_constraint;
1042ber_type_decoder_f NO_IntegerHighMax_decode_ber;
1043der_type_encoder_f NO_IntegerHighMax_encode_der;
1044xer_type_decoder_f NO_IntegerHighMax_decode_xer;
1045xer_type_encoder_f NO_IntegerHighMax_encode_xer;
1046per_type_decoder_f NO_IntegerHighMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001047per_type_encoder_f NO_IntegerHighMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001048
1049/*** <<< CODE [NO-IntegerHighMax] >>> ***/
1050
1051int
1052NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001053 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001054 const INTEGER_t *st = (const INTEGER_t *)sptr;
1055 long value;
1056
1057 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001058 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001059 "%s: value not given (%s:%d)",
1060 td->name, __FILE__, __LINE__);
1061 return -1;
1062 }
1063
1064 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001065 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001066 "%s: value too large (%s:%d)",
1067 td->name, __FILE__, __LINE__);
1068 return -1;
1069 }
1070
1071 if((value >= 3000000000)) {
1072 /* Constraint check succeeded */
1073 return 0;
1074 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001075 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001076 "%s: constraint failed (%s:%d)",
1077 td->name, __FILE__, __LINE__);
1078 return -1;
1079 }
1080}
1081
1082/*
1083 * This type is implemented using INTEGER,
1084 * so here we adjust the DEF accordingly.
1085 */
1086static void
1087NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1088 td->free_struct = asn_DEF_INTEGER.free_struct;
1089 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001090 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001091 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1092 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1093 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1094 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1095 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001096 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001097 td->oer_decoder = asn_DEF_INTEGER.oer_decoder;
1098 td->oer_encoder = asn_DEF_INTEGER.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001099 if(!td->oer_constraints)
1100 td->oer_constraints = asn_DEF_INTEGER.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001101 if(!td->per_constraints)
1102 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1103 td->elements = asn_DEF_INTEGER.elements;
1104 td->elements_count = asn_DEF_INTEGER.elements_count;
1105 td->specifics = asn_DEF_INTEGER.specifics;
1106}
1107
1108void
1109NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
1110 void *struct_ptr, int contents_only) {
1111 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1112 td->free_struct(td, struct_ptr, contents_only);
1113}
1114
1115int
1116NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1117 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1118 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1119 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1120}
1121
1122asn_dec_rval_t
1123NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1124 void **structure, const void *bufptr, size_t size, int tag_mode) {
1125 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1126 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1127}
1128
1129asn_enc_rval_t
1130NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
1131 void *structure, int tag_mode, ber_tlv_tag_t tag,
1132 asn_app_consume_bytes_f *cb, void *app_key) {
1133 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1134 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1135}
1136
1137asn_dec_rval_t
1138NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1139 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1140 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1141 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1142}
1143
1144asn_enc_rval_t
1145NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1146 int ilevel, enum xer_encoder_flags_e flags,
1147 asn_app_consume_bytes_f *cb, void *app_key) {
1148 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1149 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1150}
1151
1152asn_dec_rval_t
1153NO_IntegerHighMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1154 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1155 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1156 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1157}
1158
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001159asn_enc_rval_t
1160NO_IntegerHighMax_encode_uper(asn_TYPE_descriptor_t *td,
1161 asn_per_constraints_t *constraints,
1162 void *structure, asn_per_outp_t *per_out) {
1163 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1164 return td->uper_encoder(td, constraints, structure, per_out);
1165}
1166
Lev Walkin59b176e2005-11-26 11:25:14 +00001167
Lev Walkin725883b2006-10-09 12:07:58 +00001168/*** <<< CTDEFS [NO-IntegerHighMax] >>> ***/
1169
Lev Walkin2fce55d2013-03-28 05:00:39 -07001170static asn_per_constraints_t asn_PER_type_NO_IntegerHighMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001171 { APC_SEMI_CONSTRAINED, -1, -1, 3000000000, 0 } /* (3000000000..MAX) */,
1172 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1173 0, 0 /* No PER value map */
1174};
1175
Lev Walkin59b176e2005-11-26 11:25:14 +00001176/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
1177
Lev Walkina7591b52014-10-12 18:37:35 -07001178static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001179 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1180};
Lev Walkin59b176e2005-11-26 11:25:14 +00001181asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
1182 "NO-IntegerHighMax",
1183 "NO-IntegerHighMax",
1184 NO_IntegerHighMax_free,
1185 NO_IntegerHighMax_print,
1186 NO_IntegerHighMax_constraint,
1187 NO_IntegerHighMax_decode_ber,
1188 NO_IntegerHighMax_encode_der,
1189 NO_IntegerHighMax_decode_xer,
1190 NO_IntegerHighMax_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001191 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001192 NO_IntegerHighMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001193 NO_IntegerHighMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001194 0, /* Use generic outmost tag fetcher */
1195 asn_DEF_NO_IntegerHighMax_tags_1,
1196 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1197 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
1198 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
1199 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1200 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001201 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001202 &asn_PER_type_NO_IntegerHighMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001203 0, 0, /* No members */
1204 0 /* No specifics */
1205};
1206
1207
1208/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
1209
1210#include <INTEGER.h>
1211
1212/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
1213
1214typedef INTEGER_t NO_IntegerLowestMax_t;
1215
1216/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1217
1218extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1219asn_struct_free_f NO_IntegerLowestMax_free;
1220asn_struct_print_f NO_IntegerLowestMax_print;
1221asn_constr_check_f NO_IntegerLowestMax_constraint;
1222ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1223der_type_encoder_f NO_IntegerLowestMax_encode_der;
1224xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1225xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1226per_type_decoder_f NO_IntegerLowestMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001227per_type_encoder_f NO_IntegerLowestMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001228
1229/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1230
1231int
1232NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001233 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001234 const INTEGER_t *st = (const INTEGER_t *)sptr;
1235 long value;
1236
1237 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001238 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001239 "%s: value not given (%s:%d)",
1240 td->name, __FILE__, __LINE__);
1241 return -1;
1242 }
1243
1244 if(asn_INTEGER2long(st, &value)) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001245 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001246 "%s: value too large (%s:%d)",
1247 td->name, __FILE__, __LINE__);
1248 return -1;
1249 }
1250
1251 if((value >= -3000000000)) {
1252 /* Constraint check succeeded */
1253 return 0;
1254 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001255 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001256 "%s: constraint failed (%s:%d)",
1257 td->name, __FILE__, __LINE__);
1258 return -1;
1259 }
1260}
1261
1262/*
1263 * This type is implemented using INTEGER,
1264 * so here we adjust the DEF accordingly.
1265 */
1266static void
1267NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1268 td->free_struct = asn_DEF_INTEGER.free_struct;
1269 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001270 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001271 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1272 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1273 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1274 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1275 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001276 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001277 td->oer_decoder = asn_DEF_INTEGER.oer_decoder;
1278 td->oer_encoder = asn_DEF_INTEGER.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001279 if(!td->oer_constraints)
1280 td->oer_constraints = asn_DEF_INTEGER.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001281 if(!td->per_constraints)
1282 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1283 td->elements = asn_DEF_INTEGER.elements;
1284 td->elements_count = asn_DEF_INTEGER.elements_count;
1285 td->specifics = asn_DEF_INTEGER.specifics;
1286}
1287
1288void
1289NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1290 void *struct_ptr, int contents_only) {
1291 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1292 td->free_struct(td, struct_ptr, contents_only);
1293}
1294
1295int
1296NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1297 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1298 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1299 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1300}
1301
1302asn_dec_rval_t
1303NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1304 void **structure, const void *bufptr, size_t size, int tag_mode) {
1305 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1306 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1307}
1308
1309asn_enc_rval_t
1310NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1311 void *structure, int tag_mode, ber_tlv_tag_t tag,
1312 asn_app_consume_bytes_f *cb, void *app_key) {
1313 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1314 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1315}
1316
1317asn_dec_rval_t
1318NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1319 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1320 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1321 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1322}
1323
1324asn_enc_rval_t
1325NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1326 int ilevel, enum xer_encoder_flags_e flags,
1327 asn_app_consume_bytes_f *cb, void *app_key) {
1328 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1329 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1330}
1331
1332asn_dec_rval_t
1333NO_IntegerLowestMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1334 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1335 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1336 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1337}
1338
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001339asn_enc_rval_t
1340NO_IntegerLowestMax_encode_uper(asn_TYPE_descriptor_t *td,
1341 asn_per_constraints_t *constraints,
1342 void *structure, asn_per_outp_t *per_out) {
1343 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1344 return td->uper_encoder(td, constraints, structure, per_out);
1345}
1346
Lev Walkin59b176e2005-11-26 11:25:14 +00001347
Lev Walkin725883b2006-10-09 12:07:58 +00001348/*** <<< CTDEFS [NO-IntegerLowestMax] >>> ***/
1349
Lev Walkin2fce55d2013-03-28 05:00:39 -07001350static asn_per_constraints_t asn_PER_type_NO_IntegerLowestMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001351 { APC_SEMI_CONSTRAINED, -1, -1, -3000000000, 0 } /* (-3000000000..MAX) */,
1352 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1353 0, 0 /* No PER value map */
1354};
1355
Lev Walkin59b176e2005-11-26 11:25:14 +00001356/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1357
Lev Walkina7591b52014-10-12 18:37:35 -07001358static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001359 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1360};
Lev Walkin59b176e2005-11-26 11:25:14 +00001361asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1362 "NO-IntegerLowestMax",
1363 "NO-IntegerLowestMax",
1364 NO_IntegerLowestMax_free,
1365 NO_IntegerLowestMax_print,
1366 NO_IntegerLowestMax_constraint,
1367 NO_IntegerLowestMax_decode_ber,
1368 NO_IntegerLowestMax_encode_der,
1369 NO_IntegerLowestMax_decode_xer,
1370 NO_IntegerLowestMax_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001371 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001372 NO_IntegerLowestMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001373 NO_IntegerLowestMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001374 0, /* Use generic outmost tag fetcher */
1375 asn_DEF_NO_IntegerLowestMax_tags_1,
1376 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1377 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1378 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1379 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1380 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001381 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001382 &asn_PER_type_NO_IntegerLowestMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001383 0, 0, /* No members */
1384 0 /* No specifics */
1385};
1386
1387
1388/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1389
Lev Walkin8bb57a22007-12-03 13:41:36 +00001390#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001391
1392/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1393
Lev Walkin8bb57a22007-12-03 13:41:36 +00001394typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001395
1396/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1397
1398extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1399asn_struct_free_f NO_IntegerOutRange_free;
1400asn_struct_print_f NO_IntegerOutRange_print;
1401asn_constr_check_f NO_IntegerOutRange_constraint;
1402ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1403der_type_encoder_f NO_IntegerOutRange_encode_der;
1404xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1405xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1406per_type_decoder_f NO_IntegerOutRange_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001407per_type_encoder_f NO_IntegerOutRange_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001408
1409/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1410
1411int
1412NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001413 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001414 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001415
1416 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001417 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001418 "%s: value not given (%s:%d)",
1419 td->name, __FILE__, __LINE__);
1420 return -1;
1421 }
1422
Lev Walkin8bb57a22007-12-03 13:41:36 +00001423 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001424
1425 if((value >= 3000000000 && value <= 3000000001)) {
1426 /* Constraint check succeeded */
1427 return 0;
1428 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001429 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001430 "%s: constraint failed (%s:%d)",
1431 td->name, __FILE__, __LINE__);
1432 return -1;
1433 }
1434}
1435
1436/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001437 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001438 * so here we adjust the DEF accordingly.
1439 */
1440static void
1441NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001442 td->free_struct = asn_DEF_NativeInteger.free_struct;
1443 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001444 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001445 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1446 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1447 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1448 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1449 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1450 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001451 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1452 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001453 if(!td->oer_constraints)
1454 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001455 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001456 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1457 td->elements = asn_DEF_NativeInteger.elements;
1458 td->elements_count = asn_DEF_NativeInteger.elements_count;
1459 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001460}
1461
1462void
1463NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1464 void *struct_ptr, int contents_only) {
1465 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1466 td->free_struct(td, struct_ptr, contents_only);
1467}
1468
1469int
1470NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1471 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1472 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1473 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1474}
1475
1476asn_dec_rval_t
1477NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1478 void **structure, const void *bufptr, size_t size, int tag_mode) {
1479 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1480 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1481}
1482
1483asn_enc_rval_t
1484NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1485 void *structure, int tag_mode, ber_tlv_tag_t tag,
1486 asn_app_consume_bytes_f *cb, void *app_key) {
1487 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1488 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1489}
1490
1491asn_dec_rval_t
1492NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1493 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1494 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1495 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1496}
1497
1498asn_enc_rval_t
1499NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1500 int ilevel, enum xer_encoder_flags_e flags,
1501 asn_app_consume_bytes_f *cb, void *app_key) {
1502 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1503 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1504}
1505
1506asn_dec_rval_t
1507NO_IntegerOutRange_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1508 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1509 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1510 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1511}
1512
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001513asn_enc_rval_t
1514NO_IntegerOutRange_encode_uper(asn_TYPE_descriptor_t *td,
1515 asn_per_constraints_t *constraints,
1516 void *structure, asn_per_outp_t *per_out) {
1517 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1518 return td->uper_encoder(td, constraints, structure, per_out);
1519}
1520
Lev Walkin59b176e2005-11-26 11:25:14 +00001521
Lev Walkin725883b2006-10-09 12:07:58 +00001522/*** <<< CTDEFS [NO-IntegerOutRange] >>> ***/
1523
Lev Walkin2fce55d2013-03-28 05:00:39 -07001524static asn_per_constraints_t asn_PER_type_NO_IntegerOutRange_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001525 { APC_CONSTRAINED, 1, -1, 3000000000, 3000000001 } /* (3000000000..3000000001) */,
1526 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1527 0, 0 /* No PER value map */
1528};
1529
Lev Walkin59b176e2005-11-26 11:25:14 +00001530/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1531
johvike70c4072017-05-09 11:06:12 +02001532static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001533 0, 0, 0, 0, 0,
1534 0, /* Native long size */
1535 1 /* Unsigned representation */
1536};
Lev Walkina7591b52014-10-12 18:37:35 -07001537static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001538 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1539};
Lev Walkin59b176e2005-11-26 11:25:14 +00001540asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1541 "NO-IntegerOutRange",
1542 "NO-IntegerOutRange",
1543 NO_IntegerOutRange_free,
1544 NO_IntegerOutRange_print,
1545 NO_IntegerOutRange_constraint,
1546 NO_IntegerOutRange_decode_ber,
1547 NO_IntegerOutRange_encode_der,
1548 NO_IntegerOutRange_decode_xer,
1549 NO_IntegerOutRange_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001550 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001551 NO_IntegerOutRange_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001552 NO_IntegerOutRange_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001553 0, /* Use generic outmost tag fetcher */
1554 asn_DEF_NO_IntegerOutRange_tags_1,
1555 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1556 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1557 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1558 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1559 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001560 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001561 &asn_PER_type_NO_IntegerOutRange_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001562 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001563 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001564};
1565
1566
1567/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1568
Lev Walkin8bb57a22007-12-03 13:41:36 +00001569#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001570
1571/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1572
Lev Walkin8bb57a22007-12-03 13:41:36 +00001573typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001574
1575/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1576
1577extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1578asn_struct_free_f NO_IntegerOutValue_free;
1579asn_struct_print_f NO_IntegerOutValue_print;
1580asn_constr_check_f NO_IntegerOutValue_constraint;
1581ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1582der_type_encoder_f NO_IntegerOutValue_encode_der;
1583xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1584xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1585per_type_decoder_f NO_IntegerOutValue_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001586per_type_encoder_f NO_IntegerOutValue_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001587
1588/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1589
1590int
1591NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001592 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001593 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001594
1595 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001596 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001597 "%s: value not given (%s:%d)",
1598 td->name, __FILE__, __LINE__);
1599 return -1;
1600 }
1601
Lev Walkin8bb57a22007-12-03 13:41:36 +00001602 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001603
1604 if((value == 3000000000)) {
1605 /* Constraint check succeeded */
1606 return 0;
1607 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001608 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001609 "%s: constraint failed (%s:%d)",
1610 td->name, __FILE__, __LINE__);
1611 return -1;
1612 }
1613}
1614
1615/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001616 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001617 * so here we adjust the DEF accordingly.
1618 */
1619static void
1620NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001621 td->free_struct = asn_DEF_NativeInteger.free_struct;
1622 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001623 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001624 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1625 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1626 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1627 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1628 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1629 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001630 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1631 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001632 if(!td->oer_constraints)
1633 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001634 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001635 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1636 td->elements = asn_DEF_NativeInteger.elements;
1637 td->elements_count = asn_DEF_NativeInteger.elements_count;
1638 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001639}
1640
1641void
1642NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1643 void *struct_ptr, int contents_only) {
1644 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1645 td->free_struct(td, struct_ptr, contents_only);
1646}
1647
1648int
1649NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1650 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1651 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1652 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1653}
1654
1655asn_dec_rval_t
1656NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1657 void **structure, const void *bufptr, size_t size, int tag_mode) {
1658 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1659 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1660}
1661
1662asn_enc_rval_t
1663NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1664 void *structure, int tag_mode, ber_tlv_tag_t tag,
1665 asn_app_consume_bytes_f *cb, void *app_key) {
1666 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1667 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1668}
1669
1670asn_dec_rval_t
1671NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1672 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1673 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1674 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1675}
1676
1677asn_enc_rval_t
1678NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1679 int ilevel, enum xer_encoder_flags_e flags,
1680 asn_app_consume_bytes_f *cb, void *app_key) {
1681 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1682 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1683}
1684
1685asn_dec_rval_t
1686NO_IntegerOutValue_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1687 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1688 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1689 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1690}
1691
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001692asn_enc_rval_t
1693NO_IntegerOutValue_encode_uper(asn_TYPE_descriptor_t *td,
1694 asn_per_constraints_t *constraints,
1695 void *structure, asn_per_outp_t *per_out) {
1696 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1697 return td->uper_encoder(td, constraints, structure, per_out);
1698}
1699
Lev Walkin59b176e2005-11-26 11:25:14 +00001700
Lev Walkin725883b2006-10-09 12:07:58 +00001701/*** <<< CTDEFS [NO-IntegerOutValue] >>> ***/
1702
Lev Walkin2fce55d2013-03-28 05:00:39 -07001703static asn_per_constraints_t asn_PER_type_NO_IntegerOutValue_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001704 { APC_CONSTRAINED, 0, -1, 3000000000, 3000000000 } /* (3000000000..3000000000) */,
1705 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1706 0, 0 /* No PER value map */
1707};
1708
Lev Walkin59b176e2005-11-26 11:25:14 +00001709/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1710
johvike70c4072017-05-09 11:06:12 +02001711static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001712 0, 0, 0, 0, 0,
1713 0, /* Native long size */
1714 1 /* Unsigned representation */
1715};
Lev Walkina7591b52014-10-12 18:37:35 -07001716static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001717 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1718};
Lev Walkin59b176e2005-11-26 11:25:14 +00001719asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1720 "NO-IntegerOutValue",
1721 "NO-IntegerOutValue",
1722 NO_IntegerOutValue_free,
1723 NO_IntegerOutValue_print,
1724 NO_IntegerOutValue_constraint,
1725 NO_IntegerOutValue_decode_ber,
1726 NO_IntegerOutValue_encode_der,
1727 NO_IntegerOutValue_decode_xer,
1728 NO_IntegerOutValue_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001729 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001730 NO_IntegerOutValue_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001731 NO_IntegerOutValue_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001732 0, /* Use generic outmost tag fetcher */
1733 asn_DEF_NO_IntegerOutValue_tags_1,
1734 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1735 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1736 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1737 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1738 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001739 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001740 &asn_PER_type_NO_IntegerOutValue_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001741 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001742 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001743};
1744
1745
1746/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1747
1748#include <NativeInteger.h>
1749
1750/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1751
1752typedef long OK_IntegerInRange1_t;
1753
1754/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1755
1756extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1757asn_struct_free_f OK_IntegerInRange1_free;
1758asn_struct_print_f OK_IntegerInRange1_print;
1759asn_constr_check_f OK_IntegerInRange1_constraint;
1760ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1761der_type_encoder_f OK_IntegerInRange1_encode_der;
1762xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1763xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1764per_type_decoder_f OK_IntegerInRange1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001765per_type_encoder_f OK_IntegerInRange1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001766
1767/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1768
1769int
1770OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001771 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001772 long value;
1773
1774 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001775 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001776 "%s: value not given (%s:%d)",
1777 td->name, __FILE__, __LINE__);
1778 return -1;
1779 }
1780
1781 value = *(const long *)sptr;
1782
1783 if((value >= -100 && value <= 100)) {
1784 /* Constraint check succeeded */
1785 return 0;
1786 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001787 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001788 "%s: constraint failed (%s:%d)",
1789 td->name, __FILE__, __LINE__);
1790 return -1;
1791 }
1792}
1793
1794/*
1795 * This type is implemented using NativeInteger,
1796 * so here we adjust the DEF accordingly.
1797 */
1798static void
1799OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1800 td->free_struct = asn_DEF_NativeInteger.free_struct;
1801 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001802 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001803 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1804 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1805 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1806 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1807 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001808 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001809 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1810 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001811 if(!td->oer_constraints)
1812 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001813 if(!td->per_constraints)
1814 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1815 td->elements = asn_DEF_NativeInteger.elements;
1816 td->elements_count = asn_DEF_NativeInteger.elements_count;
1817 td->specifics = asn_DEF_NativeInteger.specifics;
1818}
1819
1820void
1821OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1822 void *struct_ptr, int contents_only) {
1823 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1824 td->free_struct(td, struct_ptr, contents_only);
1825}
1826
1827int
1828OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1829 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1830 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1831 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1832}
1833
1834asn_dec_rval_t
1835OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1836 void **structure, const void *bufptr, size_t size, int tag_mode) {
1837 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1838 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1839}
1840
1841asn_enc_rval_t
1842OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1843 void *structure, int tag_mode, ber_tlv_tag_t tag,
1844 asn_app_consume_bytes_f *cb, void *app_key) {
1845 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1846 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1847}
1848
1849asn_dec_rval_t
1850OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1851 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1852 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1853 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1854}
1855
1856asn_enc_rval_t
1857OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1858 int ilevel, enum xer_encoder_flags_e flags,
1859 asn_app_consume_bytes_f *cb, void *app_key) {
1860 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1861 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1862}
1863
1864asn_dec_rval_t
1865OK_IntegerInRange1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1866 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1867 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1868 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1869}
1870
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001871asn_enc_rval_t
1872OK_IntegerInRange1_encode_uper(asn_TYPE_descriptor_t *td,
1873 asn_per_constraints_t *constraints,
1874 void *structure, asn_per_outp_t *per_out) {
1875 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1876 return td->uper_encoder(td, constraints, structure, per_out);
1877}
1878
Lev Walkin59b176e2005-11-26 11:25:14 +00001879
Lev Walkin725883b2006-10-09 12:07:58 +00001880/*** <<< CTDEFS [OK-IntegerInRange1] >>> ***/
1881
Lev Walkin2fce55d2013-03-28 05:00:39 -07001882static asn_per_constraints_t asn_PER_type_OK_IntegerInRange1_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001883 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
1884 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1885 0, 0 /* No PER value map */
1886};
1887
Lev Walkin59b176e2005-11-26 11:25:14 +00001888/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1889
Lev Walkina7591b52014-10-12 18:37:35 -07001890static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001891 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1892};
Lev Walkin59b176e2005-11-26 11:25:14 +00001893asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1894 "OK-IntegerInRange1",
1895 "OK-IntegerInRange1",
1896 OK_IntegerInRange1_free,
1897 OK_IntegerInRange1_print,
1898 OK_IntegerInRange1_constraint,
1899 OK_IntegerInRange1_decode_ber,
1900 OK_IntegerInRange1_encode_der,
1901 OK_IntegerInRange1_decode_xer,
1902 OK_IntegerInRange1_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04001903 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00001904 OK_IntegerInRange1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001905 OK_IntegerInRange1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001906 0, /* Use generic outmost tag fetcher */
1907 asn_DEF_OK_IntegerInRange1_tags_1,
1908 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1909 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1910 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1911 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1912 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04001913 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001914 &asn_PER_type_OK_IntegerInRange1_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001915 0, 0, /* No members */
1916 0 /* No specifics */
1917};
1918
1919
1920/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1921
1922#include <NativeInteger.h>
1923
1924/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1925
1926typedef long OK_IntegerInRange2_t;
1927
1928/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1929
1930extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1931asn_struct_free_f OK_IntegerInRange2_free;
1932asn_struct_print_f OK_IntegerInRange2_print;
1933asn_constr_check_f OK_IntegerInRange2_constraint;
1934ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1935der_type_encoder_f OK_IntegerInRange2_encode_der;
1936xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1937xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1938per_type_decoder_f OK_IntegerInRange2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001939per_type_encoder_f OK_IntegerInRange2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001940
1941/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1942
1943int
1944OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001945 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001946 long value;
1947
1948 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001949 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001950 "%s: value not given (%s:%d)",
1951 td->name, __FILE__, __LINE__);
1952 return -1;
1953 }
1954
1955 value = *(const long *)sptr;
1956
1957 if(((value == -100) || (value == 100))) {
1958 /* Constraint check succeeded */
1959 return 0;
1960 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07001961 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001962 "%s: constraint failed (%s:%d)",
1963 td->name, __FILE__, __LINE__);
1964 return -1;
1965 }
1966}
1967
1968/*
1969 * This type is implemented using NativeInteger,
1970 * so here we adjust the DEF accordingly.
1971 */
1972static void
1973OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1974 td->free_struct = asn_DEF_NativeInteger.free_struct;
1975 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001976 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001977 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1978 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1979 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1980 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1981 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001982 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07001983 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
1984 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04001985 if(!td->oer_constraints)
1986 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001987 if(!td->per_constraints)
1988 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1989 td->elements = asn_DEF_NativeInteger.elements;
1990 td->elements_count = asn_DEF_NativeInteger.elements_count;
1991 td->specifics = asn_DEF_NativeInteger.specifics;
1992}
1993
1994void
1995OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1996 void *struct_ptr, int contents_only) {
1997 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1998 td->free_struct(td, struct_ptr, contents_only);
1999}
2000
2001int
2002OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2003 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2004 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2005 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2006}
2007
2008asn_dec_rval_t
2009OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2010 void **structure, const void *bufptr, size_t size, int tag_mode) {
2011 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2012 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2013}
2014
2015asn_enc_rval_t
2016OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
2017 void *structure, int tag_mode, ber_tlv_tag_t tag,
2018 asn_app_consume_bytes_f *cb, void *app_key) {
2019 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2020 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2021}
2022
2023asn_dec_rval_t
2024OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2025 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2026 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2027 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2028}
2029
2030asn_enc_rval_t
2031OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2032 int ilevel, enum xer_encoder_flags_e flags,
2033 asn_app_consume_bytes_f *cb, void *app_key) {
2034 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2035 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2036}
2037
2038asn_dec_rval_t
2039OK_IntegerInRange2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2040 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2041 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2042 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2043}
2044
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002045asn_enc_rval_t
2046OK_IntegerInRange2_encode_uper(asn_TYPE_descriptor_t *td,
2047 asn_per_constraints_t *constraints,
2048 void *structure, asn_per_outp_t *per_out) {
2049 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
2050 return td->uper_encoder(td, constraints, structure, per_out);
2051}
2052
Lev Walkin59b176e2005-11-26 11:25:14 +00002053
Lev Walkin725883b2006-10-09 12:07:58 +00002054/*** <<< CTDEFS [OK-IntegerInRange2] >>> ***/
2055
Lev Walkin2fce55d2013-03-28 05:00:39 -07002056static asn_per_constraints_t asn_PER_type_OK_IntegerInRange2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002057 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
2058 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2059 0, 0 /* No PER value map */
2060};
2061
Lev Walkin59b176e2005-11-26 11:25:14 +00002062/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
2063
Lev Walkina7591b52014-10-12 18:37:35 -07002064static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002065 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2066};
Lev Walkin59b176e2005-11-26 11:25:14 +00002067asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
2068 "OK-IntegerInRange2",
2069 "OK-IntegerInRange2",
2070 OK_IntegerInRange2_free,
2071 OK_IntegerInRange2_print,
2072 OK_IntegerInRange2_constraint,
2073 OK_IntegerInRange2_decode_ber,
2074 OK_IntegerInRange2_encode_der,
2075 OK_IntegerInRange2_decode_xer,
2076 OK_IntegerInRange2_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002077 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002078 OK_IntegerInRange2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002079 OK_IntegerInRange2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002080 0, /* Use generic outmost tag fetcher */
2081 asn_DEF_OK_IntegerInRange2_tags_1,
2082 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2083 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
2084 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
2085 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2086 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002087 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002088 &asn_PER_type_OK_IntegerInRange2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002089 0, 0, /* No members */
2090 0 /* No specifics */
2091};
2092
2093
2094/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
2095
2096#include <NativeInteger.h>
2097
2098/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
2099
2100typedef long OK_IntegerInRange3_t;
2101
2102/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
2103
2104extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
2105asn_struct_free_f OK_IntegerInRange3_free;
2106asn_struct_print_f OK_IntegerInRange3_print;
2107asn_constr_check_f OK_IntegerInRange3_constraint;
2108ber_type_decoder_f OK_IntegerInRange3_decode_ber;
2109der_type_encoder_f OK_IntegerInRange3_encode_der;
2110xer_type_decoder_f OK_IntegerInRange3_decode_xer;
2111xer_type_encoder_f OK_IntegerInRange3_encode_xer;
2112per_type_decoder_f OK_IntegerInRange3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002113per_type_encoder_f OK_IntegerInRange3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002114
2115/*** <<< CODE [OK-IntegerInRange3] >>> ***/
2116
2117int
2118OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002119 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002120 long value;
2121
2122 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002123 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002124 "%s: value not given (%s:%d)",
2125 td->name, __FILE__, __LINE__);
2126 return -1;
2127 }
2128
2129 value = *(const long *)sptr;
2130
Lev Walkin63b41262007-11-06 01:48:46 +00002131 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002132 /* Constraint check succeeded */
2133 return 0;
2134 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002135 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002136 "%s: constraint failed (%s:%d)",
2137 td->name, __FILE__, __LINE__);
2138 return -1;
2139 }
2140}
2141
2142/*
2143 * This type is implemented using NativeInteger,
2144 * so here we adjust the DEF accordingly.
2145 */
2146static void
2147OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2148 td->free_struct = asn_DEF_NativeInteger.free_struct;
2149 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002150 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002151 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2152 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2153 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2154 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2155 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002156 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002157 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2158 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002159 if(!td->oer_constraints)
2160 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002161 if(!td->per_constraints)
2162 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2163 td->elements = asn_DEF_NativeInteger.elements;
2164 td->elements_count = asn_DEF_NativeInteger.elements_count;
2165 td->specifics = asn_DEF_NativeInteger.specifics;
2166}
2167
2168void
2169OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
2170 void *struct_ptr, int contents_only) {
2171 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2172 td->free_struct(td, struct_ptr, contents_only);
2173}
2174
2175int
2176OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2177 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2178 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2179 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2180}
2181
2182asn_dec_rval_t
2183OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2184 void **structure, const void *bufptr, size_t size, int tag_mode) {
2185 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2186 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2187}
2188
2189asn_enc_rval_t
2190OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
2191 void *structure, int tag_mode, ber_tlv_tag_t tag,
2192 asn_app_consume_bytes_f *cb, void *app_key) {
2193 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2194 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2195}
2196
2197asn_dec_rval_t
2198OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2199 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2200 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2201 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2202}
2203
2204asn_enc_rval_t
2205OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2206 int ilevel, enum xer_encoder_flags_e flags,
2207 asn_app_consume_bytes_f *cb, void *app_key) {
2208 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2209 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2210}
2211
2212asn_dec_rval_t
2213OK_IntegerInRange3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2214 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2215 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2216 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2217}
2218
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002219asn_enc_rval_t
2220OK_IntegerInRange3_encode_uper(asn_TYPE_descriptor_t *td,
2221 asn_per_constraints_t *constraints,
2222 void *structure, asn_per_outp_t *per_out) {
2223 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2224 return td->uper_encoder(td, constraints, structure, per_out);
2225}
2226
Lev Walkin59b176e2005-11-26 11:25:14 +00002227
Lev Walkin725883b2006-10-09 12:07:58 +00002228/*** <<< CTDEFS [OK-IntegerInRange3] >>> ***/
2229
Lev Walkin2fce55d2013-03-28 05:00:39 -07002230static asn_per_constraints_t asn_PER_type_OK_IntegerInRange3_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002231 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002232 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2233 0, 0 /* No PER value map */
2234};
2235
Lev Walkin59b176e2005-11-26 11:25:14 +00002236/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
2237
Lev Walkina7591b52014-10-12 18:37:35 -07002238static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002239 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2240};
Lev Walkin59b176e2005-11-26 11:25:14 +00002241asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
2242 "OK-IntegerInRange3",
2243 "OK-IntegerInRange3",
2244 OK_IntegerInRange3_free,
2245 OK_IntegerInRange3_print,
2246 OK_IntegerInRange3_constraint,
2247 OK_IntegerInRange3_decode_ber,
2248 OK_IntegerInRange3_encode_der,
2249 OK_IntegerInRange3_decode_xer,
2250 OK_IntegerInRange3_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002251 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002252 OK_IntegerInRange3_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002253 OK_IntegerInRange3_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002254 0, /* Use generic outmost tag fetcher */
2255 asn_DEF_OK_IntegerInRange3_tags_1,
2256 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2257 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
2258 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
2259 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2260 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002261 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002262 &asn_PER_type_OK_IntegerInRange3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002263 0, 0, /* No members */
2264 0 /* No specifics */
2265};
2266
2267
2268/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
2269
2270#include <NativeInteger.h>
2271
2272/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
2273
2274typedef long OK_IntegerInRange4_t;
2275
2276/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
2277
2278extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
2279asn_struct_free_f OK_IntegerInRange4_free;
2280asn_struct_print_f OK_IntegerInRange4_print;
2281asn_constr_check_f OK_IntegerInRange4_constraint;
2282ber_type_decoder_f OK_IntegerInRange4_decode_ber;
2283der_type_encoder_f OK_IntegerInRange4_encode_der;
2284xer_type_decoder_f OK_IntegerInRange4_decode_xer;
2285xer_type_encoder_f OK_IntegerInRange4_encode_xer;
2286per_type_decoder_f OK_IntegerInRange4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002287per_type_encoder_f OK_IntegerInRange4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002288
2289/*** <<< CODE [OK-IntegerInRange4] >>> ***/
2290
2291int
2292OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002293 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002294 long value;
2295
2296 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002297 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002298 "%s: value not given (%s:%d)",
2299 td->name, __FILE__, __LINE__);
2300 return -1;
2301 }
2302
2303 value = *(const long *)sptr;
2304
Lev Walkin63b41262007-11-06 01:48:46 +00002305 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002306 /* Constraint check succeeded */
2307 return 0;
2308 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002309 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002310 "%s: constraint failed (%s:%d)",
2311 td->name, __FILE__, __LINE__);
2312 return -1;
2313 }
2314}
2315
2316/*
2317 * This type is implemented using NativeInteger,
2318 * so here we adjust the DEF accordingly.
2319 */
2320static void
2321OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2322 td->free_struct = asn_DEF_NativeInteger.free_struct;
2323 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002324 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002325 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2326 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2327 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2328 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2329 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002330 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002331 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2332 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002333 if(!td->oer_constraints)
2334 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002335 if(!td->per_constraints)
2336 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2337 td->elements = asn_DEF_NativeInteger.elements;
2338 td->elements_count = asn_DEF_NativeInteger.elements_count;
2339 td->specifics = asn_DEF_NativeInteger.specifics;
2340}
2341
2342void
2343OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
2344 void *struct_ptr, int contents_only) {
2345 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2346 td->free_struct(td, struct_ptr, contents_only);
2347}
2348
2349int
2350OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2351 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2352 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2353 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2354}
2355
2356asn_dec_rval_t
2357OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2358 void **structure, const void *bufptr, size_t size, int tag_mode) {
2359 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2360 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2361}
2362
2363asn_enc_rval_t
2364OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
2365 void *structure, int tag_mode, ber_tlv_tag_t tag,
2366 asn_app_consume_bytes_f *cb, void *app_key) {
2367 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2368 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2369}
2370
2371asn_dec_rval_t
2372OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2373 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2374 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2375 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2376}
2377
2378asn_enc_rval_t
2379OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2380 int ilevel, enum xer_encoder_flags_e flags,
2381 asn_app_consume_bytes_f *cb, void *app_key) {
2382 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2383 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2384}
2385
2386asn_dec_rval_t
2387OK_IntegerInRange4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2388 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2389 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2390 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2391}
2392
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002393asn_enc_rval_t
2394OK_IntegerInRange4_encode_uper(asn_TYPE_descriptor_t *td,
2395 asn_per_constraints_t *constraints,
2396 void *structure, asn_per_outp_t *per_out) {
2397 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2398 return td->uper_encoder(td, constraints, structure, per_out);
2399}
2400
Lev Walkin59b176e2005-11-26 11:25:14 +00002401
Lev Walkin725883b2006-10-09 12:07:58 +00002402/*** <<< CTDEFS [OK-IntegerInRange4] >>> ***/
2403
Lev Walkin2fce55d2013-03-28 05:00:39 -07002404static asn_per_constraints_t asn_PER_type_OK_IntegerInRange4_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002405 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002406 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2407 0, 0 /* No PER value map */
2408};
2409
Lev Walkin59b176e2005-11-26 11:25:14 +00002410/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
2411
Lev Walkina7591b52014-10-12 18:37:35 -07002412static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002413 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2414};
Lev Walkin59b176e2005-11-26 11:25:14 +00002415asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
2416 "OK-IntegerInRange4",
2417 "OK-IntegerInRange4",
2418 OK_IntegerInRange4_free,
2419 OK_IntegerInRange4_print,
2420 OK_IntegerInRange4_constraint,
2421 OK_IntegerInRange4_decode_ber,
2422 OK_IntegerInRange4_encode_der,
2423 OK_IntegerInRange4_decode_xer,
2424 OK_IntegerInRange4_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002425 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002426 OK_IntegerInRange4_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002427 OK_IntegerInRange4_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002428 0, /* Use generic outmost tag fetcher */
2429 asn_DEF_OK_IntegerInRange4_tags_1,
2430 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2431 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2432 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
2433 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2434 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002435 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002436 &asn_PER_type_OK_IntegerInRange4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002437 0, 0, /* No members */
2438 0 /* No specifics */
2439};
2440
2441
2442/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2443
Lev Walkin2a744a72013-03-27 01:56:23 -07002444#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002445
2446/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2447
Lev Walkin2a744a72013-03-27 01:56:23 -07002448typedef long OK_IntegerInRange5_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002449
2450/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2451
2452extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2453asn_struct_free_f OK_IntegerInRange5_free;
2454asn_struct_print_f OK_IntegerInRange5_print;
2455asn_constr_check_f OK_IntegerInRange5_constraint;
2456ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2457der_type_encoder_f OK_IntegerInRange5_encode_der;
2458xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2459xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2460per_type_decoder_f OK_IntegerInRange5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002461per_type_encoder_f OK_IntegerInRange5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002462
2463/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2464
2465int
2466OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002467 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002468 long value;
2469
2470 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002471 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002472 "%s: value not given (%s:%d)",
2473 td->name, __FILE__, __LINE__);
2474 return -1;
2475 }
2476
Lev Walkin2a744a72013-03-27 01:56:23 -07002477 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002478
Lev Walkin63b41262007-11-06 01:48:46 +00002479 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002480 /* Constraint check succeeded */
2481 return 0;
2482 } else {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002483 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002484 "%s: constraint failed (%s:%d)",
2485 td->name, __FILE__, __LINE__);
2486 return -1;
2487 }
2488}
2489
2490/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002491 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002492 * so here we adjust the DEF accordingly.
2493 */
2494static void
2495OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002496 td->free_struct = asn_DEF_NativeInteger.free_struct;
2497 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002498 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002499 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2500 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2501 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2502 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2503 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2504 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002505 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2506 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002507 if(!td->oer_constraints)
2508 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002509 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002510 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2511 td->elements = asn_DEF_NativeInteger.elements;
2512 td->elements_count = asn_DEF_NativeInteger.elements_count;
2513 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002514}
2515
2516void
2517OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2518 void *struct_ptr, int contents_only) {
2519 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2520 td->free_struct(td, struct_ptr, contents_only);
2521}
2522
2523int
2524OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2525 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2526 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2527 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2528}
2529
2530asn_dec_rval_t
2531OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2532 void **structure, const void *bufptr, size_t size, int tag_mode) {
2533 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2534 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2535}
2536
2537asn_enc_rval_t
2538OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2539 void *structure, int tag_mode, ber_tlv_tag_t tag,
2540 asn_app_consume_bytes_f *cb, void *app_key) {
2541 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2542 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2543}
2544
2545asn_dec_rval_t
2546OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2547 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2548 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2549 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2550}
2551
2552asn_enc_rval_t
2553OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2554 int ilevel, enum xer_encoder_flags_e flags,
2555 asn_app_consume_bytes_f *cb, void *app_key) {
2556 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2557 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2558}
2559
2560asn_dec_rval_t
2561OK_IntegerInRange5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2562 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2563 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2564 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2565}
2566
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002567asn_enc_rval_t
2568OK_IntegerInRange5_encode_uper(asn_TYPE_descriptor_t *td,
2569 asn_per_constraints_t *constraints,
2570 void *structure, asn_per_outp_t *per_out) {
2571 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2572 return td->uper_encoder(td, constraints, structure, per_out);
2573}
2574
Lev Walkin59b176e2005-11-26 11:25:14 +00002575
Lev Walkin725883b2006-10-09 12:07:58 +00002576/*** <<< CTDEFS [OK-IntegerInRange5] >>> ***/
2577
Lev Walkin2fce55d2013-03-28 05:00:39 -07002578static asn_per_constraints_t asn_PER_type_OK_IntegerInRange5_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002579 { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002580 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2581 0, 0 /* No PER value map */
2582};
2583
Lev Walkin59b176e2005-11-26 11:25:14 +00002584/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2585
Lev Walkina7591b52014-10-12 18:37:35 -07002586static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002587 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2588};
Lev Walkin59b176e2005-11-26 11:25:14 +00002589asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2590 "OK-IntegerInRange5",
2591 "OK-IntegerInRange5",
2592 OK_IntegerInRange5_free,
2593 OK_IntegerInRange5_print,
2594 OK_IntegerInRange5_constraint,
2595 OK_IntegerInRange5_decode_ber,
2596 OK_IntegerInRange5_encode_der,
2597 OK_IntegerInRange5_decode_xer,
2598 OK_IntegerInRange5_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002599 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002600 OK_IntegerInRange5_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002601 OK_IntegerInRange5_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002602 0, /* Use generic outmost tag fetcher */
2603 asn_DEF_OK_IntegerInRange5_tags_1,
2604 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2605 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2606 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2607 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2608 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002609 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002610 &asn_PER_type_OK_IntegerInRange5_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002611 0, 0, /* No members */
2612 0 /* No specifics */
2613};
2614
2615
2616/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2617
Lev Walkin8bb57a22007-12-03 13:41:36 +00002618#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002619
2620/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2621
Lev Walkin8bb57a22007-12-03 13:41:36 +00002622typedef unsigned long NO_IntegerInRange6_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002623
2624/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2625
2626extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2627asn_struct_free_f NO_IntegerInRange6_free;
2628asn_struct_print_f NO_IntegerInRange6_print;
2629asn_constr_check_f NO_IntegerInRange6_constraint;
2630ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2631der_type_encoder_f NO_IntegerInRange6_encode_der;
2632xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2633xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2634per_type_decoder_f NO_IntegerInRange6_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002635per_type_encoder_f NO_IntegerInRange6_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002636
2637/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2638
2639int
2640NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002641 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002642
2643 if(!sptr) {
Lev Walkin7c1dc052016-03-14 03:08:15 -07002644 ASN__CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002645 "%s: value not given (%s:%d)",
2646 td->name, __FILE__, __LINE__);
2647 return -1;
2648 }
2649
Lev Walkin59b176e2005-11-26 11:25:14 +00002650
Lev Walkin8bb57a22007-12-03 13:41:36 +00002651 /* Constraint check succeeded */
2652 return 0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002653}
2654
2655/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002656 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002657 * so here we adjust the DEF accordingly.
2658 */
2659static void
2660NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002661 td->free_struct = asn_DEF_NativeInteger.free_struct;
2662 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002663 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00002664 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2665 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2666 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2667 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2668 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2669 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002670 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2671 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002672 if(!td->oer_constraints)
2673 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002674 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002675 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2676 td->elements = asn_DEF_NativeInteger.elements;
2677 td->elements_count = asn_DEF_NativeInteger.elements_count;
2678 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00002679}
2680
2681void
2682NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2683 void *struct_ptr, int contents_only) {
2684 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2685 td->free_struct(td, struct_ptr, contents_only);
2686}
2687
2688int
2689NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2690 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2691 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2692 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2693}
2694
2695asn_dec_rval_t
2696NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2697 void **structure, const void *bufptr, size_t size, int tag_mode) {
2698 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2699 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2700}
2701
2702asn_enc_rval_t
2703NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2704 void *structure, int tag_mode, ber_tlv_tag_t tag,
2705 asn_app_consume_bytes_f *cb, void *app_key) {
2706 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2707 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2708}
2709
2710asn_dec_rval_t
2711NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2712 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2713 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2714 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2715}
2716
2717asn_enc_rval_t
2718NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2719 int ilevel, enum xer_encoder_flags_e flags,
2720 asn_app_consume_bytes_f *cb, void *app_key) {
2721 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2722 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2723}
2724
2725asn_dec_rval_t
2726NO_IntegerInRange6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2727 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2728 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2729 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2730}
2731
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002732asn_enc_rval_t
2733NO_IntegerInRange6_encode_uper(asn_TYPE_descriptor_t *td,
2734 asn_per_constraints_t *constraints,
2735 void *structure, asn_per_outp_t *per_out) {
2736 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2737 return td->uper_encoder(td, constraints, structure, per_out);
2738}
2739
Lev Walkin59b176e2005-11-26 11:25:14 +00002740
Lev Walkin725883b2006-10-09 12:07:58 +00002741/*** <<< CTDEFS [NO-IntegerInRange6] >>> ***/
2742
Lev Walkin2fce55d2013-03-28 05:00:39 -07002743static asn_per_constraints_t asn_PER_type_NO_IntegerInRange6_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002744 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
2745 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2746 0, 0 /* No PER value map */
2747};
2748
Lev Walkin59b176e2005-11-26 11:25:14 +00002749/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2750
johvike70c4072017-05-09 11:06:12 +02002751static asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002752 0, 0, 0, 0, 0,
2753 0, /* Native long size */
2754 1 /* Unsigned representation */
2755};
Lev Walkina7591b52014-10-12 18:37:35 -07002756static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002757 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2758};
Lev Walkin59b176e2005-11-26 11:25:14 +00002759asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2760 "NO-IntegerInRange6",
2761 "NO-IntegerInRange6",
2762 NO_IntegerInRange6_free,
2763 NO_IntegerInRange6_print,
2764 NO_IntegerInRange6_constraint,
2765 NO_IntegerInRange6_decode_ber,
2766 NO_IntegerInRange6_encode_der,
2767 NO_IntegerInRange6_decode_xer,
2768 NO_IntegerInRange6_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002769 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002770 NO_IntegerInRange6_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002771 NO_IntegerInRange6_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002772 0, /* Use generic outmost tag fetcher */
2773 asn_DEF_NO_IntegerInRange6_tags_1,
2774 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2775 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2776 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2777 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2778 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002779 0, /* No OER visible constraints */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002780 &asn_PER_type_NO_IntegerInRange6_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002781 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002782 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00002783};
2784
2785
2786/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2787
Lev Walkin2a744a72013-03-27 01:56:23 -07002788#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002789
2790/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2791
2792typedef enum CN_IntegerEnumerated1 {
2793 CN_IntegerEnumerated1_a = 1,
2794 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002795} e_CN_IntegerEnumerated1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002796
2797/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2798
Lev Walkin2a744a72013-03-27 01:56:23 -07002799typedef long CN_IntegerEnumerated1_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002800
2801/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2802
2803extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2804asn_struct_free_f CN_IntegerEnumerated1_free;
2805asn_struct_print_f CN_IntegerEnumerated1_print;
2806asn_constr_check_f CN_IntegerEnumerated1_constraint;
2807ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2808der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2809xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2810xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2811per_type_decoder_f CN_IntegerEnumerated1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002812per_type_encoder_f CN_IntegerEnumerated1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002813
2814/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2815
2816int
2817CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002818 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002819 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002820 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002821 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002822}
2823
2824/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002825 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002826 * so here we adjust the DEF accordingly.
2827 */
2828static void
2829CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002830 td->free_struct = asn_DEF_NativeInteger.free_struct;
2831 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002832 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002833 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2834 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2835 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2836 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2837 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2838 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002839 td->oer_decoder = asn_DEF_NativeInteger.oer_decoder;
2840 td->oer_encoder = asn_DEF_NativeInteger.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002841 if(!td->oer_constraints)
2842 td->oer_constraints = asn_DEF_NativeInteger.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002843 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002844 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2845 td->elements = asn_DEF_NativeInteger.elements;
2846 td->elements_count = asn_DEF_NativeInteger.elements_count;
2847 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002848}
2849
2850void
2851CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2852 void *struct_ptr, int contents_only) {
2853 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2854 td->free_struct(td, struct_ptr, contents_only);
2855}
2856
2857int
2858CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2859 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2860 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2861 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2862}
2863
2864asn_dec_rval_t
2865CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2866 void **structure, const void *bufptr, size_t size, int tag_mode) {
2867 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2868 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2869}
2870
2871asn_enc_rval_t
2872CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2873 void *structure, int tag_mode, ber_tlv_tag_t tag,
2874 asn_app_consume_bytes_f *cb, void *app_key) {
2875 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2876 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2877}
2878
2879asn_dec_rval_t
2880CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2881 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2882 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2883 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2884}
2885
2886asn_enc_rval_t
2887CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2888 int ilevel, enum xer_encoder_flags_e flags,
2889 asn_app_consume_bytes_f *cb, void *app_key) {
2890 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2891 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2892}
2893
2894asn_dec_rval_t
2895CN_IntegerEnumerated1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2896 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2897 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2898 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2899}
2900
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002901asn_enc_rval_t
2902CN_IntegerEnumerated1_encode_uper(asn_TYPE_descriptor_t *td,
2903 asn_per_constraints_t *constraints,
2904 void *structure, asn_per_outp_t *per_out) {
2905 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2906 return td->uper_encoder(td, constraints, structure, per_out);
2907}
2908
Lev Walkin59b176e2005-11-26 11:25:14 +00002909
2910/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2911
Lev Walkina7591b52014-10-12 18:37:35 -07002912static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002913 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2914};
2915asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2916 "CN-IntegerEnumerated1",
2917 "CN-IntegerEnumerated1",
2918 CN_IntegerEnumerated1_free,
2919 CN_IntegerEnumerated1_print,
2920 CN_IntegerEnumerated1_constraint,
2921 CN_IntegerEnumerated1_decode_ber,
2922 CN_IntegerEnumerated1_encode_der,
2923 CN_IntegerEnumerated1_decode_xer,
2924 CN_IntegerEnumerated1_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04002925 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00002926 CN_IntegerEnumerated1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002927 CN_IntegerEnumerated1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002928 0, /* Use generic outmost tag fetcher */
2929 asn_DEF_CN_IntegerEnumerated1_tags_1,
2930 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2931 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2932 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2933 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2934 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04002935 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +00002936 0, /* No PER visible constraints */
2937 0, 0, /* Defined elsewhere */
2938 0 /* No specifics */
2939};
2940
2941
2942/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2943
2944#include <INTEGER.h>
2945
2946/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2947
2948typedef enum NO_IntegerEnumerated2 {
2949 NO_IntegerEnumerated2_a = 1,
2950 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002951} e_NO_IntegerEnumerated2;
Lev Walkin59b176e2005-11-26 11:25:14 +00002952
2953/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2954
2955typedef INTEGER_t NO_IntegerEnumerated2_t;
2956
2957/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2958
2959extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2960asn_struct_free_f NO_IntegerEnumerated2_free;
2961asn_struct_print_f NO_IntegerEnumerated2_print;
2962asn_constr_check_f NO_IntegerEnumerated2_constraint;
2963ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2964der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2965xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2966xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2967per_type_decoder_f NO_IntegerEnumerated2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002968per_type_encoder_f NO_IntegerEnumerated2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002969
2970/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2971
2972int
2973NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002974 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002975 /* Replace with underlying type checker */
2976 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002977 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002978}
2979
2980/*
2981 * This type is implemented using INTEGER,
2982 * so here we adjust the DEF accordingly.
2983 */
2984static void
2985NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2986 td->free_struct = asn_DEF_INTEGER.free_struct;
2987 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002988 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002989 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2990 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2991 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2992 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2993 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002994 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkinba68c912017-07-06 07:52:39 -07002995 td->oer_decoder = asn_DEF_INTEGER.oer_decoder;
2996 td->oer_encoder = asn_DEF_INTEGER.oer_encoder;
Lev Walkinb33425f2017-07-14 14:59:52 +04002997 if(!td->oer_constraints)
2998 td->oer_constraints = asn_DEF_INTEGER.oer_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002999 if(!td->per_constraints)
3000 td->per_constraints = asn_DEF_INTEGER.per_constraints;
3001 td->elements = asn_DEF_INTEGER.elements;
3002 td->elements_count = asn_DEF_INTEGER.elements_count;
3003 td->specifics = asn_DEF_INTEGER.specifics;
3004}
3005
3006void
3007NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
3008 void *struct_ptr, int contents_only) {
3009 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3010 td->free_struct(td, struct_ptr, contents_only);
3011}
3012
3013int
3014NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3015 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3016 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3017 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3018}
3019
3020asn_dec_rval_t
3021NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3022 void **structure, const void *bufptr, size_t size, int tag_mode) {
3023 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3024 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3025}
3026
3027asn_enc_rval_t
3028NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
3029 void *structure, int tag_mode, ber_tlv_tag_t tag,
3030 asn_app_consume_bytes_f *cb, void *app_key) {
3031 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3032 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3033}
3034
3035asn_dec_rval_t
3036NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3037 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3038 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3039 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3040}
3041
3042asn_enc_rval_t
3043NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3044 int ilevel, enum xer_encoder_flags_e flags,
3045 asn_app_consume_bytes_f *cb, void *app_key) {
3046 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3047 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3048}
3049
3050asn_dec_rval_t
3051NO_IntegerEnumerated2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3052 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3053 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3054 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3055}
3056
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00003057asn_enc_rval_t
3058NO_IntegerEnumerated2_encode_uper(asn_TYPE_descriptor_t *td,
3059 asn_per_constraints_t *constraints,
3060 void *structure, asn_per_outp_t *per_out) {
3061 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
3062 return td->uper_encoder(td, constraints, structure, per_out);
3063}
3064
Lev Walkin59b176e2005-11-26 11:25:14 +00003065
3066/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
3067
Lev Walkina7591b52014-10-12 18:37:35 -07003068static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00003069 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
3070};
3071asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
3072 "NO-IntegerEnumerated2",
3073 "NO-IntegerEnumerated2",
3074 NO_IntegerEnumerated2_free,
3075 NO_IntegerEnumerated2_print,
3076 NO_IntegerEnumerated2_constraint,
3077 NO_IntegerEnumerated2_decode_ber,
3078 NO_IntegerEnumerated2_encode_der,
3079 NO_IntegerEnumerated2_decode_xer,
3080 NO_IntegerEnumerated2_encode_xer,
Lev Walkinb33425f2017-07-14 14:59:52 +04003081 0, 0, /* No OER support, use "-gen-OER" to enable */
Lev Walkin59b176e2005-11-26 11:25:14 +00003082 NO_IntegerEnumerated2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00003083 NO_IntegerEnumerated2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00003084 0, /* Use generic outmost tag fetcher */
3085 asn_DEF_NO_IntegerEnumerated2_tags_1,
3086 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
3087 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
3088 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
3089 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
3090 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
Lev Walkinb33425f2017-07-14 14:59:52 +04003091 0, /* No OER visible constraints */
Lev Walkin59b176e2005-11-26 11:25:14 +00003092 0, /* No PER visible constraints */
3093 0, 0, /* Defined elsewhere */
3094 0 /* No specifics */
3095};
3096