blob: 57461071e69f83054aa56b676daf3c45b0c87897 [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 Walkin59b176e2005-11-26 11:25:14 +000048 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -070049 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
50 td->elements = asn_DEF_NativeInteger.elements;
51 td->elements_count = asn_DEF_NativeInteger.elements_count;
52 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +000053}
54
55void
56CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
57 void *struct_ptr, int contents_only) {
58 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
59 td->free_struct(td, struct_ptr, contents_only);
60}
61
62int
63CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
64 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
65 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
66 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
67}
68
69asn_dec_rval_t
70CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
71 void **structure, const void *bufptr, size_t size, int tag_mode) {
72 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
73 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
74}
75
76asn_enc_rval_t
77CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
78 void *structure, int tag_mode, ber_tlv_tag_t tag,
79 asn_app_consume_bytes_f *cb, void *app_key) {
80 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
81 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
82}
83
84asn_dec_rval_t
85CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
86 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
87 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
88 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
89}
90
91asn_enc_rval_t
92CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
93 int ilevel, enum xer_encoder_flags_e flags,
94 asn_app_consume_bytes_f *cb, void *app_key) {
95 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
96 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
97}
98
99asn_dec_rval_t
100CN_IntegerUnlimited_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
101 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
102 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
103 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
104}
105
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000106asn_enc_rval_t
107CN_IntegerUnlimited_encode_uper(asn_TYPE_descriptor_t *td,
108 asn_per_constraints_t *constraints,
109 void *structure, asn_per_outp_t *per_out) {
110 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
111 return td->uper_encoder(td, constraints, structure, per_out);
112}
113
Lev Walkin59b176e2005-11-26 11:25:14 +0000114
115/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
116
Lev Walkina7591b52014-10-12 18:37:35 -0700117static const ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000118 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
119};
120asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
121 "CN-IntegerUnlimited",
122 "CN-IntegerUnlimited",
123 CN_IntegerUnlimited_free,
124 CN_IntegerUnlimited_print,
125 CN_IntegerUnlimited_constraint,
126 CN_IntegerUnlimited_decode_ber,
127 CN_IntegerUnlimited_encode_der,
128 CN_IntegerUnlimited_decode_xer,
129 CN_IntegerUnlimited_encode_xer,
130 CN_IntegerUnlimited_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000131 CN_IntegerUnlimited_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000132 0, /* Use generic outmost tag fetcher */
133 asn_DEF_CN_IntegerUnlimited_tags_1,
134 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
135 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
136 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
137 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
138 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
139 0, /* No PER visible constraints */
140 0, 0, /* No members */
141 0 /* No specifics */
142};
143
144
145/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
146
Lev Walkin2a744a72013-03-27 01:56:23 -0700147#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000148
149/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
150
Lev Walkin2a744a72013-03-27 01:56:23 -0700151typedef long CN_IntegerMinMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000152
153/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
154
155extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
156asn_struct_free_f CN_IntegerMinMax_free;
157asn_struct_print_f CN_IntegerMinMax_print;
158asn_constr_check_f CN_IntegerMinMax_constraint;
159ber_type_decoder_f CN_IntegerMinMax_decode_ber;
160der_type_encoder_f CN_IntegerMinMax_encode_der;
161xer_type_decoder_f CN_IntegerMinMax_decode_xer;
162xer_type_encoder_f CN_IntegerMinMax_encode_xer;
163per_type_decoder_f CN_IntegerMinMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000164per_type_encoder_f CN_IntegerMinMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000165
166/*** <<< CODE [CN-IntegerMinMax] >>> ***/
167
168int
169CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000170 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000171
172 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000173 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000174 "%s: value not given (%s:%d)",
175 td->name, __FILE__, __LINE__);
176 return -1;
177 }
178
179
180 if(1 /* No applicable constraints whatsoever */) {
181 /* Nothing is here. See below */
182 }
183
184 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700185 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000186 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +0000187}
188
189/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700190 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000191 * so here we adjust the DEF accordingly.
192 */
193static void
194CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700195 td->free_struct = asn_DEF_NativeInteger.free_struct;
196 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800197 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700198 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
199 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
200 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
201 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
202 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
203 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000204 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700205 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
206 td->elements = asn_DEF_NativeInteger.elements;
207 td->elements_count = asn_DEF_NativeInteger.elements_count;
208 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000209}
210
211void
212CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
213 void *struct_ptr, int contents_only) {
214 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
215 td->free_struct(td, struct_ptr, contents_only);
216}
217
218int
219CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
220 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
221 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
222 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
223}
224
225asn_dec_rval_t
226CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
227 void **structure, const void *bufptr, size_t size, int tag_mode) {
228 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
229 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
230}
231
232asn_enc_rval_t
233CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
234 void *structure, int tag_mode, ber_tlv_tag_t tag,
235 asn_app_consume_bytes_f *cb, void *app_key) {
236 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
237 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
238}
239
240asn_dec_rval_t
241CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
242 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
243 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
244 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
245}
246
247asn_enc_rval_t
248CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
249 int ilevel, enum xer_encoder_flags_e flags,
250 asn_app_consume_bytes_f *cb, void *app_key) {
251 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
252 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
253}
254
255asn_dec_rval_t
256CN_IntegerMinMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
257 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
258 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
259 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
260}
261
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000262asn_enc_rval_t
263CN_IntegerMinMax_encode_uper(asn_TYPE_descriptor_t *td,
264 asn_per_constraints_t *constraints,
265 void *structure, asn_per_outp_t *per_out) {
266 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
267 return td->uper_encoder(td, constraints, structure, per_out);
268}
269
Lev Walkin59b176e2005-11-26 11:25:14 +0000270
Lev Walkin725883b2006-10-09 12:07:58 +0000271/*** <<< CTDEFS [CN-IntegerMinMax] >>> ***/
272
Lev Walkin2fce55d2013-03-28 05:00:39 -0700273static asn_per_constraints_t asn_PER_type_CN_IntegerMinMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000274 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
275 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
276 0, 0 /* No PER value map */
277};
278
Lev Walkin59b176e2005-11-26 11:25:14 +0000279/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
280
Lev Walkina7591b52014-10-12 18:37:35 -0700281static const ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000282 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
283};
Lev Walkin59b176e2005-11-26 11:25:14 +0000284asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
285 "CN-IntegerMinMax",
286 "CN-IntegerMinMax",
287 CN_IntegerMinMax_free,
288 CN_IntegerMinMax_print,
289 CN_IntegerMinMax_constraint,
290 CN_IntegerMinMax_decode_ber,
291 CN_IntegerMinMax_encode_der,
292 CN_IntegerMinMax_decode_xer,
293 CN_IntegerMinMax_encode_xer,
294 CN_IntegerMinMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000295 CN_IntegerMinMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000296 0, /* Use generic outmost tag fetcher */
297 asn_DEF_CN_IntegerMinMax_tags_1,
298 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
299 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
300 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
301 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
302 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000303 &asn_PER_type_CN_IntegerMinMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000304 0, 0, /* No members */
305 0 /* No specifics */
306};
307
308
309/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
310
Lev Walkin2a744a72013-03-27 01:56:23 -0700311#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000312
313/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
314
Lev Walkin2a744a72013-03-27 01:56:23 -0700315typedef long CN_IntegerMinLow_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000316
317/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
318
319extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
320asn_struct_free_f CN_IntegerMinLow_free;
321asn_struct_print_f CN_IntegerMinLow_print;
322asn_constr_check_f CN_IntegerMinLow_constraint;
323ber_type_decoder_f CN_IntegerMinLow_decode_ber;
324der_type_encoder_f CN_IntegerMinLow_encode_der;
325xer_type_decoder_f CN_IntegerMinLow_decode_xer;
326xer_type_encoder_f CN_IntegerMinLow_encode_xer;
327per_type_decoder_f CN_IntegerMinLow_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000328per_type_encoder_f CN_IntegerMinLow_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000329
330/*** <<< CODE [CN-IntegerMinLow] >>> ***/
331
332int
333CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000334 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000335 long value;
336
337 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000338 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000339 "%s: value not given (%s:%d)",
340 td->name, __FILE__, __LINE__);
341 return -1;
342 }
343
Lev Walkin2a744a72013-03-27 01:56:23 -0700344 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000345
346 if((value <= 1)) {
347 /* Constraint check succeeded */
348 return 0;
349 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000350 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000351 "%s: constraint failed (%s:%d)",
352 td->name, __FILE__, __LINE__);
353 return -1;
354 }
355}
356
357/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700358 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000359 * so here we adjust the DEF accordingly.
360 */
361static void
362CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700363 td->free_struct = asn_DEF_NativeInteger.free_struct;
364 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800365 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700366 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
367 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
368 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
369 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
370 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
371 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000372 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700373 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
374 td->elements = asn_DEF_NativeInteger.elements;
375 td->elements_count = asn_DEF_NativeInteger.elements_count;
376 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000377}
378
379void
380CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
381 void *struct_ptr, int contents_only) {
382 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
383 td->free_struct(td, struct_ptr, contents_only);
384}
385
386int
387CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
388 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
389 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
390 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
391}
392
393asn_dec_rval_t
394CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
395 void **structure, const void *bufptr, size_t size, int tag_mode) {
396 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
397 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
398}
399
400asn_enc_rval_t
401CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
402 void *structure, int tag_mode, ber_tlv_tag_t tag,
403 asn_app_consume_bytes_f *cb, void *app_key) {
404 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
405 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
406}
407
408asn_dec_rval_t
409CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
410 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
411 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
412 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
413}
414
415asn_enc_rval_t
416CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
417 int ilevel, enum xer_encoder_flags_e flags,
418 asn_app_consume_bytes_f *cb, void *app_key) {
419 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
420 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
421}
422
423asn_dec_rval_t
424CN_IntegerMinLow_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
425 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
426 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
427 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
428}
429
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000430asn_enc_rval_t
431CN_IntegerMinLow_encode_uper(asn_TYPE_descriptor_t *td,
432 asn_per_constraints_t *constraints,
433 void *structure, asn_per_outp_t *per_out) {
434 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
435 return td->uper_encoder(td, constraints, structure, per_out);
436}
437
Lev Walkin59b176e2005-11-26 11:25:14 +0000438
Lev Walkin725883b2006-10-09 12:07:58 +0000439/*** <<< CTDEFS [CN-IntegerMinLow] >>> ***/
440
Lev Walkin2fce55d2013-03-28 05:00:39 -0700441static asn_per_constraints_t asn_PER_type_CN_IntegerMinLow_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000442 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..1) */,
443 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
444 0, 0 /* No PER value map */
445};
446
Lev Walkin59b176e2005-11-26 11:25:14 +0000447/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
448
Lev Walkina7591b52014-10-12 18:37:35 -0700449static const ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000450 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
451};
Lev Walkin59b176e2005-11-26 11:25:14 +0000452asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
453 "CN-IntegerMinLow",
454 "CN-IntegerMinLow",
455 CN_IntegerMinLow_free,
456 CN_IntegerMinLow_print,
457 CN_IntegerMinLow_constraint,
458 CN_IntegerMinLow_decode_ber,
459 CN_IntegerMinLow_encode_der,
460 CN_IntegerMinLow_decode_xer,
461 CN_IntegerMinLow_encode_xer,
462 CN_IntegerMinLow_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000463 CN_IntegerMinLow_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000464 0, /* Use generic outmost tag fetcher */
465 asn_DEF_CN_IntegerMinLow_tags_1,
466 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
467 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
468 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
469 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
470 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000471 &asn_PER_type_CN_IntegerMinLow_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000472 0, 0, /* No members */
473 0 /* No specifics */
474};
475
476
477/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
478
479#include <INTEGER.h>
480
481/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
482
483typedef INTEGER_t NO_IntegerMinHigh_t;
484
485/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
486
487extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
488asn_struct_free_f NO_IntegerMinHigh_free;
489asn_struct_print_f NO_IntegerMinHigh_print;
490asn_constr_check_f NO_IntegerMinHigh_constraint;
491ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
492der_type_encoder_f NO_IntegerMinHigh_encode_der;
493xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
494xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
495per_type_decoder_f NO_IntegerMinHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000496per_type_encoder_f NO_IntegerMinHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000497
498/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
499
500int
501NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000502 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000503 const INTEGER_t *st = (const INTEGER_t *)sptr;
504 long value;
505
506 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000507 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000508 "%s: value not given (%s:%d)",
509 td->name, __FILE__, __LINE__);
510 return -1;
511 }
512
513 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000514 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000515 "%s: value too large (%s:%d)",
516 td->name, __FILE__, __LINE__);
517 return -1;
518 }
519
520 if((value <= 3000000000)) {
521 /* Constraint check succeeded */
522 return 0;
523 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000524 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000525 "%s: constraint failed (%s:%d)",
526 td->name, __FILE__, __LINE__);
527 return -1;
528 }
529}
530
531/*
532 * This type is implemented using INTEGER,
533 * so here we adjust the DEF accordingly.
534 */
535static void
536NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
537 td->free_struct = asn_DEF_INTEGER.free_struct;
538 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800539 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +0000540 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
541 td->der_encoder = asn_DEF_INTEGER.der_encoder;
542 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
543 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
544 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000545 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000546 if(!td->per_constraints)
547 td->per_constraints = asn_DEF_INTEGER.per_constraints;
548 td->elements = asn_DEF_INTEGER.elements;
549 td->elements_count = asn_DEF_INTEGER.elements_count;
550 td->specifics = asn_DEF_INTEGER.specifics;
551}
552
553void
554NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
555 void *struct_ptr, int contents_only) {
556 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
557 td->free_struct(td, struct_ptr, contents_only);
558}
559
560int
561NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
562 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
563 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
564 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
565}
566
567asn_dec_rval_t
568NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
569 void **structure, const void *bufptr, size_t size, int tag_mode) {
570 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
571 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
572}
573
574asn_enc_rval_t
575NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
576 void *structure, int tag_mode, ber_tlv_tag_t tag,
577 asn_app_consume_bytes_f *cb, void *app_key) {
578 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
579 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
580}
581
582asn_dec_rval_t
583NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
584 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
585 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
586 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
587}
588
589asn_enc_rval_t
590NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
591 int ilevel, enum xer_encoder_flags_e flags,
592 asn_app_consume_bytes_f *cb, void *app_key) {
593 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
594 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
595}
596
597asn_dec_rval_t
598NO_IntegerMinHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
599 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
600 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
601 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
602}
603
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000604asn_enc_rval_t
605NO_IntegerMinHigh_encode_uper(asn_TYPE_descriptor_t *td,
606 asn_per_constraints_t *constraints,
607 void *structure, asn_per_outp_t *per_out) {
608 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
609 return td->uper_encoder(td, constraints, structure, per_out);
610}
611
Lev Walkin59b176e2005-11-26 11:25:14 +0000612
Lev Walkin725883b2006-10-09 12:07:58 +0000613/*** <<< CTDEFS [NO-IntegerMinHigh] >>> ***/
614
Lev Walkin2fce55d2013-03-28 05:00:39 -0700615static asn_per_constraints_t asn_PER_type_NO_IntegerMinHigh_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000616 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..3000000000) */,
617 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
618 0, 0 /* No PER value map */
619};
620
Lev Walkin59b176e2005-11-26 11:25:14 +0000621/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
622
Lev Walkina7591b52014-10-12 18:37:35 -0700623static const ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000624 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
625};
Lev Walkin59b176e2005-11-26 11:25:14 +0000626asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
627 "NO-IntegerMinHigh",
628 "NO-IntegerMinHigh",
629 NO_IntegerMinHigh_free,
630 NO_IntegerMinHigh_print,
631 NO_IntegerMinHigh_constraint,
632 NO_IntegerMinHigh_decode_ber,
633 NO_IntegerMinHigh_encode_der,
634 NO_IntegerMinHigh_decode_xer,
635 NO_IntegerMinHigh_encode_xer,
636 NO_IntegerMinHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000637 NO_IntegerMinHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000638 0, /* Use generic outmost tag fetcher */
639 asn_DEF_NO_IntegerMinHigh_tags_1,
640 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
641 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
642 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
643 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
644 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000645 &asn_PER_type_NO_IntegerMinHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000646 0, 0, /* No members */
647 0 /* No specifics */
648};
649
650
651/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
652
Lev Walkin8bb57a22007-12-03 13:41:36 +0000653#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000654
655/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
656
Lev Walkin8bb57a22007-12-03 13:41:36 +0000657typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000658
659/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
660
661extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
662asn_struct_free_f NO_IntegerLowHigh_free;
663asn_struct_print_f NO_IntegerLowHigh_print;
664asn_constr_check_f NO_IntegerLowHigh_constraint;
665ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
666der_type_encoder_f NO_IntegerLowHigh_encode_der;
667xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
668xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
669per_type_decoder_f NO_IntegerLowHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000670per_type_encoder_f NO_IntegerLowHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000671
672/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
673
674int
675NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000676 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000677 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +0000678
679 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000680 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000681 "%s: value not given (%s:%d)",
682 td->name, __FILE__, __LINE__);
683 return -1;
684 }
685
Lev Walkin8bb57a22007-12-03 13:41:36 +0000686 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000687
688 if((value >= 1 && value <= 3000000000)) {
689 /* Constraint check succeeded */
690 return 0;
691 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000692 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000693 "%s: constraint failed (%s:%d)",
694 td->name, __FILE__, __LINE__);
695 return -1;
696 }
697}
698
699/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000700 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000701 * so here we adjust the DEF accordingly.
702 */
703static void
704NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000705 td->free_struct = asn_DEF_NativeInteger.free_struct;
706 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800707 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +0000708 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
709 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
710 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
711 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
712 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
713 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000714 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000715 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
716 td->elements = asn_DEF_NativeInteger.elements;
717 td->elements_count = asn_DEF_NativeInteger.elements_count;
718 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +0000719}
720
721void
722NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
723 void *struct_ptr, int contents_only) {
724 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
725 td->free_struct(td, struct_ptr, contents_only);
726}
727
728int
729NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
730 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
731 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
732 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
733}
734
735asn_dec_rval_t
736NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
737 void **structure, const void *bufptr, size_t size, int tag_mode) {
738 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
739 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
740}
741
742asn_enc_rval_t
743NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
744 void *structure, int tag_mode, ber_tlv_tag_t tag,
745 asn_app_consume_bytes_f *cb, void *app_key) {
746 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
747 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
748}
749
750asn_dec_rval_t
751NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
752 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
753 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
754 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
755}
756
757asn_enc_rval_t
758NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
759 int ilevel, enum xer_encoder_flags_e flags,
760 asn_app_consume_bytes_f *cb, void *app_key) {
761 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
762 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
763}
764
765asn_dec_rval_t
766NO_IntegerLowHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
767 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
768 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
769 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
770}
771
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000772asn_enc_rval_t
773NO_IntegerLowHigh_encode_uper(asn_TYPE_descriptor_t *td,
774 asn_per_constraints_t *constraints,
775 void *structure, asn_per_outp_t *per_out) {
776 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
777 return td->uper_encoder(td, constraints, structure, per_out);
778}
779
Lev Walkin59b176e2005-11-26 11:25:14 +0000780
Lev Walkin725883b2006-10-09 12:07:58 +0000781/*** <<< CTDEFS [NO-IntegerLowHigh] >>> ***/
782
Lev Walkin2fce55d2013-03-28 05:00:39 -0700783static asn_per_constraints_t asn_PER_type_NO_IntegerLowHigh_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000784 { APC_CONSTRAINED, 32, -1, 1, 3000000000 } /* (1..3000000000) */,
785 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
786 0, 0 /* No PER value map */
787};
788
Lev Walkin59b176e2005-11-26 11:25:14 +0000789/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
790
Lev Walkina7591b52014-10-12 18:37:35 -0700791static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000792 0, 0, 0, 0, 0,
793 0, /* Native long size */
794 1 /* Unsigned representation */
795};
Lev Walkina7591b52014-10-12 18:37:35 -0700796static const ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000797 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
798};
Lev Walkin59b176e2005-11-26 11:25:14 +0000799asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
800 "NO-IntegerLowHigh",
801 "NO-IntegerLowHigh",
802 NO_IntegerLowHigh_free,
803 NO_IntegerLowHigh_print,
804 NO_IntegerLowHigh_constraint,
805 NO_IntegerLowHigh_decode_ber,
806 NO_IntegerLowHigh_encode_der,
807 NO_IntegerLowHigh_decode_xer,
808 NO_IntegerLowHigh_encode_xer,
809 NO_IntegerLowHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000810 NO_IntegerLowHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000811 0, /* Use generic outmost tag fetcher */
812 asn_DEF_NO_IntegerLowHigh_tags_1,
813 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
814 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
815 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
816 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
817 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000818 &asn_PER_type_NO_IntegerLowHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000819 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000820 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +0000821};
822
823
824/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
825
Lev Walkin2a744a72013-03-27 01:56:23 -0700826#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000827
828/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
829
Lev Walkin2a744a72013-03-27 01:56:23 -0700830typedef long CN_IntegerLowMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000831
832/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
833
834extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
835asn_struct_free_f CN_IntegerLowMax_free;
836asn_struct_print_f CN_IntegerLowMax_print;
837asn_constr_check_f CN_IntegerLowMax_constraint;
838ber_type_decoder_f CN_IntegerLowMax_decode_ber;
839der_type_encoder_f CN_IntegerLowMax_encode_der;
840xer_type_decoder_f CN_IntegerLowMax_decode_xer;
841xer_type_encoder_f CN_IntegerLowMax_encode_xer;
842per_type_decoder_f CN_IntegerLowMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000843per_type_encoder_f CN_IntegerLowMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000844
845/*** <<< CODE [CN-IntegerLowMax] >>> ***/
846
847int
848CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000849 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000850 long value;
851
852 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000853 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000854 "%s: value not given (%s:%d)",
855 td->name, __FILE__, __LINE__);
856 return -1;
857 }
858
Lev Walkin2a744a72013-03-27 01:56:23 -0700859 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000860
861 if((value >= 1)) {
862 /* Constraint check succeeded */
863 return 0;
864 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000865 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000866 "%s: constraint failed (%s:%d)",
867 td->name, __FILE__, __LINE__);
868 return -1;
869 }
870}
871
872/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700873 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000874 * so here we adjust the DEF accordingly.
875 */
876static void
877CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700878 td->free_struct = asn_DEF_NativeInteger.free_struct;
879 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -0800880 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -0700881 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
882 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
883 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
884 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
885 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
886 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000887 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700888 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
889 td->elements = asn_DEF_NativeInteger.elements;
890 td->elements_count = asn_DEF_NativeInteger.elements_count;
891 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000892}
893
894void
895CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
896 void *struct_ptr, int contents_only) {
897 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
898 td->free_struct(td, struct_ptr, contents_only);
899}
900
901int
902CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
903 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
904 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
905 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
906}
907
908asn_dec_rval_t
909CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
910 void **structure, const void *bufptr, size_t size, int tag_mode) {
911 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
912 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
913}
914
915asn_enc_rval_t
916CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
917 void *structure, int tag_mode, ber_tlv_tag_t tag,
918 asn_app_consume_bytes_f *cb, void *app_key) {
919 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
920 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
921}
922
923asn_dec_rval_t
924CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
925 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
926 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
927 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
928}
929
930asn_enc_rval_t
931CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
932 int ilevel, enum xer_encoder_flags_e flags,
933 asn_app_consume_bytes_f *cb, void *app_key) {
934 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
935 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
936}
937
938asn_dec_rval_t
939CN_IntegerLowMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
940 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
941 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
942 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
943}
944
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000945asn_enc_rval_t
946CN_IntegerLowMax_encode_uper(asn_TYPE_descriptor_t *td,
947 asn_per_constraints_t *constraints,
948 void *structure, asn_per_outp_t *per_out) {
949 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
950 return td->uper_encoder(td, constraints, structure, per_out);
951}
952
Lev Walkin59b176e2005-11-26 11:25:14 +0000953
Lev Walkin725883b2006-10-09 12:07:58 +0000954/*** <<< CTDEFS [CN-IntegerLowMax] >>> ***/
955
Lev Walkin2fce55d2013-03-28 05:00:39 -0700956static asn_per_constraints_t asn_PER_type_CN_IntegerLowMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +0000957 { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (1..MAX) */,
958 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
959 0, 0 /* No PER value map */
960};
961
Lev Walkin59b176e2005-11-26 11:25:14 +0000962/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
963
Lev Walkina7591b52014-10-12 18:37:35 -0700964static const ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +0000965 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
966};
Lev Walkin59b176e2005-11-26 11:25:14 +0000967asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
968 "CN-IntegerLowMax",
969 "CN-IntegerLowMax",
970 CN_IntegerLowMax_free,
971 CN_IntegerLowMax_print,
972 CN_IntegerLowMax_constraint,
973 CN_IntegerLowMax_decode_ber,
974 CN_IntegerLowMax_encode_der,
975 CN_IntegerLowMax_decode_xer,
976 CN_IntegerLowMax_encode_xer,
977 CN_IntegerLowMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000978 CN_IntegerLowMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000979 0, /* Use generic outmost tag fetcher */
980 asn_DEF_CN_IntegerLowMax_tags_1,
981 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
982 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
983 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
984 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
985 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000986 &asn_PER_type_CN_IntegerLowMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000987 0, 0, /* No members */
988 0 /* No specifics */
989};
990
991
992/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
993
994#include <INTEGER.h>
995
996/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
997
998typedef INTEGER_t NO_IntegerHighMax_t;
999
1000/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
1001
1002extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
1003asn_struct_free_f NO_IntegerHighMax_free;
1004asn_struct_print_f NO_IntegerHighMax_print;
1005asn_constr_check_f NO_IntegerHighMax_constraint;
1006ber_type_decoder_f NO_IntegerHighMax_decode_ber;
1007der_type_encoder_f NO_IntegerHighMax_encode_der;
1008xer_type_decoder_f NO_IntegerHighMax_decode_xer;
1009xer_type_encoder_f NO_IntegerHighMax_encode_xer;
1010per_type_decoder_f NO_IntegerHighMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001011per_type_encoder_f NO_IntegerHighMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001012
1013/*** <<< CODE [NO-IntegerHighMax] >>> ***/
1014
1015int
1016NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001017 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001018 const INTEGER_t *st = (const INTEGER_t *)sptr;
1019 long value;
1020
1021 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001022 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001023 "%s: value not given (%s:%d)",
1024 td->name, __FILE__, __LINE__);
1025 return -1;
1026 }
1027
1028 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001029 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001030 "%s: value too large (%s:%d)",
1031 td->name, __FILE__, __LINE__);
1032 return -1;
1033 }
1034
1035 if((value >= 3000000000)) {
1036 /* Constraint check succeeded */
1037 return 0;
1038 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001039 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001040 "%s: constraint failed (%s:%d)",
1041 td->name, __FILE__, __LINE__);
1042 return -1;
1043 }
1044}
1045
1046/*
1047 * This type is implemented using INTEGER,
1048 * so here we adjust the DEF accordingly.
1049 */
1050static void
1051NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1052 td->free_struct = asn_DEF_INTEGER.free_struct;
1053 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001054 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001055 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1056 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1057 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1058 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1059 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001060 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001061 if(!td->per_constraints)
1062 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1063 td->elements = asn_DEF_INTEGER.elements;
1064 td->elements_count = asn_DEF_INTEGER.elements_count;
1065 td->specifics = asn_DEF_INTEGER.specifics;
1066}
1067
1068void
1069NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
1070 void *struct_ptr, int contents_only) {
1071 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1072 td->free_struct(td, struct_ptr, contents_only);
1073}
1074
1075int
1076NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1077 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1078 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1079 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1080}
1081
1082asn_dec_rval_t
1083NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1084 void **structure, const void *bufptr, size_t size, int tag_mode) {
1085 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1086 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1087}
1088
1089asn_enc_rval_t
1090NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
1091 void *structure, int tag_mode, ber_tlv_tag_t tag,
1092 asn_app_consume_bytes_f *cb, void *app_key) {
1093 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1094 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1095}
1096
1097asn_dec_rval_t
1098NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1099 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1100 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1101 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1102}
1103
1104asn_enc_rval_t
1105NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1106 int ilevel, enum xer_encoder_flags_e flags,
1107 asn_app_consume_bytes_f *cb, void *app_key) {
1108 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1109 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1110}
1111
1112asn_dec_rval_t
1113NO_IntegerHighMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1114 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1115 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1116 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1117}
1118
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001119asn_enc_rval_t
1120NO_IntegerHighMax_encode_uper(asn_TYPE_descriptor_t *td,
1121 asn_per_constraints_t *constraints,
1122 void *structure, asn_per_outp_t *per_out) {
1123 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1124 return td->uper_encoder(td, constraints, structure, per_out);
1125}
1126
Lev Walkin59b176e2005-11-26 11:25:14 +00001127
Lev Walkin725883b2006-10-09 12:07:58 +00001128/*** <<< CTDEFS [NO-IntegerHighMax] >>> ***/
1129
Lev Walkin2fce55d2013-03-28 05:00:39 -07001130static asn_per_constraints_t asn_PER_type_NO_IntegerHighMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001131 { APC_SEMI_CONSTRAINED, -1, -1, 3000000000, 0 } /* (3000000000..MAX) */,
1132 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1133 0, 0 /* No PER value map */
1134};
1135
Lev Walkin59b176e2005-11-26 11:25:14 +00001136/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
1137
Lev Walkina7591b52014-10-12 18:37:35 -07001138static const ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001139 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1140};
Lev Walkin59b176e2005-11-26 11:25:14 +00001141asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
1142 "NO-IntegerHighMax",
1143 "NO-IntegerHighMax",
1144 NO_IntegerHighMax_free,
1145 NO_IntegerHighMax_print,
1146 NO_IntegerHighMax_constraint,
1147 NO_IntegerHighMax_decode_ber,
1148 NO_IntegerHighMax_encode_der,
1149 NO_IntegerHighMax_decode_xer,
1150 NO_IntegerHighMax_encode_xer,
1151 NO_IntegerHighMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001152 NO_IntegerHighMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001153 0, /* Use generic outmost tag fetcher */
1154 asn_DEF_NO_IntegerHighMax_tags_1,
1155 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1156 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
1157 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
1158 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1159 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001160 &asn_PER_type_NO_IntegerHighMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001161 0, 0, /* No members */
1162 0 /* No specifics */
1163};
1164
1165
1166/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
1167
1168#include <INTEGER.h>
1169
1170/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
1171
1172typedef INTEGER_t NO_IntegerLowestMax_t;
1173
1174/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1175
1176extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1177asn_struct_free_f NO_IntegerLowestMax_free;
1178asn_struct_print_f NO_IntegerLowestMax_print;
1179asn_constr_check_f NO_IntegerLowestMax_constraint;
1180ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1181der_type_encoder_f NO_IntegerLowestMax_encode_der;
1182xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1183xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1184per_type_decoder_f NO_IntegerLowestMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001185per_type_encoder_f NO_IntegerLowestMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001186
1187/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1188
1189int
1190NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001191 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001192 const INTEGER_t *st = (const INTEGER_t *)sptr;
1193 long value;
1194
1195 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001196 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001197 "%s: value not given (%s:%d)",
1198 td->name, __FILE__, __LINE__);
1199 return -1;
1200 }
1201
1202 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001203 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001204 "%s: value too large (%s:%d)",
1205 td->name, __FILE__, __LINE__);
1206 return -1;
1207 }
1208
1209 if((value >= -3000000000)) {
1210 /* Constraint check succeeded */
1211 return 0;
1212 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001213 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001214 "%s: constraint failed (%s:%d)",
1215 td->name, __FILE__, __LINE__);
1216 return -1;
1217 }
1218}
1219
1220/*
1221 * This type is implemented using INTEGER,
1222 * so here we adjust the DEF accordingly.
1223 */
1224static void
1225NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1226 td->free_struct = asn_DEF_INTEGER.free_struct;
1227 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001228 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001229 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1230 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1231 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1232 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1233 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001234 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001235 if(!td->per_constraints)
1236 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1237 td->elements = asn_DEF_INTEGER.elements;
1238 td->elements_count = asn_DEF_INTEGER.elements_count;
1239 td->specifics = asn_DEF_INTEGER.specifics;
1240}
1241
1242void
1243NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1244 void *struct_ptr, int contents_only) {
1245 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1246 td->free_struct(td, struct_ptr, contents_only);
1247}
1248
1249int
1250NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1251 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1252 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1253 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1254}
1255
1256asn_dec_rval_t
1257NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1258 void **structure, const void *bufptr, size_t size, int tag_mode) {
1259 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1260 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1261}
1262
1263asn_enc_rval_t
1264NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1265 void *structure, int tag_mode, ber_tlv_tag_t tag,
1266 asn_app_consume_bytes_f *cb, void *app_key) {
1267 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1268 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1269}
1270
1271asn_dec_rval_t
1272NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1273 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1274 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1275 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1276}
1277
1278asn_enc_rval_t
1279NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1280 int ilevel, enum xer_encoder_flags_e flags,
1281 asn_app_consume_bytes_f *cb, void *app_key) {
1282 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1283 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1284}
1285
1286asn_dec_rval_t
1287NO_IntegerLowestMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1288 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1289 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1290 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1291}
1292
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001293asn_enc_rval_t
1294NO_IntegerLowestMax_encode_uper(asn_TYPE_descriptor_t *td,
1295 asn_per_constraints_t *constraints,
1296 void *structure, asn_per_outp_t *per_out) {
1297 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1298 return td->uper_encoder(td, constraints, structure, per_out);
1299}
1300
Lev Walkin59b176e2005-11-26 11:25:14 +00001301
Lev Walkin725883b2006-10-09 12:07:58 +00001302/*** <<< CTDEFS [NO-IntegerLowestMax] >>> ***/
1303
Lev Walkin2fce55d2013-03-28 05:00:39 -07001304static asn_per_constraints_t asn_PER_type_NO_IntegerLowestMax_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001305 { APC_SEMI_CONSTRAINED, -1, -1, -3000000000, 0 } /* (-3000000000..MAX) */,
1306 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1307 0, 0 /* No PER value map */
1308};
1309
Lev Walkin59b176e2005-11-26 11:25:14 +00001310/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1311
Lev Walkina7591b52014-10-12 18:37:35 -07001312static const ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001313 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1314};
Lev Walkin59b176e2005-11-26 11:25:14 +00001315asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1316 "NO-IntegerLowestMax",
1317 "NO-IntegerLowestMax",
1318 NO_IntegerLowestMax_free,
1319 NO_IntegerLowestMax_print,
1320 NO_IntegerLowestMax_constraint,
1321 NO_IntegerLowestMax_decode_ber,
1322 NO_IntegerLowestMax_encode_der,
1323 NO_IntegerLowestMax_decode_xer,
1324 NO_IntegerLowestMax_encode_xer,
1325 NO_IntegerLowestMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001326 NO_IntegerLowestMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001327 0, /* Use generic outmost tag fetcher */
1328 asn_DEF_NO_IntegerLowestMax_tags_1,
1329 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1330 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1331 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1332 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1333 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001334 &asn_PER_type_NO_IntegerLowestMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001335 0, 0, /* No members */
1336 0 /* No specifics */
1337};
1338
1339
1340/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1341
Lev Walkin8bb57a22007-12-03 13:41:36 +00001342#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001343
1344/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1345
Lev Walkin8bb57a22007-12-03 13:41:36 +00001346typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001347
1348/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1349
1350extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1351asn_struct_free_f NO_IntegerOutRange_free;
1352asn_struct_print_f NO_IntegerOutRange_print;
1353asn_constr_check_f NO_IntegerOutRange_constraint;
1354ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1355der_type_encoder_f NO_IntegerOutRange_encode_der;
1356xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1357xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1358per_type_decoder_f NO_IntegerOutRange_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001359per_type_encoder_f NO_IntegerOutRange_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001360
1361/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1362
1363int
1364NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001365 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001366 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001367
1368 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001369 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001370 "%s: value not given (%s:%d)",
1371 td->name, __FILE__, __LINE__);
1372 return -1;
1373 }
1374
Lev Walkin8bb57a22007-12-03 13:41:36 +00001375 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001376
1377 if((value >= 3000000000 && value <= 3000000001)) {
1378 /* Constraint check succeeded */
1379 return 0;
1380 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001381 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001382 "%s: constraint failed (%s:%d)",
1383 td->name, __FILE__, __LINE__);
1384 return -1;
1385 }
1386}
1387
1388/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001389 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001390 * so here we adjust the DEF accordingly.
1391 */
1392static void
1393NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001394 td->free_struct = asn_DEF_NativeInteger.free_struct;
1395 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001396 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001397 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1398 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1399 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1400 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1401 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1402 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001403 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001404 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1405 td->elements = asn_DEF_NativeInteger.elements;
1406 td->elements_count = asn_DEF_NativeInteger.elements_count;
1407 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001408}
1409
1410void
1411NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1412 void *struct_ptr, int contents_only) {
1413 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1414 td->free_struct(td, struct_ptr, contents_only);
1415}
1416
1417int
1418NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1419 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1420 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1421 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1422}
1423
1424asn_dec_rval_t
1425NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1426 void **structure, const void *bufptr, size_t size, int tag_mode) {
1427 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1428 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1429}
1430
1431asn_enc_rval_t
1432NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1433 void *structure, int tag_mode, ber_tlv_tag_t tag,
1434 asn_app_consume_bytes_f *cb, void *app_key) {
1435 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1436 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1437}
1438
1439asn_dec_rval_t
1440NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1441 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1442 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1443 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1444}
1445
1446asn_enc_rval_t
1447NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1448 int ilevel, enum xer_encoder_flags_e flags,
1449 asn_app_consume_bytes_f *cb, void *app_key) {
1450 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1451 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1452}
1453
1454asn_dec_rval_t
1455NO_IntegerOutRange_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1456 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1457 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1458 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1459}
1460
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001461asn_enc_rval_t
1462NO_IntegerOutRange_encode_uper(asn_TYPE_descriptor_t *td,
1463 asn_per_constraints_t *constraints,
1464 void *structure, asn_per_outp_t *per_out) {
1465 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1466 return td->uper_encoder(td, constraints, structure, per_out);
1467}
1468
Lev Walkin59b176e2005-11-26 11:25:14 +00001469
Lev Walkin725883b2006-10-09 12:07:58 +00001470/*** <<< CTDEFS [NO-IntegerOutRange] >>> ***/
1471
Lev Walkin2fce55d2013-03-28 05:00:39 -07001472static asn_per_constraints_t asn_PER_type_NO_IntegerOutRange_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001473 { APC_CONSTRAINED, 1, -1, 3000000000, 3000000001 } /* (3000000000..3000000001) */,
1474 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1475 0, 0 /* No PER value map */
1476};
1477
Lev Walkin59b176e2005-11-26 11:25:14 +00001478/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1479
Lev Walkina7591b52014-10-12 18:37:35 -07001480static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001481 0, 0, 0, 0, 0,
1482 0, /* Native long size */
1483 1 /* Unsigned representation */
1484};
Lev Walkina7591b52014-10-12 18:37:35 -07001485static const ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001486 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1487};
Lev Walkin59b176e2005-11-26 11:25:14 +00001488asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1489 "NO-IntegerOutRange",
1490 "NO-IntegerOutRange",
1491 NO_IntegerOutRange_free,
1492 NO_IntegerOutRange_print,
1493 NO_IntegerOutRange_constraint,
1494 NO_IntegerOutRange_decode_ber,
1495 NO_IntegerOutRange_encode_der,
1496 NO_IntegerOutRange_decode_xer,
1497 NO_IntegerOutRange_encode_xer,
1498 NO_IntegerOutRange_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001499 NO_IntegerOutRange_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001500 0, /* Use generic outmost tag fetcher */
1501 asn_DEF_NO_IntegerOutRange_tags_1,
1502 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1503 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1504 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1505 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1506 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001507 &asn_PER_type_NO_IntegerOutRange_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001508 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001509 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001510};
1511
1512
1513/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1514
Lev Walkin8bb57a22007-12-03 13:41:36 +00001515#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001516
1517/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1518
Lev Walkin8bb57a22007-12-03 13:41:36 +00001519typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001520
1521/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1522
1523extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1524asn_struct_free_f NO_IntegerOutValue_free;
1525asn_struct_print_f NO_IntegerOutValue_print;
1526asn_constr_check_f NO_IntegerOutValue_constraint;
1527ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1528der_type_encoder_f NO_IntegerOutValue_encode_der;
1529xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1530xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1531per_type_decoder_f NO_IntegerOutValue_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001532per_type_encoder_f NO_IntegerOutValue_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001533
1534/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1535
1536int
1537NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001538 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001539 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001540
1541 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001542 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001543 "%s: value not given (%s:%d)",
1544 td->name, __FILE__, __LINE__);
1545 return -1;
1546 }
1547
Lev Walkin8bb57a22007-12-03 13:41:36 +00001548 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001549
1550 if((value == 3000000000)) {
1551 /* Constraint check succeeded */
1552 return 0;
1553 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001554 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001555 "%s: constraint failed (%s:%d)",
1556 td->name, __FILE__, __LINE__);
1557 return -1;
1558 }
1559}
1560
1561/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001562 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001563 * so here we adjust the DEF accordingly.
1564 */
1565static void
1566NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001567 td->free_struct = asn_DEF_NativeInteger.free_struct;
1568 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001569 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00001570 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1571 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1572 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1573 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1574 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1575 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001576 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001577 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1578 td->elements = asn_DEF_NativeInteger.elements;
1579 td->elements_count = asn_DEF_NativeInteger.elements_count;
1580 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001581}
1582
1583void
1584NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1585 void *struct_ptr, int contents_only) {
1586 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1587 td->free_struct(td, struct_ptr, contents_only);
1588}
1589
1590int
1591NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1592 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1593 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1594 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1595}
1596
1597asn_dec_rval_t
1598NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1599 void **structure, const void *bufptr, size_t size, int tag_mode) {
1600 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1601 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1602}
1603
1604asn_enc_rval_t
1605NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1606 void *structure, int tag_mode, ber_tlv_tag_t tag,
1607 asn_app_consume_bytes_f *cb, void *app_key) {
1608 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1609 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1610}
1611
1612asn_dec_rval_t
1613NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1614 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1615 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1616 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1617}
1618
1619asn_enc_rval_t
1620NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1621 int ilevel, enum xer_encoder_flags_e flags,
1622 asn_app_consume_bytes_f *cb, void *app_key) {
1623 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1624 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1625}
1626
1627asn_dec_rval_t
1628NO_IntegerOutValue_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1629 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1630 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1631 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1632}
1633
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001634asn_enc_rval_t
1635NO_IntegerOutValue_encode_uper(asn_TYPE_descriptor_t *td,
1636 asn_per_constraints_t *constraints,
1637 void *structure, asn_per_outp_t *per_out) {
1638 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1639 return td->uper_encoder(td, constraints, structure, per_out);
1640}
1641
Lev Walkin59b176e2005-11-26 11:25:14 +00001642
Lev Walkin725883b2006-10-09 12:07:58 +00001643/*** <<< CTDEFS [NO-IntegerOutValue] >>> ***/
1644
Lev Walkin2fce55d2013-03-28 05:00:39 -07001645static asn_per_constraints_t asn_PER_type_NO_IntegerOutValue_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001646 { APC_CONSTRAINED, 0, -1, 3000000000, 3000000000 } /* (3000000000..3000000000) */,
1647 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1648 0, 0 /* No PER value map */
1649};
1650
Lev Walkin59b176e2005-11-26 11:25:14 +00001651/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1652
Lev Walkina7591b52014-10-12 18:37:35 -07001653static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001654 0, 0, 0, 0, 0,
1655 0, /* Native long size */
1656 1 /* Unsigned representation */
1657};
Lev Walkina7591b52014-10-12 18:37:35 -07001658static const ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001659 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1660};
Lev Walkin59b176e2005-11-26 11:25:14 +00001661asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1662 "NO-IntegerOutValue",
1663 "NO-IntegerOutValue",
1664 NO_IntegerOutValue_free,
1665 NO_IntegerOutValue_print,
1666 NO_IntegerOutValue_constraint,
1667 NO_IntegerOutValue_decode_ber,
1668 NO_IntegerOutValue_encode_der,
1669 NO_IntegerOutValue_decode_xer,
1670 NO_IntegerOutValue_encode_xer,
1671 NO_IntegerOutValue_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001672 NO_IntegerOutValue_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001673 0, /* Use generic outmost tag fetcher */
1674 asn_DEF_NO_IntegerOutValue_tags_1,
1675 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1676 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1677 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1678 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1679 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001680 &asn_PER_type_NO_IntegerOutValue_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001681 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001682 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001683};
1684
1685
1686/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1687
1688#include <NativeInteger.h>
1689
1690/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1691
1692typedef long OK_IntegerInRange1_t;
1693
1694/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1695
1696extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1697asn_struct_free_f OK_IntegerInRange1_free;
1698asn_struct_print_f OK_IntegerInRange1_print;
1699asn_constr_check_f OK_IntegerInRange1_constraint;
1700ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1701der_type_encoder_f OK_IntegerInRange1_encode_der;
1702xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1703xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1704per_type_decoder_f OK_IntegerInRange1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001705per_type_encoder_f OK_IntegerInRange1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001706
1707/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1708
1709int
1710OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001711 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001712 long value;
1713
1714 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001715 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001716 "%s: value not given (%s:%d)",
1717 td->name, __FILE__, __LINE__);
1718 return -1;
1719 }
1720
1721 value = *(const long *)sptr;
1722
1723 if((value >= -100 && value <= 100)) {
1724 /* Constraint check succeeded */
1725 return 0;
1726 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001727 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001728 "%s: constraint failed (%s:%d)",
1729 td->name, __FILE__, __LINE__);
1730 return -1;
1731 }
1732}
1733
1734/*
1735 * This type is implemented using NativeInteger,
1736 * so here we adjust the DEF accordingly.
1737 */
1738static void
1739OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1740 td->free_struct = asn_DEF_NativeInteger.free_struct;
1741 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001742 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001743 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1744 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1745 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1746 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1747 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001748 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001749 if(!td->per_constraints)
1750 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1751 td->elements = asn_DEF_NativeInteger.elements;
1752 td->elements_count = asn_DEF_NativeInteger.elements_count;
1753 td->specifics = asn_DEF_NativeInteger.specifics;
1754}
1755
1756void
1757OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1758 void *struct_ptr, int contents_only) {
1759 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1760 td->free_struct(td, struct_ptr, contents_only);
1761}
1762
1763int
1764OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1765 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1766 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1767 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1768}
1769
1770asn_dec_rval_t
1771OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1772 void **structure, const void *bufptr, size_t size, int tag_mode) {
1773 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1774 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1775}
1776
1777asn_enc_rval_t
1778OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1779 void *structure, int tag_mode, ber_tlv_tag_t tag,
1780 asn_app_consume_bytes_f *cb, void *app_key) {
1781 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1782 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1783}
1784
1785asn_dec_rval_t
1786OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1787 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1788 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1789 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1790}
1791
1792asn_enc_rval_t
1793OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1794 int ilevel, enum xer_encoder_flags_e flags,
1795 asn_app_consume_bytes_f *cb, void *app_key) {
1796 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1797 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1798}
1799
1800asn_dec_rval_t
1801OK_IntegerInRange1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1802 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1803 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1804 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1805}
1806
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001807asn_enc_rval_t
1808OK_IntegerInRange1_encode_uper(asn_TYPE_descriptor_t *td,
1809 asn_per_constraints_t *constraints,
1810 void *structure, asn_per_outp_t *per_out) {
1811 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1812 return td->uper_encoder(td, constraints, structure, per_out);
1813}
1814
Lev Walkin59b176e2005-11-26 11:25:14 +00001815
Lev Walkin725883b2006-10-09 12:07:58 +00001816/*** <<< CTDEFS [OK-IntegerInRange1] >>> ***/
1817
Lev Walkin2fce55d2013-03-28 05:00:39 -07001818static asn_per_constraints_t asn_PER_type_OK_IntegerInRange1_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001819 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
1820 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1821 0, 0 /* No PER value map */
1822};
1823
Lev Walkin59b176e2005-11-26 11:25:14 +00001824/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1825
Lev Walkina7591b52014-10-12 18:37:35 -07001826static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001827 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1828};
Lev Walkin59b176e2005-11-26 11:25:14 +00001829asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1830 "OK-IntegerInRange1",
1831 "OK-IntegerInRange1",
1832 OK_IntegerInRange1_free,
1833 OK_IntegerInRange1_print,
1834 OK_IntegerInRange1_constraint,
1835 OK_IntegerInRange1_decode_ber,
1836 OK_IntegerInRange1_encode_der,
1837 OK_IntegerInRange1_decode_xer,
1838 OK_IntegerInRange1_encode_xer,
1839 OK_IntegerInRange1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001840 OK_IntegerInRange1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001841 0, /* Use generic outmost tag fetcher */
1842 asn_DEF_OK_IntegerInRange1_tags_1,
1843 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1844 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1845 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1846 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1847 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001848 &asn_PER_type_OK_IntegerInRange1_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001849 0, 0, /* No members */
1850 0 /* No specifics */
1851};
1852
1853
1854/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1855
1856#include <NativeInteger.h>
1857
1858/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1859
1860typedef long OK_IntegerInRange2_t;
1861
1862/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1863
1864extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1865asn_struct_free_f OK_IntegerInRange2_free;
1866asn_struct_print_f OK_IntegerInRange2_print;
1867asn_constr_check_f OK_IntegerInRange2_constraint;
1868ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1869der_type_encoder_f OK_IntegerInRange2_encode_der;
1870xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1871xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1872per_type_decoder_f OK_IntegerInRange2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001873per_type_encoder_f OK_IntegerInRange2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001874
1875/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1876
1877int
1878OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001879 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001880 long value;
1881
1882 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001883 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001884 "%s: value not given (%s:%d)",
1885 td->name, __FILE__, __LINE__);
1886 return -1;
1887 }
1888
1889 value = *(const long *)sptr;
1890
1891 if(((value == -100) || (value == 100))) {
1892 /* Constraint check succeeded */
1893 return 0;
1894 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001895 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001896 "%s: constraint failed (%s:%d)",
1897 td->name, __FILE__, __LINE__);
1898 return -1;
1899 }
1900}
1901
1902/*
1903 * This type is implemented using NativeInteger,
1904 * so here we adjust the DEF accordingly.
1905 */
1906static void
1907OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1908 td->free_struct = asn_DEF_NativeInteger.free_struct;
1909 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08001910 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00001911 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1912 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1913 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1914 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1915 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001916 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001917 if(!td->per_constraints)
1918 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1919 td->elements = asn_DEF_NativeInteger.elements;
1920 td->elements_count = asn_DEF_NativeInteger.elements_count;
1921 td->specifics = asn_DEF_NativeInteger.specifics;
1922}
1923
1924void
1925OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1926 void *struct_ptr, int contents_only) {
1927 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1928 td->free_struct(td, struct_ptr, contents_only);
1929}
1930
1931int
1932OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1933 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1934 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1935 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1936}
1937
1938asn_dec_rval_t
1939OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1940 void **structure, const void *bufptr, size_t size, int tag_mode) {
1941 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1942 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1943}
1944
1945asn_enc_rval_t
1946OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1947 void *structure, int tag_mode, ber_tlv_tag_t tag,
1948 asn_app_consume_bytes_f *cb, void *app_key) {
1949 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1950 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1951}
1952
1953asn_dec_rval_t
1954OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1955 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1956 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1957 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1958}
1959
1960asn_enc_rval_t
1961OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1962 int ilevel, enum xer_encoder_flags_e flags,
1963 asn_app_consume_bytes_f *cb, void *app_key) {
1964 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1965 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1966}
1967
1968asn_dec_rval_t
1969OK_IntegerInRange2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1970 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1971 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1972 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1973}
1974
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001975asn_enc_rval_t
1976OK_IntegerInRange2_encode_uper(asn_TYPE_descriptor_t *td,
1977 asn_per_constraints_t *constraints,
1978 void *structure, asn_per_outp_t *per_out) {
1979 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1980 return td->uper_encoder(td, constraints, structure, per_out);
1981}
1982
Lev Walkin59b176e2005-11-26 11:25:14 +00001983
Lev Walkin725883b2006-10-09 12:07:58 +00001984/*** <<< CTDEFS [OK-IntegerInRange2] >>> ***/
1985
Lev Walkin2fce55d2013-03-28 05:00:39 -07001986static asn_per_constraints_t asn_PER_type_OK_IntegerInRange2_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00001987 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
1988 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1989 0, 0 /* No PER value map */
1990};
1991
Lev Walkin59b176e2005-11-26 11:25:14 +00001992/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1993
Lev Walkina7591b52014-10-12 18:37:35 -07001994static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00001995 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1996};
Lev Walkin59b176e2005-11-26 11:25:14 +00001997asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1998 "OK-IntegerInRange2",
1999 "OK-IntegerInRange2",
2000 OK_IntegerInRange2_free,
2001 OK_IntegerInRange2_print,
2002 OK_IntegerInRange2_constraint,
2003 OK_IntegerInRange2_decode_ber,
2004 OK_IntegerInRange2_encode_der,
2005 OK_IntegerInRange2_decode_xer,
2006 OK_IntegerInRange2_encode_xer,
2007 OK_IntegerInRange2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002008 OK_IntegerInRange2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002009 0, /* Use generic outmost tag fetcher */
2010 asn_DEF_OK_IntegerInRange2_tags_1,
2011 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2012 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
2013 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
2014 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2015 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002016 &asn_PER_type_OK_IntegerInRange2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002017 0, 0, /* No members */
2018 0 /* No specifics */
2019};
2020
2021
2022/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
2023
2024#include <NativeInteger.h>
2025
2026/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
2027
2028typedef long OK_IntegerInRange3_t;
2029
2030/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
2031
2032extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
2033asn_struct_free_f OK_IntegerInRange3_free;
2034asn_struct_print_f OK_IntegerInRange3_print;
2035asn_constr_check_f OK_IntegerInRange3_constraint;
2036ber_type_decoder_f OK_IntegerInRange3_decode_ber;
2037der_type_encoder_f OK_IntegerInRange3_encode_der;
2038xer_type_decoder_f OK_IntegerInRange3_decode_xer;
2039xer_type_encoder_f OK_IntegerInRange3_encode_xer;
2040per_type_decoder_f OK_IntegerInRange3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002041per_type_encoder_f OK_IntegerInRange3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002042
2043/*** <<< CODE [OK-IntegerInRange3] >>> ***/
2044
2045int
2046OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002047 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002048 long value;
2049
2050 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002051 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002052 "%s: value not given (%s:%d)",
2053 td->name, __FILE__, __LINE__);
2054 return -1;
2055 }
2056
2057 value = *(const long *)sptr;
2058
Lev Walkin63b41262007-11-06 01:48:46 +00002059 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002060 /* Constraint check succeeded */
2061 return 0;
2062 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002063 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002064 "%s: constraint failed (%s:%d)",
2065 td->name, __FILE__, __LINE__);
2066 return -1;
2067 }
2068}
2069
2070/*
2071 * This type is implemented using NativeInteger,
2072 * so here we adjust the DEF accordingly.
2073 */
2074static void
2075OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2076 td->free_struct = asn_DEF_NativeInteger.free_struct;
2077 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002078 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002079 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2080 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2081 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2082 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2083 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002084 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002085 if(!td->per_constraints)
2086 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2087 td->elements = asn_DEF_NativeInteger.elements;
2088 td->elements_count = asn_DEF_NativeInteger.elements_count;
2089 td->specifics = asn_DEF_NativeInteger.specifics;
2090}
2091
2092void
2093OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
2094 void *struct_ptr, int contents_only) {
2095 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2096 td->free_struct(td, struct_ptr, contents_only);
2097}
2098
2099int
2100OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2101 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2102 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2103 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2104}
2105
2106asn_dec_rval_t
2107OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2108 void **structure, const void *bufptr, size_t size, int tag_mode) {
2109 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2110 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2111}
2112
2113asn_enc_rval_t
2114OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
2115 void *structure, int tag_mode, ber_tlv_tag_t tag,
2116 asn_app_consume_bytes_f *cb, void *app_key) {
2117 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2118 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2119}
2120
2121asn_dec_rval_t
2122OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2123 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2124 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2125 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2126}
2127
2128asn_enc_rval_t
2129OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2130 int ilevel, enum xer_encoder_flags_e flags,
2131 asn_app_consume_bytes_f *cb, void *app_key) {
2132 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2133 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2134}
2135
2136asn_dec_rval_t
2137OK_IntegerInRange3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2138 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2139 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2140 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2141}
2142
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002143asn_enc_rval_t
2144OK_IntegerInRange3_encode_uper(asn_TYPE_descriptor_t *td,
2145 asn_per_constraints_t *constraints,
2146 void *structure, asn_per_outp_t *per_out) {
2147 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2148 return td->uper_encoder(td, constraints, structure, per_out);
2149}
2150
Lev Walkin59b176e2005-11-26 11:25:14 +00002151
Lev Walkin725883b2006-10-09 12:07:58 +00002152/*** <<< CTDEFS [OK-IntegerInRange3] >>> ***/
2153
Lev Walkin2fce55d2013-03-28 05:00:39 -07002154static asn_per_constraints_t asn_PER_type_OK_IntegerInRange3_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002155 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002156 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2157 0, 0 /* No PER value map */
2158};
2159
Lev Walkin59b176e2005-11-26 11:25:14 +00002160/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
2161
Lev Walkina7591b52014-10-12 18:37:35 -07002162static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002163 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2164};
Lev Walkin59b176e2005-11-26 11:25:14 +00002165asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
2166 "OK-IntegerInRange3",
2167 "OK-IntegerInRange3",
2168 OK_IntegerInRange3_free,
2169 OK_IntegerInRange3_print,
2170 OK_IntegerInRange3_constraint,
2171 OK_IntegerInRange3_decode_ber,
2172 OK_IntegerInRange3_encode_der,
2173 OK_IntegerInRange3_decode_xer,
2174 OK_IntegerInRange3_encode_xer,
2175 OK_IntegerInRange3_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002176 OK_IntegerInRange3_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002177 0, /* Use generic outmost tag fetcher */
2178 asn_DEF_OK_IntegerInRange3_tags_1,
2179 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2180 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
2181 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
2182 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2183 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002184 &asn_PER_type_OK_IntegerInRange3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002185 0, 0, /* No members */
2186 0 /* No specifics */
2187};
2188
2189
2190/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
2191
2192#include <NativeInteger.h>
2193
2194/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
2195
2196typedef long OK_IntegerInRange4_t;
2197
2198/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
2199
2200extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
2201asn_struct_free_f OK_IntegerInRange4_free;
2202asn_struct_print_f OK_IntegerInRange4_print;
2203asn_constr_check_f OK_IntegerInRange4_constraint;
2204ber_type_decoder_f OK_IntegerInRange4_decode_ber;
2205der_type_encoder_f OK_IntegerInRange4_encode_der;
2206xer_type_decoder_f OK_IntegerInRange4_decode_xer;
2207xer_type_encoder_f OK_IntegerInRange4_encode_xer;
2208per_type_decoder_f OK_IntegerInRange4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002209per_type_encoder_f OK_IntegerInRange4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002210
2211/*** <<< CODE [OK-IntegerInRange4] >>> ***/
2212
2213int
2214OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002215 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002216 long value;
2217
2218 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002219 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002220 "%s: value not given (%s:%d)",
2221 td->name, __FILE__, __LINE__);
2222 return -1;
2223 }
2224
2225 value = *(const long *)sptr;
2226
Lev Walkin63b41262007-11-06 01:48:46 +00002227 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002228 /* Constraint check succeeded */
2229 return 0;
2230 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002231 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002232 "%s: constraint failed (%s:%d)",
2233 td->name, __FILE__, __LINE__);
2234 return -1;
2235 }
2236}
2237
2238/*
2239 * This type is implemented using NativeInteger,
2240 * so here we adjust the DEF accordingly.
2241 */
2242static void
2243OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2244 td->free_struct = asn_DEF_NativeInteger.free_struct;
2245 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002246 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002247 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2248 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2249 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2250 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2251 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002252 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002253 if(!td->per_constraints)
2254 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2255 td->elements = asn_DEF_NativeInteger.elements;
2256 td->elements_count = asn_DEF_NativeInteger.elements_count;
2257 td->specifics = asn_DEF_NativeInteger.specifics;
2258}
2259
2260void
2261OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
2262 void *struct_ptr, int contents_only) {
2263 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2264 td->free_struct(td, struct_ptr, contents_only);
2265}
2266
2267int
2268OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2269 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2270 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2271 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2272}
2273
2274asn_dec_rval_t
2275OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2276 void **structure, const void *bufptr, size_t size, int tag_mode) {
2277 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2278 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2279}
2280
2281asn_enc_rval_t
2282OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
2283 void *structure, int tag_mode, ber_tlv_tag_t tag,
2284 asn_app_consume_bytes_f *cb, void *app_key) {
2285 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2286 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2287}
2288
2289asn_dec_rval_t
2290OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2291 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2292 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2293 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2294}
2295
2296asn_enc_rval_t
2297OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2298 int ilevel, enum xer_encoder_flags_e flags,
2299 asn_app_consume_bytes_f *cb, void *app_key) {
2300 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2301 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2302}
2303
2304asn_dec_rval_t
2305OK_IntegerInRange4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2306 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2307 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2308 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2309}
2310
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002311asn_enc_rval_t
2312OK_IntegerInRange4_encode_uper(asn_TYPE_descriptor_t *td,
2313 asn_per_constraints_t *constraints,
2314 void *structure, asn_per_outp_t *per_out) {
2315 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2316 return td->uper_encoder(td, constraints, structure, per_out);
2317}
2318
Lev Walkin59b176e2005-11-26 11:25:14 +00002319
Lev Walkin725883b2006-10-09 12:07:58 +00002320/*** <<< CTDEFS [OK-IntegerInRange4] >>> ***/
2321
Lev Walkin2fce55d2013-03-28 05:00:39 -07002322static asn_per_constraints_t asn_PER_type_OK_IntegerInRange4_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002323 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002324 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2325 0, 0 /* No PER value map */
2326};
2327
Lev Walkin59b176e2005-11-26 11:25:14 +00002328/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
2329
Lev Walkina7591b52014-10-12 18:37:35 -07002330static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002331 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2332};
Lev Walkin59b176e2005-11-26 11:25:14 +00002333asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
2334 "OK-IntegerInRange4",
2335 "OK-IntegerInRange4",
2336 OK_IntegerInRange4_free,
2337 OK_IntegerInRange4_print,
2338 OK_IntegerInRange4_constraint,
2339 OK_IntegerInRange4_decode_ber,
2340 OK_IntegerInRange4_encode_der,
2341 OK_IntegerInRange4_decode_xer,
2342 OK_IntegerInRange4_encode_xer,
2343 OK_IntegerInRange4_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002344 OK_IntegerInRange4_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002345 0, /* Use generic outmost tag fetcher */
2346 asn_DEF_OK_IntegerInRange4_tags_1,
2347 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2348 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2349 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
2350 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2351 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002352 &asn_PER_type_OK_IntegerInRange4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002353 0, 0, /* No members */
2354 0 /* No specifics */
2355};
2356
2357
2358/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2359
Lev Walkin2a744a72013-03-27 01:56:23 -07002360#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002361
2362/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2363
Lev Walkin2a744a72013-03-27 01:56:23 -07002364typedef long OK_IntegerInRange5_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002365
2366/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2367
2368extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2369asn_struct_free_f OK_IntegerInRange5_free;
2370asn_struct_print_f OK_IntegerInRange5_print;
2371asn_constr_check_f OK_IntegerInRange5_constraint;
2372ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2373der_type_encoder_f OK_IntegerInRange5_encode_der;
2374xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2375xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2376per_type_decoder_f OK_IntegerInRange5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002377per_type_encoder_f OK_IntegerInRange5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002378
2379/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2380
2381int
2382OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002383 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002384 long value;
2385
2386 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002387 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002388 "%s: value not given (%s:%d)",
2389 td->name, __FILE__, __LINE__);
2390 return -1;
2391 }
2392
Lev Walkin2a744a72013-03-27 01:56:23 -07002393 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002394
Lev Walkin63b41262007-11-06 01:48:46 +00002395 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002396 /* Constraint check succeeded */
2397 return 0;
2398 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002399 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002400 "%s: constraint failed (%s:%d)",
2401 td->name, __FILE__, __LINE__);
2402 return -1;
2403 }
2404}
2405
2406/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002407 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002408 * so here we adjust the DEF accordingly.
2409 */
2410static void
2411OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002412 td->free_struct = asn_DEF_NativeInteger.free_struct;
2413 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002414 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002415 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2416 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2417 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2418 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2419 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2420 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002421 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002422 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2423 td->elements = asn_DEF_NativeInteger.elements;
2424 td->elements_count = asn_DEF_NativeInteger.elements_count;
2425 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002426}
2427
2428void
2429OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2430 void *struct_ptr, int contents_only) {
2431 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2432 td->free_struct(td, struct_ptr, contents_only);
2433}
2434
2435int
2436OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2437 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2438 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2439 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2440}
2441
2442asn_dec_rval_t
2443OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2444 void **structure, const void *bufptr, size_t size, int tag_mode) {
2445 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2446 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2447}
2448
2449asn_enc_rval_t
2450OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2451 void *structure, int tag_mode, ber_tlv_tag_t tag,
2452 asn_app_consume_bytes_f *cb, void *app_key) {
2453 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2454 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2455}
2456
2457asn_dec_rval_t
2458OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2459 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2460 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2461 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2462}
2463
2464asn_enc_rval_t
2465OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2466 int ilevel, enum xer_encoder_flags_e flags,
2467 asn_app_consume_bytes_f *cb, void *app_key) {
2468 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2469 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2470}
2471
2472asn_dec_rval_t
2473OK_IntegerInRange5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2474 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2475 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2476 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2477}
2478
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002479asn_enc_rval_t
2480OK_IntegerInRange5_encode_uper(asn_TYPE_descriptor_t *td,
2481 asn_per_constraints_t *constraints,
2482 void *structure, asn_per_outp_t *per_out) {
2483 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2484 return td->uper_encoder(td, constraints, structure, per_out);
2485}
2486
Lev Walkin59b176e2005-11-26 11:25:14 +00002487
Lev Walkin725883b2006-10-09 12:07:58 +00002488/*** <<< CTDEFS [OK-IntegerInRange5] >>> ***/
2489
Lev Walkin2fce55d2013-03-28 05:00:39 -07002490static asn_per_constraints_t asn_PER_type_OK_IntegerInRange5_constr_1 GCC_NOTUSED = {
Lev Walkin63b41262007-11-06 01:48:46 +00002491 { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002492 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2493 0, 0 /* No PER value map */
2494};
2495
Lev Walkin59b176e2005-11-26 11:25:14 +00002496/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2497
Lev Walkina7591b52014-10-12 18:37:35 -07002498static const ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002499 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2500};
Lev Walkin59b176e2005-11-26 11:25:14 +00002501asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2502 "OK-IntegerInRange5",
2503 "OK-IntegerInRange5",
2504 OK_IntegerInRange5_free,
2505 OK_IntegerInRange5_print,
2506 OK_IntegerInRange5_constraint,
2507 OK_IntegerInRange5_decode_ber,
2508 OK_IntegerInRange5_encode_der,
2509 OK_IntegerInRange5_decode_xer,
2510 OK_IntegerInRange5_encode_xer,
2511 OK_IntegerInRange5_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002512 OK_IntegerInRange5_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002513 0, /* Use generic outmost tag fetcher */
2514 asn_DEF_OK_IntegerInRange5_tags_1,
2515 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2516 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2517 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2518 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2519 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002520 &asn_PER_type_OK_IntegerInRange5_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002521 0, 0, /* No members */
2522 0 /* No specifics */
2523};
2524
2525
2526/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2527
Lev Walkin8bb57a22007-12-03 13:41:36 +00002528#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002529
2530/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2531
Lev Walkin8bb57a22007-12-03 13:41:36 +00002532typedef unsigned long NO_IntegerInRange6_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002533
2534/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2535
2536extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2537asn_struct_free_f NO_IntegerInRange6_free;
2538asn_struct_print_f NO_IntegerInRange6_print;
2539asn_constr_check_f NO_IntegerInRange6_constraint;
2540ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2541der_type_encoder_f NO_IntegerInRange6_encode_der;
2542xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2543xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2544per_type_decoder_f NO_IntegerInRange6_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002545per_type_encoder_f NO_IntegerInRange6_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002546
2547/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2548
2549int
2550NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002551 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002552
2553 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002554 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002555 "%s: value not given (%s:%d)",
2556 td->name, __FILE__, __LINE__);
2557 return -1;
2558 }
2559
Lev Walkin59b176e2005-11-26 11:25:14 +00002560
Lev Walkin8bb57a22007-12-03 13:41:36 +00002561 /* Constraint check succeeded */
2562 return 0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002563}
2564
2565/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002566 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002567 * so here we adjust the DEF accordingly.
2568 */
2569static void
2570NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002571 td->free_struct = asn_DEF_NativeInteger.free_struct;
2572 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002573 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin8bb57a22007-12-03 13:41:36 +00002574 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2575 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2576 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2577 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2578 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2579 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002580 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002581 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2582 td->elements = asn_DEF_NativeInteger.elements;
2583 td->elements_count = asn_DEF_NativeInteger.elements_count;
2584 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00002585}
2586
2587void
2588NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2589 void *struct_ptr, int contents_only) {
2590 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2591 td->free_struct(td, struct_ptr, contents_only);
2592}
2593
2594int
2595NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2596 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2597 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2598 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2599}
2600
2601asn_dec_rval_t
2602NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2603 void **structure, const void *bufptr, size_t size, int tag_mode) {
2604 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2605 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2606}
2607
2608asn_enc_rval_t
2609NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2610 void *structure, int tag_mode, ber_tlv_tag_t tag,
2611 asn_app_consume_bytes_f *cb, void *app_key) {
2612 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2613 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2614}
2615
2616asn_dec_rval_t
2617NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2618 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2619 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2620 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2621}
2622
2623asn_enc_rval_t
2624NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2625 int ilevel, enum xer_encoder_flags_e flags,
2626 asn_app_consume_bytes_f *cb, void *app_key) {
2627 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2628 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2629}
2630
2631asn_dec_rval_t
2632NO_IntegerInRange6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2633 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2634 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2635 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2636}
2637
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002638asn_enc_rval_t
2639NO_IntegerInRange6_encode_uper(asn_TYPE_descriptor_t *td,
2640 asn_per_constraints_t *constraints,
2641 void *structure, asn_per_outp_t *per_out) {
2642 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2643 return td->uper_encoder(td, constraints, structure, per_out);
2644}
2645
Lev Walkin59b176e2005-11-26 11:25:14 +00002646
Lev Walkin725883b2006-10-09 12:07:58 +00002647/*** <<< CTDEFS [NO-IntegerInRange6] >>> ***/
2648
Lev Walkin2fce55d2013-03-28 05:00:39 -07002649static asn_per_constraints_t asn_PER_type_NO_IntegerInRange6_constr_1 GCC_NOTUSED = {
Lev Walkin725883b2006-10-09 12:07:58 +00002650 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
2651 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2652 0, 0 /* No PER value map */
2653};
2654
Lev Walkin59b176e2005-11-26 11:25:14 +00002655/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2656
Lev Walkina7591b52014-10-12 18:37:35 -07002657static const asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002658 0, 0, 0, 0, 0,
2659 0, /* Native long size */
2660 1 /* Unsigned representation */
2661};
Lev Walkina7591b52014-10-12 18:37:35 -07002662static const ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002663 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2664};
Lev Walkin59b176e2005-11-26 11:25:14 +00002665asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2666 "NO-IntegerInRange6",
2667 "NO-IntegerInRange6",
2668 NO_IntegerInRange6_free,
2669 NO_IntegerInRange6_print,
2670 NO_IntegerInRange6_constraint,
2671 NO_IntegerInRange6_decode_ber,
2672 NO_IntegerInRange6_encode_der,
2673 NO_IntegerInRange6_decode_xer,
2674 NO_IntegerInRange6_encode_xer,
2675 NO_IntegerInRange6_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002676 NO_IntegerInRange6_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002677 0, /* Use generic outmost tag fetcher */
2678 asn_DEF_NO_IntegerInRange6_tags_1,
2679 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2680 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2681 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2682 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2683 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002684 &asn_PER_type_NO_IntegerInRange6_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002685 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002686 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00002687};
2688
2689
2690/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2691
Lev Walkin2a744a72013-03-27 01:56:23 -07002692#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002693
2694/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2695
2696typedef enum CN_IntegerEnumerated1 {
2697 CN_IntegerEnumerated1_a = 1,
2698 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002699} e_CN_IntegerEnumerated1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002700
2701/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2702
Lev Walkin2a744a72013-03-27 01:56:23 -07002703typedef long CN_IntegerEnumerated1_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002704
2705/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2706
2707extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2708asn_struct_free_f CN_IntegerEnumerated1_free;
2709asn_struct_print_f CN_IntegerEnumerated1_print;
2710asn_constr_check_f CN_IntegerEnumerated1_constraint;
2711ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2712der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2713xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2714xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2715per_type_decoder_f CN_IntegerEnumerated1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002716per_type_encoder_f CN_IntegerEnumerated1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002717
2718/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2719
2720int
2721CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002722 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002723 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002724 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002725 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002726}
2727
2728/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002729 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002730 * so here we adjust the DEF accordingly.
2731 */
2732static void
2733CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002734 td->free_struct = asn_DEF_NativeInteger.free_struct;
2735 td->print_struct = asn_DEF_NativeInteger.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002736 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin2a744a72013-03-27 01:56:23 -07002737 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2738 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2739 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2740 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2741 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2742 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002743 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002744 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2745 td->elements = asn_DEF_NativeInteger.elements;
2746 td->elements_count = asn_DEF_NativeInteger.elements_count;
2747 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002748}
2749
2750void
2751CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2752 void *struct_ptr, int contents_only) {
2753 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2754 td->free_struct(td, struct_ptr, contents_only);
2755}
2756
2757int
2758CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2759 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2760 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2761 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2762}
2763
2764asn_dec_rval_t
2765CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2766 void **structure, const void *bufptr, size_t size, int tag_mode) {
2767 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2768 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2769}
2770
2771asn_enc_rval_t
2772CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2773 void *structure, int tag_mode, ber_tlv_tag_t tag,
2774 asn_app_consume_bytes_f *cb, void *app_key) {
2775 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2776 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2777}
2778
2779asn_dec_rval_t
2780CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2781 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2782 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2783 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2784}
2785
2786asn_enc_rval_t
2787CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2788 int ilevel, enum xer_encoder_flags_e flags,
2789 asn_app_consume_bytes_f *cb, void *app_key) {
2790 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2791 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2792}
2793
2794asn_dec_rval_t
2795CN_IntegerEnumerated1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2796 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2797 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2798 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2799}
2800
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002801asn_enc_rval_t
2802CN_IntegerEnumerated1_encode_uper(asn_TYPE_descriptor_t *td,
2803 asn_per_constraints_t *constraints,
2804 void *structure, asn_per_outp_t *per_out) {
2805 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2806 return td->uper_encoder(td, constraints, structure, per_out);
2807}
2808
Lev Walkin59b176e2005-11-26 11:25:14 +00002809
2810/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2811
Lev Walkina7591b52014-10-12 18:37:35 -07002812static const ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002813 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2814};
2815asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2816 "CN-IntegerEnumerated1",
2817 "CN-IntegerEnumerated1",
2818 CN_IntegerEnumerated1_free,
2819 CN_IntegerEnumerated1_print,
2820 CN_IntegerEnumerated1_constraint,
2821 CN_IntegerEnumerated1_decode_ber,
2822 CN_IntegerEnumerated1_encode_der,
2823 CN_IntegerEnumerated1_decode_xer,
2824 CN_IntegerEnumerated1_encode_xer,
2825 CN_IntegerEnumerated1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002826 CN_IntegerEnumerated1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002827 0, /* Use generic outmost tag fetcher */
2828 asn_DEF_CN_IntegerEnumerated1_tags_1,
2829 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2830 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2831 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2832 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2833 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2834 0, /* No PER visible constraints */
2835 0, 0, /* Defined elsewhere */
2836 0 /* No specifics */
2837};
2838
2839
2840/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2841
2842#include <INTEGER.h>
2843
2844/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2845
2846typedef enum NO_IntegerEnumerated2 {
2847 NO_IntegerEnumerated2_a = 1,
2848 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002849} e_NO_IntegerEnumerated2;
Lev Walkin59b176e2005-11-26 11:25:14 +00002850
2851/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2852
2853typedef INTEGER_t NO_IntegerEnumerated2_t;
2854
2855/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2856
2857extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2858asn_struct_free_f NO_IntegerEnumerated2_free;
2859asn_struct_print_f NO_IntegerEnumerated2_print;
2860asn_constr_check_f NO_IntegerEnumerated2_constraint;
2861ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2862der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2863xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2864xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2865per_type_decoder_f NO_IntegerEnumerated2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002866per_type_encoder_f NO_IntegerEnumerated2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002867
2868/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2869
2870int
2871NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002872 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002873 /* Replace with underlying type checker */
2874 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002875 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002876}
2877
2878/*
2879 * This type is implemented using INTEGER,
2880 * so here we adjust the DEF accordingly.
2881 */
2882static void
2883NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2884 td->free_struct = asn_DEF_INTEGER.free_struct;
2885 td->print_struct = asn_DEF_INTEGER.print_struct;
Lev Walkin6169b8d2013-12-07 11:02:44 -08002886 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin59b176e2005-11-26 11:25:14 +00002887 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2888 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2889 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2890 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2891 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002892 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002893 if(!td->per_constraints)
2894 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2895 td->elements = asn_DEF_INTEGER.elements;
2896 td->elements_count = asn_DEF_INTEGER.elements_count;
2897 td->specifics = asn_DEF_INTEGER.specifics;
2898}
2899
2900void
2901NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2902 void *struct_ptr, int contents_only) {
2903 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2904 td->free_struct(td, struct_ptr, contents_only);
2905}
2906
2907int
2908NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2909 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2910 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2911 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2912}
2913
2914asn_dec_rval_t
2915NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2916 void **structure, const void *bufptr, size_t size, int tag_mode) {
2917 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2918 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2919}
2920
2921asn_enc_rval_t
2922NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2923 void *structure, int tag_mode, ber_tlv_tag_t tag,
2924 asn_app_consume_bytes_f *cb, void *app_key) {
2925 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2926 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2927}
2928
2929asn_dec_rval_t
2930NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2931 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2932 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2933 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2934}
2935
2936asn_enc_rval_t
2937NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2938 int ilevel, enum xer_encoder_flags_e flags,
2939 asn_app_consume_bytes_f *cb, void *app_key) {
2940 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2941 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2942}
2943
2944asn_dec_rval_t
2945NO_IntegerEnumerated2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2946 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2947 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2948 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2949}
2950
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002951asn_enc_rval_t
2952NO_IntegerEnumerated2_encode_uper(asn_TYPE_descriptor_t *td,
2953 asn_per_constraints_t *constraints,
2954 void *structure, asn_per_outp_t *per_out) {
2955 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2956 return td->uper_encoder(td, constraints, structure, per_out);
2957}
2958
Lev Walkin59b176e2005-11-26 11:25:14 +00002959
2960/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2961
Lev Walkina7591b52014-10-12 18:37:35 -07002962static const ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
Lev Walkin59b176e2005-11-26 11:25:14 +00002963 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2964};
2965asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2966 "NO-IntegerEnumerated2",
2967 "NO-IntegerEnumerated2",
2968 NO_IntegerEnumerated2_free,
2969 NO_IntegerEnumerated2_print,
2970 NO_IntegerEnumerated2_constraint,
2971 NO_IntegerEnumerated2_decode_ber,
2972 NO_IntegerEnumerated2_encode_der,
2973 NO_IntegerEnumerated2_decode_xer,
2974 NO_IntegerEnumerated2_encode_xer,
2975 NO_IntegerEnumerated2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002976 NO_IntegerEnumerated2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002977 0, /* Use generic outmost tag fetcher */
2978 asn_DEF_NO_IntegerEnumerated2_tags_1,
2979 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2980 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2981 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2982 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2983 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2984 0, /* No PER visible constraints */
2985 0, 0, /* Defined elsewhere */
2986 0 /* No specifics */
2987};
2988