blob: 01b0abc960ffb55a7120e8a6bbed4e61daeb222a [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;
41 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
42 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
43 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
44 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
45 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
46 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +000047 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -070048 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
49 td->elements = asn_DEF_NativeInteger.elements;
50 td->elements_count = asn_DEF_NativeInteger.elements_count;
51 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +000052}
53
54void
55CN_IntegerUnlimited_free(asn_TYPE_descriptor_t *td,
56 void *struct_ptr, int contents_only) {
57 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
58 td->free_struct(td, struct_ptr, contents_only);
59}
60
61int
62CN_IntegerUnlimited_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
63 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
64 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
65 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
66}
67
68asn_dec_rval_t
69CN_IntegerUnlimited_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
70 void **structure, const void *bufptr, size_t size, int tag_mode) {
71 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
72 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
73}
74
75asn_enc_rval_t
76CN_IntegerUnlimited_encode_der(asn_TYPE_descriptor_t *td,
77 void *structure, int tag_mode, ber_tlv_tag_t tag,
78 asn_app_consume_bytes_f *cb, void *app_key) {
79 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
80 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
81}
82
83asn_dec_rval_t
84CN_IntegerUnlimited_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
85 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
86 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
87 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
88}
89
90asn_enc_rval_t
91CN_IntegerUnlimited_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
92 int ilevel, enum xer_encoder_flags_e flags,
93 asn_app_consume_bytes_f *cb, void *app_key) {
94 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
95 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
96}
97
98asn_dec_rval_t
99CN_IntegerUnlimited_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
100 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
101 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
102 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
103}
104
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000105asn_enc_rval_t
106CN_IntegerUnlimited_encode_uper(asn_TYPE_descriptor_t *td,
107 asn_per_constraints_t *constraints,
108 void *structure, asn_per_outp_t *per_out) {
109 CN_IntegerUnlimited_1_inherit_TYPE_descriptor(td);
110 return td->uper_encoder(td, constraints, structure, per_out);
111}
112
Lev Walkin59b176e2005-11-26 11:25:14 +0000113
114/*** <<< STAT-DEFS [CN-IntegerUnlimited] >>> ***/
115
116static ber_tlv_tag_t asn_DEF_CN_IntegerUnlimited_tags_1[] = {
117 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
118};
119asn_TYPE_descriptor_t asn_DEF_CN_IntegerUnlimited = {
120 "CN-IntegerUnlimited",
121 "CN-IntegerUnlimited",
122 CN_IntegerUnlimited_free,
123 CN_IntegerUnlimited_print,
124 CN_IntegerUnlimited_constraint,
125 CN_IntegerUnlimited_decode_ber,
126 CN_IntegerUnlimited_encode_der,
127 CN_IntegerUnlimited_decode_xer,
128 CN_IntegerUnlimited_encode_xer,
129 CN_IntegerUnlimited_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000130 CN_IntegerUnlimited_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000131 0, /* Use generic outmost tag fetcher */
132 asn_DEF_CN_IntegerUnlimited_tags_1,
133 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
134 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
135 asn_DEF_CN_IntegerUnlimited_tags_1, /* Same as above */
136 sizeof(asn_DEF_CN_IntegerUnlimited_tags_1)
137 /sizeof(asn_DEF_CN_IntegerUnlimited_tags_1[0]), /* 1 */
138 0, /* No PER visible constraints */
139 0, 0, /* No members */
140 0 /* No specifics */
141};
142
143
144/*** <<< INCLUDES [CN-IntegerMinMax] >>> ***/
145
Lev Walkin2a744a72013-03-27 01:56:23 -0700146#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000147
148/*** <<< TYPE-DECLS [CN-IntegerMinMax] >>> ***/
149
Lev Walkin2a744a72013-03-27 01:56:23 -0700150typedef long CN_IntegerMinMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000151
152/*** <<< FUNC-DECLS [CN-IntegerMinMax] >>> ***/
153
154extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax;
155asn_struct_free_f CN_IntegerMinMax_free;
156asn_struct_print_f CN_IntegerMinMax_print;
157asn_constr_check_f CN_IntegerMinMax_constraint;
158ber_type_decoder_f CN_IntegerMinMax_decode_ber;
159der_type_encoder_f CN_IntegerMinMax_encode_der;
160xer_type_decoder_f CN_IntegerMinMax_decode_xer;
161xer_type_encoder_f CN_IntegerMinMax_encode_xer;
162per_type_decoder_f CN_IntegerMinMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000163per_type_encoder_f CN_IntegerMinMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000164
165/*** <<< CODE [CN-IntegerMinMax] >>> ***/
166
167int
168CN_IntegerMinMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000169 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000170
171 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000172 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000173 "%s: value not given (%s:%d)",
174 td->name, __FILE__, __LINE__);
175 return -1;
176 }
177
178
179 if(1 /* No applicable constraints whatsoever */) {
180 /* Nothing is here. See below */
181 }
182
183 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -0700184 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +0000185 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +0000186}
187
188/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700189 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000190 * so here we adjust the DEF accordingly.
191 */
192static void
193CN_IntegerMinMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700194 td->free_struct = asn_DEF_NativeInteger.free_struct;
195 td->print_struct = asn_DEF_NativeInteger.print_struct;
196 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
197 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
198 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
199 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
200 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
201 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000202 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700203 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
204 td->elements = asn_DEF_NativeInteger.elements;
205 td->elements_count = asn_DEF_NativeInteger.elements_count;
206 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000207}
208
209void
210CN_IntegerMinMax_free(asn_TYPE_descriptor_t *td,
211 void *struct_ptr, int contents_only) {
212 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
213 td->free_struct(td, struct_ptr, contents_only);
214}
215
216int
217CN_IntegerMinMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
218 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
219 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
220 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
221}
222
223asn_dec_rval_t
224CN_IntegerMinMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
225 void **structure, const void *bufptr, size_t size, int tag_mode) {
226 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
227 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
228}
229
230asn_enc_rval_t
231CN_IntegerMinMax_encode_der(asn_TYPE_descriptor_t *td,
232 void *structure, int tag_mode, ber_tlv_tag_t tag,
233 asn_app_consume_bytes_f *cb, void *app_key) {
234 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
235 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
236}
237
238asn_dec_rval_t
239CN_IntegerMinMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
240 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
241 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
242 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
243}
244
245asn_enc_rval_t
246CN_IntegerMinMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
247 int ilevel, enum xer_encoder_flags_e flags,
248 asn_app_consume_bytes_f *cb, void *app_key) {
249 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
250 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
251}
252
253asn_dec_rval_t
254CN_IntegerMinMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
255 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
256 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
257 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
258}
259
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000260asn_enc_rval_t
261CN_IntegerMinMax_encode_uper(asn_TYPE_descriptor_t *td,
262 asn_per_constraints_t *constraints,
263 void *structure, asn_per_outp_t *per_out) {
264 CN_IntegerMinMax_1_inherit_TYPE_descriptor(td);
265 return td->uper_encoder(td, constraints, structure, per_out);
266}
267
Lev Walkin59b176e2005-11-26 11:25:14 +0000268
Lev Walkin725883b2006-10-09 12:07:58 +0000269/*** <<< CTDEFS [CN-IntegerMinMax] >>> ***/
270
Lev Walkin4b5dae32006-10-09 12:27:44 +0000271static asn_per_constraints_t asn_PER_type_CN_IntegerMinMax_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +0000272 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
273 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
274 0, 0 /* No PER value map */
275};
276
Lev Walkin59b176e2005-11-26 11:25:14 +0000277/*** <<< STAT-DEFS [CN-IntegerMinMax] >>> ***/
278
279static ber_tlv_tag_t asn_DEF_CN_IntegerMinMax_tags_1[] = {
280 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
281};
Lev Walkin59b176e2005-11-26 11:25:14 +0000282asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinMax = {
283 "CN-IntegerMinMax",
284 "CN-IntegerMinMax",
285 CN_IntegerMinMax_free,
286 CN_IntegerMinMax_print,
287 CN_IntegerMinMax_constraint,
288 CN_IntegerMinMax_decode_ber,
289 CN_IntegerMinMax_encode_der,
290 CN_IntegerMinMax_decode_xer,
291 CN_IntegerMinMax_encode_xer,
292 CN_IntegerMinMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000293 CN_IntegerMinMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000294 0, /* Use generic outmost tag fetcher */
295 asn_DEF_CN_IntegerMinMax_tags_1,
296 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
297 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
298 asn_DEF_CN_IntegerMinMax_tags_1, /* Same as above */
299 sizeof(asn_DEF_CN_IntegerMinMax_tags_1)
300 /sizeof(asn_DEF_CN_IntegerMinMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000301 &asn_PER_type_CN_IntegerMinMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000302 0, 0, /* No members */
303 0 /* No specifics */
304};
305
306
307/*** <<< INCLUDES [CN-IntegerMinLow] >>> ***/
308
Lev Walkin2a744a72013-03-27 01:56:23 -0700309#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000310
311/*** <<< TYPE-DECLS [CN-IntegerMinLow] >>> ***/
312
Lev Walkin2a744a72013-03-27 01:56:23 -0700313typedef long CN_IntegerMinLow_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000314
315/*** <<< FUNC-DECLS [CN-IntegerMinLow] >>> ***/
316
317extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow;
318asn_struct_free_f CN_IntegerMinLow_free;
319asn_struct_print_f CN_IntegerMinLow_print;
320asn_constr_check_f CN_IntegerMinLow_constraint;
321ber_type_decoder_f CN_IntegerMinLow_decode_ber;
322der_type_encoder_f CN_IntegerMinLow_encode_der;
323xer_type_decoder_f CN_IntegerMinLow_decode_xer;
324xer_type_encoder_f CN_IntegerMinLow_encode_xer;
325per_type_decoder_f CN_IntegerMinLow_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000326per_type_encoder_f CN_IntegerMinLow_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000327
328/*** <<< CODE [CN-IntegerMinLow] >>> ***/
329
330int
331CN_IntegerMinLow_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000332 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000333 long value;
334
335 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000336 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000337 "%s: value not given (%s:%d)",
338 td->name, __FILE__, __LINE__);
339 return -1;
340 }
341
Lev Walkin2a744a72013-03-27 01:56:23 -0700342 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000343
344 if((value <= 1)) {
345 /* Constraint check succeeded */
346 return 0;
347 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000348 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000349 "%s: constraint failed (%s:%d)",
350 td->name, __FILE__, __LINE__);
351 return -1;
352 }
353}
354
355/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700356 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000357 * so here we adjust the DEF accordingly.
358 */
359static void
360CN_IntegerMinLow_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700361 td->free_struct = asn_DEF_NativeInteger.free_struct;
362 td->print_struct = asn_DEF_NativeInteger.print_struct;
363 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
364 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
365 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
366 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
367 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
368 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000369 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700370 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
371 td->elements = asn_DEF_NativeInteger.elements;
372 td->elements_count = asn_DEF_NativeInteger.elements_count;
373 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000374}
375
376void
377CN_IntegerMinLow_free(asn_TYPE_descriptor_t *td,
378 void *struct_ptr, int contents_only) {
379 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
380 td->free_struct(td, struct_ptr, contents_only);
381}
382
383int
384CN_IntegerMinLow_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
385 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
386 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
387 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
388}
389
390asn_dec_rval_t
391CN_IntegerMinLow_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
392 void **structure, const void *bufptr, size_t size, int tag_mode) {
393 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
394 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
395}
396
397asn_enc_rval_t
398CN_IntegerMinLow_encode_der(asn_TYPE_descriptor_t *td,
399 void *structure, int tag_mode, ber_tlv_tag_t tag,
400 asn_app_consume_bytes_f *cb, void *app_key) {
401 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
402 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
403}
404
405asn_dec_rval_t
406CN_IntegerMinLow_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
407 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
408 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
409 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
410}
411
412asn_enc_rval_t
413CN_IntegerMinLow_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
414 int ilevel, enum xer_encoder_flags_e flags,
415 asn_app_consume_bytes_f *cb, void *app_key) {
416 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
417 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
418}
419
420asn_dec_rval_t
421CN_IntegerMinLow_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
422 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
423 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
424 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
425}
426
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000427asn_enc_rval_t
428CN_IntegerMinLow_encode_uper(asn_TYPE_descriptor_t *td,
429 asn_per_constraints_t *constraints,
430 void *structure, asn_per_outp_t *per_out) {
431 CN_IntegerMinLow_1_inherit_TYPE_descriptor(td);
432 return td->uper_encoder(td, constraints, structure, per_out);
433}
434
Lev Walkin59b176e2005-11-26 11:25:14 +0000435
Lev Walkin725883b2006-10-09 12:07:58 +0000436/*** <<< CTDEFS [CN-IntegerMinLow] >>> ***/
437
Lev Walkin4b5dae32006-10-09 12:27:44 +0000438static asn_per_constraints_t asn_PER_type_CN_IntegerMinLow_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +0000439 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..1) */,
440 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
441 0, 0 /* No PER value map */
442};
443
Lev Walkin59b176e2005-11-26 11:25:14 +0000444/*** <<< STAT-DEFS [CN-IntegerMinLow] >>> ***/
445
446static ber_tlv_tag_t asn_DEF_CN_IntegerMinLow_tags_1[] = {
447 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
448};
Lev Walkin59b176e2005-11-26 11:25:14 +0000449asn_TYPE_descriptor_t asn_DEF_CN_IntegerMinLow = {
450 "CN-IntegerMinLow",
451 "CN-IntegerMinLow",
452 CN_IntegerMinLow_free,
453 CN_IntegerMinLow_print,
454 CN_IntegerMinLow_constraint,
455 CN_IntegerMinLow_decode_ber,
456 CN_IntegerMinLow_encode_der,
457 CN_IntegerMinLow_decode_xer,
458 CN_IntegerMinLow_encode_xer,
459 CN_IntegerMinLow_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000460 CN_IntegerMinLow_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000461 0, /* Use generic outmost tag fetcher */
462 asn_DEF_CN_IntegerMinLow_tags_1,
463 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
464 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
465 asn_DEF_CN_IntegerMinLow_tags_1, /* Same as above */
466 sizeof(asn_DEF_CN_IntegerMinLow_tags_1)
467 /sizeof(asn_DEF_CN_IntegerMinLow_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000468 &asn_PER_type_CN_IntegerMinLow_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000469 0, 0, /* No members */
470 0 /* No specifics */
471};
472
473
474/*** <<< INCLUDES [NO-IntegerMinHigh] >>> ***/
475
476#include <INTEGER.h>
477
478/*** <<< TYPE-DECLS [NO-IntegerMinHigh] >>> ***/
479
480typedef INTEGER_t NO_IntegerMinHigh_t;
481
482/*** <<< FUNC-DECLS [NO-IntegerMinHigh] >>> ***/
483
484extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh;
485asn_struct_free_f NO_IntegerMinHigh_free;
486asn_struct_print_f NO_IntegerMinHigh_print;
487asn_constr_check_f NO_IntegerMinHigh_constraint;
488ber_type_decoder_f NO_IntegerMinHigh_decode_ber;
489der_type_encoder_f NO_IntegerMinHigh_encode_der;
490xer_type_decoder_f NO_IntegerMinHigh_decode_xer;
491xer_type_encoder_f NO_IntegerMinHigh_encode_xer;
492per_type_decoder_f NO_IntegerMinHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000493per_type_encoder_f NO_IntegerMinHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000494
495/*** <<< CODE [NO-IntegerMinHigh] >>> ***/
496
497int
498NO_IntegerMinHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000499 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000500 const INTEGER_t *st = (const INTEGER_t *)sptr;
501 long value;
502
503 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000504 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000505 "%s: value not given (%s:%d)",
506 td->name, __FILE__, __LINE__);
507 return -1;
508 }
509
510 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000511 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000512 "%s: value too large (%s:%d)",
513 td->name, __FILE__, __LINE__);
514 return -1;
515 }
516
517 if((value <= 3000000000)) {
518 /* Constraint check succeeded */
519 return 0;
520 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000521 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000522 "%s: constraint failed (%s:%d)",
523 td->name, __FILE__, __LINE__);
524 return -1;
525 }
526}
527
528/*
529 * This type is implemented using INTEGER,
530 * so here we adjust the DEF accordingly.
531 */
532static void
533NO_IntegerMinHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
534 td->free_struct = asn_DEF_INTEGER.free_struct;
535 td->print_struct = asn_DEF_INTEGER.print_struct;
536 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
537 td->der_encoder = asn_DEF_INTEGER.der_encoder;
538 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
539 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
540 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000541 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000542 if(!td->per_constraints)
543 td->per_constraints = asn_DEF_INTEGER.per_constraints;
544 td->elements = asn_DEF_INTEGER.elements;
545 td->elements_count = asn_DEF_INTEGER.elements_count;
546 td->specifics = asn_DEF_INTEGER.specifics;
547}
548
549void
550NO_IntegerMinHigh_free(asn_TYPE_descriptor_t *td,
551 void *struct_ptr, int contents_only) {
552 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
553 td->free_struct(td, struct_ptr, contents_only);
554}
555
556int
557NO_IntegerMinHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
558 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
559 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
560 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
561}
562
563asn_dec_rval_t
564NO_IntegerMinHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
565 void **structure, const void *bufptr, size_t size, int tag_mode) {
566 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
567 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
568}
569
570asn_enc_rval_t
571NO_IntegerMinHigh_encode_der(asn_TYPE_descriptor_t *td,
572 void *structure, int tag_mode, ber_tlv_tag_t tag,
573 asn_app_consume_bytes_f *cb, void *app_key) {
574 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
575 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
576}
577
578asn_dec_rval_t
579NO_IntegerMinHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
580 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
581 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
582 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
583}
584
585asn_enc_rval_t
586NO_IntegerMinHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
587 int ilevel, enum xer_encoder_flags_e flags,
588 asn_app_consume_bytes_f *cb, void *app_key) {
589 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
590 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
591}
592
593asn_dec_rval_t
594NO_IntegerMinHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
595 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
596 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
597 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
598}
599
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000600asn_enc_rval_t
601NO_IntegerMinHigh_encode_uper(asn_TYPE_descriptor_t *td,
602 asn_per_constraints_t *constraints,
603 void *structure, asn_per_outp_t *per_out) {
604 NO_IntegerMinHigh_1_inherit_TYPE_descriptor(td);
605 return td->uper_encoder(td, constraints, structure, per_out);
606}
607
Lev Walkin59b176e2005-11-26 11:25:14 +0000608
Lev Walkin725883b2006-10-09 12:07:58 +0000609/*** <<< CTDEFS [NO-IntegerMinHigh] >>> ***/
610
Lev Walkin4b5dae32006-10-09 12:27:44 +0000611static asn_per_constraints_t asn_PER_type_NO_IntegerMinHigh_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +0000612 { APC_UNCONSTRAINED, -1, -1, 0, 0 } /* (MIN..3000000000) */,
613 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
614 0, 0 /* No PER value map */
615};
616
Lev Walkin59b176e2005-11-26 11:25:14 +0000617/*** <<< STAT-DEFS [NO-IntegerMinHigh] >>> ***/
618
619static ber_tlv_tag_t asn_DEF_NO_IntegerMinHigh_tags_1[] = {
620 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
621};
Lev Walkin59b176e2005-11-26 11:25:14 +0000622asn_TYPE_descriptor_t asn_DEF_NO_IntegerMinHigh = {
623 "NO-IntegerMinHigh",
624 "NO-IntegerMinHigh",
625 NO_IntegerMinHigh_free,
626 NO_IntegerMinHigh_print,
627 NO_IntegerMinHigh_constraint,
628 NO_IntegerMinHigh_decode_ber,
629 NO_IntegerMinHigh_encode_der,
630 NO_IntegerMinHigh_decode_xer,
631 NO_IntegerMinHigh_encode_xer,
632 NO_IntegerMinHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000633 NO_IntegerMinHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000634 0, /* Use generic outmost tag fetcher */
635 asn_DEF_NO_IntegerMinHigh_tags_1,
636 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
637 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
638 asn_DEF_NO_IntegerMinHigh_tags_1, /* Same as above */
639 sizeof(asn_DEF_NO_IntegerMinHigh_tags_1)
640 /sizeof(asn_DEF_NO_IntegerMinHigh_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000641 &asn_PER_type_NO_IntegerMinHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000642 0, 0, /* No members */
643 0 /* No specifics */
644};
645
646
647/*** <<< INCLUDES [NO-IntegerLowHigh] >>> ***/
648
Lev Walkin8bb57a22007-12-03 13:41:36 +0000649#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000650
651/*** <<< TYPE-DECLS [NO-IntegerLowHigh] >>> ***/
652
Lev Walkin8bb57a22007-12-03 13:41:36 +0000653typedef unsigned long NO_IntegerLowHigh_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000654
655/*** <<< FUNC-DECLS [NO-IntegerLowHigh] >>> ***/
656
657extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh;
658asn_struct_free_f NO_IntegerLowHigh_free;
659asn_struct_print_f NO_IntegerLowHigh_print;
660asn_constr_check_f NO_IntegerLowHigh_constraint;
661ber_type_decoder_f NO_IntegerLowHigh_decode_ber;
662der_type_encoder_f NO_IntegerLowHigh_encode_der;
663xer_type_decoder_f NO_IntegerLowHigh_decode_xer;
664xer_type_encoder_f NO_IntegerLowHigh_encode_xer;
665per_type_decoder_f NO_IntegerLowHigh_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000666per_type_encoder_f NO_IntegerLowHigh_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000667
668/*** <<< CODE [NO-IntegerLowHigh] >>> ***/
669
670int
671NO_IntegerLowHigh_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000672 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000673 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +0000674
675 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000676 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000677 "%s: value not given (%s:%d)",
678 td->name, __FILE__, __LINE__);
679 return -1;
680 }
681
Lev Walkin8bb57a22007-12-03 13:41:36 +0000682 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000683
684 if((value >= 1 && value <= 3000000000)) {
685 /* Constraint check succeeded */
686 return 0;
687 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000688 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000689 "%s: constraint failed (%s:%d)",
690 td->name, __FILE__, __LINE__);
691 return -1;
692 }
693}
694
695/*
Lev Walkin8bb57a22007-12-03 13:41:36 +0000696 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000697 * so here we adjust the DEF accordingly.
698 */
699static void
700NO_IntegerLowHigh_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +0000701 td->free_struct = asn_DEF_NativeInteger.free_struct;
702 td->print_struct = asn_DEF_NativeInteger.print_struct;
703 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
704 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
705 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
706 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
707 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
708 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000709 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +0000710 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
711 td->elements = asn_DEF_NativeInteger.elements;
712 td->elements_count = asn_DEF_NativeInteger.elements_count;
713 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +0000714}
715
716void
717NO_IntegerLowHigh_free(asn_TYPE_descriptor_t *td,
718 void *struct_ptr, int contents_only) {
719 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
720 td->free_struct(td, struct_ptr, contents_only);
721}
722
723int
724NO_IntegerLowHigh_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
725 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
726 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
727 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
728}
729
730asn_dec_rval_t
731NO_IntegerLowHigh_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
732 void **structure, const void *bufptr, size_t size, int tag_mode) {
733 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
734 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
735}
736
737asn_enc_rval_t
738NO_IntegerLowHigh_encode_der(asn_TYPE_descriptor_t *td,
739 void *structure, int tag_mode, ber_tlv_tag_t tag,
740 asn_app_consume_bytes_f *cb, void *app_key) {
741 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
742 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
743}
744
745asn_dec_rval_t
746NO_IntegerLowHigh_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
747 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
748 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
749 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
750}
751
752asn_enc_rval_t
753NO_IntegerLowHigh_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
754 int ilevel, enum xer_encoder_flags_e flags,
755 asn_app_consume_bytes_f *cb, void *app_key) {
756 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
757 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
758}
759
760asn_dec_rval_t
761NO_IntegerLowHigh_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
762 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
763 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
764 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
765}
766
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000767asn_enc_rval_t
768NO_IntegerLowHigh_encode_uper(asn_TYPE_descriptor_t *td,
769 asn_per_constraints_t *constraints,
770 void *structure, asn_per_outp_t *per_out) {
771 NO_IntegerLowHigh_1_inherit_TYPE_descriptor(td);
772 return td->uper_encoder(td, constraints, structure, per_out);
773}
774
Lev Walkin59b176e2005-11-26 11:25:14 +0000775
Lev Walkin725883b2006-10-09 12:07:58 +0000776/*** <<< CTDEFS [NO-IntegerLowHigh] >>> ***/
777
Lev Walkin4b5dae32006-10-09 12:27:44 +0000778static asn_per_constraints_t asn_PER_type_NO_IntegerLowHigh_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +0000779 { APC_CONSTRAINED, 32, -1, 1, 3000000000 } /* (1..3000000000) */,
780 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
781 0, 0 /* No PER value map */
782};
783
Lev Walkin59b176e2005-11-26 11:25:14 +0000784/*** <<< STAT-DEFS [NO-IntegerLowHigh] >>> ***/
785
Lev Walkin8bb57a22007-12-03 13:41:36 +0000786static asn_INTEGER_specifics_t asn_SPC_NO_IntegerLowHigh_specs_1 = {
787 0, 0, 0, 0, 0,
788 0, /* Native long size */
789 1 /* Unsigned representation */
790};
Lev Walkin59b176e2005-11-26 11:25:14 +0000791static ber_tlv_tag_t asn_DEF_NO_IntegerLowHigh_tags_1[] = {
792 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
793};
Lev Walkin59b176e2005-11-26 11:25:14 +0000794asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowHigh = {
795 "NO-IntegerLowHigh",
796 "NO-IntegerLowHigh",
797 NO_IntegerLowHigh_free,
798 NO_IntegerLowHigh_print,
799 NO_IntegerLowHigh_constraint,
800 NO_IntegerLowHigh_decode_ber,
801 NO_IntegerLowHigh_encode_der,
802 NO_IntegerLowHigh_decode_xer,
803 NO_IntegerLowHigh_encode_xer,
804 NO_IntegerLowHigh_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000805 NO_IntegerLowHigh_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000806 0, /* Use generic outmost tag fetcher */
807 asn_DEF_NO_IntegerLowHigh_tags_1,
808 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
809 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
810 asn_DEF_NO_IntegerLowHigh_tags_1, /* Same as above */
811 sizeof(asn_DEF_NO_IntegerLowHigh_tags_1)
812 /sizeof(asn_DEF_NO_IntegerLowHigh_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000813 &asn_PER_type_NO_IntegerLowHigh_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000814 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +0000815 &asn_SPC_NO_IntegerLowHigh_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +0000816};
817
818
819/*** <<< INCLUDES [CN-IntegerLowMax] >>> ***/
820
Lev Walkin2a744a72013-03-27 01:56:23 -0700821#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +0000822
823/*** <<< TYPE-DECLS [CN-IntegerLowMax] >>> ***/
824
Lev Walkin2a744a72013-03-27 01:56:23 -0700825typedef long CN_IntegerLowMax_t;
Lev Walkin59b176e2005-11-26 11:25:14 +0000826
827/*** <<< FUNC-DECLS [CN-IntegerLowMax] >>> ***/
828
829extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax;
830asn_struct_free_f CN_IntegerLowMax_free;
831asn_struct_print_f CN_IntegerLowMax_print;
832asn_constr_check_f CN_IntegerLowMax_constraint;
833ber_type_decoder_f CN_IntegerLowMax_decode_ber;
834der_type_encoder_f CN_IntegerLowMax_encode_der;
835xer_type_decoder_f CN_IntegerLowMax_decode_xer;
836xer_type_encoder_f CN_IntegerLowMax_encode_xer;
837per_type_decoder_f CN_IntegerLowMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000838per_type_encoder_f CN_IntegerLowMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +0000839
840/*** <<< CODE [CN-IntegerLowMax] >>> ***/
841
842int
843CN_IntegerLowMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +0000844 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +0000845 long value;
846
847 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000848 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000849 "%s: value not given (%s:%d)",
850 td->name, __FILE__, __LINE__);
851 return -1;
852 }
853
Lev Walkin2a744a72013-03-27 01:56:23 -0700854 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +0000855
856 if((value >= 1)) {
857 /* Constraint check succeeded */
858 return 0;
859 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +0000860 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +0000861 "%s: constraint failed (%s:%d)",
862 td->name, __FILE__, __LINE__);
863 return -1;
864 }
865}
866
867/*
Lev Walkin2a744a72013-03-27 01:56:23 -0700868 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +0000869 * so here we adjust the DEF accordingly.
870 */
871static void
872CN_IntegerLowMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -0700873 td->free_struct = asn_DEF_NativeInteger.free_struct;
874 td->print_struct = asn_DEF_NativeInteger.print_struct;
875 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
876 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
877 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
878 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
879 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
880 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +0000881 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -0700882 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
883 td->elements = asn_DEF_NativeInteger.elements;
884 td->elements_count = asn_DEF_NativeInteger.elements_count;
885 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +0000886}
887
888void
889CN_IntegerLowMax_free(asn_TYPE_descriptor_t *td,
890 void *struct_ptr, int contents_only) {
891 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
892 td->free_struct(td, struct_ptr, contents_only);
893}
894
895int
896CN_IntegerLowMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
897 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
898 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
899 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
900}
901
902asn_dec_rval_t
903CN_IntegerLowMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
904 void **structure, const void *bufptr, size_t size, int tag_mode) {
905 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
906 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
907}
908
909asn_enc_rval_t
910CN_IntegerLowMax_encode_der(asn_TYPE_descriptor_t *td,
911 void *structure, int tag_mode, ber_tlv_tag_t tag,
912 asn_app_consume_bytes_f *cb, void *app_key) {
913 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
914 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
915}
916
917asn_dec_rval_t
918CN_IntegerLowMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
919 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
920 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
921 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
922}
923
924asn_enc_rval_t
925CN_IntegerLowMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
926 int ilevel, enum xer_encoder_flags_e flags,
927 asn_app_consume_bytes_f *cb, void *app_key) {
928 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
929 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
930}
931
932asn_dec_rval_t
933CN_IntegerLowMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
934 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
935 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
936 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
937}
938
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000939asn_enc_rval_t
940CN_IntegerLowMax_encode_uper(asn_TYPE_descriptor_t *td,
941 asn_per_constraints_t *constraints,
942 void *structure, asn_per_outp_t *per_out) {
943 CN_IntegerLowMax_1_inherit_TYPE_descriptor(td);
944 return td->uper_encoder(td, constraints, structure, per_out);
945}
946
Lev Walkin59b176e2005-11-26 11:25:14 +0000947
Lev Walkin725883b2006-10-09 12:07:58 +0000948/*** <<< CTDEFS [CN-IntegerLowMax] >>> ***/
949
Lev Walkin4b5dae32006-10-09 12:27:44 +0000950static asn_per_constraints_t asn_PER_type_CN_IntegerLowMax_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +0000951 { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (1..MAX) */,
952 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
953 0, 0 /* No PER value map */
954};
955
Lev Walkin59b176e2005-11-26 11:25:14 +0000956/*** <<< STAT-DEFS [CN-IntegerLowMax] >>> ***/
957
958static ber_tlv_tag_t asn_DEF_CN_IntegerLowMax_tags_1[] = {
959 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
960};
Lev Walkin59b176e2005-11-26 11:25:14 +0000961asn_TYPE_descriptor_t asn_DEF_CN_IntegerLowMax = {
962 "CN-IntegerLowMax",
963 "CN-IntegerLowMax",
964 CN_IntegerLowMax_free,
965 CN_IntegerLowMax_print,
966 CN_IntegerLowMax_constraint,
967 CN_IntegerLowMax_decode_ber,
968 CN_IntegerLowMax_encode_der,
969 CN_IntegerLowMax_decode_xer,
970 CN_IntegerLowMax_encode_xer,
971 CN_IntegerLowMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +0000972 CN_IntegerLowMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +0000973 0, /* Use generic outmost tag fetcher */
974 asn_DEF_CN_IntegerLowMax_tags_1,
975 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
976 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
977 asn_DEF_CN_IntegerLowMax_tags_1, /* Same as above */
978 sizeof(asn_DEF_CN_IntegerLowMax_tags_1)
979 /sizeof(asn_DEF_CN_IntegerLowMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +0000980 &asn_PER_type_CN_IntegerLowMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +0000981 0, 0, /* No members */
982 0 /* No specifics */
983};
984
985
986/*** <<< INCLUDES [NO-IntegerHighMax] >>> ***/
987
988#include <INTEGER.h>
989
990/*** <<< TYPE-DECLS [NO-IntegerHighMax] >>> ***/
991
992typedef INTEGER_t NO_IntegerHighMax_t;
993
994/*** <<< FUNC-DECLS [NO-IntegerHighMax] >>> ***/
995
996extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax;
997asn_struct_free_f NO_IntegerHighMax_free;
998asn_struct_print_f NO_IntegerHighMax_print;
999asn_constr_check_f NO_IntegerHighMax_constraint;
1000ber_type_decoder_f NO_IntegerHighMax_decode_ber;
1001der_type_encoder_f NO_IntegerHighMax_encode_der;
1002xer_type_decoder_f NO_IntegerHighMax_decode_xer;
1003xer_type_encoder_f NO_IntegerHighMax_encode_xer;
1004per_type_decoder_f NO_IntegerHighMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001005per_type_encoder_f NO_IntegerHighMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001006
1007/*** <<< CODE [NO-IntegerHighMax] >>> ***/
1008
1009int
1010NO_IntegerHighMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001011 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001012 const INTEGER_t *st = (const INTEGER_t *)sptr;
1013 long value;
1014
1015 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001016 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001017 "%s: value not given (%s:%d)",
1018 td->name, __FILE__, __LINE__);
1019 return -1;
1020 }
1021
1022 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001023 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001024 "%s: value too large (%s:%d)",
1025 td->name, __FILE__, __LINE__);
1026 return -1;
1027 }
1028
1029 if((value >= 3000000000)) {
1030 /* Constraint check succeeded */
1031 return 0;
1032 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001033 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001034 "%s: constraint failed (%s:%d)",
1035 td->name, __FILE__, __LINE__);
1036 return -1;
1037 }
1038}
1039
1040/*
1041 * This type is implemented using INTEGER,
1042 * so here we adjust the DEF accordingly.
1043 */
1044static void
1045NO_IntegerHighMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1046 td->free_struct = asn_DEF_INTEGER.free_struct;
1047 td->print_struct = asn_DEF_INTEGER.print_struct;
1048 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1049 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1050 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1051 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1052 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001053 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001054 if(!td->per_constraints)
1055 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1056 td->elements = asn_DEF_INTEGER.elements;
1057 td->elements_count = asn_DEF_INTEGER.elements_count;
1058 td->specifics = asn_DEF_INTEGER.specifics;
1059}
1060
1061void
1062NO_IntegerHighMax_free(asn_TYPE_descriptor_t *td,
1063 void *struct_ptr, int contents_only) {
1064 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1065 td->free_struct(td, struct_ptr, contents_only);
1066}
1067
1068int
1069NO_IntegerHighMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1070 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1071 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1072 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1073}
1074
1075asn_dec_rval_t
1076NO_IntegerHighMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1077 void **structure, const void *bufptr, size_t size, int tag_mode) {
1078 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1079 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1080}
1081
1082asn_enc_rval_t
1083NO_IntegerHighMax_encode_der(asn_TYPE_descriptor_t *td,
1084 void *structure, int tag_mode, ber_tlv_tag_t tag,
1085 asn_app_consume_bytes_f *cb, void *app_key) {
1086 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1087 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1088}
1089
1090asn_dec_rval_t
1091NO_IntegerHighMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1092 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1093 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1094 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1095}
1096
1097asn_enc_rval_t
1098NO_IntegerHighMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1099 int ilevel, enum xer_encoder_flags_e flags,
1100 asn_app_consume_bytes_f *cb, void *app_key) {
1101 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1102 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1103}
1104
1105asn_dec_rval_t
1106NO_IntegerHighMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1107 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1108 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1109 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1110}
1111
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001112asn_enc_rval_t
1113NO_IntegerHighMax_encode_uper(asn_TYPE_descriptor_t *td,
1114 asn_per_constraints_t *constraints,
1115 void *structure, asn_per_outp_t *per_out) {
1116 NO_IntegerHighMax_1_inherit_TYPE_descriptor(td);
1117 return td->uper_encoder(td, constraints, structure, per_out);
1118}
1119
Lev Walkin59b176e2005-11-26 11:25:14 +00001120
Lev Walkin725883b2006-10-09 12:07:58 +00001121/*** <<< CTDEFS [NO-IntegerHighMax] >>> ***/
1122
Lev Walkin4b5dae32006-10-09 12:27:44 +00001123static asn_per_constraints_t asn_PER_type_NO_IntegerHighMax_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001124 { APC_SEMI_CONSTRAINED, -1, -1, 3000000000, 0 } /* (3000000000..MAX) */,
1125 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1126 0, 0 /* No PER value map */
1127};
1128
Lev Walkin59b176e2005-11-26 11:25:14 +00001129/*** <<< STAT-DEFS [NO-IntegerHighMax] >>> ***/
1130
1131static ber_tlv_tag_t asn_DEF_NO_IntegerHighMax_tags_1[] = {
1132 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1133};
Lev Walkin59b176e2005-11-26 11:25:14 +00001134asn_TYPE_descriptor_t asn_DEF_NO_IntegerHighMax = {
1135 "NO-IntegerHighMax",
1136 "NO-IntegerHighMax",
1137 NO_IntegerHighMax_free,
1138 NO_IntegerHighMax_print,
1139 NO_IntegerHighMax_constraint,
1140 NO_IntegerHighMax_decode_ber,
1141 NO_IntegerHighMax_encode_der,
1142 NO_IntegerHighMax_decode_xer,
1143 NO_IntegerHighMax_encode_xer,
1144 NO_IntegerHighMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001145 NO_IntegerHighMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001146 0, /* Use generic outmost tag fetcher */
1147 asn_DEF_NO_IntegerHighMax_tags_1,
1148 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1149 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
1150 asn_DEF_NO_IntegerHighMax_tags_1, /* Same as above */
1151 sizeof(asn_DEF_NO_IntegerHighMax_tags_1)
1152 /sizeof(asn_DEF_NO_IntegerHighMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001153 &asn_PER_type_NO_IntegerHighMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001154 0, 0, /* No members */
1155 0 /* No specifics */
1156};
1157
1158
1159/*** <<< INCLUDES [NO-IntegerLowestMax] >>> ***/
1160
1161#include <INTEGER.h>
1162
1163/*** <<< TYPE-DECLS [NO-IntegerLowestMax] >>> ***/
1164
1165typedef INTEGER_t NO_IntegerLowestMax_t;
1166
1167/*** <<< FUNC-DECLS [NO-IntegerLowestMax] >>> ***/
1168
1169extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax;
1170asn_struct_free_f NO_IntegerLowestMax_free;
1171asn_struct_print_f NO_IntegerLowestMax_print;
1172asn_constr_check_f NO_IntegerLowestMax_constraint;
1173ber_type_decoder_f NO_IntegerLowestMax_decode_ber;
1174der_type_encoder_f NO_IntegerLowestMax_encode_der;
1175xer_type_decoder_f NO_IntegerLowestMax_decode_xer;
1176xer_type_encoder_f NO_IntegerLowestMax_encode_xer;
1177per_type_decoder_f NO_IntegerLowestMax_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001178per_type_encoder_f NO_IntegerLowestMax_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001179
1180/*** <<< CODE [NO-IntegerLowestMax] >>> ***/
1181
1182int
1183NO_IntegerLowestMax_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001184 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001185 const INTEGER_t *st = (const INTEGER_t *)sptr;
1186 long value;
1187
1188 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001189 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001190 "%s: value not given (%s:%d)",
1191 td->name, __FILE__, __LINE__);
1192 return -1;
1193 }
1194
1195 if(asn_INTEGER2long(st, &value)) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001196 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001197 "%s: value too large (%s:%d)",
1198 td->name, __FILE__, __LINE__);
1199 return -1;
1200 }
1201
1202 if((value >= -3000000000)) {
1203 /* Constraint check succeeded */
1204 return 0;
1205 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001206 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001207 "%s: constraint failed (%s:%d)",
1208 td->name, __FILE__, __LINE__);
1209 return -1;
1210 }
1211}
1212
1213/*
1214 * This type is implemented using INTEGER,
1215 * so here we adjust the DEF accordingly.
1216 */
1217static void
1218NO_IntegerLowestMax_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1219 td->free_struct = asn_DEF_INTEGER.free_struct;
1220 td->print_struct = asn_DEF_INTEGER.print_struct;
1221 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
1222 td->der_encoder = asn_DEF_INTEGER.der_encoder;
1223 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
1224 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
1225 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001226 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001227 if(!td->per_constraints)
1228 td->per_constraints = asn_DEF_INTEGER.per_constraints;
1229 td->elements = asn_DEF_INTEGER.elements;
1230 td->elements_count = asn_DEF_INTEGER.elements_count;
1231 td->specifics = asn_DEF_INTEGER.specifics;
1232}
1233
1234void
1235NO_IntegerLowestMax_free(asn_TYPE_descriptor_t *td,
1236 void *struct_ptr, int contents_only) {
1237 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1238 td->free_struct(td, struct_ptr, contents_only);
1239}
1240
1241int
1242NO_IntegerLowestMax_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1243 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1244 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1245 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1246}
1247
1248asn_dec_rval_t
1249NO_IntegerLowestMax_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1250 void **structure, const void *bufptr, size_t size, int tag_mode) {
1251 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1252 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1253}
1254
1255asn_enc_rval_t
1256NO_IntegerLowestMax_encode_der(asn_TYPE_descriptor_t *td,
1257 void *structure, int tag_mode, ber_tlv_tag_t tag,
1258 asn_app_consume_bytes_f *cb, void *app_key) {
1259 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1260 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1261}
1262
1263asn_dec_rval_t
1264NO_IntegerLowestMax_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1265 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1266 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1267 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1268}
1269
1270asn_enc_rval_t
1271NO_IntegerLowestMax_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1272 int ilevel, enum xer_encoder_flags_e flags,
1273 asn_app_consume_bytes_f *cb, void *app_key) {
1274 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1275 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1276}
1277
1278asn_dec_rval_t
1279NO_IntegerLowestMax_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1280 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1281 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1282 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1283}
1284
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001285asn_enc_rval_t
1286NO_IntegerLowestMax_encode_uper(asn_TYPE_descriptor_t *td,
1287 asn_per_constraints_t *constraints,
1288 void *structure, asn_per_outp_t *per_out) {
1289 NO_IntegerLowestMax_1_inherit_TYPE_descriptor(td);
1290 return td->uper_encoder(td, constraints, structure, per_out);
1291}
1292
Lev Walkin59b176e2005-11-26 11:25:14 +00001293
Lev Walkin725883b2006-10-09 12:07:58 +00001294/*** <<< CTDEFS [NO-IntegerLowestMax] >>> ***/
1295
Lev Walkin4b5dae32006-10-09 12:27:44 +00001296static asn_per_constraints_t asn_PER_type_NO_IntegerLowestMax_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001297 { APC_SEMI_CONSTRAINED, -1, -1, -3000000000, 0 } /* (-3000000000..MAX) */,
1298 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1299 0, 0 /* No PER value map */
1300};
1301
Lev Walkin59b176e2005-11-26 11:25:14 +00001302/*** <<< STAT-DEFS [NO-IntegerLowestMax] >>> ***/
1303
1304static ber_tlv_tag_t asn_DEF_NO_IntegerLowestMax_tags_1[] = {
1305 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1306};
Lev Walkin59b176e2005-11-26 11:25:14 +00001307asn_TYPE_descriptor_t asn_DEF_NO_IntegerLowestMax = {
1308 "NO-IntegerLowestMax",
1309 "NO-IntegerLowestMax",
1310 NO_IntegerLowestMax_free,
1311 NO_IntegerLowestMax_print,
1312 NO_IntegerLowestMax_constraint,
1313 NO_IntegerLowestMax_decode_ber,
1314 NO_IntegerLowestMax_encode_der,
1315 NO_IntegerLowestMax_decode_xer,
1316 NO_IntegerLowestMax_encode_xer,
1317 NO_IntegerLowestMax_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001318 NO_IntegerLowestMax_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001319 0, /* Use generic outmost tag fetcher */
1320 asn_DEF_NO_IntegerLowestMax_tags_1,
1321 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1322 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
1323 asn_DEF_NO_IntegerLowestMax_tags_1, /* Same as above */
1324 sizeof(asn_DEF_NO_IntegerLowestMax_tags_1)
1325 /sizeof(asn_DEF_NO_IntegerLowestMax_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001326 &asn_PER_type_NO_IntegerLowestMax_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001327 0, 0, /* No members */
1328 0 /* No specifics */
1329};
1330
1331
1332/*** <<< INCLUDES [NO-IntegerOutRange] >>> ***/
1333
Lev Walkin8bb57a22007-12-03 13:41:36 +00001334#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001335
1336/*** <<< TYPE-DECLS [NO-IntegerOutRange] >>> ***/
1337
Lev Walkin8bb57a22007-12-03 13:41:36 +00001338typedef unsigned long NO_IntegerOutRange_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001339
1340/*** <<< FUNC-DECLS [NO-IntegerOutRange] >>> ***/
1341
1342extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange;
1343asn_struct_free_f NO_IntegerOutRange_free;
1344asn_struct_print_f NO_IntegerOutRange_print;
1345asn_constr_check_f NO_IntegerOutRange_constraint;
1346ber_type_decoder_f NO_IntegerOutRange_decode_ber;
1347der_type_encoder_f NO_IntegerOutRange_encode_der;
1348xer_type_decoder_f NO_IntegerOutRange_decode_xer;
1349xer_type_encoder_f NO_IntegerOutRange_encode_xer;
1350per_type_decoder_f NO_IntegerOutRange_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001351per_type_encoder_f NO_IntegerOutRange_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001352
1353/*** <<< CODE [NO-IntegerOutRange] >>> ***/
1354
1355int
1356NO_IntegerOutRange_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001357 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001358 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001359
1360 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001361 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001362 "%s: value not given (%s:%d)",
1363 td->name, __FILE__, __LINE__);
1364 return -1;
1365 }
1366
Lev Walkin8bb57a22007-12-03 13:41:36 +00001367 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001368
1369 if((value >= 3000000000 && value <= 3000000001)) {
1370 /* Constraint check succeeded */
1371 return 0;
1372 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001373 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001374 "%s: constraint failed (%s:%d)",
1375 td->name, __FILE__, __LINE__);
1376 return -1;
1377 }
1378}
1379
1380/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001381 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001382 * so here we adjust the DEF accordingly.
1383 */
1384static void
1385NO_IntegerOutRange_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001386 td->free_struct = asn_DEF_NativeInteger.free_struct;
1387 td->print_struct = asn_DEF_NativeInteger.print_struct;
1388 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1389 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1390 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1391 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1392 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1393 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001394 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001395 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1396 td->elements = asn_DEF_NativeInteger.elements;
1397 td->elements_count = asn_DEF_NativeInteger.elements_count;
1398 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001399}
1400
1401void
1402NO_IntegerOutRange_free(asn_TYPE_descriptor_t *td,
1403 void *struct_ptr, int contents_only) {
1404 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1405 td->free_struct(td, struct_ptr, contents_only);
1406}
1407
1408int
1409NO_IntegerOutRange_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1410 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1411 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1412 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1413}
1414
1415asn_dec_rval_t
1416NO_IntegerOutRange_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1417 void **structure, const void *bufptr, size_t size, int tag_mode) {
1418 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1419 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1420}
1421
1422asn_enc_rval_t
1423NO_IntegerOutRange_encode_der(asn_TYPE_descriptor_t *td,
1424 void *structure, int tag_mode, ber_tlv_tag_t tag,
1425 asn_app_consume_bytes_f *cb, void *app_key) {
1426 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1427 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1428}
1429
1430asn_dec_rval_t
1431NO_IntegerOutRange_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1432 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1433 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1434 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1435}
1436
1437asn_enc_rval_t
1438NO_IntegerOutRange_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1439 int ilevel, enum xer_encoder_flags_e flags,
1440 asn_app_consume_bytes_f *cb, void *app_key) {
1441 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1442 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1443}
1444
1445asn_dec_rval_t
1446NO_IntegerOutRange_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1447 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1448 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1449 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1450}
1451
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001452asn_enc_rval_t
1453NO_IntegerOutRange_encode_uper(asn_TYPE_descriptor_t *td,
1454 asn_per_constraints_t *constraints,
1455 void *structure, asn_per_outp_t *per_out) {
1456 NO_IntegerOutRange_1_inherit_TYPE_descriptor(td);
1457 return td->uper_encoder(td, constraints, structure, per_out);
1458}
1459
Lev Walkin59b176e2005-11-26 11:25:14 +00001460
Lev Walkin725883b2006-10-09 12:07:58 +00001461/*** <<< CTDEFS [NO-IntegerOutRange] >>> ***/
1462
Lev Walkin4b5dae32006-10-09 12:27:44 +00001463static asn_per_constraints_t asn_PER_type_NO_IntegerOutRange_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001464 { APC_CONSTRAINED, 1, -1, 3000000000, 3000000001 } /* (3000000000..3000000001) */,
1465 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1466 0, 0 /* No PER value map */
1467};
1468
Lev Walkin59b176e2005-11-26 11:25:14 +00001469/*** <<< STAT-DEFS [NO-IntegerOutRange] >>> ***/
1470
Lev Walkin8bb57a22007-12-03 13:41:36 +00001471static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutRange_specs_1 = {
1472 0, 0, 0, 0, 0,
1473 0, /* Native long size */
1474 1 /* Unsigned representation */
1475};
Lev Walkin59b176e2005-11-26 11:25:14 +00001476static ber_tlv_tag_t asn_DEF_NO_IntegerOutRange_tags_1[] = {
1477 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1478};
Lev Walkin59b176e2005-11-26 11:25:14 +00001479asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutRange = {
1480 "NO-IntegerOutRange",
1481 "NO-IntegerOutRange",
1482 NO_IntegerOutRange_free,
1483 NO_IntegerOutRange_print,
1484 NO_IntegerOutRange_constraint,
1485 NO_IntegerOutRange_decode_ber,
1486 NO_IntegerOutRange_encode_der,
1487 NO_IntegerOutRange_decode_xer,
1488 NO_IntegerOutRange_encode_xer,
1489 NO_IntegerOutRange_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001490 NO_IntegerOutRange_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001491 0, /* Use generic outmost tag fetcher */
1492 asn_DEF_NO_IntegerOutRange_tags_1,
1493 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1494 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
1495 asn_DEF_NO_IntegerOutRange_tags_1, /* Same as above */
1496 sizeof(asn_DEF_NO_IntegerOutRange_tags_1)
1497 /sizeof(asn_DEF_NO_IntegerOutRange_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001498 &asn_PER_type_NO_IntegerOutRange_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001499 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001500 &asn_SPC_NO_IntegerOutRange_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001501};
1502
1503
1504/*** <<< INCLUDES [NO-IntegerOutValue] >>> ***/
1505
Lev Walkin8bb57a22007-12-03 13:41:36 +00001506#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00001507
1508/*** <<< TYPE-DECLS [NO-IntegerOutValue] >>> ***/
1509
Lev Walkin8bb57a22007-12-03 13:41:36 +00001510typedef unsigned long NO_IntegerOutValue_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00001511
1512/*** <<< FUNC-DECLS [NO-IntegerOutValue] >>> ***/
1513
1514extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue;
1515asn_struct_free_f NO_IntegerOutValue_free;
1516asn_struct_print_f NO_IntegerOutValue_print;
1517asn_constr_check_f NO_IntegerOutValue_constraint;
1518ber_type_decoder_f NO_IntegerOutValue_decode_ber;
1519der_type_encoder_f NO_IntegerOutValue_encode_der;
1520xer_type_decoder_f NO_IntegerOutValue_decode_xer;
1521xer_type_encoder_f NO_IntegerOutValue_encode_xer;
1522per_type_decoder_f NO_IntegerOutValue_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001523per_type_encoder_f NO_IntegerOutValue_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001524
1525/*** <<< CODE [NO-IntegerOutValue] >>> ***/
1526
1527int
1528NO_IntegerOutValue_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001529 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001530 unsigned long value;
Lev Walkin59b176e2005-11-26 11:25:14 +00001531
1532 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001533 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001534 "%s: value not given (%s:%d)",
1535 td->name, __FILE__, __LINE__);
1536 return -1;
1537 }
1538
Lev Walkin8bb57a22007-12-03 13:41:36 +00001539 value = *(const unsigned long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00001540
1541 if((value == 3000000000)) {
1542 /* Constraint check succeeded */
1543 return 0;
1544 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001545 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001546 "%s: constraint failed (%s:%d)",
1547 td->name, __FILE__, __LINE__);
1548 return -1;
1549 }
1550}
1551
1552/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00001553 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00001554 * so here we adjust the DEF accordingly.
1555 */
1556static void
1557NO_IntegerOutValue_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00001558 td->free_struct = asn_DEF_NativeInteger.free_struct;
1559 td->print_struct = asn_DEF_NativeInteger.print_struct;
1560 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1561 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1562 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1563 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1564 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
1565 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001566 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00001567 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1568 td->elements = asn_DEF_NativeInteger.elements;
1569 td->elements_count = asn_DEF_NativeInteger.elements_count;
1570 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00001571}
1572
1573void
1574NO_IntegerOutValue_free(asn_TYPE_descriptor_t *td,
1575 void *struct_ptr, int contents_only) {
1576 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1577 td->free_struct(td, struct_ptr, contents_only);
1578}
1579
1580int
1581NO_IntegerOutValue_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1582 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1583 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1584 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1585}
1586
1587asn_dec_rval_t
1588NO_IntegerOutValue_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1589 void **structure, const void *bufptr, size_t size, int tag_mode) {
1590 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1591 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1592}
1593
1594asn_enc_rval_t
1595NO_IntegerOutValue_encode_der(asn_TYPE_descriptor_t *td,
1596 void *structure, int tag_mode, ber_tlv_tag_t tag,
1597 asn_app_consume_bytes_f *cb, void *app_key) {
1598 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1599 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1600}
1601
1602asn_dec_rval_t
1603NO_IntegerOutValue_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1604 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1605 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1606 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1607}
1608
1609asn_enc_rval_t
1610NO_IntegerOutValue_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1611 int ilevel, enum xer_encoder_flags_e flags,
1612 asn_app_consume_bytes_f *cb, void *app_key) {
1613 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1614 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1615}
1616
1617asn_dec_rval_t
1618NO_IntegerOutValue_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1619 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1620 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1621 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1622}
1623
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001624asn_enc_rval_t
1625NO_IntegerOutValue_encode_uper(asn_TYPE_descriptor_t *td,
1626 asn_per_constraints_t *constraints,
1627 void *structure, asn_per_outp_t *per_out) {
1628 NO_IntegerOutValue_1_inherit_TYPE_descriptor(td);
1629 return td->uper_encoder(td, constraints, structure, per_out);
1630}
1631
Lev Walkin59b176e2005-11-26 11:25:14 +00001632
Lev Walkin725883b2006-10-09 12:07:58 +00001633/*** <<< CTDEFS [NO-IntegerOutValue] >>> ***/
1634
Lev Walkin4b5dae32006-10-09 12:27:44 +00001635static asn_per_constraints_t asn_PER_type_NO_IntegerOutValue_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001636 { APC_CONSTRAINED, 0, -1, 3000000000, 3000000000 } /* (3000000000..3000000000) */,
1637 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1638 0, 0 /* No PER value map */
1639};
1640
Lev Walkin59b176e2005-11-26 11:25:14 +00001641/*** <<< STAT-DEFS [NO-IntegerOutValue] >>> ***/
1642
Lev Walkin8bb57a22007-12-03 13:41:36 +00001643static asn_INTEGER_specifics_t asn_SPC_NO_IntegerOutValue_specs_1 = {
1644 0, 0, 0, 0, 0,
1645 0, /* Native long size */
1646 1 /* Unsigned representation */
1647};
Lev Walkin59b176e2005-11-26 11:25:14 +00001648static ber_tlv_tag_t asn_DEF_NO_IntegerOutValue_tags_1[] = {
1649 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1650};
Lev Walkin59b176e2005-11-26 11:25:14 +00001651asn_TYPE_descriptor_t asn_DEF_NO_IntegerOutValue = {
1652 "NO-IntegerOutValue",
1653 "NO-IntegerOutValue",
1654 NO_IntegerOutValue_free,
1655 NO_IntegerOutValue_print,
1656 NO_IntegerOutValue_constraint,
1657 NO_IntegerOutValue_decode_ber,
1658 NO_IntegerOutValue_encode_der,
1659 NO_IntegerOutValue_decode_xer,
1660 NO_IntegerOutValue_encode_xer,
1661 NO_IntegerOutValue_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001662 NO_IntegerOutValue_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001663 0, /* Use generic outmost tag fetcher */
1664 asn_DEF_NO_IntegerOutValue_tags_1,
1665 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1666 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
1667 asn_DEF_NO_IntegerOutValue_tags_1, /* Same as above */
1668 sizeof(asn_DEF_NO_IntegerOutValue_tags_1)
1669 /sizeof(asn_DEF_NO_IntegerOutValue_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001670 &asn_PER_type_NO_IntegerOutValue_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001671 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00001672 &asn_SPC_NO_IntegerOutValue_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00001673};
1674
1675
1676/*** <<< INCLUDES [OK-IntegerInRange1] >>> ***/
1677
1678#include <NativeInteger.h>
1679
1680/*** <<< TYPE-DECLS [OK-IntegerInRange1] >>> ***/
1681
1682typedef long OK_IntegerInRange1_t;
1683
1684/*** <<< FUNC-DECLS [OK-IntegerInRange1] >>> ***/
1685
1686extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1;
1687asn_struct_free_f OK_IntegerInRange1_free;
1688asn_struct_print_f OK_IntegerInRange1_print;
1689asn_constr_check_f OK_IntegerInRange1_constraint;
1690ber_type_decoder_f OK_IntegerInRange1_decode_ber;
1691der_type_encoder_f OK_IntegerInRange1_encode_der;
1692xer_type_decoder_f OK_IntegerInRange1_decode_xer;
1693xer_type_encoder_f OK_IntegerInRange1_encode_xer;
1694per_type_decoder_f OK_IntegerInRange1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001695per_type_encoder_f OK_IntegerInRange1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001696
1697/*** <<< CODE [OK-IntegerInRange1] >>> ***/
1698
1699int
1700OK_IntegerInRange1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001701 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001702 long value;
1703
1704 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001705 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001706 "%s: value not given (%s:%d)",
1707 td->name, __FILE__, __LINE__);
1708 return -1;
1709 }
1710
1711 value = *(const long *)sptr;
1712
1713 if((value >= -100 && value <= 100)) {
1714 /* Constraint check succeeded */
1715 return 0;
1716 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001717 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001718 "%s: constraint failed (%s:%d)",
1719 td->name, __FILE__, __LINE__);
1720 return -1;
1721 }
1722}
1723
1724/*
1725 * This type is implemented using NativeInteger,
1726 * so here we adjust the DEF accordingly.
1727 */
1728static void
1729OK_IntegerInRange1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1730 td->free_struct = asn_DEF_NativeInteger.free_struct;
1731 td->print_struct = asn_DEF_NativeInteger.print_struct;
1732 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1733 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1734 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1735 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1736 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001737 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001738 if(!td->per_constraints)
1739 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1740 td->elements = asn_DEF_NativeInteger.elements;
1741 td->elements_count = asn_DEF_NativeInteger.elements_count;
1742 td->specifics = asn_DEF_NativeInteger.specifics;
1743}
1744
1745void
1746OK_IntegerInRange1_free(asn_TYPE_descriptor_t *td,
1747 void *struct_ptr, int contents_only) {
1748 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1749 td->free_struct(td, struct_ptr, contents_only);
1750}
1751
1752int
1753OK_IntegerInRange1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1754 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1755 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1756 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1757}
1758
1759asn_dec_rval_t
1760OK_IntegerInRange1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1761 void **structure, const void *bufptr, size_t size, int tag_mode) {
1762 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1763 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1764}
1765
1766asn_enc_rval_t
1767OK_IntegerInRange1_encode_der(asn_TYPE_descriptor_t *td,
1768 void *structure, int tag_mode, ber_tlv_tag_t tag,
1769 asn_app_consume_bytes_f *cb, void *app_key) {
1770 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1771 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1772}
1773
1774asn_dec_rval_t
1775OK_IntegerInRange1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1776 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1777 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1778 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1779}
1780
1781asn_enc_rval_t
1782OK_IntegerInRange1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1783 int ilevel, enum xer_encoder_flags_e flags,
1784 asn_app_consume_bytes_f *cb, void *app_key) {
1785 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1786 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1787}
1788
1789asn_dec_rval_t
1790OK_IntegerInRange1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1791 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1792 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1793 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1794}
1795
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001796asn_enc_rval_t
1797OK_IntegerInRange1_encode_uper(asn_TYPE_descriptor_t *td,
1798 asn_per_constraints_t *constraints,
1799 void *structure, asn_per_outp_t *per_out) {
1800 OK_IntegerInRange1_1_inherit_TYPE_descriptor(td);
1801 return td->uper_encoder(td, constraints, structure, per_out);
1802}
1803
Lev Walkin59b176e2005-11-26 11:25:14 +00001804
Lev Walkin725883b2006-10-09 12:07:58 +00001805/*** <<< CTDEFS [OK-IntegerInRange1] >>> ***/
1806
Lev Walkin4b5dae32006-10-09 12:27:44 +00001807static asn_per_constraints_t asn_PER_type_OK_IntegerInRange1_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001808 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
1809 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1810 0, 0 /* No PER value map */
1811};
1812
Lev Walkin59b176e2005-11-26 11:25:14 +00001813/*** <<< STAT-DEFS [OK-IntegerInRange1] >>> ***/
1814
1815static ber_tlv_tag_t asn_DEF_OK_IntegerInRange1_tags_1[] = {
1816 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1817};
Lev Walkin59b176e2005-11-26 11:25:14 +00001818asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange1 = {
1819 "OK-IntegerInRange1",
1820 "OK-IntegerInRange1",
1821 OK_IntegerInRange1_free,
1822 OK_IntegerInRange1_print,
1823 OK_IntegerInRange1_constraint,
1824 OK_IntegerInRange1_decode_ber,
1825 OK_IntegerInRange1_encode_der,
1826 OK_IntegerInRange1_decode_xer,
1827 OK_IntegerInRange1_encode_xer,
1828 OK_IntegerInRange1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001829 OK_IntegerInRange1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001830 0, /* Use generic outmost tag fetcher */
1831 asn_DEF_OK_IntegerInRange1_tags_1,
1832 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1833 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
1834 asn_DEF_OK_IntegerInRange1_tags_1, /* Same as above */
1835 sizeof(asn_DEF_OK_IntegerInRange1_tags_1)
1836 /sizeof(asn_DEF_OK_IntegerInRange1_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00001837 &asn_PER_type_OK_IntegerInRange1_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00001838 0, 0, /* No members */
1839 0 /* No specifics */
1840};
1841
1842
1843/*** <<< INCLUDES [OK-IntegerInRange2] >>> ***/
1844
1845#include <NativeInteger.h>
1846
1847/*** <<< TYPE-DECLS [OK-IntegerInRange2] >>> ***/
1848
1849typedef long OK_IntegerInRange2_t;
1850
1851/*** <<< FUNC-DECLS [OK-IntegerInRange2] >>> ***/
1852
1853extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2;
1854asn_struct_free_f OK_IntegerInRange2_free;
1855asn_struct_print_f OK_IntegerInRange2_print;
1856asn_constr_check_f OK_IntegerInRange2_constraint;
1857ber_type_decoder_f OK_IntegerInRange2_decode_ber;
1858der_type_encoder_f OK_IntegerInRange2_encode_der;
1859xer_type_decoder_f OK_IntegerInRange2_decode_xer;
1860xer_type_encoder_f OK_IntegerInRange2_encode_xer;
1861per_type_decoder_f OK_IntegerInRange2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001862per_type_encoder_f OK_IntegerInRange2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00001863
1864/*** <<< CODE [OK-IntegerInRange2] >>> ***/
1865
1866int
1867OK_IntegerInRange2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00001868 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00001869 long value;
1870
1871 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001872 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001873 "%s: value not given (%s:%d)",
1874 td->name, __FILE__, __LINE__);
1875 return -1;
1876 }
1877
1878 value = *(const long *)sptr;
1879
1880 if(((value == -100) || (value == 100))) {
1881 /* Constraint check succeeded */
1882 return 0;
1883 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00001884 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00001885 "%s: constraint failed (%s:%d)",
1886 td->name, __FILE__, __LINE__);
1887 return -1;
1888 }
1889}
1890
1891/*
1892 * This type is implemented using NativeInteger,
1893 * so here we adjust the DEF accordingly.
1894 */
1895static void
1896OK_IntegerInRange2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1897 td->free_struct = asn_DEF_NativeInteger.free_struct;
1898 td->print_struct = asn_DEF_NativeInteger.print_struct;
1899 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
1900 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
1901 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
1902 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
1903 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001904 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00001905 if(!td->per_constraints)
1906 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
1907 td->elements = asn_DEF_NativeInteger.elements;
1908 td->elements_count = asn_DEF_NativeInteger.elements_count;
1909 td->specifics = asn_DEF_NativeInteger.specifics;
1910}
1911
1912void
1913OK_IntegerInRange2_free(asn_TYPE_descriptor_t *td,
1914 void *struct_ptr, int contents_only) {
1915 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1916 td->free_struct(td, struct_ptr, contents_only);
1917}
1918
1919int
1920OK_IntegerInRange2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1921 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1922 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1923 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1924}
1925
1926asn_dec_rval_t
1927OK_IntegerInRange2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1928 void **structure, const void *bufptr, size_t size, int tag_mode) {
1929 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1930 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1931}
1932
1933asn_enc_rval_t
1934OK_IntegerInRange2_encode_der(asn_TYPE_descriptor_t *td,
1935 void *structure, int tag_mode, ber_tlv_tag_t tag,
1936 asn_app_consume_bytes_f *cb, void *app_key) {
1937 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1938 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1939}
1940
1941asn_dec_rval_t
1942OK_IntegerInRange2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1943 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1944 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1945 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1946}
1947
1948asn_enc_rval_t
1949OK_IntegerInRange2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1950 int ilevel, enum xer_encoder_flags_e flags,
1951 asn_app_consume_bytes_f *cb, void *app_key) {
1952 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1953 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1954}
1955
1956asn_dec_rval_t
1957OK_IntegerInRange2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1958 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1959 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1960 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1961}
1962
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001963asn_enc_rval_t
1964OK_IntegerInRange2_encode_uper(asn_TYPE_descriptor_t *td,
1965 asn_per_constraints_t *constraints,
1966 void *structure, asn_per_outp_t *per_out) {
1967 OK_IntegerInRange2_1_inherit_TYPE_descriptor(td);
1968 return td->uper_encoder(td, constraints, structure, per_out);
1969}
1970
Lev Walkin59b176e2005-11-26 11:25:14 +00001971
Lev Walkin725883b2006-10-09 12:07:58 +00001972/*** <<< CTDEFS [OK-IntegerInRange2] >>> ***/
1973
Lev Walkin4b5dae32006-10-09 12:27:44 +00001974static asn_per_constraints_t asn_PER_type_OK_IntegerInRange2_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00001975 { APC_CONSTRAINED, 8, 8, -100, 100 } /* (-100..100) */,
1976 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1977 0, 0 /* No PER value map */
1978};
1979
Lev Walkin59b176e2005-11-26 11:25:14 +00001980/*** <<< STAT-DEFS [OK-IntegerInRange2] >>> ***/
1981
1982static ber_tlv_tag_t asn_DEF_OK_IntegerInRange2_tags_1[] = {
1983 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
1984};
Lev Walkin59b176e2005-11-26 11:25:14 +00001985asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange2 = {
1986 "OK-IntegerInRange2",
1987 "OK-IntegerInRange2",
1988 OK_IntegerInRange2_free,
1989 OK_IntegerInRange2_print,
1990 OK_IntegerInRange2_constraint,
1991 OK_IntegerInRange2_decode_ber,
1992 OK_IntegerInRange2_encode_der,
1993 OK_IntegerInRange2_decode_xer,
1994 OK_IntegerInRange2_encode_xer,
1995 OK_IntegerInRange2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00001996 OK_IntegerInRange2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00001997 0, /* Use generic outmost tag fetcher */
1998 asn_DEF_OK_IntegerInRange2_tags_1,
1999 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2000 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
2001 asn_DEF_OK_IntegerInRange2_tags_1, /* Same as above */
2002 sizeof(asn_DEF_OK_IntegerInRange2_tags_1)
2003 /sizeof(asn_DEF_OK_IntegerInRange2_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002004 &asn_PER_type_OK_IntegerInRange2_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002005 0, 0, /* No members */
2006 0 /* No specifics */
2007};
2008
2009
2010/*** <<< INCLUDES [OK-IntegerInRange3] >>> ***/
2011
2012#include <NativeInteger.h>
2013
2014/*** <<< TYPE-DECLS [OK-IntegerInRange3] >>> ***/
2015
2016typedef long OK_IntegerInRange3_t;
2017
2018/*** <<< FUNC-DECLS [OK-IntegerInRange3] >>> ***/
2019
2020extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3;
2021asn_struct_free_f OK_IntegerInRange3_free;
2022asn_struct_print_f OK_IntegerInRange3_print;
2023asn_constr_check_f OK_IntegerInRange3_constraint;
2024ber_type_decoder_f OK_IntegerInRange3_decode_ber;
2025der_type_encoder_f OK_IntegerInRange3_encode_der;
2026xer_type_decoder_f OK_IntegerInRange3_decode_xer;
2027xer_type_encoder_f OK_IntegerInRange3_encode_xer;
2028per_type_decoder_f OK_IntegerInRange3_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002029per_type_encoder_f OK_IntegerInRange3_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002030
2031/*** <<< CODE [OK-IntegerInRange3] >>> ***/
2032
2033int
2034OK_IntegerInRange3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002035 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002036 long value;
2037
2038 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002039 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002040 "%s: value not given (%s:%d)",
2041 td->name, __FILE__, __LINE__);
2042 return -1;
2043 }
2044
2045 value = *(const long *)sptr;
2046
Lev Walkin63b41262007-11-06 01:48:46 +00002047 if((value >= (-2147483647L - 1) && value <= 2147483647)) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002048 /* Constraint check succeeded */
2049 return 0;
2050 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002051 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002052 "%s: constraint failed (%s:%d)",
2053 td->name, __FILE__, __LINE__);
2054 return -1;
2055 }
2056}
2057
2058/*
2059 * This type is implemented using NativeInteger,
2060 * so here we adjust the DEF accordingly.
2061 */
2062static void
2063OK_IntegerInRange3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2064 td->free_struct = asn_DEF_NativeInteger.free_struct;
2065 td->print_struct = asn_DEF_NativeInteger.print_struct;
2066 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2067 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2068 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2069 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2070 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002071 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002072 if(!td->per_constraints)
2073 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2074 td->elements = asn_DEF_NativeInteger.elements;
2075 td->elements_count = asn_DEF_NativeInteger.elements_count;
2076 td->specifics = asn_DEF_NativeInteger.specifics;
2077}
2078
2079void
2080OK_IntegerInRange3_free(asn_TYPE_descriptor_t *td,
2081 void *struct_ptr, int contents_only) {
2082 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2083 td->free_struct(td, struct_ptr, contents_only);
2084}
2085
2086int
2087OK_IntegerInRange3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2088 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2089 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2090 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2091}
2092
2093asn_dec_rval_t
2094OK_IntegerInRange3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2095 void **structure, const void *bufptr, size_t size, int tag_mode) {
2096 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2097 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2098}
2099
2100asn_enc_rval_t
2101OK_IntegerInRange3_encode_der(asn_TYPE_descriptor_t *td,
2102 void *structure, int tag_mode, ber_tlv_tag_t tag,
2103 asn_app_consume_bytes_f *cb, void *app_key) {
2104 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2105 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2106}
2107
2108asn_dec_rval_t
2109OK_IntegerInRange3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2110 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2111 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2112 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2113}
2114
2115asn_enc_rval_t
2116OK_IntegerInRange3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2117 int ilevel, enum xer_encoder_flags_e flags,
2118 asn_app_consume_bytes_f *cb, void *app_key) {
2119 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2120 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2121}
2122
2123asn_dec_rval_t
2124OK_IntegerInRange3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2125 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2126 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2127 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2128}
2129
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002130asn_enc_rval_t
2131OK_IntegerInRange3_encode_uper(asn_TYPE_descriptor_t *td,
2132 asn_per_constraints_t *constraints,
2133 void *structure, asn_per_outp_t *per_out) {
2134 OK_IntegerInRange3_1_inherit_TYPE_descriptor(td);
2135 return td->uper_encoder(td, constraints, structure, per_out);
2136}
2137
Lev Walkin59b176e2005-11-26 11:25:14 +00002138
Lev Walkin725883b2006-10-09 12:07:58 +00002139/*** <<< CTDEFS [OK-IntegerInRange3] >>> ***/
2140
Lev Walkin4b5dae32006-10-09 12:27:44 +00002141static asn_per_constraints_t asn_PER_type_OK_IntegerInRange3_constr_1 = {
Lev Walkin63b41262007-11-06 01:48:46 +00002142 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002143 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2144 0, 0 /* No PER value map */
2145};
2146
Lev Walkin59b176e2005-11-26 11:25:14 +00002147/*** <<< STAT-DEFS [OK-IntegerInRange3] >>> ***/
2148
2149static ber_tlv_tag_t asn_DEF_OK_IntegerInRange3_tags_1[] = {
2150 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2151};
Lev Walkin59b176e2005-11-26 11:25:14 +00002152asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange3 = {
2153 "OK-IntegerInRange3",
2154 "OK-IntegerInRange3",
2155 OK_IntegerInRange3_free,
2156 OK_IntegerInRange3_print,
2157 OK_IntegerInRange3_constraint,
2158 OK_IntegerInRange3_decode_ber,
2159 OK_IntegerInRange3_encode_der,
2160 OK_IntegerInRange3_decode_xer,
2161 OK_IntegerInRange3_encode_xer,
2162 OK_IntegerInRange3_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002163 OK_IntegerInRange3_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002164 0, /* Use generic outmost tag fetcher */
2165 asn_DEF_OK_IntegerInRange3_tags_1,
2166 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2167 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
2168 asn_DEF_OK_IntegerInRange3_tags_1, /* Same as above */
2169 sizeof(asn_DEF_OK_IntegerInRange3_tags_1)
2170 /sizeof(asn_DEF_OK_IntegerInRange3_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002171 &asn_PER_type_OK_IntegerInRange3_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002172 0, 0, /* No members */
2173 0 /* No specifics */
2174};
2175
2176
2177/*** <<< INCLUDES [OK-IntegerInRange4] >>> ***/
2178
2179#include <NativeInteger.h>
2180
2181/*** <<< TYPE-DECLS [OK-IntegerInRange4] >>> ***/
2182
2183typedef long OK_IntegerInRange4_t;
2184
2185/*** <<< FUNC-DECLS [OK-IntegerInRange4] >>> ***/
2186
2187extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4;
2188asn_struct_free_f OK_IntegerInRange4_free;
2189asn_struct_print_f OK_IntegerInRange4_print;
2190asn_constr_check_f OK_IntegerInRange4_constraint;
2191ber_type_decoder_f OK_IntegerInRange4_decode_ber;
2192der_type_encoder_f OK_IntegerInRange4_encode_der;
2193xer_type_decoder_f OK_IntegerInRange4_decode_xer;
2194xer_type_encoder_f OK_IntegerInRange4_encode_xer;
2195per_type_decoder_f OK_IntegerInRange4_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002196per_type_encoder_f OK_IntegerInRange4_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002197
2198/*** <<< CODE [OK-IntegerInRange4] >>> ***/
2199
2200int
2201OK_IntegerInRange4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002202 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002203 long value;
2204
2205 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002206 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002207 "%s: value not given (%s:%d)",
2208 td->name, __FILE__, __LINE__);
2209 return -1;
2210 }
2211
2212 value = *(const long *)sptr;
2213
Lev Walkin63b41262007-11-06 01:48:46 +00002214 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002215 /* Constraint check succeeded */
2216 return 0;
2217 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002218 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002219 "%s: constraint failed (%s:%d)",
2220 td->name, __FILE__, __LINE__);
2221 return -1;
2222 }
2223}
2224
2225/*
2226 * This type is implemented using NativeInteger,
2227 * so here we adjust the DEF accordingly.
2228 */
2229static void
2230OK_IntegerInRange4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2231 td->free_struct = asn_DEF_NativeInteger.free_struct;
2232 td->print_struct = asn_DEF_NativeInteger.print_struct;
2233 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2234 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2235 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2236 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2237 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002238 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002239 if(!td->per_constraints)
2240 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2241 td->elements = asn_DEF_NativeInteger.elements;
2242 td->elements_count = asn_DEF_NativeInteger.elements_count;
2243 td->specifics = asn_DEF_NativeInteger.specifics;
2244}
2245
2246void
2247OK_IntegerInRange4_free(asn_TYPE_descriptor_t *td,
2248 void *struct_ptr, int contents_only) {
2249 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2250 td->free_struct(td, struct_ptr, contents_only);
2251}
2252
2253int
2254OK_IntegerInRange4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2255 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2256 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2257 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2258}
2259
2260asn_dec_rval_t
2261OK_IntegerInRange4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2262 void **structure, const void *bufptr, size_t size, int tag_mode) {
2263 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2264 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2265}
2266
2267asn_enc_rval_t
2268OK_IntegerInRange4_encode_der(asn_TYPE_descriptor_t *td,
2269 void *structure, int tag_mode, ber_tlv_tag_t tag,
2270 asn_app_consume_bytes_f *cb, void *app_key) {
2271 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2272 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2273}
2274
2275asn_dec_rval_t
2276OK_IntegerInRange4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2277 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2278 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2279 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2280}
2281
2282asn_enc_rval_t
2283OK_IntegerInRange4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2284 int ilevel, enum xer_encoder_flags_e flags,
2285 asn_app_consume_bytes_f *cb, void *app_key) {
2286 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2287 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2288}
2289
2290asn_dec_rval_t
2291OK_IntegerInRange4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2292 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2293 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2294 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2295}
2296
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002297asn_enc_rval_t
2298OK_IntegerInRange4_encode_uper(asn_TYPE_descriptor_t *td,
2299 asn_per_constraints_t *constraints,
2300 void *structure, asn_per_outp_t *per_out) {
2301 OK_IntegerInRange4_1_inherit_TYPE_descriptor(td);
2302 return td->uper_encoder(td, constraints, structure, per_out);
2303}
2304
Lev Walkin59b176e2005-11-26 11:25:14 +00002305
Lev Walkin725883b2006-10-09 12:07:58 +00002306/*** <<< CTDEFS [OK-IntegerInRange4] >>> ***/
2307
Lev Walkin4b5dae32006-10-09 12:27:44 +00002308static asn_per_constraints_t asn_PER_type_OK_IntegerInRange4_constr_1 = {
Lev Walkin63b41262007-11-06 01:48:46 +00002309 { APC_CONSTRAINED, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002310 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2311 0, 0 /* No PER value map */
2312};
2313
Lev Walkin59b176e2005-11-26 11:25:14 +00002314/*** <<< STAT-DEFS [OK-IntegerInRange4] >>> ***/
2315
2316static ber_tlv_tag_t asn_DEF_OK_IntegerInRange4_tags_1[] = {
2317 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2318};
Lev Walkin59b176e2005-11-26 11:25:14 +00002319asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange4 = {
2320 "OK-IntegerInRange4",
2321 "OK-IntegerInRange4",
2322 OK_IntegerInRange4_free,
2323 OK_IntegerInRange4_print,
2324 OK_IntegerInRange4_constraint,
2325 OK_IntegerInRange4_decode_ber,
2326 OK_IntegerInRange4_encode_der,
2327 OK_IntegerInRange4_decode_xer,
2328 OK_IntegerInRange4_encode_xer,
2329 OK_IntegerInRange4_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002330 OK_IntegerInRange4_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002331 0, /* Use generic outmost tag fetcher */
2332 asn_DEF_OK_IntegerInRange4_tags_1,
2333 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2334 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
2335 asn_DEF_OK_IntegerInRange4_tags_1, /* Same as above */
2336 sizeof(asn_DEF_OK_IntegerInRange4_tags_1)
2337 /sizeof(asn_DEF_OK_IntegerInRange4_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002338 &asn_PER_type_OK_IntegerInRange4_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002339 0, 0, /* No members */
2340 0 /* No specifics */
2341};
2342
2343
2344/*** <<< INCLUDES [OK-IntegerInRange5] >>> ***/
2345
Lev Walkin2a744a72013-03-27 01:56:23 -07002346#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002347
2348/*** <<< TYPE-DECLS [OK-IntegerInRange5] >>> ***/
2349
Lev Walkin2a744a72013-03-27 01:56:23 -07002350typedef long OK_IntegerInRange5_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002351
2352/*** <<< FUNC-DECLS [OK-IntegerInRange5] >>> ***/
2353
2354extern asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5;
2355asn_struct_free_f OK_IntegerInRange5_free;
2356asn_struct_print_f OK_IntegerInRange5_print;
2357asn_constr_check_f OK_IntegerInRange5_constraint;
2358ber_type_decoder_f OK_IntegerInRange5_decode_ber;
2359der_type_encoder_f OK_IntegerInRange5_encode_der;
2360xer_type_decoder_f OK_IntegerInRange5_decode_xer;
2361xer_type_encoder_f OK_IntegerInRange5_encode_xer;
2362per_type_decoder_f OK_IntegerInRange5_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002363per_type_encoder_f OK_IntegerInRange5_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002364
2365/*** <<< CODE [OK-IntegerInRange5] >>> ***/
2366
2367int
2368OK_IntegerInRange5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002369 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002370 long value;
2371
2372 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002373 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002374 "%s: value not given (%s:%d)",
2375 td->name, __FILE__, __LINE__);
2376 return -1;
2377 }
2378
Lev Walkin2a744a72013-03-27 01:56:23 -07002379 value = *(const long *)sptr;
Lev Walkin59b176e2005-11-26 11:25:14 +00002380
Lev Walkin63b41262007-11-06 01:48:46 +00002381 if(((value == (-2147483647L - 1)) || (value == 2147483647))) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002382 /* Constraint check succeeded */
2383 return 0;
2384 } else {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002385 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002386 "%s: constraint failed (%s:%d)",
2387 td->name, __FILE__, __LINE__);
2388 return -1;
2389 }
2390}
2391
2392/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002393 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002394 * so here we adjust the DEF accordingly.
2395 */
2396static void
2397OK_IntegerInRange5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002398 td->free_struct = asn_DEF_NativeInteger.free_struct;
2399 td->print_struct = asn_DEF_NativeInteger.print_struct;
2400 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2401 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2402 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2403 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2404 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2405 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002406 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002407 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2408 td->elements = asn_DEF_NativeInteger.elements;
2409 td->elements_count = asn_DEF_NativeInteger.elements_count;
2410 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002411}
2412
2413void
2414OK_IntegerInRange5_free(asn_TYPE_descriptor_t *td,
2415 void *struct_ptr, int contents_only) {
2416 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2417 td->free_struct(td, struct_ptr, contents_only);
2418}
2419
2420int
2421OK_IntegerInRange5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2422 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2423 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2424 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2425}
2426
2427asn_dec_rval_t
2428OK_IntegerInRange5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2429 void **structure, const void *bufptr, size_t size, int tag_mode) {
2430 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2431 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2432}
2433
2434asn_enc_rval_t
2435OK_IntegerInRange5_encode_der(asn_TYPE_descriptor_t *td,
2436 void *structure, int tag_mode, ber_tlv_tag_t tag,
2437 asn_app_consume_bytes_f *cb, void *app_key) {
2438 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2439 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2440}
2441
2442asn_dec_rval_t
2443OK_IntegerInRange5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2444 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2445 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2446 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2447}
2448
2449asn_enc_rval_t
2450OK_IntegerInRange5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2451 int ilevel, enum xer_encoder_flags_e flags,
2452 asn_app_consume_bytes_f *cb, void *app_key) {
2453 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2454 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2455}
2456
2457asn_dec_rval_t
2458OK_IntegerInRange5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2459 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2460 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2461 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2462}
2463
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002464asn_enc_rval_t
2465OK_IntegerInRange5_encode_uper(asn_TYPE_descriptor_t *td,
2466 asn_per_constraints_t *constraints,
2467 void *structure, asn_per_outp_t *per_out) {
2468 OK_IntegerInRange5_1_inherit_TYPE_descriptor(td);
2469 return td->uper_encoder(td, constraints, structure, per_out);
2470}
2471
Lev Walkin59b176e2005-11-26 11:25:14 +00002472
Lev Walkin725883b2006-10-09 12:07:58 +00002473/*** <<< CTDEFS [OK-IntegerInRange5] >>> ***/
2474
Lev Walkin4b5dae32006-10-09 12:27:44 +00002475static asn_per_constraints_t asn_PER_type_OK_IntegerInRange5_constr_1 = {
Lev Walkin63b41262007-11-06 01:48:46 +00002476 { APC_CONSTRAINED | APC_EXTENSIBLE, 32, -1, (-2147483647L - 1), 2147483647 } /* (-2147483648..2147483647,...) */,
Lev Walkin725883b2006-10-09 12:07:58 +00002477 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2478 0, 0 /* No PER value map */
2479};
2480
Lev Walkin59b176e2005-11-26 11:25:14 +00002481/*** <<< STAT-DEFS [OK-IntegerInRange5] >>> ***/
2482
2483static ber_tlv_tag_t asn_DEF_OK_IntegerInRange5_tags_1[] = {
2484 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2485};
Lev Walkin59b176e2005-11-26 11:25:14 +00002486asn_TYPE_descriptor_t asn_DEF_OK_IntegerInRange5 = {
2487 "OK-IntegerInRange5",
2488 "OK-IntegerInRange5",
2489 OK_IntegerInRange5_free,
2490 OK_IntegerInRange5_print,
2491 OK_IntegerInRange5_constraint,
2492 OK_IntegerInRange5_decode_ber,
2493 OK_IntegerInRange5_encode_der,
2494 OK_IntegerInRange5_decode_xer,
2495 OK_IntegerInRange5_encode_xer,
2496 OK_IntegerInRange5_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002497 OK_IntegerInRange5_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002498 0, /* Use generic outmost tag fetcher */
2499 asn_DEF_OK_IntegerInRange5_tags_1,
2500 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2501 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
2502 asn_DEF_OK_IntegerInRange5_tags_1, /* Same as above */
2503 sizeof(asn_DEF_OK_IntegerInRange5_tags_1)
2504 /sizeof(asn_DEF_OK_IntegerInRange5_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002505 &asn_PER_type_OK_IntegerInRange5_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002506 0, 0, /* No members */
2507 0 /* No specifics */
2508};
2509
2510
2511/*** <<< INCLUDES [NO-IntegerInRange6] >>> ***/
2512
Lev Walkin8bb57a22007-12-03 13:41:36 +00002513#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002514
2515/*** <<< TYPE-DECLS [NO-IntegerInRange6] >>> ***/
2516
Lev Walkin8bb57a22007-12-03 13:41:36 +00002517typedef unsigned long NO_IntegerInRange6_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002518
2519/*** <<< FUNC-DECLS [NO-IntegerInRange6] >>> ***/
2520
2521extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6;
2522asn_struct_free_f NO_IntegerInRange6_free;
2523asn_struct_print_f NO_IntegerInRange6_print;
2524asn_constr_check_f NO_IntegerInRange6_constraint;
2525ber_type_decoder_f NO_IntegerInRange6_decode_ber;
2526der_type_encoder_f NO_IntegerInRange6_encode_der;
2527xer_type_decoder_f NO_IntegerInRange6_decode_xer;
2528xer_type_encoder_f NO_IntegerInRange6_encode_xer;
2529per_type_decoder_f NO_IntegerInRange6_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002530per_type_encoder_f NO_IntegerInRange6_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002531
2532/*** <<< CODE [NO-IntegerInRange6] >>> ***/
2533
2534int
2535NO_IntegerInRange6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002536 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002537
2538 if(!sptr) {
Lev Walkin739d9bf2006-07-13 13:28:32 +00002539 _ASN_CTFAIL(app_key, td, sptr,
Lev Walkin59b176e2005-11-26 11:25:14 +00002540 "%s: value not given (%s:%d)",
2541 td->name, __FILE__, __LINE__);
2542 return -1;
2543 }
2544
Lev Walkin59b176e2005-11-26 11:25:14 +00002545
Lev Walkin8bb57a22007-12-03 13:41:36 +00002546 /* Constraint check succeeded */
2547 return 0;
Lev Walkin59b176e2005-11-26 11:25:14 +00002548}
2549
2550/*
Lev Walkin8bb57a22007-12-03 13:41:36 +00002551 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002552 * so here we adjust the DEF accordingly.
2553 */
2554static void
2555NO_IntegerInRange6_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin8bb57a22007-12-03 13:41:36 +00002556 td->free_struct = asn_DEF_NativeInteger.free_struct;
2557 td->print_struct = asn_DEF_NativeInteger.print_struct;
2558 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2559 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2560 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2561 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2562 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2563 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002564 if(!td->per_constraints)
Lev Walkin8bb57a22007-12-03 13:41:36 +00002565 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2566 td->elements = asn_DEF_NativeInteger.elements;
2567 td->elements_count = asn_DEF_NativeInteger.elements_count;
2568 /* td->specifics = asn_DEF_NativeInteger.specifics; // Defined explicitly */
Lev Walkin59b176e2005-11-26 11:25:14 +00002569}
2570
2571void
2572NO_IntegerInRange6_free(asn_TYPE_descriptor_t *td,
2573 void *struct_ptr, int contents_only) {
2574 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2575 td->free_struct(td, struct_ptr, contents_only);
2576}
2577
2578int
2579NO_IntegerInRange6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2580 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2581 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2582 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2583}
2584
2585asn_dec_rval_t
2586NO_IntegerInRange6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2587 void **structure, const void *bufptr, size_t size, int tag_mode) {
2588 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2589 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2590}
2591
2592asn_enc_rval_t
2593NO_IntegerInRange6_encode_der(asn_TYPE_descriptor_t *td,
2594 void *structure, int tag_mode, ber_tlv_tag_t tag,
2595 asn_app_consume_bytes_f *cb, void *app_key) {
2596 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2597 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2598}
2599
2600asn_dec_rval_t
2601NO_IntegerInRange6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2602 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2603 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2604 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2605}
2606
2607asn_enc_rval_t
2608NO_IntegerInRange6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2609 int ilevel, enum xer_encoder_flags_e flags,
2610 asn_app_consume_bytes_f *cb, void *app_key) {
2611 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2612 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2613}
2614
2615asn_dec_rval_t
2616NO_IntegerInRange6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2617 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2618 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2619 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2620}
2621
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002622asn_enc_rval_t
2623NO_IntegerInRange6_encode_uper(asn_TYPE_descriptor_t *td,
2624 asn_per_constraints_t *constraints,
2625 void *structure, asn_per_outp_t *per_out) {
2626 NO_IntegerInRange6_1_inherit_TYPE_descriptor(td);
2627 return td->uper_encoder(td, constraints, structure, per_out);
2628}
2629
Lev Walkin59b176e2005-11-26 11:25:14 +00002630
Lev Walkin725883b2006-10-09 12:07:58 +00002631/*** <<< CTDEFS [NO-IntegerInRange6] >>> ***/
2632
Lev Walkin4b5dae32006-10-09 12:27:44 +00002633static asn_per_constraints_t asn_PER_type_NO_IntegerInRange6_constr_1 = {
Lev Walkin725883b2006-10-09 12:07:58 +00002634 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
2635 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2636 0, 0 /* No PER value map */
2637};
2638
Lev Walkin59b176e2005-11-26 11:25:14 +00002639/*** <<< STAT-DEFS [NO-IntegerInRange6] >>> ***/
2640
Lev Walkin8bb57a22007-12-03 13:41:36 +00002641static asn_INTEGER_specifics_t asn_SPC_NO_IntegerInRange6_specs_1 = {
2642 0, 0, 0, 0, 0,
2643 0, /* Native long size */
2644 1 /* Unsigned representation */
2645};
Lev Walkin59b176e2005-11-26 11:25:14 +00002646static ber_tlv_tag_t asn_DEF_NO_IntegerInRange6_tags_1[] = {
2647 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2648};
Lev Walkin59b176e2005-11-26 11:25:14 +00002649asn_TYPE_descriptor_t asn_DEF_NO_IntegerInRange6 = {
2650 "NO-IntegerInRange6",
2651 "NO-IntegerInRange6",
2652 NO_IntegerInRange6_free,
2653 NO_IntegerInRange6_print,
2654 NO_IntegerInRange6_constraint,
2655 NO_IntegerInRange6_decode_ber,
2656 NO_IntegerInRange6_encode_der,
2657 NO_IntegerInRange6_decode_xer,
2658 NO_IntegerInRange6_encode_xer,
2659 NO_IntegerInRange6_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002660 NO_IntegerInRange6_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002661 0, /* Use generic outmost tag fetcher */
2662 asn_DEF_NO_IntegerInRange6_tags_1,
2663 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2664 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
2665 asn_DEF_NO_IntegerInRange6_tags_1, /* Same as above */
2666 sizeof(asn_DEF_NO_IntegerInRange6_tags_1)
2667 /sizeof(asn_DEF_NO_IntegerInRange6_tags_1[0]), /* 1 */
Lev Walkin4b5dae32006-10-09 12:27:44 +00002668 &asn_PER_type_NO_IntegerInRange6_constr_1,
Lev Walkin59b176e2005-11-26 11:25:14 +00002669 0, 0, /* No members */
Lev Walkin8bb57a22007-12-03 13:41:36 +00002670 &asn_SPC_NO_IntegerInRange6_specs_1 /* Additional specs */
Lev Walkin59b176e2005-11-26 11:25:14 +00002671};
2672
2673
2674/*** <<< INCLUDES [CN-IntegerEnumerated1] >>> ***/
2675
Lev Walkin2a744a72013-03-27 01:56:23 -07002676#include <NativeInteger.h>
Lev Walkin59b176e2005-11-26 11:25:14 +00002677
2678/*** <<< DEPS [CN-IntegerEnumerated1] >>> ***/
2679
2680typedef enum CN_IntegerEnumerated1 {
2681 CN_IntegerEnumerated1_a = 1,
2682 CN_IntegerEnumerated1_b = 2
Lev Walkin171487e2006-03-21 07:25:18 +00002683} e_CN_IntegerEnumerated1;
Lev Walkin59b176e2005-11-26 11:25:14 +00002684
2685/*** <<< TYPE-DECLS [CN-IntegerEnumerated1] >>> ***/
2686
Lev Walkin2a744a72013-03-27 01:56:23 -07002687typedef long CN_IntegerEnumerated1_t;
Lev Walkin59b176e2005-11-26 11:25:14 +00002688
2689/*** <<< FUNC-DECLS [CN-IntegerEnumerated1] >>> ***/
2690
2691extern asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1;
2692asn_struct_free_f CN_IntegerEnumerated1_free;
2693asn_struct_print_f CN_IntegerEnumerated1_print;
2694asn_constr_check_f CN_IntegerEnumerated1_constraint;
2695ber_type_decoder_f CN_IntegerEnumerated1_decode_ber;
2696der_type_encoder_f CN_IntegerEnumerated1_encode_der;
2697xer_type_decoder_f CN_IntegerEnumerated1_decode_xer;
2698xer_type_encoder_f CN_IntegerEnumerated1_encode_xer;
2699per_type_decoder_f CN_IntegerEnumerated1_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002700per_type_encoder_f CN_IntegerEnumerated1_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002701
2702/*** <<< CODE [CN-IntegerEnumerated1] >>> ***/
2703
2704int
2705CN_IntegerEnumerated1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002706 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002707 /* Replace with underlying type checker */
Lev Walkin2a744a72013-03-27 01:56:23 -07002708 td->check_constraints = asn_DEF_NativeInteger.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002709 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002710}
2711
2712/*
Lev Walkin2a744a72013-03-27 01:56:23 -07002713 * This type is implemented using NativeInteger,
Lev Walkin59b176e2005-11-26 11:25:14 +00002714 * so here we adjust the DEF accordingly.
2715 */
2716static void
2717CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
Lev Walkin2a744a72013-03-27 01:56:23 -07002718 td->free_struct = asn_DEF_NativeInteger.free_struct;
2719 td->print_struct = asn_DEF_NativeInteger.print_struct;
2720 td->ber_decoder = asn_DEF_NativeInteger.ber_decoder;
2721 td->der_encoder = asn_DEF_NativeInteger.der_encoder;
2722 td->xer_decoder = asn_DEF_NativeInteger.xer_decoder;
2723 td->xer_encoder = asn_DEF_NativeInteger.xer_encoder;
2724 td->uper_decoder = asn_DEF_NativeInteger.uper_decoder;
2725 td->uper_encoder = asn_DEF_NativeInteger.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002726 if(!td->per_constraints)
Lev Walkin2a744a72013-03-27 01:56:23 -07002727 td->per_constraints = asn_DEF_NativeInteger.per_constraints;
2728 td->elements = asn_DEF_NativeInteger.elements;
2729 td->elements_count = asn_DEF_NativeInteger.elements_count;
2730 td->specifics = asn_DEF_NativeInteger.specifics;
Lev Walkin59b176e2005-11-26 11:25:14 +00002731}
2732
2733void
2734CN_IntegerEnumerated1_free(asn_TYPE_descriptor_t *td,
2735 void *struct_ptr, int contents_only) {
2736 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2737 td->free_struct(td, struct_ptr, contents_only);
2738}
2739
2740int
2741CN_IntegerEnumerated1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2742 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2743 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2744 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2745}
2746
2747asn_dec_rval_t
2748CN_IntegerEnumerated1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2749 void **structure, const void *bufptr, size_t size, int tag_mode) {
2750 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2751 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2752}
2753
2754asn_enc_rval_t
2755CN_IntegerEnumerated1_encode_der(asn_TYPE_descriptor_t *td,
2756 void *structure, int tag_mode, ber_tlv_tag_t tag,
2757 asn_app_consume_bytes_f *cb, void *app_key) {
2758 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2759 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2760}
2761
2762asn_dec_rval_t
2763CN_IntegerEnumerated1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2764 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2765 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2766 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2767}
2768
2769asn_enc_rval_t
2770CN_IntegerEnumerated1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2771 int ilevel, enum xer_encoder_flags_e flags,
2772 asn_app_consume_bytes_f *cb, void *app_key) {
2773 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2774 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2775}
2776
2777asn_dec_rval_t
2778CN_IntegerEnumerated1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2779 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2780 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2781 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2782}
2783
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002784asn_enc_rval_t
2785CN_IntegerEnumerated1_encode_uper(asn_TYPE_descriptor_t *td,
2786 asn_per_constraints_t *constraints,
2787 void *structure, asn_per_outp_t *per_out) {
2788 CN_IntegerEnumerated1_1_inherit_TYPE_descriptor(td);
2789 return td->uper_encoder(td, constraints, structure, per_out);
2790}
2791
Lev Walkin59b176e2005-11-26 11:25:14 +00002792
2793/*** <<< STAT-DEFS [CN-IntegerEnumerated1] >>> ***/
2794
2795static ber_tlv_tag_t asn_DEF_CN_IntegerEnumerated1_tags_1[] = {
2796 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2797};
2798asn_TYPE_descriptor_t asn_DEF_CN_IntegerEnumerated1 = {
2799 "CN-IntegerEnumerated1",
2800 "CN-IntegerEnumerated1",
2801 CN_IntegerEnumerated1_free,
2802 CN_IntegerEnumerated1_print,
2803 CN_IntegerEnumerated1_constraint,
2804 CN_IntegerEnumerated1_decode_ber,
2805 CN_IntegerEnumerated1_encode_der,
2806 CN_IntegerEnumerated1_decode_xer,
2807 CN_IntegerEnumerated1_encode_xer,
2808 CN_IntegerEnumerated1_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002809 CN_IntegerEnumerated1_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002810 0, /* Use generic outmost tag fetcher */
2811 asn_DEF_CN_IntegerEnumerated1_tags_1,
2812 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2813 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2814 asn_DEF_CN_IntegerEnumerated1_tags_1, /* Same as above */
2815 sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1)
2816 /sizeof(asn_DEF_CN_IntegerEnumerated1_tags_1[0]), /* 1 */
2817 0, /* No PER visible constraints */
2818 0, 0, /* Defined elsewhere */
2819 0 /* No specifics */
2820};
2821
2822
2823/*** <<< INCLUDES [NO-IntegerEnumerated2] >>> ***/
2824
2825#include <INTEGER.h>
2826
2827/*** <<< DEPS [NO-IntegerEnumerated2] >>> ***/
2828
2829typedef enum NO_IntegerEnumerated2 {
2830 NO_IntegerEnumerated2_a = 1,
2831 NO_IntegerEnumerated2_b = 3000000000
Lev Walkin171487e2006-03-21 07:25:18 +00002832} e_NO_IntegerEnumerated2;
Lev Walkin59b176e2005-11-26 11:25:14 +00002833
2834/*** <<< TYPE-DECLS [NO-IntegerEnumerated2] >>> ***/
2835
2836typedef INTEGER_t NO_IntegerEnumerated2_t;
2837
2838/*** <<< FUNC-DECLS [NO-IntegerEnumerated2] >>> ***/
2839
2840extern asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2;
2841asn_struct_free_f NO_IntegerEnumerated2_free;
2842asn_struct_print_f NO_IntegerEnumerated2_print;
2843asn_constr_check_f NO_IntegerEnumerated2_constraint;
2844ber_type_decoder_f NO_IntegerEnumerated2_decode_ber;
2845der_type_encoder_f NO_IntegerEnumerated2_encode_der;
2846xer_type_decoder_f NO_IntegerEnumerated2_decode_xer;
2847xer_type_encoder_f NO_IntegerEnumerated2_encode_xer;
2848per_type_decoder_f NO_IntegerEnumerated2_decode_uper;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002849per_type_encoder_f NO_IntegerEnumerated2_encode_uper;
Lev Walkin59b176e2005-11-26 11:25:14 +00002850
2851/*** <<< CODE [NO-IntegerEnumerated2] >>> ***/
2852
2853int
2854NO_IntegerEnumerated2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
Lev Walkin1eded352006-07-13 11:19:01 +00002855 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
Lev Walkin59b176e2005-11-26 11:25:14 +00002856 /* Replace with underlying type checker */
2857 td->check_constraints = asn_DEF_INTEGER.check_constraints;
Lev Walkin1eded352006-07-13 11:19:01 +00002858 return td->check_constraints(td, sptr, ctfailcb, app_key);
Lev Walkin59b176e2005-11-26 11:25:14 +00002859}
2860
2861/*
2862 * This type is implemented using INTEGER,
2863 * so here we adjust the DEF accordingly.
2864 */
2865static void
2866NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2867 td->free_struct = asn_DEF_INTEGER.free_struct;
2868 td->print_struct = asn_DEF_INTEGER.print_struct;
2869 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
2870 td->der_encoder = asn_DEF_INTEGER.der_encoder;
2871 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
2872 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
2873 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002874 td->uper_encoder = asn_DEF_INTEGER.uper_encoder;
Lev Walkin59b176e2005-11-26 11:25:14 +00002875 if(!td->per_constraints)
2876 td->per_constraints = asn_DEF_INTEGER.per_constraints;
2877 td->elements = asn_DEF_INTEGER.elements;
2878 td->elements_count = asn_DEF_INTEGER.elements_count;
2879 td->specifics = asn_DEF_INTEGER.specifics;
2880}
2881
2882void
2883NO_IntegerEnumerated2_free(asn_TYPE_descriptor_t *td,
2884 void *struct_ptr, int contents_only) {
2885 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2886 td->free_struct(td, struct_ptr, contents_only);
2887}
2888
2889int
2890NO_IntegerEnumerated2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2891 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2892 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2893 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2894}
2895
2896asn_dec_rval_t
2897NO_IntegerEnumerated2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2898 void **structure, const void *bufptr, size_t size, int tag_mode) {
2899 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2900 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2901}
2902
2903asn_enc_rval_t
2904NO_IntegerEnumerated2_encode_der(asn_TYPE_descriptor_t *td,
2905 void *structure, int tag_mode, ber_tlv_tag_t tag,
2906 asn_app_consume_bytes_f *cb, void *app_key) {
2907 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2908 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2909}
2910
2911asn_dec_rval_t
2912NO_IntegerEnumerated2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2913 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2914 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2915 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2916}
2917
2918asn_enc_rval_t
2919NO_IntegerEnumerated2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2920 int ilevel, enum xer_encoder_flags_e flags,
2921 asn_app_consume_bytes_f *cb, void *app_key) {
2922 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2923 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2924}
2925
2926asn_dec_rval_t
2927NO_IntegerEnumerated2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2928 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2929 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2930 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2931}
2932
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002933asn_enc_rval_t
2934NO_IntegerEnumerated2_encode_uper(asn_TYPE_descriptor_t *td,
2935 asn_per_constraints_t *constraints,
2936 void *structure, asn_per_outp_t *per_out) {
2937 NO_IntegerEnumerated2_1_inherit_TYPE_descriptor(td);
2938 return td->uper_encoder(td, constraints, structure, per_out);
2939}
2940
Lev Walkin59b176e2005-11-26 11:25:14 +00002941
2942/*** <<< STAT-DEFS [NO-IntegerEnumerated2] >>> ***/
2943
2944static ber_tlv_tag_t asn_DEF_NO_IntegerEnumerated2_tags_1[] = {
2945 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
2946};
2947asn_TYPE_descriptor_t asn_DEF_NO_IntegerEnumerated2 = {
2948 "NO-IntegerEnumerated2",
2949 "NO-IntegerEnumerated2",
2950 NO_IntegerEnumerated2_free,
2951 NO_IntegerEnumerated2_print,
2952 NO_IntegerEnumerated2_constraint,
2953 NO_IntegerEnumerated2_decode_ber,
2954 NO_IntegerEnumerated2_encode_der,
2955 NO_IntegerEnumerated2_decode_xer,
2956 NO_IntegerEnumerated2_encode_xer,
2957 NO_IntegerEnumerated2_decode_uper,
Lev Walkin9f5bb3a2006-08-18 01:46:46 +00002958 NO_IntegerEnumerated2_encode_uper,
Lev Walkin59b176e2005-11-26 11:25:14 +00002959 0, /* Use generic outmost tag fetcher */
2960 asn_DEF_NO_IntegerEnumerated2_tags_1,
2961 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2962 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2963 asn_DEF_NO_IntegerEnumerated2_tags_1, /* Same as above */
2964 sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1)
2965 /sizeof(asn_DEF_NO_IntegerEnumerated2_tags_1[0]), /* 1 */
2966 0, /* No PER visible constraints */
2967 0, 0, /* Defined elsewhere */
2968 0 /* No specifics */
2969};
2970