blob: a5c37ad4682d75e87e418c40b339daea6060c859 [file] [log] [blame]
Lev Walkin59b176e2005-11-26 11:25:14 +00001
2/*** <<< INCLUDES [Int1] >>> ***/
3
4#include <INTEGER.h>
5
6/*** <<< TYPE-DECLS [Int1] >>> ***/
7
8typedef INTEGER_t Int1_t;
9
10/*** <<< FUNC-DECLS [Int1] >>> ***/
11
12extern asn_TYPE_descriptor_t asn_DEF_Int1;
13asn_struct_free_f Int1_free;
14asn_struct_print_f Int1_print;
15asn_constr_check_f Int1_constraint;
16ber_type_decoder_f Int1_decode_ber;
17der_type_encoder_f Int1_encode_der;
18xer_type_decoder_f Int1_decode_xer;
19xer_type_encoder_f Int1_encode_xer;
20per_type_decoder_f Int1_decode_uper;
21
22/*** <<< CODE [Int1] >>> ***/
23
24int
25Int1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
26 asn_app_consume_bytes_f *app_errlog, void *app_key) {
27 /* Replace with underlying type checker */
28 td->check_constraints = asn_DEF_INTEGER.check_constraints;
29 return td->check_constraints(td, sptr, app_errlog, app_key);
30}
31
32/*
33 * This type is implemented using INTEGER,
34 * so here we adjust the DEF accordingly.
35 */
36static void
37Int1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
38 td->free_struct = asn_DEF_INTEGER.free_struct;
39 td->print_struct = asn_DEF_INTEGER.print_struct;
40 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
41 td->der_encoder = asn_DEF_INTEGER.der_encoder;
42 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
43 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
44 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
45 if(!td->per_constraints)
46 td->per_constraints = asn_DEF_INTEGER.per_constraints;
47 td->elements = asn_DEF_INTEGER.elements;
48 td->elements_count = asn_DEF_INTEGER.elements_count;
49 td->specifics = asn_DEF_INTEGER.specifics;
50}
51
52void
53Int1_free(asn_TYPE_descriptor_t *td,
54 void *struct_ptr, int contents_only) {
55 Int1_1_inherit_TYPE_descriptor(td);
56 td->free_struct(td, struct_ptr, contents_only);
57}
58
59int
60Int1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
61 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
62 Int1_1_inherit_TYPE_descriptor(td);
63 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
64}
65
66asn_dec_rval_t
67Int1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
68 void **structure, const void *bufptr, size_t size, int tag_mode) {
69 Int1_1_inherit_TYPE_descriptor(td);
70 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
71}
72
73asn_enc_rval_t
74Int1_encode_der(asn_TYPE_descriptor_t *td,
75 void *structure, int tag_mode, ber_tlv_tag_t tag,
76 asn_app_consume_bytes_f *cb, void *app_key) {
77 Int1_1_inherit_TYPE_descriptor(td);
78 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
79}
80
81asn_dec_rval_t
82Int1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
83 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
84 Int1_1_inherit_TYPE_descriptor(td);
85 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
86}
87
88asn_enc_rval_t
89Int1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
90 int ilevel, enum xer_encoder_flags_e flags,
91 asn_app_consume_bytes_f *cb, void *app_key) {
92 Int1_1_inherit_TYPE_descriptor(td);
93 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
94}
95
96asn_dec_rval_t
97Int1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
98 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
99 Int1_1_inherit_TYPE_descriptor(td);
100 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
101}
102
103
104/*** <<< STAT-DEFS [Int1] >>> ***/
105
106static ber_tlv_tag_t asn_DEF_Int1_tags_1[] = {
107 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
108};
109asn_TYPE_descriptor_t asn_DEF_Int1 = {
110 "Int1",
111 "Int1",
112 Int1_free,
113 Int1_print,
114 Int1_constraint,
115 Int1_decode_ber,
116 Int1_encode_der,
117 Int1_decode_xer,
118 Int1_encode_xer,
119 Int1_decode_uper,
120 0, /* Use generic outmost tag fetcher */
121 asn_DEF_Int1_tags_1,
122 sizeof(asn_DEF_Int1_tags_1)
123 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
124 asn_DEF_Int1_tags_1, /* Same as above */
125 sizeof(asn_DEF_Int1_tags_1)
126 /sizeof(asn_DEF_Int1_tags_1[0]), /* 1 */
127 0, /* No PER visible constraints */
128 0, 0, /* No members */
129 0 /* No specifics */
130};
131
132
133/*** <<< INCLUDES [Int2] >>> ***/
134
135#include <Int1.h>
136
137/*** <<< TYPE-DECLS [Int2] >>> ***/
138
139typedef Int1_t Int2_t;
140
141/*** <<< FUNC-DECLS [Int2] >>> ***/
142
143extern asn_TYPE_descriptor_t asn_DEF_Int2;
144asn_struct_free_f Int2_free;
145asn_struct_print_f Int2_print;
146asn_constr_check_f Int2_constraint;
147ber_type_decoder_f Int2_decode_ber;
148der_type_encoder_f Int2_encode_der;
149xer_type_decoder_f Int2_decode_xer;
150xer_type_encoder_f Int2_encode_xer;
151per_type_decoder_f Int2_decode_uper;
152
153/*** <<< CODE [Int2] >>> ***/
154
155int
156Int2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
157 asn_app_consume_bytes_f *app_errlog, void *app_key) {
158 const Int1_t *st = (const Int1_t *)sptr;
159 long value;
160
161 if(!sptr) {
162 _ASN_ERRLOG(app_errlog, app_key,
163 "%s: value not given (%s:%d)",
164 td->name, __FILE__, __LINE__);
165 return -1;
166 }
167
168 /* Check if the sign bit is present */
169 value = st->buf ? ((st->buf[0] & 0x80) ? -1 : 1) : 0;
170
171 if((value >= 0)) {
172 /* Constraint check succeeded */
173 return 0;
174 } else {
175 _ASN_ERRLOG(app_errlog, app_key,
176 "%s: constraint failed (%s:%d)",
177 td->name, __FILE__, __LINE__);
178 return -1;
179 }
180}
181
182/*
183 * This type is implemented using Int1,
184 * so here we adjust the DEF accordingly.
185 */
186static void
187Int2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
188 td->free_struct = asn_DEF_Int1.free_struct;
189 td->print_struct = asn_DEF_Int1.print_struct;
190 td->ber_decoder = asn_DEF_Int1.ber_decoder;
191 td->der_encoder = asn_DEF_Int1.der_encoder;
192 td->xer_decoder = asn_DEF_Int1.xer_decoder;
193 td->xer_encoder = asn_DEF_Int1.xer_encoder;
194 td->uper_decoder = asn_DEF_Int1.uper_decoder;
195 if(!td->per_constraints)
196 td->per_constraints = asn_DEF_Int1.per_constraints;
197 td->elements = asn_DEF_Int1.elements;
198 td->elements_count = asn_DEF_Int1.elements_count;
199 td->specifics = asn_DEF_Int1.specifics;
200}
201
202void
203Int2_free(asn_TYPE_descriptor_t *td,
204 void *struct_ptr, int contents_only) {
205 Int2_1_inherit_TYPE_descriptor(td);
206 td->free_struct(td, struct_ptr, contents_only);
207}
208
209int
210Int2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
211 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
212 Int2_1_inherit_TYPE_descriptor(td);
213 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
214}
215
216asn_dec_rval_t
217Int2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
218 void **structure, const void *bufptr, size_t size, int tag_mode) {
219 Int2_1_inherit_TYPE_descriptor(td);
220 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
221}
222
223asn_enc_rval_t
224Int2_encode_der(asn_TYPE_descriptor_t *td,
225 void *structure, int tag_mode, ber_tlv_tag_t tag,
226 asn_app_consume_bytes_f *cb, void *app_key) {
227 Int2_1_inherit_TYPE_descriptor(td);
228 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
229}
230
231asn_dec_rval_t
232Int2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
233 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
234 Int2_1_inherit_TYPE_descriptor(td);
235 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
236}
237
238asn_enc_rval_t
239Int2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
240 int ilevel, enum xer_encoder_flags_e flags,
241 asn_app_consume_bytes_f *cb, void *app_key) {
242 Int2_1_inherit_TYPE_descriptor(td);
243 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
244}
245
246asn_dec_rval_t
247Int2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
248 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
249 Int2_1_inherit_TYPE_descriptor(td);
250 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
251}
252
253
254/*** <<< STAT-DEFS [Int2] >>> ***/
255
256static ber_tlv_tag_t asn_DEF_Int2_tags_1[] = {
257 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
258};
259static asn_per_constraints_t asn_PER_Int2_constr_1 = {
260 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
261 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
262};
263asn_TYPE_descriptor_t asn_DEF_Int2 = {
264 "Int2",
265 "Int2",
266 Int2_free,
267 Int2_print,
268 Int2_constraint,
269 Int2_decode_ber,
270 Int2_encode_der,
271 Int2_decode_xer,
272 Int2_encode_xer,
273 Int2_decode_uper,
274 0, /* Use generic outmost tag fetcher */
275 asn_DEF_Int2_tags_1,
276 sizeof(asn_DEF_Int2_tags_1)
277 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
278 asn_DEF_Int2_tags_1, /* Same as above */
279 sizeof(asn_DEF_Int2_tags_1)
280 /sizeof(asn_DEF_Int2_tags_1[0]), /* 1 */
281 &asn_PER_Int2_constr_1,
282 0, 0, /* No members */
283 0 /* No specifics */
284};
285
286
287/*** <<< INCLUDES [Int3] >>> ***/
288
289#include <Int2.h>
290
291/*** <<< TYPE-DECLS [Int3] >>> ***/
292
293typedef Int2_t Int3_t;
294
295/*** <<< FUNC-DECLS [Int3] >>> ***/
296
297extern asn_TYPE_descriptor_t asn_DEF_Int3;
298asn_struct_free_f Int3_free;
299asn_struct_print_f Int3_print;
300asn_constr_check_f Int3_constraint;
301ber_type_decoder_f Int3_decode_ber;
302der_type_encoder_f Int3_encode_der;
303xer_type_decoder_f Int3_decode_xer;
304xer_type_encoder_f Int3_encode_xer;
305per_type_decoder_f Int3_decode_uper;
306
307/*** <<< CODE [Int3] >>> ***/
308
309int
310Int3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
311 asn_app_consume_bytes_f *app_errlog, void *app_key) {
312 const Int2_t *st = (const Int2_t *)sptr;
313 long value;
314
315 if(!sptr) {
316 _ASN_ERRLOG(app_errlog, app_key,
317 "%s: value not given (%s:%d)",
318 td->name, __FILE__, __LINE__);
319 return -1;
320 }
321
322 if(asn_INTEGER2long(st, &value)) {
323 _ASN_ERRLOG(app_errlog, app_key,
324 "%s: value too large (%s:%d)",
325 td->name, __FILE__, __LINE__);
326 return -1;
327 }
328
329 if((value >= 0 && value <= 10)) {
330 /* Constraint check succeeded */
331 return 0;
332 } else {
333 _ASN_ERRLOG(app_errlog, app_key,
334 "%s: constraint failed (%s:%d)",
335 td->name, __FILE__, __LINE__);
336 return -1;
337 }
338}
339
340/*
341 * This type is implemented using Int2,
342 * so here we adjust the DEF accordingly.
343 */
344static void
345Int3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
346 td->free_struct = asn_DEF_Int2.free_struct;
347 td->print_struct = asn_DEF_Int2.print_struct;
348 td->ber_decoder = asn_DEF_Int2.ber_decoder;
349 td->der_encoder = asn_DEF_Int2.der_encoder;
350 td->xer_decoder = asn_DEF_Int2.xer_decoder;
351 td->xer_encoder = asn_DEF_Int2.xer_encoder;
352 td->uper_decoder = asn_DEF_Int2.uper_decoder;
353 if(!td->per_constraints)
354 td->per_constraints = asn_DEF_Int2.per_constraints;
355 td->elements = asn_DEF_Int2.elements;
356 td->elements_count = asn_DEF_Int2.elements_count;
357 td->specifics = asn_DEF_Int2.specifics;
358}
359
360void
361Int3_free(asn_TYPE_descriptor_t *td,
362 void *struct_ptr, int contents_only) {
363 Int3_1_inherit_TYPE_descriptor(td);
364 td->free_struct(td, struct_ptr, contents_only);
365}
366
367int
368Int3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
369 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
370 Int3_1_inherit_TYPE_descriptor(td);
371 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
372}
373
374asn_dec_rval_t
375Int3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
376 void **structure, const void *bufptr, size_t size, int tag_mode) {
377 Int3_1_inherit_TYPE_descriptor(td);
378 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
379}
380
381asn_enc_rval_t
382Int3_encode_der(asn_TYPE_descriptor_t *td,
383 void *structure, int tag_mode, ber_tlv_tag_t tag,
384 asn_app_consume_bytes_f *cb, void *app_key) {
385 Int3_1_inherit_TYPE_descriptor(td);
386 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
387}
388
389asn_dec_rval_t
390Int3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
391 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
392 Int3_1_inherit_TYPE_descriptor(td);
393 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
394}
395
396asn_enc_rval_t
397Int3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
398 int ilevel, enum xer_encoder_flags_e flags,
399 asn_app_consume_bytes_f *cb, void *app_key) {
400 Int3_1_inherit_TYPE_descriptor(td);
401 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
402}
403
404asn_dec_rval_t
405Int3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
406 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
407 Int3_1_inherit_TYPE_descriptor(td);
408 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
409}
410
411
412/*** <<< STAT-DEFS [Int3] >>> ***/
413
414static ber_tlv_tag_t asn_DEF_Int3_tags_1[] = {
415 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
416};
417static asn_per_constraints_t asn_PER_Int3_constr_1 = {
418 { APC_CONSTRAINED, 4, 4, 0, 10 } /* (0..10) */,
419 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
420};
421asn_TYPE_descriptor_t asn_DEF_Int3 = {
422 "Int3",
423 "Int3",
424 Int3_free,
425 Int3_print,
426 Int3_constraint,
427 Int3_decode_ber,
428 Int3_encode_der,
429 Int3_decode_xer,
430 Int3_encode_xer,
431 Int3_decode_uper,
432 0, /* Use generic outmost tag fetcher */
433 asn_DEF_Int3_tags_1,
434 sizeof(asn_DEF_Int3_tags_1)
435 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
436 asn_DEF_Int3_tags_1, /* Same as above */
437 sizeof(asn_DEF_Int3_tags_1)
438 /sizeof(asn_DEF_Int3_tags_1[0]), /* 1 */
439 &asn_PER_Int3_constr_1,
440 0, 0, /* No members */
441 0 /* No specifics */
442};
443
444
445/*** <<< INCLUDES [Int4] >>> ***/
446
447#include <Int3.h>
448
449/*** <<< TYPE-DECLS [Int4] >>> ***/
450
451typedef Int3_t Int4_t;
452
453/*** <<< FUNC-DECLS [Int4] >>> ***/
454
455extern asn_TYPE_descriptor_t asn_DEF_Int4;
456asn_struct_free_f Int4_free;
457asn_struct_print_f Int4_print;
458asn_constr_check_f Int4_constraint;
459ber_type_decoder_f Int4_decode_ber;
460der_type_encoder_f Int4_encode_der;
461xer_type_decoder_f Int4_decode_xer;
462xer_type_encoder_f Int4_encode_xer;
463per_type_decoder_f Int4_decode_uper;
464
465/*** <<< CODE [Int4] >>> ***/
466
467int
468Int4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
469 asn_app_consume_bytes_f *app_errlog, void *app_key) {
470 const Int3_t *st = (const Int3_t *)sptr;
471 long value;
472
473 if(!sptr) {
474 _ASN_ERRLOG(app_errlog, app_key,
475 "%s: value not given (%s:%d)",
476 td->name, __FILE__, __LINE__);
477 return -1;
478 }
479
480 if(asn_INTEGER2long(st, &value)) {
481 _ASN_ERRLOG(app_errlog, app_key,
482 "%s: value too large (%s:%d)",
483 td->name, __FILE__, __LINE__);
484 return -1;
485 }
486
487 if((value >= 1 && value <= 10)) {
488 /* Constraint check succeeded */
489 return 0;
490 } else {
491 _ASN_ERRLOG(app_errlog, app_key,
492 "%s: constraint failed (%s:%d)",
493 td->name, __FILE__, __LINE__);
494 return -1;
495 }
496}
497
498/*
499 * This type is implemented using Int3,
500 * so here we adjust the DEF accordingly.
501 */
502static void
503Int4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
504 td->free_struct = asn_DEF_Int3.free_struct;
505 td->print_struct = asn_DEF_Int3.print_struct;
506 td->ber_decoder = asn_DEF_Int3.ber_decoder;
507 td->der_encoder = asn_DEF_Int3.der_encoder;
508 td->xer_decoder = asn_DEF_Int3.xer_decoder;
509 td->xer_encoder = asn_DEF_Int3.xer_encoder;
510 td->uper_decoder = asn_DEF_Int3.uper_decoder;
511 if(!td->per_constraints)
512 td->per_constraints = asn_DEF_Int3.per_constraints;
513 td->elements = asn_DEF_Int3.elements;
514 td->elements_count = asn_DEF_Int3.elements_count;
515 td->specifics = asn_DEF_Int3.specifics;
516}
517
518void
519Int4_free(asn_TYPE_descriptor_t *td,
520 void *struct_ptr, int contents_only) {
521 Int4_1_inherit_TYPE_descriptor(td);
522 td->free_struct(td, struct_ptr, contents_only);
523}
524
525int
526Int4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
527 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
528 Int4_1_inherit_TYPE_descriptor(td);
529 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
530}
531
532asn_dec_rval_t
533Int4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
534 void **structure, const void *bufptr, size_t size, int tag_mode) {
535 Int4_1_inherit_TYPE_descriptor(td);
536 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
537}
538
539asn_enc_rval_t
540Int4_encode_der(asn_TYPE_descriptor_t *td,
541 void *structure, int tag_mode, ber_tlv_tag_t tag,
542 asn_app_consume_bytes_f *cb, void *app_key) {
543 Int4_1_inherit_TYPE_descriptor(td);
544 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
545}
546
547asn_dec_rval_t
548Int4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
549 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
550 Int4_1_inherit_TYPE_descriptor(td);
551 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
552}
553
554asn_enc_rval_t
555Int4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
556 int ilevel, enum xer_encoder_flags_e flags,
557 asn_app_consume_bytes_f *cb, void *app_key) {
558 Int4_1_inherit_TYPE_descriptor(td);
559 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
560}
561
562asn_dec_rval_t
563Int4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
564 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
565 Int4_1_inherit_TYPE_descriptor(td);
566 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
567}
568
569
570/*** <<< STAT-DEFS [Int4] >>> ***/
571
572static ber_tlv_tag_t asn_DEF_Int4_tags_1[] = {
573 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
574};
575static asn_per_constraints_t asn_PER_Int4_constr_1 = {
576 { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 10 } /* (1..10,...) */,
577 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
578};
579asn_TYPE_descriptor_t asn_DEF_Int4 = {
580 "Int4",
581 "Int4",
582 Int4_free,
583 Int4_print,
584 Int4_constraint,
585 Int4_decode_ber,
586 Int4_encode_der,
587 Int4_decode_xer,
588 Int4_encode_xer,
589 Int4_decode_uper,
590 0, /* Use generic outmost tag fetcher */
591 asn_DEF_Int4_tags_1,
592 sizeof(asn_DEF_Int4_tags_1)
593 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
594 asn_DEF_Int4_tags_1, /* Same as above */
595 sizeof(asn_DEF_Int4_tags_1)
596 /sizeof(asn_DEF_Int4_tags_1[0]), /* 1 */
597 &asn_PER_Int4_constr_1,
598 0, 0, /* No members */
599 0 /* No specifics */
600};
601
602
603/*** <<< INCLUDES [Int5] >>> ***/
604
605#include <Int4.h>
606
607/*** <<< TYPE-DECLS [Int5] >>> ***/
608
609typedef Int4_t Int5_t;
610
611/*** <<< FUNC-DECLS [Int5] >>> ***/
612
613extern asn_TYPE_descriptor_t asn_DEF_Int5;
614asn_struct_free_f Int5_free;
615asn_struct_print_f Int5_print;
616asn_constr_check_f Int5_constraint;
617ber_type_decoder_f Int5_decode_ber;
618der_type_encoder_f Int5_encode_der;
619xer_type_decoder_f Int5_decode_xer;
620xer_type_encoder_f Int5_encode_xer;
621per_type_decoder_f Int5_decode_uper;
622
623/*** <<< CODE [Int5] >>> ***/
624
625int
626Int5_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
627 asn_app_consume_bytes_f *app_errlog, void *app_key) {
628 const Int4_t *st = (const Int4_t *)sptr;
629 long value;
630
631 if(!sptr) {
632 _ASN_ERRLOG(app_errlog, app_key,
633 "%s: value not given (%s:%d)",
634 td->name, __FILE__, __LINE__);
635 return -1;
636 }
637
638 if(asn_INTEGER2long(st, &value)) {
639 _ASN_ERRLOG(app_errlog, app_key,
640 "%s: value too large (%s:%d)",
641 td->name, __FILE__, __LINE__);
642 return -1;
643 }
644
645 if((value == 5)) {
646 /* Constraint check succeeded */
647 return 0;
648 } else {
649 _ASN_ERRLOG(app_errlog, app_key,
650 "%s: constraint failed (%s:%d)",
651 td->name, __FILE__, __LINE__);
652 return -1;
653 }
654}
655
656/*
657 * This type is implemented using Int4,
658 * so here we adjust the DEF accordingly.
659 */
660static void
661Int5_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
662 td->free_struct = asn_DEF_Int4.free_struct;
663 td->print_struct = asn_DEF_Int4.print_struct;
664 td->ber_decoder = asn_DEF_Int4.ber_decoder;
665 td->der_encoder = asn_DEF_Int4.der_encoder;
666 td->xer_decoder = asn_DEF_Int4.xer_decoder;
667 td->xer_encoder = asn_DEF_Int4.xer_encoder;
668 td->uper_decoder = asn_DEF_Int4.uper_decoder;
669 if(!td->per_constraints)
670 td->per_constraints = asn_DEF_Int4.per_constraints;
671 td->elements = asn_DEF_Int4.elements;
672 td->elements_count = asn_DEF_Int4.elements_count;
673 td->specifics = asn_DEF_Int4.specifics;
674}
675
676void
677Int5_free(asn_TYPE_descriptor_t *td,
678 void *struct_ptr, int contents_only) {
679 Int5_1_inherit_TYPE_descriptor(td);
680 td->free_struct(td, struct_ptr, contents_only);
681}
682
683int
684Int5_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
685 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
686 Int5_1_inherit_TYPE_descriptor(td);
687 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
688}
689
690asn_dec_rval_t
691Int5_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
692 void **structure, const void *bufptr, size_t size, int tag_mode) {
693 Int5_1_inherit_TYPE_descriptor(td);
694 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
695}
696
697asn_enc_rval_t
698Int5_encode_der(asn_TYPE_descriptor_t *td,
699 void *structure, int tag_mode, ber_tlv_tag_t tag,
700 asn_app_consume_bytes_f *cb, void *app_key) {
701 Int5_1_inherit_TYPE_descriptor(td);
702 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
703}
704
705asn_dec_rval_t
706Int5_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
707 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
708 Int5_1_inherit_TYPE_descriptor(td);
709 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
710}
711
712asn_enc_rval_t
713Int5_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
714 int ilevel, enum xer_encoder_flags_e flags,
715 asn_app_consume_bytes_f *cb, void *app_key) {
716 Int5_1_inherit_TYPE_descriptor(td);
717 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
718}
719
720asn_dec_rval_t
721Int5_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
722 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
723 Int5_1_inherit_TYPE_descriptor(td);
724 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
725}
726
727
728/*** <<< STAT-DEFS [Int5] >>> ***/
729
730static ber_tlv_tag_t asn_DEF_Int5_tags_1[] = {
731 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
732};
733static asn_per_constraints_t asn_PER_Int5_constr_1 = {
734 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
735 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
736};
737asn_TYPE_descriptor_t asn_DEF_Int5 = {
738 "Int5",
739 "Int5",
740 Int5_free,
741 Int5_print,
742 Int5_constraint,
743 Int5_decode_ber,
744 Int5_encode_der,
745 Int5_decode_xer,
746 Int5_encode_xer,
747 Int5_decode_uper,
748 0, /* Use generic outmost tag fetcher */
749 asn_DEF_Int5_tags_1,
750 sizeof(asn_DEF_Int5_tags_1)
751 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
752 asn_DEF_Int5_tags_1, /* Same as above */
753 sizeof(asn_DEF_Int5_tags_1)
754 /sizeof(asn_DEF_Int5_tags_1[0]), /* 1 */
755 &asn_PER_Int5_constr_1,
756 0, 0, /* No members */
757 0 /* No specifics */
758};
759
760
761/*** <<< INCLUDES [ExtensibleExtensions] >>> ***/
762
763#include <INTEGER.h>
764
765/*** <<< TYPE-DECLS [ExtensibleExtensions] >>> ***/
766
767typedef INTEGER_t ExtensibleExtensions_t;
768
769/*** <<< FUNC-DECLS [ExtensibleExtensions] >>> ***/
770
771extern asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions;
772asn_struct_free_f ExtensibleExtensions_free;
773asn_struct_print_f ExtensibleExtensions_print;
774asn_constr_check_f ExtensibleExtensions_constraint;
775ber_type_decoder_f ExtensibleExtensions_decode_ber;
776der_type_encoder_f ExtensibleExtensions_encode_der;
777xer_type_decoder_f ExtensibleExtensions_decode_xer;
778xer_type_encoder_f ExtensibleExtensions_encode_xer;
779per_type_decoder_f ExtensibleExtensions_decode_uper;
780
781/*** <<< CODE [ExtensibleExtensions] >>> ***/
782
783int
784ExtensibleExtensions_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
785 asn_app_consume_bytes_f *app_errlog, void *app_key) {
786 const INTEGER_t *st = (const INTEGER_t *)sptr;
787 long value;
788
789 if(!sptr) {
790 _ASN_ERRLOG(app_errlog, app_key,
791 "%s: value not given (%s:%d)",
792 td->name, __FILE__, __LINE__);
793 return -1;
794 }
795
796 if(asn_INTEGER2long(st, &value)) {
797 _ASN_ERRLOG(app_errlog, app_key,
798 "%s: value too large (%s:%d)",
799 td->name, __FILE__, __LINE__);
800 return -1;
801 }
802
803 if((value >= 1 && value <= 256)) {
804 /* Constraint check succeeded */
805 return 0;
806 } else {
807 _ASN_ERRLOG(app_errlog, app_key,
808 "%s: constraint failed (%s:%d)",
809 td->name, __FILE__, __LINE__);
810 return -1;
811 }
812}
813
814/*
815 * This type is implemented using INTEGER,
816 * so here we adjust the DEF accordingly.
817 */
818static void
819ExtensibleExtensions_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
820 td->free_struct = asn_DEF_INTEGER.free_struct;
821 td->print_struct = asn_DEF_INTEGER.print_struct;
822 td->ber_decoder = asn_DEF_INTEGER.ber_decoder;
823 td->der_encoder = asn_DEF_INTEGER.der_encoder;
824 td->xer_decoder = asn_DEF_INTEGER.xer_decoder;
825 td->xer_encoder = asn_DEF_INTEGER.xer_encoder;
826 td->uper_decoder = asn_DEF_INTEGER.uper_decoder;
827 if(!td->per_constraints)
828 td->per_constraints = asn_DEF_INTEGER.per_constraints;
829 td->elements = asn_DEF_INTEGER.elements;
830 td->elements_count = asn_DEF_INTEGER.elements_count;
831 td->specifics = asn_DEF_INTEGER.specifics;
832}
833
834void
835ExtensibleExtensions_free(asn_TYPE_descriptor_t *td,
836 void *struct_ptr, int contents_only) {
837 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
838 td->free_struct(td, struct_ptr, contents_only);
839}
840
841int
842ExtensibleExtensions_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
843 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
844 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
845 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
846}
847
848asn_dec_rval_t
849ExtensibleExtensions_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
850 void **structure, const void *bufptr, size_t size, int tag_mode) {
851 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
852 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
853}
854
855asn_enc_rval_t
856ExtensibleExtensions_encode_der(asn_TYPE_descriptor_t *td,
857 void *structure, int tag_mode, ber_tlv_tag_t tag,
858 asn_app_consume_bytes_f *cb, void *app_key) {
859 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
860 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
861}
862
863asn_dec_rval_t
864ExtensibleExtensions_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
865 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
866 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
867 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
868}
869
870asn_enc_rval_t
871ExtensibleExtensions_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
872 int ilevel, enum xer_encoder_flags_e flags,
873 asn_app_consume_bytes_f *cb, void *app_key) {
874 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
875 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
876}
877
878asn_dec_rval_t
879ExtensibleExtensions_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
880 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
881 ExtensibleExtensions_1_inherit_TYPE_descriptor(td);
882 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
883}
884
885
886/*** <<< STAT-DEFS [ExtensibleExtensions] >>> ***/
887
888static ber_tlv_tag_t asn_DEF_ExtensibleExtensions_tags_1[] = {
889 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
890};
891static asn_per_constraints_t asn_PER_ExtensibleExtensions_constr_1 = {
892 { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 256 } /* (1..256,...) */,
893 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
894};
895asn_TYPE_descriptor_t asn_DEF_ExtensibleExtensions = {
896 "ExtensibleExtensions",
897 "ExtensibleExtensions",
898 ExtensibleExtensions_free,
899 ExtensibleExtensions_print,
900 ExtensibleExtensions_constraint,
901 ExtensibleExtensions_decode_ber,
902 ExtensibleExtensions_encode_der,
903 ExtensibleExtensions_decode_xer,
904 ExtensibleExtensions_encode_xer,
905 ExtensibleExtensions_decode_uper,
906 0, /* Use generic outmost tag fetcher */
907 asn_DEF_ExtensibleExtensions_tags_1,
908 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
909 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
910 asn_DEF_ExtensibleExtensions_tags_1, /* Same as above */
911 sizeof(asn_DEF_ExtensibleExtensions_tags_1)
912 /sizeof(asn_DEF_ExtensibleExtensions_tags_1[0]), /* 1 */
913 &asn_PER_ExtensibleExtensions_constr_1,
914 0, 0, /* No members */
915 0 /* No specifics */
916};
917
918
919/*** <<< INCLUDES [Str1] >>> ***/
920
921#include <IA5String.h>
922
923/*** <<< TYPE-DECLS [Str1] >>> ***/
924
925typedef IA5String_t Str1_t;
926
927/*** <<< FUNC-DECLS [Str1] >>> ***/
928
929extern asn_TYPE_descriptor_t asn_DEF_Str1;
930asn_struct_free_f Str1_free;
931asn_struct_print_f Str1_print;
932asn_constr_check_f Str1_constraint;
933ber_type_decoder_f Str1_decode_ber;
934der_type_encoder_f Str1_encode_der;
935xer_type_decoder_f Str1_decode_xer;
936xer_type_encoder_f Str1_encode_xer;
937per_type_decoder_f Str1_decode_uper;
938
939/*** <<< CODE [Str1] >>> ***/
940
941int
942Str1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
943 asn_app_consume_bytes_f *app_errlog, void *app_key) {
944 /* Replace with underlying type checker */
945 td->check_constraints = asn_DEF_IA5String.check_constraints;
946 return td->check_constraints(td, sptr, app_errlog, app_key);
947}
948
949/*
950 * This type is implemented using IA5String,
951 * so here we adjust the DEF accordingly.
952 */
953static void
954Str1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
955 td->free_struct = asn_DEF_IA5String.free_struct;
956 td->print_struct = asn_DEF_IA5String.print_struct;
957 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
958 td->der_encoder = asn_DEF_IA5String.der_encoder;
959 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
960 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
961 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
962 if(!td->per_constraints)
963 td->per_constraints = asn_DEF_IA5String.per_constraints;
964 td->elements = asn_DEF_IA5String.elements;
965 td->elements_count = asn_DEF_IA5String.elements_count;
966 td->specifics = asn_DEF_IA5String.specifics;
967}
968
969void
970Str1_free(asn_TYPE_descriptor_t *td,
971 void *struct_ptr, int contents_only) {
972 Str1_1_inherit_TYPE_descriptor(td);
973 td->free_struct(td, struct_ptr, contents_only);
974}
975
976int
977Str1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
978 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
979 Str1_1_inherit_TYPE_descriptor(td);
980 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
981}
982
983asn_dec_rval_t
984Str1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
985 void **structure, const void *bufptr, size_t size, int tag_mode) {
986 Str1_1_inherit_TYPE_descriptor(td);
987 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
988}
989
990asn_enc_rval_t
991Str1_encode_der(asn_TYPE_descriptor_t *td,
992 void *structure, int tag_mode, ber_tlv_tag_t tag,
993 asn_app_consume_bytes_f *cb, void *app_key) {
994 Str1_1_inherit_TYPE_descriptor(td);
995 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
996}
997
998asn_dec_rval_t
999Str1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1000 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1001 Str1_1_inherit_TYPE_descriptor(td);
1002 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1003}
1004
1005asn_enc_rval_t
1006Str1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1007 int ilevel, enum xer_encoder_flags_e flags,
1008 asn_app_consume_bytes_f *cb, void *app_key) {
1009 Str1_1_inherit_TYPE_descriptor(td);
1010 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1011}
1012
1013asn_dec_rval_t
1014Str1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1015 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1016 Str1_1_inherit_TYPE_descriptor(td);
1017 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1018}
1019
1020
1021/*** <<< STAT-DEFS [Str1] >>> ***/
1022
1023static ber_tlv_tag_t asn_DEF_Str1_tags_1[] = {
1024 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1025};
1026asn_TYPE_descriptor_t asn_DEF_Str1 = {
1027 "Str1",
1028 "Str1",
1029 Str1_free,
1030 Str1_print,
1031 Str1_constraint,
1032 Str1_decode_ber,
1033 Str1_encode_der,
1034 Str1_decode_xer,
1035 Str1_encode_xer,
1036 Str1_decode_uper,
1037 0, /* Use generic outmost tag fetcher */
1038 asn_DEF_Str1_tags_1,
1039 sizeof(asn_DEF_Str1_tags_1)
1040 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
1041 asn_DEF_Str1_tags_1, /* Same as above */
1042 sizeof(asn_DEF_Str1_tags_1)
1043 /sizeof(asn_DEF_Str1_tags_1[0]), /* 1 */
1044 0, /* No PER visible constraints */
1045 0, 0, /* No members */
1046 0 /* No specifics */
1047};
1048
1049
1050/*** <<< INCLUDES [Str2] >>> ***/
1051
1052#include <Str1.h>
1053
1054/*** <<< TYPE-DECLS [Str2] >>> ***/
1055
1056typedef Str1_t Str2_t;
1057
1058/*** <<< FUNC-DECLS [Str2] >>> ***/
1059
1060extern asn_TYPE_descriptor_t asn_DEF_Str2;
1061asn_struct_free_f Str2_free;
1062asn_struct_print_f Str2_print;
1063asn_constr_check_f Str2_constraint;
1064ber_type_decoder_f Str2_decode_ber;
1065der_type_encoder_f Str2_encode_der;
1066xer_type_decoder_f Str2_decode_xer;
1067xer_type_encoder_f Str2_encode_xer;
1068per_type_decoder_f Str2_decode_uper;
1069
1070/*** <<< CTABLES [Str2] >>> ***/
1071
1072static int check_permitted_alphabet_1(const void *sptr) {
1073 /* The underlying type is IA5String */
1074 const IA5String_t *st = (const IA5String_t *)sptr;
1075 const uint8_t *ch = st->buf;
1076 const uint8_t *end = ch + st->size;
1077
1078 for(; ch < end; ch++) {
1079 uint8_t cv = *ch;
1080 if(!(cv <= 127)) return -1;
1081 }
1082 return 0;
1083}
1084
1085
1086/*** <<< CODE [Str2] >>> ***/
1087
1088int
1089Str2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1090 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1091 const Str1_t *st = (const Str1_t *)sptr;
1092 size_t size;
1093
1094 if(!sptr) {
1095 _ASN_ERRLOG(app_errlog, app_key,
1096 "%s: value not given (%s:%d)",
1097 td->name, __FILE__, __LINE__);
1098 return -1;
1099 }
1100
1101 size = st->size;
1102
1103 if(((size <= 20) || (size >= 25 && size <= 30))
1104 && !check_permitted_alphabet_1(st)) {
1105 /* Constraint check succeeded */
1106 return 0;
1107 } else {
1108 _ASN_ERRLOG(app_errlog, app_key,
1109 "%s: constraint failed (%s:%d)",
1110 td->name, __FILE__, __LINE__);
1111 return -1;
1112 }
1113}
1114
1115/*
1116 * This type is implemented using Str1,
1117 * so here we adjust the DEF accordingly.
1118 */
1119static void
1120Str2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1121 td->free_struct = asn_DEF_Str1.free_struct;
1122 td->print_struct = asn_DEF_Str1.print_struct;
1123 td->ber_decoder = asn_DEF_Str1.ber_decoder;
1124 td->der_encoder = asn_DEF_Str1.der_encoder;
1125 td->xer_decoder = asn_DEF_Str1.xer_decoder;
1126 td->xer_encoder = asn_DEF_Str1.xer_encoder;
1127 td->uper_decoder = asn_DEF_Str1.uper_decoder;
1128 if(!td->per_constraints)
1129 td->per_constraints = asn_DEF_Str1.per_constraints;
1130 td->elements = asn_DEF_Str1.elements;
1131 td->elements_count = asn_DEF_Str1.elements_count;
1132 td->specifics = asn_DEF_Str1.specifics;
1133}
1134
1135void
1136Str2_free(asn_TYPE_descriptor_t *td,
1137 void *struct_ptr, int contents_only) {
1138 Str2_1_inherit_TYPE_descriptor(td);
1139 td->free_struct(td, struct_ptr, contents_only);
1140}
1141
1142int
1143Str2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1144 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1145 Str2_1_inherit_TYPE_descriptor(td);
1146 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1147}
1148
1149asn_dec_rval_t
1150Str2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1151 void **structure, const void *bufptr, size_t size, int tag_mode) {
1152 Str2_1_inherit_TYPE_descriptor(td);
1153 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1154}
1155
1156asn_enc_rval_t
1157Str2_encode_der(asn_TYPE_descriptor_t *td,
1158 void *structure, int tag_mode, ber_tlv_tag_t tag,
1159 asn_app_consume_bytes_f *cb, void *app_key) {
1160 Str2_1_inherit_TYPE_descriptor(td);
1161 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1162}
1163
1164asn_dec_rval_t
1165Str2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1166 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1167 Str2_1_inherit_TYPE_descriptor(td);
1168 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1169}
1170
1171asn_enc_rval_t
1172Str2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1173 int ilevel, enum xer_encoder_flags_e flags,
1174 asn_app_consume_bytes_f *cb, void *app_key) {
1175 Str2_1_inherit_TYPE_descriptor(td);
1176 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1177}
1178
1179asn_dec_rval_t
1180Str2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1181 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1182 Str2_1_inherit_TYPE_descriptor(td);
1183 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1184}
1185
1186
1187/*** <<< STAT-DEFS [Str2] >>> ***/
1188
1189static ber_tlv_tag_t asn_DEF_Str2_tags_1[] = {
1190 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1191};
1192static asn_per_constraints_t asn_PER_Str2_constr_1 = {
1193 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1194 { APC_CONSTRAINED, 5, 5, 0, 30 } /* (SIZE(0..30)) */
1195};
1196asn_TYPE_descriptor_t asn_DEF_Str2 = {
1197 "Str2",
1198 "Str2",
1199 Str2_free,
1200 Str2_print,
1201 Str2_constraint,
1202 Str2_decode_ber,
1203 Str2_encode_der,
1204 Str2_decode_xer,
1205 Str2_encode_xer,
1206 Str2_decode_uper,
1207 0, /* Use generic outmost tag fetcher */
1208 asn_DEF_Str2_tags_1,
1209 sizeof(asn_DEF_Str2_tags_1)
1210 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
1211 asn_DEF_Str2_tags_1, /* Same as above */
1212 sizeof(asn_DEF_Str2_tags_1)
1213 /sizeof(asn_DEF_Str2_tags_1[0]), /* 1 */
1214 &asn_PER_Str2_constr_1,
1215 0, 0, /* No members */
1216 0 /* No specifics */
1217};
1218
1219
1220/*** <<< INCLUDES [Str3] >>> ***/
1221
1222#include <Str2.h>
1223
1224/*** <<< TYPE-DECLS [Str3] >>> ***/
1225
1226typedef Str2_t Str3_t;
1227
1228/*** <<< FUNC-DECLS [Str3] >>> ***/
1229
1230extern asn_TYPE_descriptor_t asn_DEF_Str3;
1231asn_struct_free_f Str3_free;
1232asn_struct_print_f Str3_print;
1233asn_constr_check_f Str3_constraint;
1234ber_type_decoder_f Str3_decode_ber;
1235der_type_encoder_f Str3_encode_der;
1236xer_type_decoder_f Str3_decode_xer;
1237xer_type_encoder_f Str3_encode_xer;
1238per_type_decoder_f Str3_decode_uper;
1239
1240/*** <<< CTABLES [Str3] >>> ***/
1241
1242static int permitted_alphabet_table_1[256] = {
12430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
12440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
12450,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
12460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
12470,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, /* ABC */
12480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
12490,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0, /* def */
1250};
1251
1252static int check_permitted_alphabet_1(const void *sptr) {
1253 int *table = permitted_alphabet_table_1;
1254 /* The underlying type is IA5String */
1255 const IA5String_t *st = (const IA5String_t *)sptr;
1256 const uint8_t *ch = st->buf;
1257 const uint8_t *end = ch + st->size;
1258
1259 for(; ch < end; ch++) {
1260 uint8_t cv = *ch;
1261 if(!table[cv]) return -1;
1262 }
1263 return 0;
1264}
1265
1266
1267/*** <<< CODE [Str3] >>> ***/
1268
1269int
1270Str3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1271 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1272 const Str2_t *st = (const Str2_t *)sptr;
1273 size_t size;
1274
1275 if(!sptr) {
1276 _ASN_ERRLOG(app_errlog, app_key,
1277 "%s: value not given (%s:%d)",
1278 td->name, __FILE__, __LINE__);
1279 return -1;
1280 }
1281
1282 size = st->size;
1283
1284 if(((size >= 10 && size <= 20) || (size >= 25 && size <= 27))
1285 && !check_permitted_alphabet_1(st)) {
1286 /* Constraint check succeeded */
1287 return 0;
1288 } else {
1289 _ASN_ERRLOG(app_errlog, app_key,
1290 "%s: constraint failed (%s:%d)",
1291 td->name, __FILE__, __LINE__);
1292 return -1;
1293 }
1294}
1295
1296/*
1297 * This type is implemented using Str2,
1298 * so here we adjust the DEF accordingly.
1299 */
1300static void
1301Str3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1302 td->free_struct = asn_DEF_Str2.free_struct;
1303 td->print_struct = asn_DEF_Str2.print_struct;
1304 td->ber_decoder = asn_DEF_Str2.ber_decoder;
1305 td->der_encoder = asn_DEF_Str2.der_encoder;
1306 td->xer_decoder = asn_DEF_Str2.xer_decoder;
1307 td->xer_encoder = asn_DEF_Str2.xer_encoder;
1308 td->uper_decoder = asn_DEF_Str2.uper_decoder;
1309 if(!td->per_constraints)
1310 td->per_constraints = asn_DEF_Str2.per_constraints;
1311 td->elements = asn_DEF_Str2.elements;
1312 td->elements_count = asn_DEF_Str2.elements_count;
1313 td->specifics = asn_DEF_Str2.specifics;
1314}
1315
1316void
1317Str3_free(asn_TYPE_descriptor_t *td,
1318 void *struct_ptr, int contents_only) {
1319 Str3_1_inherit_TYPE_descriptor(td);
1320 td->free_struct(td, struct_ptr, contents_only);
1321}
1322
1323int
1324Str3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1325 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1326 Str3_1_inherit_TYPE_descriptor(td);
1327 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1328}
1329
1330asn_dec_rval_t
1331Str3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1332 void **structure, const void *bufptr, size_t size, int tag_mode) {
1333 Str3_1_inherit_TYPE_descriptor(td);
1334 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1335}
1336
1337asn_enc_rval_t
1338Str3_encode_der(asn_TYPE_descriptor_t *td,
1339 void *structure, int tag_mode, ber_tlv_tag_t tag,
1340 asn_app_consume_bytes_f *cb, void *app_key) {
1341 Str3_1_inherit_TYPE_descriptor(td);
1342 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1343}
1344
1345asn_dec_rval_t
1346Str3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1347 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1348 Str3_1_inherit_TYPE_descriptor(td);
1349 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1350}
1351
1352asn_enc_rval_t
1353Str3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1354 int ilevel, enum xer_encoder_flags_e flags,
1355 asn_app_consume_bytes_f *cb, void *app_key) {
1356 Str3_1_inherit_TYPE_descriptor(td);
1357 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1358}
1359
1360asn_dec_rval_t
1361Str3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1362 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1363 Str3_1_inherit_TYPE_descriptor(td);
1364 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1365}
1366
1367
1368/*** <<< STAT-DEFS [Str3] >>> ***/
1369
1370static ber_tlv_tag_t asn_DEF_Str3_tags_1[] = {
1371 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1372};
1373static asn_per_constraints_t asn_PER_Str3_constr_1 = {
1374 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1375 { APC_CONSTRAINED, 5, 5, 10, 27 } /* (SIZE(10..27)) */
1376};
1377asn_TYPE_descriptor_t asn_DEF_Str3 = {
1378 "Str3",
1379 "Str3",
1380 Str3_free,
1381 Str3_print,
1382 Str3_constraint,
1383 Str3_decode_ber,
1384 Str3_encode_der,
1385 Str3_decode_xer,
1386 Str3_encode_xer,
1387 Str3_decode_uper,
1388 0, /* Use generic outmost tag fetcher */
1389 asn_DEF_Str3_tags_1,
1390 sizeof(asn_DEF_Str3_tags_1)
1391 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
1392 asn_DEF_Str3_tags_1, /* Same as above */
1393 sizeof(asn_DEF_Str3_tags_1)
1394 /sizeof(asn_DEF_Str3_tags_1[0]), /* 1 */
1395 &asn_PER_Str3_constr_1,
1396 0, 0, /* No members */
1397 0 /* No specifics */
1398};
1399
1400
1401/*** <<< INCLUDES [Str4] >>> ***/
1402
1403#include <IA5String.h>
1404
1405/*** <<< TYPE-DECLS [Str4] >>> ***/
1406
1407typedef IA5String_t Str4_t;
1408
1409/*** <<< FUNC-DECLS [Str4] >>> ***/
1410
1411extern asn_TYPE_descriptor_t asn_DEF_Str4;
1412asn_struct_free_f Str4_free;
1413asn_struct_print_f Str4_print;
1414asn_constr_check_f Str4_constraint;
1415ber_type_decoder_f Str4_decode_ber;
1416der_type_encoder_f Str4_encode_der;
1417xer_type_decoder_f Str4_decode_xer;
1418xer_type_encoder_f Str4_encode_xer;
1419per_type_decoder_f Str4_decode_uper;
1420
1421/*** <<< CTABLES [Str4] >>> ***/
1422
1423static int check_permitted_alphabet_1(const void *sptr) {
1424 /* The underlying type is IA5String */
1425 const IA5String_t *st = (const IA5String_t *)sptr;
1426 const uint8_t *ch = st->buf;
1427 const uint8_t *end = ch + st->size;
1428
1429 for(; ch < end; ch++) {
1430 uint8_t cv = *ch;
1431 if(!(cv <= 127)) return -1;
1432 }
1433 return 0;
1434}
1435
1436
1437/*** <<< CODE [Str4] >>> ***/
1438
1439int
1440Str4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1441 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1442 const IA5String_t *st = (const IA5String_t *)sptr;
1443
1444 if(!sptr) {
1445 _ASN_ERRLOG(app_errlog, app_key,
1446 "%s: value not given (%s:%d)",
1447 td->name, __FILE__, __LINE__);
1448 return -1;
1449 }
1450
1451
1452 if(!check_permitted_alphabet_1(st)) {
1453 /* Constraint check succeeded */
1454 return 0;
1455 } else {
1456 _ASN_ERRLOG(app_errlog, app_key,
1457 "%s: constraint failed (%s:%d)",
1458 td->name, __FILE__, __LINE__);
1459 return -1;
1460 }
1461}
1462
1463/*
1464 * This type is implemented using IA5String,
1465 * so here we adjust the DEF accordingly.
1466 */
1467static void
1468Str4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1469 td->free_struct = asn_DEF_IA5String.free_struct;
1470 td->print_struct = asn_DEF_IA5String.print_struct;
1471 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
1472 td->der_encoder = asn_DEF_IA5String.der_encoder;
1473 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
1474 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
1475 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
1476 if(!td->per_constraints)
1477 td->per_constraints = asn_DEF_IA5String.per_constraints;
1478 td->elements = asn_DEF_IA5String.elements;
1479 td->elements_count = asn_DEF_IA5String.elements_count;
1480 td->specifics = asn_DEF_IA5String.specifics;
1481}
1482
1483void
1484Str4_free(asn_TYPE_descriptor_t *td,
1485 void *struct_ptr, int contents_only) {
1486 Str4_1_inherit_TYPE_descriptor(td);
1487 td->free_struct(td, struct_ptr, contents_only);
1488}
1489
1490int
1491Str4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1492 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1493 Str4_1_inherit_TYPE_descriptor(td);
1494 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1495}
1496
1497asn_dec_rval_t
1498Str4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1499 void **structure, const void *bufptr, size_t size, int tag_mode) {
1500 Str4_1_inherit_TYPE_descriptor(td);
1501 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1502}
1503
1504asn_enc_rval_t
1505Str4_encode_der(asn_TYPE_descriptor_t *td,
1506 void *structure, int tag_mode, ber_tlv_tag_t tag,
1507 asn_app_consume_bytes_f *cb, void *app_key) {
1508 Str4_1_inherit_TYPE_descriptor(td);
1509 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1510}
1511
1512asn_dec_rval_t
1513Str4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1514 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1515 Str4_1_inherit_TYPE_descriptor(td);
1516 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1517}
1518
1519asn_enc_rval_t
1520Str4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1521 int ilevel, enum xer_encoder_flags_e flags,
1522 asn_app_consume_bytes_f *cb, void *app_key) {
1523 Str4_1_inherit_TYPE_descriptor(td);
1524 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1525}
1526
1527asn_dec_rval_t
1528Str4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1529 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1530 Str4_1_inherit_TYPE_descriptor(td);
1531 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1532}
1533
1534
1535/*** <<< STAT-DEFS [Str4] >>> ***/
1536
1537static ber_tlv_tag_t asn_DEF_Str4_tags_1[] = {
1538 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1539};
1540static asn_per_constraints_t asn_PER_Str4_constr_1 = {
1541 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1542 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
1543};
1544asn_TYPE_descriptor_t asn_DEF_Str4 = {
1545 "Str4",
1546 "Str4",
1547 Str4_free,
1548 Str4_print,
1549 Str4_constraint,
1550 Str4_decode_ber,
1551 Str4_encode_der,
1552 Str4_decode_xer,
1553 Str4_encode_xer,
1554 Str4_decode_uper,
1555 0, /* Use generic outmost tag fetcher */
1556 asn_DEF_Str4_tags_1,
1557 sizeof(asn_DEF_Str4_tags_1)
1558 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
1559 asn_DEF_Str4_tags_1, /* Same as above */
1560 sizeof(asn_DEF_Str4_tags_1)
1561 /sizeof(asn_DEF_Str4_tags_1[0]), /* 1 */
1562 &asn_PER_Str4_constr_1,
1563 0, 0, /* No members */
1564 0 /* No specifics */
1565};
1566
1567
1568/*** <<< INCLUDES [PER-Visible] >>> ***/
1569
1570#include <IA5String.h>
1571
1572/*** <<< TYPE-DECLS [PER-Visible] >>> ***/
1573
1574typedef IA5String_t PER_Visible_t;
1575
1576/*** <<< FUNC-DECLS [PER-Visible] >>> ***/
1577
1578extern asn_TYPE_descriptor_t asn_DEF_PER_Visible;
1579asn_struct_free_f PER_Visible_free;
1580asn_struct_print_f PER_Visible_print;
1581asn_constr_check_f PER_Visible_constraint;
1582ber_type_decoder_f PER_Visible_decode_ber;
1583der_type_encoder_f PER_Visible_encode_der;
1584xer_type_decoder_f PER_Visible_decode_xer;
1585xer_type_encoder_f PER_Visible_encode_xer;
1586per_type_decoder_f PER_Visible_decode_uper;
1587
1588/*** <<< CTABLES [PER-Visible] >>> ***/
1589
1590static int check_permitted_alphabet_1(const void *sptr) {
1591 /* The underlying type is IA5String */
1592 const IA5String_t *st = (const IA5String_t *)sptr;
1593 const uint8_t *ch = st->buf;
1594 const uint8_t *end = ch + st->size;
1595
1596 for(; ch < end; ch++) {
1597 uint8_t cv = *ch;
1598 if(!(cv >= 65 && cv <= 70)) return -1;
1599 }
1600 return 0;
1601}
1602
1603
1604/*** <<< CODE [PER-Visible] >>> ***/
1605
1606int
1607PER_Visible_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1608 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1609 const IA5String_t *st = (const IA5String_t *)sptr;
1610
1611 if(!sptr) {
1612 _ASN_ERRLOG(app_errlog, app_key,
1613 "%s: value not given (%s:%d)",
1614 td->name, __FILE__, __LINE__);
1615 return -1;
1616 }
1617
1618
1619 if(!check_permitted_alphabet_1(st)) {
1620 /* Constraint check succeeded */
1621 return 0;
1622 } else {
1623 _ASN_ERRLOG(app_errlog, app_key,
1624 "%s: constraint failed (%s:%d)",
1625 td->name, __FILE__, __LINE__);
1626 return -1;
1627 }
1628}
1629
1630/*
1631 * This type is implemented using IA5String,
1632 * so here we adjust the DEF accordingly.
1633 */
1634static void
1635PER_Visible_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1636 td->free_struct = asn_DEF_IA5String.free_struct;
1637 td->print_struct = asn_DEF_IA5String.print_struct;
1638 td->ber_decoder = asn_DEF_IA5String.ber_decoder;
1639 td->der_encoder = asn_DEF_IA5String.der_encoder;
1640 td->xer_decoder = asn_DEF_IA5String.xer_decoder;
1641 td->xer_encoder = asn_DEF_IA5String.xer_encoder;
1642 td->uper_decoder = asn_DEF_IA5String.uper_decoder;
1643 if(!td->per_constraints)
1644 td->per_constraints = asn_DEF_IA5String.per_constraints;
1645 td->elements = asn_DEF_IA5String.elements;
1646 td->elements_count = asn_DEF_IA5String.elements_count;
1647 td->specifics = asn_DEF_IA5String.specifics;
1648}
1649
1650void
1651PER_Visible_free(asn_TYPE_descriptor_t *td,
1652 void *struct_ptr, int contents_only) {
1653 PER_Visible_1_inherit_TYPE_descriptor(td);
1654 td->free_struct(td, struct_ptr, contents_only);
1655}
1656
1657int
1658PER_Visible_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1659 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1660 PER_Visible_1_inherit_TYPE_descriptor(td);
1661 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1662}
1663
1664asn_dec_rval_t
1665PER_Visible_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1666 void **structure, const void *bufptr, size_t size, int tag_mode) {
1667 PER_Visible_1_inherit_TYPE_descriptor(td);
1668 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1669}
1670
1671asn_enc_rval_t
1672PER_Visible_encode_der(asn_TYPE_descriptor_t *td,
1673 void *structure, int tag_mode, ber_tlv_tag_t tag,
1674 asn_app_consume_bytes_f *cb, void *app_key) {
1675 PER_Visible_1_inherit_TYPE_descriptor(td);
1676 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1677}
1678
1679asn_dec_rval_t
1680PER_Visible_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1681 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1682 PER_Visible_1_inherit_TYPE_descriptor(td);
1683 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1684}
1685
1686asn_enc_rval_t
1687PER_Visible_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1688 int ilevel, enum xer_encoder_flags_e flags,
1689 asn_app_consume_bytes_f *cb, void *app_key) {
1690 PER_Visible_1_inherit_TYPE_descriptor(td);
1691 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1692}
1693
1694asn_dec_rval_t
1695PER_Visible_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1696 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1697 PER_Visible_1_inherit_TYPE_descriptor(td);
1698 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1699}
1700
1701
1702/*** <<< STAT-DEFS [PER-Visible] >>> ***/
1703
1704static ber_tlv_tag_t asn_DEF_PER_Visible_tags_1[] = {
1705 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1706};
1707static asn_per_constraints_t asn_PER_PER_Visible_constr_1 = {
1708 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1709 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
1710};
1711asn_TYPE_descriptor_t asn_DEF_PER_Visible = {
1712 "PER-Visible",
1713 "PER-Visible",
1714 PER_Visible_free,
1715 PER_Visible_print,
1716 PER_Visible_constraint,
1717 PER_Visible_decode_ber,
1718 PER_Visible_encode_der,
1719 PER_Visible_decode_xer,
1720 PER_Visible_encode_xer,
1721 PER_Visible_decode_uper,
1722 0, /* Use generic outmost tag fetcher */
1723 asn_DEF_PER_Visible_tags_1,
1724 sizeof(asn_DEF_PER_Visible_tags_1)
1725 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
1726 asn_DEF_PER_Visible_tags_1, /* Same as above */
1727 sizeof(asn_DEF_PER_Visible_tags_1)
1728 /sizeof(asn_DEF_PER_Visible_tags_1[0]), /* 1 */
1729 &asn_PER_PER_Visible_constr_1,
1730 0, 0, /* No members */
1731 0 /* No specifics */
1732};
1733
1734
1735/*** <<< INCLUDES [PER-Visible-2] >>> ***/
1736
1737#include <PER-Visible.h>
1738
1739/*** <<< TYPE-DECLS [PER-Visible-2] >>> ***/
1740
1741typedef PER_Visible_t PER_Visible_2_t;
1742
1743/*** <<< FUNC-DECLS [PER-Visible-2] >>> ***/
1744
1745extern asn_TYPE_descriptor_t asn_DEF_PER_Visible_2;
1746asn_struct_free_f PER_Visible_2_free;
1747asn_struct_print_f PER_Visible_2_print;
1748asn_constr_check_f PER_Visible_2_constraint;
1749ber_type_decoder_f PER_Visible_2_decode_ber;
1750der_type_encoder_f PER_Visible_2_encode_der;
1751xer_type_decoder_f PER_Visible_2_decode_xer;
1752xer_type_encoder_f PER_Visible_2_encode_xer;
1753per_type_decoder_f PER_Visible_2_decode_uper;
1754
1755/*** <<< CTABLES [PER-Visible-2] >>> ***/
1756
1757static int check_permitted_alphabet_1(const void *sptr) {
1758 /* The underlying type is IA5String */
1759 const IA5String_t *st = (const IA5String_t *)sptr;
1760 const uint8_t *ch = st->buf;
1761 const uint8_t *end = ch + st->size;
1762
1763 for(; ch < end; ch++) {
1764 uint8_t cv = *ch;
1765 if(!(cv >= 69 && cv <= 70)) return -1;
1766 }
1767 return 0;
1768}
1769
1770
1771/*** <<< CODE [PER-Visible-2] >>> ***/
1772
1773int
1774PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1775 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1776 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1777
1778 if(!sptr) {
1779 _ASN_ERRLOG(app_errlog, app_key,
1780 "%s: value not given (%s:%d)",
1781 td->name, __FILE__, __LINE__);
1782 return -1;
1783 }
1784
1785
1786 if(!check_permitted_alphabet_1(st)) {
1787 /* Constraint check succeeded */
1788 return 0;
1789 } else {
1790 _ASN_ERRLOG(app_errlog, app_key,
1791 "%s: constraint failed (%s:%d)",
1792 td->name, __FILE__, __LINE__);
1793 return -1;
1794 }
1795}
1796
1797/*
1798 * This type is implemented using PER_Visible,
1799 * so here we adjust the DEF accordingly.
1800 */
1801static void
1802PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1803 td->free_struct = asn_DEF_PER_Visible.free_struct;
1804 td->print_struct = asn_DEF_PER_Visible.print_struct;
1805 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
1806 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
1807 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
1808 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
1809 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
1810 if(!td->per_constraints)
1811 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
1812 td->elements = asn_DEF_PER_Visible.elements;
1813 td->elements_count = asn_DEF_PER_Visible.elements_count;
1814 td->specifics = asn_DEF_PER_Visible.specifics;
1815}
1816
1817void
1818PER_Visible_2_free(asn_TYPE_descriptor_t *td,
1819 void *struct_ptr, int contents_only) {
1820 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1821 td->free_struct(td, struct_ptr, contents_only);
1822}
1823
1824int
1825PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1826 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1827 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1828 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1829}
1830
1831asn_dec_rval_t
1832PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1833 void **structure, const void *bufptr, size_t size, int tag_mode) {
1834 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1835 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
1836}
1837
1838asn_enc_rval_t
1839PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
1840 void *structure, int tag_mode, ber_tlv_tag_t tag,
1841 asn_app_consume_bytes_f *cb, void *app_key) {
1842 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1843 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
1844}
1845
1846asn_dec_rval_t
1847PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1848 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
1849 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1850 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
1851}
1852
1853asn_enc_rval_t
1854PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
1855 int ilevel, enum xer_encoder_flags_e flags,
1856 asn_app_consume_bytes_f *cb, void *app_key) {
1857 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1858 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
1859}
1860
1861asn_dec_rval_t
1862PER_Visible_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
1863 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
1864 PER_Visible_2_1_inherit_TYPE_descriptor(td);
1865 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
1866}
1867
1868
1869/*** <<< STAT-DEFS [PER-Visible-2] >>> ***/
1870
1871static ber_tlv_tag_t asn_DEF_PER_Visible_2_tags_1[] = {
1872 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
1873};
1874static asn_per_constraints_t asn_PER_PER_Visible_2_constr_1 = {
1875 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
1876 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
1877};
1878asn_TYPE_descriptor_t asn_DEF_PER_Visible_2 = {
1879 "PER-Visible-2",
1880 "PER-Visible-2",
1881 PER_Visible_2_free,
1882 PER_Visible_2_print,
1883 PER_Visible_2_constraint,
1884 PER_Visible_2_decode_ber,
1885 PER_Visible_2_encode_der,
1886 PER_Visible_2_decode_xer,
1887 PER_Visible_2_encode_xer,
1888 PER_Visible_2_decode_uper,
1889 0, /* Use generic outmost tag fetcher */
1890 asn_DEF_PER_Visible_2_tags_1,
1891 sizeof(asn_DEF_PER_Visible_2_tags_1)
1892 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1893 asn_DEF_PER_Visible_2_tags_1, /* Same as above */
1894 sizeof(asn_DEF_PER_Visible_2_tags_1)
1895 /sizeof(asn_DEF_PER_Visible_2_tags_1[0]), /* 1 */
1896 &asn_PER_PER_Visible_2_constr_1,
1897 0, 0, /* No members */
1898 0 /* No specifics */
1899};
1900
1901
1902/*** <<< INCLUDES [Not-PER-Visible-1] >>> ***/
1903
1904#include <PER-Visible.h>
1905
1906/*** <<< TYPE-DECLS [Not-PER-Visible-1] >>> ***/
1907
1908typedef PER_Visible_t Not_PER_Visible_1_t;
1909
1910/*** <<< FUNC-DECLS [Not-PER-Visible-1] >>> ***/
1911
1912extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1;
1913asn_struct_free_f Not_PER_Visible_1_free;
1914asn_struct_print_f Not_PER_Visible_1_print;
1915asn_constr_check_f Not_PER_Visible_1_constraint;
1916ber_type_decoder_f Not_PER_Visible_1_decode_ber;
1917der_type_encoder_f Not_PER_Visible_1_encode_der;
1918xer_type_decoder_f Not_PER_Visible_1_decode_xer;
1919xer_type_encoder_f Not_PER_Visible_1_encode_xer;
1920per_type_decoder_f Not_PER_Visible_1_decode_uper;
1921
1922/*** <<< CTABLES [Not-PER-Visible-1] >>> ***/
1923
1924static int check_permitted_alphabet_1(const void *sptr) {
1925 /* The underlying type is IA5String */
1926 const IA5String_t *st = (const IA5String_t *)sptr;
1927 const uint8_t *ch = st->buf;
1928 const uint8_t *end = ch + st->size;
1929
1930 for(; ch < end; ch++) {
1931 uint8_t cv = *ch;
1932 if(!(cv >= 65 && cv <= 70)) return -1;
1933 }
1934 return 0;
1935}
1936
1937
1938/*** <<< CODE [Not-PER-Visible-1] >>> ***/
1939
1940int
1941Not_PER_Visible_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
1942 asn_app_consume_bytes_f *app_errlog, void *app_key) {
1943 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
1944
1945 if(!sptr) {
1946 _ASN_ERRLOG(app_errlog, app_key,
1947 "%s: value not given (%s:%d)",
1948 td->name, __FILE__, __LINE__);
1949 return -1;
1950 }
1951
1952
1953 if(!check_permitted_alphabet_1(st)) {
1954 /* Constraint check succeeded */
1955 return 0;
1956 } else {
1957 _ASN_ERRLOG(app_errlog, app_key,
1958 "%s: constraint failed (%s:%d)",
1959 td->name, __FILE__, __LINE__);
1960 return -1;
1961 }
1962}
1963
1964/*
1965 * This type is implemented using PER_Visible,
1966 * so here we adjust the DEF accordingly.
1967 */
1968static void
1969Not_PER_Visible_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
1970 td->free_struct = asn_DEF_PER_Visible.free_struct;
1971 td->print_struct = asn_DEF_PER_Visible.print_struct;
1972 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
1973 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
1974 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
1975 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
1976 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
1977 if(!td->per_constraints)
1978 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
1979 td->elements = asn_DEF_PER_Visible.elements;
1980 td->elements_count = asn_DEF_PER_Visible.elements_count;
1981 td->specifics = asn_DEF_PER_Visible.specifics;
1982}
1983
1984void
1985Not_PER_Visible_1_free(asn_TYPE_descriptor_t *td,
1986 void *struct_ptr, int contents_only) {
1987 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
1988 td->free_struct(td, struct_ptr, contents_only);
1989}
1990
1991int
1992Not_PER_Visible_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
1993 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
1994 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
1995 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
1996}
1997
1998asn_dec_rval_t
1999Not_PER_Visible_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2000 void **structure, const void *bufptr, size_t size, int tag_mode) {
2001 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
2002 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2003}
2004
2005asn_enc_rval_t
2006Not_PER_Visible_1_encode_der(asn_TYPE_descriptor_t *td,
2007 void *structure, int tag_mode, ber_tlv_tag_t tag,
2008 asn_app_consume_bytes_f *cb, void *app_key) {
2009 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
2010 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2011}
2012
2013asn_dec_rval_t
2014Not_PER_Visible_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2015 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2016 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
2017 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2018}
2019
2020asn_enc_rval_t
2021Not_PER_Visible_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2022 int ilevel, enum xer_encoder_flags_e flags,
2023 asn_app_consume_bytes_f *cb, void *app_key) {
2024 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
2025 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2026}
2027
2028asn_dec_rval_t
2029Not_PER_Visible_1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2030 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2031 Not_PER_Visible_1_1_inherit_TYPE_descriptor(td);
2032 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2033}
2034
2035
2036/*** <<< STAT-DEFS [Not-PER-Visible-1] >>> ***/
2037
2038static ber_tlv_tag_t asn_DEF_Not_PER_Visible_1_tags_1[] = {
2039 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2040};
2041static asn_per_constraints_t asn_PER_Not_PER_Visible_1_constr_1 = {
2042 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2043 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
2044};
2045asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_1 = {
2046 "Not-PER-Visible-1",
2047 "Not-PER-Visible-1",
2048 Not_PER_Visible_1_free,
2049 Not_PER_Visible_1_print,
2050 Not_PER_Visible_1_constraint,
2051 Not_PER_Visible_1_decode_ber,
2052 Not_PER_Visible_1_encode_der,
2053 Not_PER_Visible_1_decode_xer,
2054 Not_PER_Visible_1_encode_xer,
2055 Not_PER_Visible_1_decode_uper,
2056 0, /* Use generic outmost tag fetcher */
2057 asn_DEF_Not_PER_Visible_1_tags_1,
2058 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
2059 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
2060 asn_DEF_Not_PER_Visible_1_tags_1, /* Same as above */
2061 sizeof(asn_DEF_Not_PER_Visible_1_tags_1)
2062 /sizeof(asn_DEF_Not_PER_Visible_1_tags_1[0]), /* 1 */
2063 &asn_PER_Not_PER_Visible_1_constr_1,
2064 0, 0, /* No members */
2065 0 /* No specifics */
2066};
2067
2068
2069/*** <<< INCLUDES [Not-PER-Visible-2] >>> ***/
2070
2071#include <PER-Visible.h>
2072
2073/*** <<< TYPE-DECLS [Not-PER-Visible-2] >>> ***/
2074
2075typedef PER_Visible_t Not_PER_Visible_2_t;
2076
2077/*** <<< FUNC-DECLS [Not-PER-Visible-2] >>> ***/
2078
2079extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2;
2080asn_struct_free_f Not_PER_Visible_2_free;
2081asn_struct_print_f Not_PER_Visible_2_print;
2082asn_constr_check_f Not_PER_Visible_2_constraint;
2083ber_type_decoder_f Not_PER_Visible_2_decode_ber;
2084der_type_encoder_f Not_PER_Visible_2_encode_der;
2085xer_type_decoder_f Not_PER_Visible_2_decode_xer;
2086xer_type_encoder_f Not_PER_Visible_2_encode_xer;
2087per_type_decoder_f Not_PER_Visible_2_decode_uper;
2088
2089/*** <<< CTABLES [Not-PER-Visible-2] >>> ***/
2090
2091static int check_permitted_alphabet_1(const void *sptr) {
2092 /* The underlying type is IA5String */
2093 const IA5String_t *st = (const IA5String_t *)sptr;
2094 const uint8_t *ch = st->buf;
2095 const uint8_t *end = ch + st->size;
2096
2097 for(; ch < end; ch++) {
2098 uint8_t cv = *ch;
2099 if(!(cv >= 65 && cv <= 66)) return -1;
2100 }
2101 return 0;
2102}
2103
2104
2105/*** <<< CODE [Not-PER-Visible-2] >>> ***/
2106
2107int
2108Not_PER_Visible_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2109 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2110 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
2111
2112 if(!sptr) {
2113 _ASN_ERRLOG(app_errlog, app_key,
2114 "%s: value not given (%s:%d)",
2115 td->name, __FILE__, __LINE__);
2116 return -1;
2117 }
2118
2119
2120 if(!check_permitted_alphabet_1(st)) {
2121 /* Constraint check succeeded */
2122 return 0;
2123 } else {
2124 _ASN_ERRLOG(app_errlog, app_key,
2125 "%s: constraint failed (%s:%d)",
2126 td->name, __FILE__, __LINE__);
2127 return -1;
2128 }
2129}
2130
2131/*
2132 * This type is implemented using PER_Visible,
2133 * so here we adjust the DEF accordingly.
2134 */
2135static void
2136Not_PER_Visible_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2137 td->free_struct = asn_DEF_PER_Visible.free_struct;
2138 td->print_struct = asn_DEF_PER_Visible.print_struct;
2139 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2140 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2141 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2142 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
2143 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2144 if(!td->per_constraints)
2145 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
2146 td->elements = asn_DEF_PER_Visible.elements;
2147 td->elements_count = asn_DEF_PER_Visible.elements_count;
2148 td->specifics = asn_DEF_PER_Visible.specifics;
2149}
2150
2151void
2152Not_PER_Visible_2_free(asn_TYPE_descriptor_t *td,
2153 void *struct_ptr, int contents_only) {
2154 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2155 td->free_struct(td, struct_ptr, contents_only);
2156}
2157
2158int
2159Not_PER_Visible_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2160 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2161 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2162 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2163}
2164
2165asn_dec_rval_t
2166Not_PER_Visible_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2167 void **structure, const void *bufptr, size_t size, int tag_mode) {
2168 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2169 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2170}
2171
2172asn_enc_rval_t
2173Not_PER_Visible_2_encode_der(asn_TYPE_descriptor_t *td,
2174 void *structure, int tag_mode, ber_tlv_tag_t tag,
2175 asn_app_consume_bytes_f *cb, void *app_key) {
2176 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2177 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2178}
2179
2180asn_dec_rval_t
2181Not_PER_Visible_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2182 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2183 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2184 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2185}
2186
2187asn_enc_rval_t
2188Not_PER_Visible_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2189 int ilevel, enum xer_encoder_flags_e flags,
2190 asn_app_consume_bytes_f *cb, void *app_key) {
2191 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2192 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2193}
2194
2195asn_dec_rval_t
2196Not_PER_Visible_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2197 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2198 Not_PER_Visible_2_1_inherit_TYPE_descriptor(td);
2199 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2200}
2201
2202
2203/*** <<< STAT-DEFS [Not-PER-Visible-2] >>> ***/
2204
2205static ber_tlv_tag_t asn_DEF_Not_PER_Visible_2_tags_1[] = {
2206 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2207};
2208static asn_per_constraints_t asn_PER_Not_PER_Visible_2_constr_1 = {
2209 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2210 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
2211};
2212asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_2 = {
2213 "Not-PER-Visible-2",
2214 "Not-PER-Visible-2",
2215 Not_PER_Visible_2_free,
2216 Not_PER_Visible_2_print,
2217 Not_PER_Visible_2_constraint,
2218 Not_PER_Visible_2_decode_ber,
2219 Not_PER_Visible_2_encode_der,
2220 Not_PER_Visible_2_decode_xer,
2221 Not_PER_Visible_2_encode_xer,
2222 Not_PER_Visible_2_decode_uper,
2223 0, /* Use generic outmost tag fetcher */
2224 asn_DEF_Not_PER_Visible_2_tags_1,
2225 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
2226 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
2227 asn_DEF_Not_PER_Visible_2_tags_1, /* Same as above */
2228 sizeof(asn_DEF_Not_PER_Visible_2_tags_1)
2229 /sizeof(asn_DEF_Not_PER_Visible_2_tags_1[0]), /* 1 */
2230 &asn_PER_Not_PER_Visible_2_constr_1,
2231 0, 0, /* No members */
2232 0 /* No specifics */
2233};
2234
2235
2236/*** <<< INCLUDES [Not-PER-Visible-3] >>> ***/
2237
2238#include <PER-Visible.h>
2239
2240/*** <<< TYPE-DECLS [Not-PER-Visible-3] >>> ***/
2241
2242typedef PER_Visible_t Not_PER_Visible_3_t;
2243
2244/*** <<< FUNC-DECLS [Not-PER-Visible-3] >>> ***/
2245
2246extern asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3;
2247asn_struct_free_f Not_PER_Visible_3_free;
2248asn_struct_print_f Not_PER_Visible_3_print;
2249asn_constr_check_f Not_PER_Visible_3_constraint;
2250ber_type_decoder_f Not_PER_Visible_3_decode_ber;
2251der_type_encoder_f Not_PER_Visible_3_encode_der;
2252xer_type_decoder_f Not_PER_Visible_3_decode_xer;
2253xer_type_encoder_f Not_PER_Visible_3_encode_xer;
2254per_type_decoder_f Not_PER_Visible_3_decode_uper;
2255
2256/*** <<< CTABLES [Not-PER-Visible-3] >>> ***/
2257
2258static int check_permitted_alphabet_1(const void *sptr) {
2259 /* The underlying type is IA5String */
2260 const IA5String_t *st = (const IA5String_t *)sptr;
2261 const uint8_t *ch = st->buf;
2262 const uint8_t *end = ch + st->size;
2263
2264 for(; ch < end; ch++) {
2265 uint8_t cv = *ch;
2266 if(!(cv >= 65 && cv <= 66)) return -1;
2267 }
2268 return 0;
2269}
2270
2271
2272/*** <<< CODE [Not-PER-Visible-3] >>> ***/
2273
2274int
2275Not_PER_Visible_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2276 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2277 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
2278
2279 if(!sptr) {
2280 _ASN_ERRLOG(app_errlog, app_key,
2281 "%s: value not given (%s:%d)",
2282 td->name, __FILE__, __LINE__);
2283 return -1;
2284 }
2285
2286
2287 if(!check_permitted_alphabet_1(st)) {
2288 /* Constraint check succeeded */
2289 return 0;
2290 } else {
2291 _ASN_ERRLOG(app_errlog, app_key,
2292 "%s: constraint failed (%s:%d)",
2293 td->name, __FILE__, __LINE__);
2294 return -1;
2295 }
2296}
2297
2298/*
2299 * This type is implemented using PER_Visible,
2300 * so here we adjust the DEF accordingly.
2301 */
2302static void
2303Not_PER_Visible_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2304 td->free_struct = asn_DEF_PER_Visible.free_struct;
2305 td->print_struct = asn_DEF_PER_Visible.print_struct;
2306 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2307 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2308 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2309 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
2310 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2311 if(!td->per_constraints)
2312 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
2313 td->elements = asn_DEF_PER_Visible.elements;
2314 td->elements_count = asn_DEF_PER_Visible.elements_count;
2315 td->specifics = asn_DEF_PER_Visible.specifics;
2316}
2317
2318void
2319Not_PER_Visible_3_free(asn_TYPE_descriptor_t *td,
2320 void *struct_ptr, int contents_only) {
2321 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2322 td->free_struct(td, struct_ptr, contents_only);
2323}
2324
2325int
2326Not_PER_Visible_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2327 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2328 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2329 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2330}
2331
2332asn_dec_rval_t
2333Not_PER_Visible_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2334 void **structure, const void *bufptr, size_t size, int tag_mode) {
2335 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2336 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2337}
2338
2339asn_enc_rval_t
2340Not_PER_Visible_3_encode_der(asn_TYPE_descriptor_t *td,
2341 void *structure, int tag_mode, ber_tlv_tag_t tag,
2342 asn_app_consume_bytes_f *cb, void *app_key) {
2343 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2344 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2345}
2346
2347asn_dec_rval_t
2348Not_PER_Visible_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2349 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2350 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2351 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2352}
2353
2354asn_enc_rval_t
2355Not_PER_Visible_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2356 int ilevel, enum xer_encoder_flags_e flags,
2357 asn_app_consume_bytes_f *cb, void *app_key) {
2358 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2359 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2360}
2361
2362asn_dec_rval_t
2363Not_PER_Visible_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2364 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2365 Not_PER_Visible_3_1_inherit_TYPE_descriptor(td);
2366 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2367}
2368
2369
2370/*** <<< STAT-DEFS [Not-PER-Visible-3] >>> ***/
2371
2372static ber_tlv_tag_t asn_DEF_Not_PER_Visible_3_tags_1[] = {
2373 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2374};
2375static asn_per_constraints_t asn_PER_Not_PER_Visible_3_constr_1 = {
2376 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2377 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
2378};
2379asn_TYPE_descriptor_t asn_DEF_Not_PER_Visible_3 = {
2380 "Not-PER-Visible-3",
2381 "Not-PER-Visible-3",
2382 Not_PER_Visible_3_free,
2383 Not_PER_Visible_3_print,
2384 Not_PER_Visible_3_constraint,
2385 Not_PER_Visible_3_decode_ber,
2386 Not_PER_Visible_3_encode_der,
2387 Not_PER_Visible_3_decode_xer,
2388 Not_PER_Visible_3_encode_xer,
2389 Not_PER_Visible_3_decode_uper,
2390 0, /* Use generic outmost tag fetcher */
2391 asn_DEF_Not_PER_Visible_3_tags_1,
2392 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
2393 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
2394 asn_DEF_Not_PER_Visible_3_tags_1, /* Same as above */
2395 sizeof(asn_DEF_Not_PER_Visible_3_tags_1)
2396 /sizeof(asn_DEF_Not_PER_Visible_3_tags_1[0]), /* 1 */
2397 &asn_PER_Not_PER_Visible_3_constr_1,
2398 0, 0, /* No members */
2399 0 /* No specifics */
2400};
2401
2402
2403/*** <<< INCLUDES [SIZE-but-not-FROM] >>> ***/
2404
2405#include <PER-Visible.h>
2406
2407/*** <<< TYPE-DECLS [SIZE-but-not-FROM] >>> ***/
2408
2409typedef PER_Visible_t SIZE_but_not_FROM_t;
2410
2411/*** <<< FUNC-DECLS [SIZE-but-not-FROM] >>> ***/
2412
2413extern asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM;
2414asn_struct_free_f SIZE_but_not_FROM_free;
2415asn_struct_print_f SIZE_but_not_FROM_print;
2416asn_constr_check_f SIZE_but_not_FROM_constraint;
2417ber_type_decoder_f SIZE_but_not_FROM_decode_ber;
2418der_type_encoder_f SIZE_but_not_FROM_encode_der;
2419xer_type_decoder_f SIZE_but_not_FROM_decode_xer;
2420xer_type_encoder_f SIZE_but_not_FROM_encode_xer;
2421per_type_decoder_f SIZE_but_not_FROM_decode_uper;
2422
2423/*** <<< CTABLES [SIZE-but-not-FROM] >>> ***/
2424
2425static int check_permitted_alphabet_1(const void *sptr) {
2426 /* The underlying type is IA5String */
2427 const IA5String_t *st = (const IA5String_t *)sptr;
2428 const uint8_t *ch = st->buf;
2429 const uint8_t *end = ch + st->size;
2430
2431 for(; ch < end; ch++) {
2432 uint8_t cv = *ch;
2433 if(!(cv >= 65 && cv <= 68)) return -1;
2434 }
2435 return 0;
2436}
2437
2438
2439/*** <<< CODE [SIZE-but-not-FROM] >>> ***/
2440
2441int
2442SIZE_but_not_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2443 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2444 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
2445 size_t size;
2446
2447 if(!sptr) {
2448 _ASN_ERRLOG(app_errlog, app_key,
2449 "%s: value not given (%s:%d)",
2450 td->name, __FILE__, __LINE__);
2451 return -1;
2452 }
2453
2454 size = st->size;
2455
2456 if((size >= 1 && size <= 4)
2457 && !check_permitted_alphabet_1(st)) {
2458 /* Constraint check succeeded */
2459 return 0;
2460 } else {
2461 _ASN_ERRLOG(app_errlog, app_key,
2462 "%s: constraint failed (%s:%d)",
2463 td->name, __FILE__, __LINE__);
2464 return -1;
2465 }
2466}
2467
2468/*
2469 * This type is implemented using PER_Visible,
2470 * so here we adjust the DEF accordingly.
2471 */
2472static void
2473SIZE_but_not_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2474 td->free_struct = asn_DEF_PER_Visible.free_struct;
2475 td->print_struct = asn_DEF_PER_Visible.print_struct;
2476 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2477 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2478 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2479 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
2480 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2481 if(!td->per_constraints)
2482 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
2483 td->elements = asn_DEF_PER_Visible.elements;
2484 td->elements_count = asn_DEF_PER_Visible.elements_count;
2485 td->specifics = asn_DEF_PER_Visible.specifics;
2486}
2487
2488void
2489SIZE_but_not_FROM_free(asn_TYPE_descriptor_t *td,
2490 void *struct_ptr, int contents_only) {
2491 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2492 td->free_struct(td, struct_ptr, contents_only);
2493}
2494
2495int
2496SIZE_but_not_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2497 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2498 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2499 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2500}
2501
2502asn_dec_rval_t
2503SIZE_but_not_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2504 void **structure, const void *bufptr, size_t size, int tag_mode) {
2505 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2506 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2507}
2508
2509asn_enc_rval_t
2510SIZE_but_not_FROM_encode_der(asn_TYPE_descriptor_t *td,
2511 void *structure, int tag_mode, ber_tlv_tag_t tag,
2512 asn_app_consume_bytes_f *cb, void *app_key) {
2513 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2514 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2515}
2516
2517asn_dec_rval_t
2518SIZE_but_not_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2519 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2520 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2521 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2522}
2523
2524asn_enc_rval_t
2525SIZE_but_not_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2526 int ilevel, enum xer_encoder_flags_e flags,
2527 asn_app_consume_bytes_f *cb, void *app_key) {
2528 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2529 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2530}
2531
2532asn_dec_rval_t
2533SIZE_but_not_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2534 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2535 SIZE_but_not_FROM_1_inherit_TYPE_descriptor(td);
2536 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2537}
2538
2539
2540/*** <<< STAT-DEFS [SIZE-but-not-FROM] >>> ***/
2541
2542static ber_tlv_tag_t asn_DEF_SIZE_but_not_FROM_tags_1[] = {
2543 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2544};
2545static asn_per_constraints_t asn_PER_SIZE_but_not_FROM_constr_1 = {
2546 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2547 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */
2548};
2549asn_TYPE_descriptor_t asn_DEF_SIZE_but_not_FROM = {
2550 "SIZE-but-not-FROM",
2551 "SIZE-but-not-FROM",
2552 SIZE_but_not_FROM_free,
2553 SIZE_but_not_FROM_print,
2554 SIZE_but_not_FROM_constraint,
2555 SIZE_but_not_FROM_decode_ber,
2556 SIZE_but_not_FROM_encode_der,
2557 SIZE_but_not_FROM_decode_xer,
2558 SIZE_but_not_FROM_encode_xer,
2559 SIZE_but_not_FROM_decode_uper,
2560 0, /* Use generic outmost tag fetcher */
2561 asn_DEF_SIZE_but_not_FROM_tags_1,
2562 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
2563 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
2564 asn_DEF_SIZE_but_not_FROM_tags_1, /* Same as above */
2565 sizeof(asn_DEF_SIZE_but_not_FROM_tags_1)
2566 /sizeof(asn_DEF_SIZE_but_not_FROM_tags_1[0]), /* 1 */
2567 &asn_PER_SIZE_but_not_FROM_constr_1,
2568 0, 0, /* No members */
2569 0 /* No specifics */
2570};
2571
2572
2573/*** <<< INCLUDES [SIZE-and-FROM] >>> ***/
2574
2575#include <PER-Visible.h>
2576
2577/*** <<< TYPE-DECLS [SIZE-and-FROM] >>> ***/
2578
2579typedef PER_Visible_t SIZE_and_FROM_t;
2580
2581/*** <<< FUNC-DECLS [SIZE-and-FROM] >>> ***/
2582
2583extern asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM;
2584asn_struct_free_f SIZE_and_FROM_free;
2585asn_struct_print_f SIZE_and_FROM_print;
2586asn_constr_check_f SIZE_and_FROM_constraint;
2587ber_type_decoder_f SIZE_and_FROM_decode_ber;
2588der_type_encoder_f SIZE_and_FROM_encode_der;
2589xer_type_decoder_f SIZE_and_FROM_decode_xer;
2590xer_type_encoder_f SIZE_and_FROM_encode_xer;
2591per_type_decoder_f SIZE_and_FROM_decode_uper;
2592
2593/*** <<< CTABLES [SIZE-and-FROM] >>> ***/
2594
2595static int check_permitted_alphabet_1(const void *sptr) {
2596 /* The underlying type is IA5String */
2597 const IA5String_t *st = (const IA5String_t *)sptr;
2598 const uint8_t *ch = st->buf;
2599 const uint8_t *end = ch + st->size;
2600
2601 for(; ch < end; ch++) {
2602 uint8_t cv = *ch;
2603 if(!(cv >= 65 && cv <= 68)) return -1;
2604 }
2605 return 0;
2606}
2607
2608
2609/*** <<< CODE [SIZE-and-FROM] >>> ***/
2610
2611int
2612SIZE_and_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2613 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2614 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
2615 size_t size;
2616
2617 if(!sptr) {
2618 _ASN_ERRLOG(app_errlog, app_key,
2619 "%s: value not given (%s:%d)",
2620 td->name, __FILE__, __LINE__);
2621 return -1;
2622 }
2623
2624 size = st->size;
2625
2626 if((size >= 1 && size <= 4)
2627 && !check_permitted_alphabet_1(st)) {
2628 /* Constraint check succeeded */
2629 return 0;
2630 } else {
2631 _ASN_ERRLOG(app_errlog, app_key,
2632 "%s: constraint failed (%s:%d)",
2633 td->name, __FILE__, __LINE__);
2634 return -1;
2635 }
2636}
2637
2638/*
2639 * This type is implemented using PER_Visible,
2640 * so here we adjust the DEF accordingly.
2641 */
2642static void
2643SIZE_and_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2644 td->free_struct = asn_DEF_PER_Visible.free_struct;
2645 td->print_struct = asn_DEF_PER_Visible.print_struct;
2646 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2647 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2648 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2649 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
2650 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2651 if(!td->per_constraints)
2652 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
2653 td->elements = asn_DEF_PER_Visible.elements;
2654 td->elements_count = asn_DEF_PER_Visible.elements_count;
2655 td->specifics = asn_DEF_PER_Visible.specifics;
2656}
2657
2658void
2659SIZE_and_FROM_free(asn_TYPE_descriptor_t *td,
2660 void *struct_ptr, int contents_only) {
2661 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2662 td->free_struct(td, struct_ptr, contents_only);
2663}
2664
2665int
2666SIZE_and_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2667 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2668 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2669 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2670}
2671
2672asn_dec_rval_t
2673SIZE_and_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2674 void **structure, const void *bufptr, size_t size, int tag_mode) {
2675 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2676 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2677}
2678
2679asn_enc_rval_t
2680SIZE_and_FROM_encode_der(asn_TYPE_descriptor_t *td,
2681 void *structure, int tag_mode, ber_tlv_tag_t tag,
2682 asn_app_consume_bytes_f *cb, void *app_key) {
2683 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2684 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2685}
2686
2687asn_dec_rval_t
2688SIZE_and_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2689 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2690 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2691 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2692}
2693
2694asn_enc_rval_t
2695SIZE_and_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2696 int ilevel, enum xer_encoder_flags_e flags,
2697 asn_app_consume_bytes_f *cb, void *app_key) {
2698 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2699 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2700}
2701
2702asn_dec_rval_t
2703SIZE_and_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2704 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2705 SIZE_and_FROM_1_inherit_TYPE_descriptor(td);
2706 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2707}
2708
2709
2710/*** <<< STAT-DEFS [SIZE-and-FROM] >>> ***/
2711
2712static ber_tlv_tag_t asn_DEF_SIZE_and_FROM_tags_1[] = {
2713 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2714};
2715static asn_per_constraints_t asn_PER_SIZE_and_FROM_constr_1 = {
2716 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2717 { APC_CONSTRAINED, 2, 2, 1, 4 } /* (SIZE(1..4)) */
2718};
2719asn_TYPE_descriptor_t asn_DEF_SIZE_and_FROM = {
2720 "SIZE-and-FROM",
2721 "SIZE-and-FROM",
2722 SIZE_and_FROM_free,
2723 SIZE_and_FROM_print,
2724 SIZE_and_FROM_constraint,
2725 SIZE_and_FROM_decode_ber,
2726 SIZE_and_FROM_encode_der,
2727 SIZE_and_FROM_decode_xer,
2728 SIZE_and_FROM_encode_xer,
2729 SIZE_and_FROM_decode_uper,
2730 0, /* Use generic outmost tag fetcher */
2731 asn_DEF_SIZE_and_FROM_tags_1,
2732 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
2733 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
2734 asn_DEF_SIZE_and_FROM_tags_1, /* Same as above */
2735 sizeof(asn_DEF_SIZE_and_FROM_tags_1)
2736 /sizeof(asn_DEF_SIZE_and_FROM_tags_1[0]), /* 1 */
2737 &asn_PER_SIZE_and_FROM_constr_1,
2738 0, 0, /* No members */
2739 0 /* No specifics */
2740};
2741
2742
2743/*** <<< INCLUDES [Neither-SIZE-nor-FROM] >>> ***/
2744
2745#include <PER-Visible.h>
2746
2747/*** <<< TYPE-DECLS [Neither-SIZE-nor-FROM] >>> ***/
2748
2749typedef PER_Visible_t Neither_SIZE_nor_FROM_t;
2750
2751/*** <<< FUNC-DECLS [Neither-SIZE-nor-FROM] >>> ***/
2752
2753extern asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM;
2754asn_struct_free_f Neither_SIZE_nor_FROM_free;
2755asn_struct_print_f Neither_SIZE_nor_FROM_print;
2756asn_constr_check_f Neither_SIZE_nor_FROM_constraint;
2757ber_type_decoder_f Neither_SIZE_nor_FROM_decode_ber;
2758der_type_encoder_f Neither_SIZE_nor_FROM_encode_der;
2759xer_type_decoder_f Neither_SIZE_nor_FROM_decode_xer;
2760xer_type_encoder_f Neither_SIZE_nor_FROM_encode_xer;
2761per_type_decoder_f Neither_SIZE_nor_FROM_decode_uper;
2762
2763/*** <<< CTABLES [Neither-SIZE-nor-FROM] >>> ***/
2764
2765static int check_permitted_alphabet_1(const void *sptr) {
2766 /* The underlying type is IA5String */
2767 const IA5String_t *st = (const IA5String_t *)sptr;
2768 const uint8_t *ch = st->buf;
2769 const uint8_t *end = ch + st->size;
2770
2771 for(; ch < end; ch++) {
2772 uint8_t cv = *ch;
2773 if(!(cv >= 65 && cv <= 70)) return -1;
2774 }
2775 return 0;
2776}
2777
2778
2779/*** <<< CODE [Neither-SIZE-nor-FROM] >>> ***/
2780
2781int
2782Neither_SIZE_nor_FROM_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2783 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2784 const PER_Visible_t *st = (const PER_Visible_t *)sptr;
2785
2786 if(!sptr) {
2787 _ASN_ERRLOG(app_errlog, app_key,
2788 "%s: value not given (%s:%d)",
2789 td->name, __FILE__, __LINE__);
2790 return -1;
2791 }
2792
2793
2794 if(!check_permitted_alphabet_1(st)) {
2795 /* Constraint check succeeded */
2796 return 0;
2797 } else {
2798 _ASN_ERRLOG(app_errlog, app_key,
2799 "%s: constraint failed (%s:%d)",
2800 td->name, __FILE__, __LINE__);
2801 return -1;
2802 }
2803}
2804
2805/*
2806 * This type is implemented using PER_Visible,
2807 * so here we adjust the DEF accordingly.
2808 */
2809static void
2810Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2811 td->free_struct = asn_DEF_PER_Visible.free_struct;
2812 td->print_struct = asn_DEF_PER_Visible.print_struct;
2813 td->ber_decoder = asn_DEF_PER_Visible.ber_decoder;
2814 td->der_encoder = asn_DEF_PER_Visible.der_encoder;
2815 td->xer_decoder = asn_DEF_PER_Visible.xer_decoder;
2816 td->xer_encoder = asn_DEF_PER_Visible.xer_encoder;
2817 td->uper_decoder = asn_DEF_PER_Visible.uper_decoder;
2818 if(!td->per_constraints)
2819 td->per_constraints = asn_DEF_PER_Visible.per_constraints;
2820 td->elements = asn_DEF_PER_Visible.elements;
2821 td->elements_count = asn_DEF_PER_Visible.elements_count;
2822 td->specifics = asn_DEF_PER_Visible.specifics;
2823}
2824
2825void
2826Neither_SIZE_nor_FROM_free(asn_TYPE_descriptor_t *td,
2827 void *struct_ptr, int contents_only) {
2828 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2829 td->free_struct(td, struct_ptr, contents_only);
2830}
2831
2832int
2833Neither_SIZE_nor_FROM_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2834 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2835 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2836 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2837}
2838
2839asn_dec_rval_t
2840Neither_SIZE_nor_FROM_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2841 void **structure, const void *bufptr, size_t size, int tag_mode) {
2842 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2843 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
2844}
2845
2846asn_enc_rval_t
2847Neither_SIZE_nor_FROM_encode_der(asn_TYPE_descriptor_t *td,
2848 void *structure, int tag_mode, ber_tlv_tag_t tag,
2849 asn_app_consume_bytes_f *cb, void *app_key) {
2850 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2851 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
2852}
2853
2854asn_dec_rval_t
2855Neither_SIZE_nor_FROM_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2856 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
2857 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2858 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
2859}
2860
2861asn_enc_rval_t
2862Neither_SIZE_nor_FROM_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
2863 int ilevel, enum xer_encoder_flags_e flags,
2864 asn_app_consume_bytes_f *cb, void *app_key) {
2865 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2866 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
2867}
2868
2869asn_dec_rval_t
2870Neither_SIZE_nor_FROM_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
2871 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
2872 Neither_SIZE_nor_FROM_1_inherit_TYPE_descriptor(td);
2873 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
2874}
2875
2876
2877/*** <<< STAT-DEFS [Neither-SIZE-nor-FROM] >>> ***/
2878
2879static ber_tlv_tag_t asn_DEF_Neither_SIZE_nor_FROM_tags_1[] = {
2880 (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
2881};
2882static asn_per_constraints_t asn_PER_Neither_SIZE_nor_FROM_constr_1 = {
2883 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
2884 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */
2885};
2886asn_TYPE_descriptor_t asn_DEF_Neither_SIZE_nor_FROM = {
2887 "Neither-SIZE-nor-FROM",
2888 "Neither-SIZE-nor-FROM",
2889 Neither_SIZE_nor_FROM_free,
2890 Neither_SIZE_nor_FROM_print,
2891 Neither_SIZE_nor_FROM_constraint,
2892 Neither_SIZE_nor_FROM_decode_ber,
2893 Neither_SIZE_nor_FROM_encode_der,
2894 Neither_SIZE_nor_FROM_decode_xer,
2895 Neither_SIZE_nor_FROM_encode_xer,
2896 Neither_SIZE_nor_FROM_decode_uper,
2897 0, /* Use generic outmost tag fetcher */
2898 asn_DEF_Neither_SIZE_nor_FROM_tags_1,
2899 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
2900 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
2901 asn_DEF_Neither_SIZE_nor_FROM_tags_1, /* Same as above */
2902 sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1)
2903 /sizeof(asn_DEF_Neither_SIZE_nor_FROM_tags_1[0]), /* 1 */
2904 &asn_PER_Neither_SIZE_nor_FROM_constr_1,
2905 0, 0, /* No members */
2906 0 /* No specifics */
2907};
2908
2909
2910/*** <<< INCLUDES [Utf8-4] >>> ***/
2911
2912#include <UTF8String.h>
2913
2914/*** <<< TYPE-DECLS [Utf8-4] >>> ***/
2915
2916typedef UTF8String_t Utf8_4_t;
2917
2918/*** <<< FUNC-DECLS [Utf8-4] >>> ***/
2919
2920extern asn_TYPE_descriptor_t asn_DEF_Utf8_4;
2921asn_struct_free_f Utf8_4_free;
2922asn_struct_print_f Utf8_4_print;
2923asn_constr_check_f Utf8_4_constraint;
2924ber_type_decoder_f Utf8_4_decode_ber;
2925der_type_encoder_f Utf8_4_encode_der;
2926xer_type_decoder_f Utf8_4_decode_xer;
2927xer_type_encoder_f Utf8_4_encode_xer;
2928per_type_decoder_f Utf8_4_decode_uper;
2929
2930/*** <<< CTABLES [Utf8-4] >>> ***/
2931
2932static int check_permitted_alphabet_1(const void *sptr) {
2933 if(UTF8String_length((const UTF8String_t *)sptr) < 0)
2934 return -1; /* Alphabet (sic!) test failed. */
2935
2936 return 0;
2937}
2938
2939
2940/*** <<< CODE [Utf8-4] >>> ***/
2941
2942int
2943Utf8_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
2944 asn_app_consume_bytes_f *app_errlog, void *app_key) {
2945 const UTF8String_t *st = (const UTF8String_t *)sptr;
2946
2947 if(!sptr) {
2948 _ASN_ERRLOG(app_errlog, app_key,
2949 "%s: value not given (%s:%d)",
2950 td->name, __FILE__, __LINE__);
2951 return -1;
2952 }
2953
2954
2955 if(!check_permitted_alphabet_1(st)) {
2956 /* Constraint check succeeded */
2957 return 0;
2958 } else {
2959 _ASN_ERRLOG(app_errlog, app_key,
2960 "%s: constraint failed (%s:%d)",
2961 td->name, __FILE__, __LINE__);
2962 return -1;
2963 }
2964}
2965
2966/*
2967 * This type is implemented using UTF8String,
2968 * so here we adjust the DEF accordingly.
2969 */
2970static void
2971Utf8_4_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
2972 td->free_struct = asn_DEF_UTF8String.free_struct;
2973 td->print_struct = asn_DEF_UTF8String.print_struct;
2974 td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
2975 td->der_encoder = asn_DEF_UTF8String.der_encoder;
2976 td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
2977 td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
2978 td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
2979 if(!td->per_constraints)
2980 td->per_constraints = asn_DEF_UTF8String.per_constraints;
2981 td->elements = asn_DEF_UTF8String.elements;
2982 td->elements_count = asn_DEF_UTF8String.elements_count;
2983 td->specifics = asn_DEF_UTF8String.specifics;
2984}
2985
2986void
2987Utf8_4_free(asn_TYPE_descriptor_t *td,
2988 void *struct_ptr, int contents_only) {
2989 Utf8_4_1_inherit_TYPE_descriptor(td);
2990 td->free_struct(td, struct_ptr, contents_only);
2991}
2992
2993int
2994Utf8_4_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
2995 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
2996 Utf8_4_1_inherit_TYPE_descriptor(td);
2997 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
2998}
2999
3000asn_dec_rval_t
3001Utf8_4_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3002 void **structure, const void *bufptr, size_t size, int tag_mode) {
3003 Utf8_4_1_inherit_TYPE_descriptor(td);
3004 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3005}
3006
3007asn_enc_rval_t
3008Utf8_4_encode_der(asn_TYPE_descriptor_t *td,
3009 void *structure, int tag_mode, ber_tlv_tag_t tag,
3010 asn_app_consume_bytes_f *cb, void *app_key) {
3011 Utf8_4_1_inherit_TYPE_descriptor(td);
3012 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3013}
3014
3015asn_dec_rval_t
3016Utf8_4_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3017 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3018 Utf8_4_1_inherit_TYPE_descriptor(td);
3019 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3020}
3021
3022asn_enc_rval_t
3023Utf8_4_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3024 int ilevel, enum xer_encoder_flags_e flags,
3025 asn_app_consume_bytes_f *cb, void *app_key) {
3026 Utf8_4_1_inherit_TYPE_descriptor(td);
3027 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3028}
3029
3030asn_dec_rval_t
3031Utf8_4_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3032 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3033 Utf8_4_1_inherit_TYPE_descriptor(td);
3034 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3035}
3036
3037
3038/*** <<< STAT-DEFS [Utf8-4] >>> ***/
3039
3040static ber_tlv_tag_t asn_DEF_Utf8_4_tags_1[] = {
3041 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
3042};
3043static asn_per_constraints_t asn_PER_Utf8_4_constr_1 = {
3044 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
3045 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
3046};
3047asn_TYPE_descriptor_t asn_DEF_Utf8_4 = {
3048 "Utf8-4",
3049 "Utf8-4",
3050 Utf8_4_free,
3051 Utf8_4_print,
3052 Utf8_4_constraint,
3053 Utf8_4_decode_ber,
3054 Utf8_4_encode_der,
3055 Utf8_4_decode_xer,
3056 Utf8_4_encode_xer,
3057 Utf8_4_decode_uper,
3058 0, /* Use generic outmost tag fetcher */
3059 asn_DEF_Utf8_4_tags_1,
3060 sizeof(asn_DEF_Utf8_4_tags_1)
3061 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
3062 asn_DEF_Utf8_4_tags_1, /* Same as above */
3063 sizeof(asn_DEF_Utf8_4_tags_1)
3064 /sizeof(asn_DEF_Utf8_4_tags_1[0]), /* 1 */
3065 &asn_PER_Utf8_4_constr_1,
3066 0, 0, /* No members */
3067 0 /* No specifics */
3068};
3069
3070
3071/*** <<< INCLUDES [Utf8-3] >>> ***/
3072
3073#include <Utf8-2.h>
3074
3075/*** <<< TYPE-DECLS [Utf8-3] >>> ***/
3076
3077typedef Utf8_2_t Utf8_3_t;
3078
3079/*** <<< FUNC-DECLS [Utf8-3] >>> ***/
3080
3081extern asn_TYPE_descriptor_t asn_DEF_Utf8_3;
3082asn_struct_free_f Utf8_3_free;
3083asn_struct_print_f Utf8_3_print;
3084asn_constr_check_f Utf8_3_constraint;
3085ber_type_decoder_f Utf8_3_decode_ber;
3086der_type_encoder_f Utf8_3_encode_der;
3087xer_type_decoder_f Utf8_3_decode_xer;
3088xer_type_encoder_f Utf8_3_encode_xer;
3089per_type_decoder_f Utf8_3_decode_uper;
3090
3091/*** <<< CTABLES [Utf8-3] >>> ***/
3092
3093static int permitted_alphabet_table_1[128] = {
30940,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
30950,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
30960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
30970,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
30980,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
30991,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* PQRSTUVWXYZ */
31000,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
31011,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
3102};
3103
3104static int check_permitted_alphabet_1(const void *sptr) {
3105 int *table = permitted_alphabet_table_1;
3106 /* The underlying type is UTF8String */
3107 const UTF8String_t *st = (const UTF8String_t *)sptr;
3108 const uint8_t *ch = st->buf;
3109 const uint8_t *end = ch + st->size;
3110
3111 for(; ch < end; ch++) {
3112 uint8_t cv = *ch;
3113 if(cv >= 0x80) return -1;
3114 if(!table[cv]) return -1;
3115 }
3116 return 0;
3117}
3118
3119
3120/*** <<< CODE [Utf8-3] >>> ***/
3121
3122int
3123Utf8_3_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
3124 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3125 const Utf8_2_t *st = (const Utf8_2_t *)sptr;
3126 size_t size;
3127
3128 if(!sptr) {
3129 _ASN_ERRLOG(app_errlog, app_key,
3130 "%s: value not given (%s:%d)",
3131 td->name, __FILE__, __LINE__);
3132 return -1;
3133 }
3134
3135 size = UTF8String_length(st);
3136 if((ssize_t)size < 0) {
3137 _ASN_ERRLOG(app_errlog, app_key,
3138 "%s: UTF-8: broken encoding (%s:%d)",
3139 td->name, __FILE__, __LINE__);
3140 return -1;
3141 }
3142
3143 if((size >= 1 && size <= 2)
3144 && !check_permitted_alphabet_1(st)) {
3145 /* Constraint check succeeded */
3146 return 0;
3147 } else {
3148 _ASN_ERRLOG(app_errlog, app_key,
3149 "%s: constraint failed (%s:%d)",
3150 td->name, __FILE__, __LINE__);
3151 return -1;
3152 }
3153}
3154
3155/*
3156 * This type is implemented using Utf8_2,
3157 * so here we adjust the DEF accordingly.
3158 */
3159static void
3160Utf8_3_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3161 td->free_struct = asn_DEF_Utf8_2.free_struct;
3162 td->print_struct = asn_DEF_Utf8_2.print_struct;
3163 td->ber_decoder = asn_DEF_Utf8_2.ber_decoder;
3164 td->der_encoder = asn_DEF_Utf8_2.der_encoder;
3165 td->xer_decoder = asn_DEF_Utf8_2.xer_decoder;
3166 td->xer_encoder = asn_DEF_Utf8_2.xer_encoder;
3167 td->uper_decoder = asn_DEF_Utf8_2.uper_decoder;
3168 if(!td->per_constraints)
3169 td->per_constraints = asn_DEF_Utf8_2.per_constraints;
3170 td->elements = asn_DEF_Utf8_2.elements;
3171 td->elements_count = asn_DEF_Utf8_2.elements_count;
3172 td->specifics = asn_DEF_Utf8_2.specifics;
3173}
3174
3175void
3176Utf8_3_free(asn_TYPE_descriptor_t *td,
3177 void *struct_ptr, int contents_only) {
3178 Utf8_3_1_inherit_TYPE_descriptor(td);
3179 td->free_struct(td, struct_ptr, contents_only);
3180}
3181
3182int
3183Utf8_3_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3184 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3185 Utf8_3_1_inherit_TYPE_descriptor(td);
3186 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3187}
3188
3189asn_dec_rval_t
3190Utf8_3_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3191 void **structure, const void *bufptr, size_t size, int tag_mode) {
3192 Utf8_3_1_inherit_TYPE_descriptor(td);
3193 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3194}
3195
3196asn_enc_rval_t
3197Utf8_3_encode_der(asn_TYPE_descriptor_t *td,
3198 void *structure, int tag_mode, ber_tlv_tag_t tag,
3199 asn_app_consume_bytes_f *cb, void *app_key) {
3200 Utf8_3_1_inherit_TYPE_descriptor(td);
3201 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3202}
3203
3204asn_dec_rval_t
3205Utf8_3_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3206 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3207 Utf8_3_1_inherit_TYPE_descriptor(td);
3208 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3209}
3210
3211asn_enc_rval_t
3212Utf8_3_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3213 int ilevel, enum xer_encoder_flags_e flags,
3214 asn_app_consume_bytes_f *cb, void *app_key) {
3215 Utf8_3_1_inherit_TYPE_descriptor(td);
3216 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3217}
3218
3219asn_dec_rval_t
3220Utf8_3_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3221 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3222 Utf8_3_1_inherit_TYPE_descriptor(td);
3223 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3224}
3225
3226
3227/*** <<< STAT-DEFS [Utf8-3] >>> ***/
3228
3229static ber_tlv_tag_t asn_DEF_Utf8_3_tags_1[] = {
3230 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
3231};
3232static asn_per_constraints_t asn_PER_Utf8_3_constr_1 = {
3233 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
3234 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
3235};
3236asn_TYPE_descriptor_t asn_DEF_Utf8_3 = {
3237 "Utf8-3",
3238 "Utf8-3",
3239 Utf8_3_free,
3240 Utf8_3_print,
3241 Utf8_3_constraint,
3242 Utf8_3_decode_ber,
3243 Utf8_3_encode_der,
3244 Utf8_3_decode_xer,
3245 Utf8_3_encode_xer,
3246 Utf8_3_decode_uper,
3247 0, /* Use generic outmost tag fetcher */
3248 asn_DEF_Utf8_3_tags_1,
3249 sizeof(asn_DEF_Utf8_3_tags_1)
3250 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
3251 asn_DEF_Utf8_3_tags_1, /* Same as above */
3252 sizeof(asn_DEF_Utf8_3_tags_1)
3253 /sizeof(asn_DEF_Utf8_3_tags_1[0]), /* 1 */
3254 &asn_PER_Utf8_3_constr_1,
3255 0, 0, /* No members */
3256 0 /* No specifics */
3257};
3258
3259
3260/*** <<< INCLUDES [Utf8-2] >>> ***/
3261
3262#include <Utf8-1.h>
3263
3264/*** <<< TYPE-DECLS [Utf8-2] >>> ***/
3265
3266typedef Utf8_1_t Utf8_2_t;
3267
3268/*** <<< FUNC-DECLS [Utf8-2] >>> ***/
3269
3270extern asn_TYPE_descriptor_t asn_DEF_Utf8_2;
3271asn_struct_free_f Utf8_2_free;
3272asn_struct_print_f Utf8_2_print;
3273asn_constr_check_f Utf8_2_constraint;
3274ber_type_decoder_f Utf8_2_decode_ber;
3275der_type_encoder_f Utf8_2_encode_der;
3276xer_type_decoder_f Utf8_2_decode_xer;
3277xer_type_encoder_f Utf8_2_encode_xer;
3278per_type_decoder_f Utf8_2_decode_uper;
3279
3280/*** <<< CODE [Utf8-2] >>> ***/
3281
3282int
3283Utf8_2_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
3284 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3285 const Utf8_1_t *st = (const Utf8_1_t *)sptr;
3286 size_t size;
3287
3288 if(!sptr) {
3289 _ASN_ERRLOG(app_errlog, app_key,
3290 "%s: value not given (%s:%d)",
3291 td->name, __FILE__, __LINE__);
3292 return -1;
3293 }
3294
3295 size = UTF8String_length(st);
3296 if((ssize_t)size < 0) {
3297 _ASN_ERRLOG(app_errlog, app_key,
3298 "%s: UTF-8: broken encoding (%s:%d)",
3299 td->name, __FILE__, __LINE__);
3300 return -1;
3301 }
3302
3303 if((size >= 1 && size <= 2)) {
3304 /* Constraint check succeeded */
3305 return 0;
3306 } else {
3307 _ASN_ERRLOG(app_errlog, app_key,
3308 "%s: constraint failed (%s:%d)",
3309 td->name, __FILE__, __LINE__);
3310 return -1;
3311 }
3312}
3313
3314/*
3315 * This type is implemented using Utf8_1,
3316 * so here we adjust the DEF accordingly.
3317 */
3318static void
3319Utf8_2_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3320 td->free_struct = asn_DEF_Utf8_1.free_struct;
3321 td->print_struct = asn_DEF_Utf8_1.print_struct;
3322 td->ber_decoder = asn_DEF_Utf8_1.ber_decoder;
3323 td->der_encoder = asn_DEF_Utf8_1.der_encoder;
3324 td->xer_decoder = asn_DEF_Utf8_1.xer_decoder;
3325 td->xer_encoder = asn_DEF_Utf8_1.xer_encoder;
3326 td->uper_decoder = asn_DEF_Utf8_1.uper_decoder;
3327 if(!td->per_constraints)
3328 td->per_constraints = asn_DEF_Utf8_1.per_constraints;
3329 td->elements = asn_DEF_Utf8_1.elements;
3330 td->elements_count = asn_DEF_Utf8_1.elements_count;
3331 td->specifics = asn_DEF_Utf8_1.specifics;
3332}
3333
3334void
3335Utf8_2_free(asn_TYPE_descriptor_t *td,
3336 void *struct_ptr, int contents_only) {
3337 Utf8_2_1_inherit_TYPE_descriptor(td);
3338 td->free_struct(td, struct_ptr, contents_only);
3339}
3340
3341int
3342Utf8_2_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3343 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3344 Utf8_2_1_inherit_TYPE_descriptor(td);
3345 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3346}
3347
3348asn_dec_rval_t
3349Utf8_2_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3350 void **structure, const void *bufptr, size_t size, int tag_mode) {
3351 Utf8_2_1_inherit_TYPE_descriptor(td);
3352 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3353}
3354
3355asn_enc_rval_t
3356Utf8_2_encode_der(asn_TYPE_descriptor_t *td,
3357 void *structure, int tag_mode, ber_tlv_tag_t tag,
3358 asn_app_consume_bytes_f *cb, void *app_key) {
3359 Utf8_2_1_inherit_TYPE_descriptor(td);
3360 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3361}
3362
3363asn_dec_rval_t
3364Utf8_2_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3365 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3366 Utf8_2_1_inherit_TYPE_descriptor(td);
3367 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3368}
3369
3370asn_enc_rval_t
3371Utf8_2_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3372 int ilevel, enum xer_encoder_flags_e flags,
3373 asn_app_consume_bytes_f *cb, void *app_key) {
3374 Utf8_2_1_inherit_TYPE_descriptor(td);
3375 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3376}
3377
3378asn_dec_rval_t
3379Utf8_2_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3380 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3381 Utf8_2_1_inherit_TYPE_descriptor(td);
3382 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3383}
3384
3385
3386/*** <<< STAT-DEFS [Utf8-2] >>> ***/
3387
3388static ber_tlv_tag_t asn_DEF_Utf8_2_tags_1[] = {
3389 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
3390};
3391static asn_per_constraints_t asn_PER_Utf8_2_constr_1 = {
3392 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
3393 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
3394};
3395asn_TYPE_descriptor_t asn_DEF_Utf8_2 = {
3396 "Utf8-2",
3397 "Utf8-2",
3398 Utf8_2_free,
3399 Utf8_2_print,
3400 Utf8_2_constraint,
3401 Utf8_2_decode_ber,
3402 Utf8_2_encode_der,
3403 Utf8_2_decode_xer,
3404 Utf8_2_encode_xer,
3405 Utf8_2_decode_uper,
3406 0, /* Use generic outmost tag fetcher */
3407 asn_DEF_Utf8_2_tags_1,
3408 sizeof(asn_DEF_Utf8_2_tags_1)
3409 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
3410 asn_DEF_Utf8_2_tags_1, /* Same as above */
3411 sizeof(asn_DEF_Utf8_2_tags_1)
3412 /sizeof(asn_DEF_Utf8_2_tags_1[0]), /* 1 */
3413 &asn_PER_Utf8_2_constr_1,
3414 0, 0, /* No members */
3415 0 /* No specifics */
3416};
3417
3418
3419/*** <<< INCLUDES [Utf8-1] >>> ***/
3420
3421#include <UTF8String.h>
3422
3423/*** <<< TYPE-DECLS [Utf8-1] >>> ***/
3424
3425typedef UTF8String_t Utf8_1_t;
3426
3427/*** <<< FUNC-DECLS [Utf8-1] >>> ***/
3428
3429extern asn_TYPE_descriptor_t asn_DEF_Utf8_1;
3430asn_struct_free_f Utf8_1_free;
3431asn_struct_print_f Utf8_1_print;
3432asn_constr_check_f Utf8_1_constraint;
3433ber_type_decoder_f Utf8_1_decode_ber;
3434der_type_encoder_f Utf8_1_encode_der;
3435xer_type_decoder_f Utf8_1_decode_xer;
3436xer_type_encoder_f Utf8_1_encode_xer;
3437per_type_decoder_f Utf8_1_decode_uper;
3438
3439/*** <<< CODE [Utf8-1] >>> ***/
3440
3441int
3442Utf8_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
3443 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3444 /* Replace with underlying type checker */
3445 td->check_constraints = asn_DEF_UTF8String.check_constraints;
3446 return td->check_constraints(td, sptr, app_errlog, app_key);
3447}
3448
3449/*
3450 * This type is implemented using UTF8String,
3451 * so here we adjust the DEF accordingly.
3452 */
3453static void
3454Utf8_1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3455 td->free_struct = asn_DEF_UTF8String.free_struct;
3456 td->print_struct = asn_DEF_UTF8String.print_struct;
3457 td->ber_decoder = asn_DEF_UTF8String.ber_decoder;
3458 td->der_encoder = asn_DEF_UTF8String.der_encoder;
3459 td->xer_decoder = asn_DEF_UTF8String.xer_decoder;
3460 td->xer_encoder = asn_DEF_UTF8String.xer_encoder;
3461 td->uper_decoder = asn_DEF_UTF8String.uper_decoder;
3462 if(!td->per_constraints)
3463 td->per_constraints = asn_DEF_UTF8String.per_constraints;
3464 td->elements = asn_DEF_UTF8String.elements;
3465 td->elements_count = asn_DEF_UTF8String.elements_count;
3466 td->specifics = asn_DEF_UTF8String.specifics;
3467}
3468
3469void
3470Utf8_1_free(asn_TYPE_descriptor_t *td,
3471 void *struct_ptr, int contents_only) {
3472 Utf8_1_1_inherit_TYPE_descriptor(td);
3473 td->free_struct(td, struct_ptr, contents_only);
3474}
3475
3476int
3477Utf8_1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3478 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3479 Utf8_1_1_inherit_TYPE_descriptor(td);
3480 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3481}
3482
3483asn_dec_rval_t
3484Utf8_1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3485 void **structure, const void *bufptr, size_t size, int tag_mode) {
3486 Utf8_1_1_inherit_TYPE_descriptor(td);
3487 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3488}
3489
3490asn_enc_rval_t
3491Utf8_1_encode_der(asn_TYPE_descriptor_t *td,
3492 void *structure, int tag_mode, ber_tlv_tag_t tag,
3493 asn_app_consume_bytes_f *cb, void *app_key) {
3494 Utf8_1_1_inherit_TYPE_descriptor(td);
3495 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3496}
3497
3498asn_dec_rval_t
3499Utf8_1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3500 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3501 Utf8_1_1_inherit_TYPE_descriptor(td);
3502 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3503}
3504
3505asn_enc_rval_t
3506Utf8_1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3507 int ilevel, enum xer_encoder_flags_e flags,
3508 asn_app_consume_bytes_f *cb, void *app_key) {
3509 Utf8_1_1_inherit_TYPE_descriptor(td);
3510 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3511}
3512
3513asn_dec_rval_t
3514Utf8_1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3515 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3516 Utf8_1_1_inherit_TYPE_descriptor(td);
3517 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3518}
3519
3520
3521/*** <<< STAT-DEFS [Utf8-1] >>> ***/
3522
3523static ber_tlv_tag_t asn_DEF_Utf8_1_tags_1[] = {
3524 (ASN_TAG_CLASS_UNIVERSAL | (12 << 2))
3525};
3526asn_TYPE_descriptor_t asn_DEF_Utf8_1 = {
3527 "Utf8-1",
3528 "Utf8-1",
3529 Utf8_1_free,
3530 Utf8_1_print,
3531 Utf8_1_constraint,
3532 Utf8_1_decode_ber,
3533 Utf8_1_encode_der,
3534 Utf8_1_decode_xer,
3535 Utf8_1_encode_xer,
3536 Utf8_1_decode_uper,
3537 0, /* Use generic outmost tag fetcher */
3538 asn_DEF_Utf8_1_tags_1,
3539 sizeof(asn_DEF_Utf8_1_tags_1)
3540 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
3541 asn_DEF_Utf8_1_tags_1, /* Same as above */
3542 sizeof(asn_DEF_Utf8_1_tags_1)
3543 /sizeof(asn_DEF_Utf8_1_tags_1[0]), /* 1 */
3544 0, /* No PER visible constraints */
3545 0, 0, /* No members */
3546 0 /* No specifics */
3547};
3548
3549
3550/*** <<< INCLUDES [VisibleIdentifier] >>> ***/
3551
3552#include <Identifier.h>
3553
3554/*** <<< TYPE-DECLS [VisibleIdentifier] >>> ***/
3555
3556typedef Identifier_t VisibleIdentifier_t;
3557
3558/*** <<< FUNC-DECLS [VisibleIdentifier] >>> ***/
3559
3560extern asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier;
3561asn_struct_free_f VisibleIdentifier_free;
3562asn_struct_print_f VisibleIdentifier_print;
3563asn_constr_check_f VisibleIdentifier_constraint;
3564ber_type_decoder_f VisibleIdentifier_decode_ber;
3565der_type_encoder_f VisibleIdentifier_encode_der;
3566xer_type_decoder_f VisibleIdentifier_decode_xer;
3567xer_type_encoder_f VisibleIdentifier_encode_xer;
3568per_type_decoder_f VisibleIdentifier_decode_uper;
3569
3570/*** <<< CTABLES [VisibleIdentifier] >>> ***/
3571
3572static int permitted_alphabet_table_1[256] = {
35730,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
35740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
35750,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
35761,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
35770,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
35781,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
35790,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
35801,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
3581};
3582
3583static int check_permitted_alphabet_1(const void *sptr) {
3584 int *table = permitted_alphabet_table_1;
3585 /* The underlying type is VisibleString */
3586 const VisibleString_t *st = (const VisibleString_t *)sptr;
3587 const uint8_t *ch = st->buf;
3588 const uint8_t *end = ch + st->size;
3589
3590 for(; ch < end; ch++) {
3591 uint8_t cv = *ch;
3592 if(!table[cv]) return -1;
3593 }
3594 return 0;
3595}
3596
3597
3598/*** <<< CODE [VisibleIdentifier] >>> ***/
3599
3600int
3601VisibleIdentifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
3602 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3603 const Identifier_t *st = (const Identifier_t *)sptr;
3604 size_t size;
3605
3606 if(!sptr) {
3607 _ASN_ERRLOG(app_errlog, app_key,
3608 "%s: value not given (%s:%d)",
3609 td->name, __FILE__, __LINE__);
3610 return -1;
3611 }
3612
3613 size = st->size;
3614
3615 if((size >= 1 && size <= 32)
3616 && !check_permitted_alphabet_1(st)) {
3617 /* Constraint check succeeded */
3618 return 0;
3619 } else {
3620 _ASN_ERRLOG(app_errlog, app_key,
3621 "%s: constraint failed (%s:%d)",
3622 td->name, __FILE__, __LINE__);
3623 return -1;
3624 }
3625}
3626
3627/*
3628 * This type is implemented using Identifier,
3629 * so here we adjust the DEF accordingly.
3630 */
3631static void
3632VisibleIdentifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3633 td->free_struct = asn_DEF_Identifier.free_struct;
3634 td->print_struct = asn_DEF_Identifier.print_struct;
3635 td->ber_decoder = asn_DEF_Identifier.ber_decoder;
3636 td->der_encoder = asn_DEF_Identifier.der_encoder;
3637 td->xer_decoder = asn_DEF_Identifier.xer_decoder;
3638 td->xer_encoder = asn_DEF_Identifier.xer_encoder;
3639 td->uper_decoder = asn_DEF_Identifier.uper_decoder;
3640 if(!td->per_constraints)
3641 td->per_constraints = asn_DEF_Identifier.per_constraints;
3642 td->elements = asn_DEF_Identifier.elements;
3643 td->elements_count = asn_DEF_Identifier.elements_count;
3644 td->specifics = asn_DEF_Identifier.specifics;
3645}
3646
3647void
3648VisibleIdentifier_free(asn_TYPE_descriptor_t *td,
3649 void *struct_ptr, int contents_only) {
3650 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3651 td->free_struct(td, struct_ptr, contents_only);
3652}
3653
3654int
3655VisibleIdentifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3656 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3657 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3658 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3659}
3660
3661asn_dec_rval_t
3662VisibleIdentifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3663 void **structure, const void *bufptr, size_t size, int tag_mode) {
3664 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3665 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3666}
3667
3668asn_enc_rval_t
3669VisibleIdentifier_encode_der(asn_TYPE_descriptor_t *td,
3670 void *structure, int tag_mode, ber_tlv_tag_t tag,
3671 asn_app_consume_bytes_f *cb, void *app_key) {
3672 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3673 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3674}
3675
3676asn_dec_rval_t
3677VisibleIdentifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3678 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3679 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3680 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3681}
3682
3683asn_enc_rval_t
3684VisibleIdentifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3685 int ilevel, enum xer_encoder_flags_e flags,
3686 asn_app_consume_bytes_f *cb, void *app_key) {
3687 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3688 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3689}
3690
3691asn_dec_rval_t
3692VisibleIdentifier_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3693 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3694 VisibleIdentifier_1_inherit_TYPE_descriptor(td);
3695 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3696}
3697
3698
3699/*** <<< STAT-DEFS [VisibleIdentifier] >>> ***/
3700
3701static ber_tlv_tag_t asn_DEF_VisibleIdentifier_tags_1[] = {
3702 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
3703};
3704asn_TYPE_descriptor_t asn_DEF_VisibleIdentifier = {
3705 "VisibleIdentifier",
3706 "VisibleIdentifier",
3707 VisibleIdentifier_free,
3708 VisibleIdentifier_print,
3709 VisibleIdentifier_constraint,
3710 VisibleIdentifier_decode_ber,
3711 VisibleIdentifier_encode_der,
3712 VisibleIdentifier_decode_xer,
3713 VisibleIdentifier_encode_xer,
3714 VisibleIdentifier_decode_uper,
3715 0, /* Use generic outmost tag fetcher */
3716 asn_DEF_VisibleIdentifier_tags_1,
3717 sizeof(asn_DEF_VisibleIdentifier_tags_1)
3718 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
3719 asn_DEF_VisibleIdentifier_tags_1, /* Same as above */
3720 sizeof(asn_DEF_VisibleIdentifier_tags_1)
3721 /sizeof(asn_DEF_VisibleIdentifier_tags_1[0]), /* 1 */
3722 0, /* No PER visible constraints */
3723 0, 0, /* No members */
3724 0 /* No specifics */
3725};
3726
3727
3728/*** <<< INCLUDES [Sequence] >>> ***/
3729
3730#include <Int1.h>
3731#include <Int4.h>
3732#include <BOOLEAN.h>
3733#include <ENUMERATED.h>
3734#include <NULL.h>
3735#include <Int5.h>
3736#include <constr_SEQUENCE.h>
3737
3738/*** <<< DEPS [Sequence] >>> ***/
3739
3740typedef enum enum_c {
3741 enum_c_one = 1,
3742 enum_c_two = 2,
3743 /*
3744 * Enumeration is extensible
3745 */
3746 enum_c_three = 3
3747} enum_c_e;
3748
3749/*** <<< TYPE-DECLS [Sequence] >>> ***/
3750
3751typedef struct Sequence {
3752 Int1_t *int1_c /* DEFAULT 3 */;
3753 Int4_t int4;
3754 Int4_t int4_c;
3755 BOOLEAN_t *bool /* DEFAULT 1 */;
3756 ENUMERATED_t enum_c;
3757 NULL_t *null /* OPTIONAL */;
3758 /*
3759 * This type is extensible,
3760 * possible extensions are below.
3761 */
3762 Int5_t *int5_c /* OPTIONAL */;
3763
3764 /* Context for parsing across buffer boundaries */
3765 asn_struct_ctx_t _asn_ctx;
3766} Sequence_t;
3767
3768/*** <<< FUNC-DECLS [Sequence] >>> ***/
3769
3770/* extern asn_TYPE_descriptor_t asn_DEF_enum_c_6; // (Use -fall-defs-global to expose) */
3771extern asn_TYPE_descriptor_t asn_DEF_Sequence;
3772
3773/*** <<< CODE [Sequence] >>> ***/
3774
3775static int
3776enum_c_6_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
3777 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3778 /* Replace with underlying type checker */
3779 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
3780 return td->check_constraints(td, sptr, app_errlog, app_key);
3781}
3782
3783/*
3784 * This type is implemented using ENUMERATED,
3785 * so here we adjust the DEF accordingly.
3786 */
3787static void
3788enum_c_6_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
3789 td->free_struct = asn_DEF_ENUMERATED.free_struct;
3790 td->print_struct = asn_DEF_ENUMERATED.print_struct;
3791 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
3792 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
3793 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
3794 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
3795 td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
3796 if(!td->per_constraints)
3797 td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
3798 td->elements = asn_DEF_ENUMERATED.elements;
3799 td->elements_count = asn_DEF_ENUMERATED.elements_count;
3800 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
3801}
3802
3803static void
3804enum_c_6_free(asn_TYPE_descriptor_t *td,
3805 void *struct_ptr, int contents_only) {
3806 enum_c_6_inherit_TYPE_descriptor(td);
3807 td->free_struct(td, struct_ptr, contents_only);
3808}
3809
3810static int
3811enum_c_6_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
3812 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
3813 enum_c_6_inherit_TYPE_descriptor(td);
3814 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
3815}
3816
3817static asn_dec_rval_t
3818enum_c_6_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3819 void **structure, const void *bufptr, size_t size, int tag_mode) {
3820 enum_c_6_inherit_TYPE_descriptor(td);
3821 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
3822}
3823
3824static asn_enc_rval_t
3825enum_c_6_encode_der(asn_TYPE_descriptor_t *td,
3826 void *structure, int tag_mode, ber_tlv_tag_t tag,
3827 asn_app_consume_bytes_f *cb, void *app_key) {
3828 enum_c_6_inherit_TYPE_descriptor(td);
3829 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
3830}
3831
3832static asn_dec_rval_t
3833enum_c_6_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3834 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
3835 enum_c_6_inherit_TYPE_descriptor(td);
3836 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
3837}
3838
3839static asn_enc_rval_t
3840enum_c_6_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
3841 int ilevel, enum xer_encoder_flags_e flags,
3842 asn_app_consume_bytes_f *cb, void *app_key) {
3843 enum_c_6_inherit_TYPE_descriptor(td);
3844 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
3845}
3846
3847static asn_dec_rval_t
3848enum_c_6_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
3849 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
3850 enum_c_6_inherit_TYPE_descriptor(td);
3851 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
3852}
3853
3854static int
3855memb_int1_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
3856 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3857 const Int1_t *st = (const Int1_t *)sptr;
3858 long value;
3859
3860 if(!sptr) {
3861 _ASN_ERRLOG(app_errlog, app_key,
3862 "%s: value not given (%s:%d)",
3863 td->name, __FILE__, __LINE__);
3864 return -1;
3865 }
3866
3867 if(asn_INTEGER2long(st, &value)) {
3868 _ASN_ERRLOG(app_errlog, app_key,
3869 "%s: value too large (%s:%d)",
3870 td->name, __FILE__, __LINE__);
3871 return -1;
3872 }
3873
3874 if((value >= -2)) {
3875 /* Constraint check succeeded */
3876 return 0;
3877 } else {
3878 _ASN_ERRLOG(app_errlog, app_key,
3879 "%s: constraint failed (%s:%d)",
3880 td->name, __FILE__, __LINE__);
3881 return -1;
3882 }
3883}
3884
3885static int
3886memb_int4_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
3887 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3888 const Int4_t *st = (const Int4_t *)sptr;
3889 long value;
3890
3891 if(!sptr) {
3892 _ASN_ERRLOG(app_errlog, app_key,
3893 "%s: value not given (%s:%d)",
3894 td->name, __FILE__, __LINE__);
3895 return -1;
3896 }
3897
3898 if(asn_INTEGER2long(st, &value)) {
3899 _ASN_ERRLOG(app_errlog, app_key,
3900 "%s: value too large (%s:%d)",
3901 td->name, __FILE__, __LINE__);
3902 return -1;
3903 }
3904
3905 if((value >= 5 && value <= 7)) {
3906 /* Constraint check succeeded */
3907 return 0;
3908 } else {
3909 _ASN_ERRLOG(app_errlog, app_key,
3910 "%s: constraint failed (%s:%d)",
3911 td->name, __FILE__, __LINE__);
3912 return -1;
3913 }
3914}
3915
3916static int
3917memb_int5_c_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
3918 asn_app_consume_bytes_f *app_errlog, void *app_key) {
3919 const Int5_t *st = (const Int5_t *)sptr;
3920 long value;
3921
3922 if(!sptr) {
3923 _ASN_ERRLOG(app_errlog, app_key,
3924 "%s: value not given (%s:%d)",
3925 td->name, __FILE__, __LINE__);
3926 return -1;
3927 }
3928
3929 if(asn_INTEGER2long(st, &value)) {
3930 _ASN_ERRLOG(app_errlog, app_key,
3931 "%s: value too large (%s:%d)",
3932 td->name, __FILE__, __LINE__);
3933 return -1;
3934 }
3935
3936 if((value == 5)) {
3937 /* Constraint check succeeded */
3938 return 0;
3939 } else {
3940 _ASN_ERRLOG(app_errlog, app_key,
3941 "%s: constraint failed (%s:%d)",
3942 td->name, __FILE__, __LINE__);
3943 return -1;
3944 }
3945}
3946
3947
3948/*** <<< STAT-DEFS [Sequence] >>> ***/
3949
3950static int asn_DFL_2_set_3(void **sptr) {
3951 Int1_t *st = *sptr;
3952
3953 if(!st) {
3954 st = (*sptr = CALLOC(1, sizeof(*st)));
3955 if(!st) return -1;
3956 }
3957
3958 /* Install default value 3 */
3959 return asn_long2INTEGER(st, 3);
3960}
3961static int asn_DFL_5_set_1(void **sptr) {
3962 BOOLEAN_t *st = *sptr;
3963
3964 if(!st) {
3965 st = (*sptr = CALLOC(1, sizeof(*st)));
3966 if(!st) return -1;
3967 }
3968
3969 /* Install default value 1 */
3970 *st = 1;
3971 return 0;
3972}
3973static asn_INTEGER_enum_map_t asn_MAP_enum_c_value2enum_6[] = {
3974 { 1, 3, "one" },
3975 { 2, 3, "two" },
3976 { 3, 5, "three" }
3977 /* This list is extensible */
3978};
3979static unsigned int asn_MAP_enum_c_enum2value_6[] = {
3980 0, /* one(1) */
3981 2, /* three(3) */
3982 1 /* two(2) */
3983 /* This list is extensible */
3984};
3985static asn_INTEGER_specifics_t asn_SPC_enum_c_specs_6 = {
3986 asn_MAP_enum_c_value2enum_6, /* "tag" => N; sorted by tag */
3987 asn_MAP_enum_c_enum2value_6, /* N => "tag"; sorted by N */
3988 3, /* Number of elements in the maps */
3989 3, /* Extensions before this member */
3990 1 /* Strict enumeration */
3991};
3992static ber_tlv_tag_t asn_DEF_enum_c_tags_6[] = {
3993 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
3994};
3995static asn_per_constraints_t asn_PER_enum_c_constr_6 = {
3996 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
3997 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
3998};
3999static /* Use -fall-defs-global to expose */
4000asn_TYPE_descriptor_t asn_DEF_enum_c_6 = {
4001 "enum-c",
4002 "enum-c",
4003 enum_c_6_free,
4004 enum_c_6_print,
4005 enum_c_6_constraint,
4006 enum_c_6_decode_ber,
4007 enum_c_6_encode_der,
4008 enum_c_6_decode_xer,
4009 enum_c_6_encode_xer,
4010 enum_c_6_decode_uper,
4011 0, /* Use generic outmost tag fetcher */
4012 asn_DEF_enum_c_tags_6,
4013 sizeof(asn_DEF_enum_c_tags_6)
4014 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
4015 asn_DEF_enum_c_tags_6, /* Same as above */
4016 sizeof(asn_DEF_enum_c_tags_6)
4017 /sizeof(asn_DEF_enum_c_tags_6[0]), /* 1 */
4018 &asn_PER_enum_c_constr_6,
4019 0, 0, /* Defined elsewhere */
4020 &asn_SPC_enum_c_specs_6 /* Additional specs */
4021};
4022
4023static asn_per_constraints_t asn_PER_memb_int1_c_constr_2 = {
4024 { APC_SEMI_CONSTRAINED, -1, -1, -2, 0 } /* (-2..MAX) */,
4025 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4026};
4027static asn_per_constraints_t asn_PER_memb_int4_c_constr_4 = {
4028 { APC_CONSTRAINED, 2, 2, 5, 7 } /* (5..7) */,
4029 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4030};
4031static asn_per_constraints_t asn_PER_memb_enum_c_constr_6 = {
4032 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
4033 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4034};
4035static asn_per_constraints_t asn_PER_memb_int5_c_constr_13 = {
4036 { APC_CONSTRAINED, 0, 0, 5, 5 } /* (5..5) */,
4037 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4038};
4039static asn_TYPE_member_t asn_MBR_Sequence_1[] = {
4040 { ATF_POINTER, 1, offsetof(struct Sequence, int1_c),
4041 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
4042 .tag_mode = 0,
4043 .type = &asn_DEF_Int1,
4044 .memb_constraints = memb_int1_c_constraint_1,
4045 .per_constraints = &asn_PER_memb_int1_c_constr_2,
4046 .default_value = asn_DFL_2_set_3, /* DEFAULT 3 */
4047 .name = "int1-c"
4048 },
4049 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4),
4050 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
4051 .tag_mode = +1, /* EXPLICIT tag at current level */
4052 .type = &asn_DEF_Int4,
4053 .memb_constraints = 0, /* Defer constraints checking to the member type */
4054 .per_constraints = 0, /* No PER visible constraints */
4055 .default_value = 0,
4056 .name = "int4"
4057 },
4058 { ATF_NOFLAGS, 0, offsetof(struct Sequence, int4_c),
4059 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
4060 .tag_mode = 0,
4061 .type = &asn_DEF_Int4,
4062 .memb_constraints = memb_int4_c_constraint_1,
4063 .per_constraints = &asn_PER_memb_int4_c_constr_4,
4064 .default_value = 0,
4065 .name = "int4-c"
4066 },
4067 { ATF_POINTER, 1, offsetof(struct Sequence, bool),
4068 .tag = (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
4069 .tag_mode = 0,
4070 .type = &asn_DEF_BOOLEAN,
4071 .memb_constraints = 0, /* Defer constraints checking to the member type */
4072 .per_constraints = 0, /* No PER visible constraints */
4073 .default_value = asn_DFL_5_set_1, /* DEFAULT 1 */
4074 .name = "bool"
4075 },
4076 { ATF_NOFLAGS, 0, offsetof(struct Sequence, enum_c),
4077 .tag = (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)),
4078 .tag_mode = 0,
4079 .type = &asn_DEF_enum_c_6,
4080 .memb_constraints = 0, /* Defer constraints checking to the member type */
4081 .per_constraints = &asn_PER_memb_enum_c_constr_6,
4082 .default_value = 0,
4083 .name = "enum-c"
4084 },
4085 { ATF_POINTER, 2, offsetof(struct Sequence, null),
4086 .tag = (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
4087 .tag_mode = 0,
4088 .type = &asn_DEF_NULL,
4089 .memb_constraints = 0, /* Defer constraints checking to the member type */
4090 .per_constraints = 0, /* No PER visible constraints */
4091 .default_value = 0,
4092 .name = "null"
4093 },
4094 { ATF_POINTER, 1, offsetof(struct Sequence, int5_c),
4095 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
4096 .tag_mode = 0,
4097 .type = &asn_DEF_Int5,
4098 .memb_constraints = memb_int5_c_constraint_1,
4099 .per_constraints = &asn_PER_memb_int5_c_constr_13,
4100 .default_value = 0,
4101 .name = "int5-c"
4102 },
4103};
4104static int asn_MAP_Sequence_oms_1[] = { 0, 3, 5, 6 };
4105static ber_tlv_tag_t asn_DEF_Sequence_tags_1[] = {
4106 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
4107};
4108static asn_TYPE_tag2member_t asn_MAP_Sequence_tag2el_1[] = {
4109 { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)), 3, 0, 0 }, /* bool at 59 */
4110 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* int1-c at 56 */
4111 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 1 }, /* int4-c at 58 */
4112 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 6, -2, 0 }, /* int5-c at 62 */
4113 { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)), 5, 0, 0 }, /* null at 64 */
4114 { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 0 }, /* enum-c at 60 */
4115 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* int4 at 57 */
4116};
4117static asn_SEQUENCE_specifics_t asn_SPC_Sequence_specs_1 = {
4118 sizeof(struct Sequence),
4119 offsetof(struct Sequence, _asn_ctx),
4120 asn_MAP_Sequence_tag2el_1,
4121 7, /* Count of tags in the map */
4122 asn_MAP_Sequence_oms_1, /* Optional members */
4123 3, 1, /* Root/Additions */
4124 5, /* Start extensions */
4125 8 /* Stop extensions */
4126};
4127asn_TYPE_descriptor_t asn_DEF_Sequence = {
4128 "Sequence",
4129 "Sequence",
4130 SEQUENCE_free,
4131 SEQUENCE_print,
4132 SEQUENCE_constraint,
4133 SEQUENCE_decode_ber,
4134 SEQUENCE_encode_der,
4135 SEQUENCE_decode_xer,
4136 SEQUENCE_encode_xer,
4137 SEQUENCE_decode_uper,
4138 0, /* Use generic outmost tag fetcher */
4139 asn_DEF_Sequence_tags_1,
4140 sizeof(asn_DEF_Sequence_tags_1)
4141 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
4142 asn_DEF_Sequence_tags_1, /* Same as above */
4143 sizeof(asn_DEF_Sequence_tags_1)
4144 /sizeof(asn_DEF_Sequence_tags_1[0]), /* 1 */
4145 0, /* No PER visible constraints */
4146 asn_MBR_Sequence_1,
4147 7, /* Elements count */
4148 &asn_SPC_Sequence_specs_1 /* Additional specs */
4149};
4150
4151
4152/*** <<< INCLUDES [SequenceOf] >>> ***/
4153
4154#include <asn_SEQUENCE_OF.h>
4155#include <constr_SEQUENCE_OF.h>
4156
4157/*** <<< FWD-DECLS [SequenceOf] >>> ***/
4158
4159struct Sequence;
4160
4161/*** <<< TYPE-DECLS [SequenceOf] >>> ***/
4162
4163typedef struct SequenceOf {
4164 A_SEQUENCE_OF(struct Sequence) list;
4165
4166 /* Context for parsing across buffer boundaries */
4167 asn_struct_ctx_t _asn_ctx;
4168} SequenceOf_t;
4169
4170/*** <<< FUNC-DECLS [SequenceOf] >>> ***/
4171
4172extern asn_TYPE_descriptor_t asn_DEF_SequenceOf;
4173
4174/*** <<< POST-INCLUDE [SequenceOf] >>> ***/
4175
4176#include <Sequence.h>
4177
4178/*** <<< STAT-DEFS [SequenceOf] >>> ***/
4179
4180static asn_TYPE_member_t asn_MBR_SequenceOf_1[] = {
4181 { ATF_POINTER, 0, 0,
4182 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
4183 .tag_mode = 0,
4184 .type = &asn_DEF_Sequence,
4185 .memb_constraints = 0, /* Defer constraints checking to the member type */
4186 .per_constraints = 0, /* No PER visible constraints */
4187 .default_value = 0,
4188 .name = ""
4189 },
4190};
4191static ber_tlv_tag_t asn_DEF_SequenceOf_tags_1[] = {
4192 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
4193};
4194static asn_SET_OF_specifics_t asn_SPC_SequenceOf_specs_1 = {
4195 sizeof(struct SequenceOf),
4196 offsetof(struct SequenceOf, _asn_ctx),
4197 0, /* XER encoding is XMLDelimitedItemList */
4198};
4199static asn_per_constraints_t asn_PER_SequenceOf_constr_1 = {
4200 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
4201 { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */
4202};
4203asn_TYPE_descriptor_t asn_DEF_SequenceOf = {
4204 "SequenceOf",
4205 "SequenceOf",
4206 SEQUENCE_OF_free,
4207 SEQUENCE_OF_print,
4208 SEQUENCE_OF_constraint,
4209 SEQUENCE_OF_decode_ber,
4210 SEQUENCE_OF_encode_der,
4211 SEQUENCE_OF_decode_xer,
4212 SEQUENCE_OF_encode_xer,
4213 SEQUENCE_OF_decode_uper,
4214 0, /* Use generic outmost tag fetcher */
4215 asn_DEF_SequenceOf_tags_1,
4216 sizeof(asn_DEF_SequenceOf_tags_1)
4217 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
4218 asn_DEF_SequenceOf_tags_1, /* Same as above */
4219 sizeof(asn_DEF_SequenceOf_tags_1)
4220 /sizeof(asn_DEF_SequenceOf_tags_1[0]), /* 1 */
4221 &asn_PER_SequenceOf_constr_1,
4222 asn_MBR_SequenceOf_1,
4223 1, /* Single element */
4224 &asn_SPC_SequenceOf_specs_1 /* Additional specs */
4225};
4226
4227
4228/*** <<< INCLUDES [Enum0] >>> ***/
4229
4230#include <ENUMERATED.h>
4231
4232/*** <<< DEPS [Enum0] >>> ***/
4233
4234typedef enum Enum0 {
4235 Enum0_one = 0,
4236 Enum0_two = 1
4237} Enum0_e;
4238
4239/*** <<< TYPE-DECLS [Enum0] >>> ***/
4240
4241typedef ENUMERATED_t Enum0_t;
4242
4243/*** <<< FUNC-DECLS [Enum0] >>> ***/
4244
4245extern asn_TYPE_descriptor_t asn_DEF_Enum0;
4246asn_struct_free_f Enum0_free;
4247asn_struct_print_f Enum0_print;
4248asn_constr_check_f Enum0_constraint;
4249ber_type_decoder_f Enum0_decode_ber;
4250der_type_encoder_f Enum0_encode_der;
4251xer_type_decoder_f Enum0_decode_xer;
4252xer_type_encoder_f Enum0_encode_xer;
4253per_type_decoder_f Enum0_decode_uper;
4254
4255/*** <<< CODE [Enum0] >>> ***/
4256
4257int
4258Enum0_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
4259 asn_app_consume_bytes_f *app_errlog, void *app_key) {
4260 /* Replace with underlying type checker */
4261 td->check_constraints = asn_DEF_ENUMERATED.check_constraints;
4262 return td->check_constraints(td, sptr, app_errlog, app_key);
4263}
4264
4265/*
4266 * This type is implemented using ENUMERATED,
4267 * so here we adjust the DEF accordingly.
4268 */
4269static void
4270Enum0_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
4271 td->free_struct = asn_DEF_ENUMERATED.free_struct;
4272 td->print_struct = asn_DEF_ENUMERATED.print_struct;
4273 td->ber_decoder = asn_DEF_ENUMERATED.ber_decoder;
4274 td->der_encoder = asn_DEF_ENUMERATED.der_encoder;
4275 td->xer_decoder = asn_DEF_ENUMERATED.xer_decoder;
4276 td->xer_encoder = asn_DEF_ENUMERATED.xer_encoder;
4277 td->uper_decoder = asn_DEF_ENUMERATED.uper_decoder;
4278 if(!td->per_constraints)
4279 td->per_constraints = asn_DEF_ENUMERATED.per_constraints;
4280 td->elements = asn_DEF_ENUMERATED.elements;
4281 td->elements_count = asn_DEF_ENUMERATED.elements_count;
4282 /* td->specifics = asn_DEF_ENUMERATED.specifics; // Defined explicitly */
4283}
4284
4285void
4286Enum0_free(asn_TYPE_descriptor_t *td,
4287 void *struct_ptr, int contents_only) {
4288 Enum0_1_inherit_TYPE_descriptor(td);
4289 td->free_struct(td, struct_ptr, contents_only);
4290}
4291
4292int
4293Enum0_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
4294 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
4295 Enum0_1_inherit_TYPE_descriptor(td);
4296 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4297}
4298
4299asn_dec_rval_t
4300Enum0_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4301 void **structure, const void *bufptr, size_t size, int tag_mode) {
4302 Enum0_1_inherit_TYPE_descriptor(td);
4303 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
4304}
4305
4306asn_enc_rval_t
4307Enum0_encode_der(asn_TYPE_descriptor_t *td,
4308 void *structure, int tag_mode, ber_tlv_tag_t tag,
4309 asn_app_consume_bytes_f *cb, void *app_key) {
4310 Enum0_1_inherit_TYPE_descriptor(td);
4311 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4312}
4313
4314asn_dec_rval_t
4315Enum0_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4316 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
4317 Enum0_1_inherit_TYPE_descriptor(td);
4318 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4319}
4320
4321asn_enc_rval_t
4322Enum0_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
4323 int ilevel, enum xer_encoder_flags_e flags,
4324 asn_app_consume_bytes_f *cb, void *app_key) {
4325 Enum0_1_inherit_TYPE_descriptor(td);
4326 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
4327}
4328
4329asn_dec_rval_t
4330Enum0_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4331 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
4332 Enum0_1_inherit_TYPE_descriptor(td);
4333 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
4334}
4335
4336
4337/*** <<< STAT-DEFS [Enum0] >>> ***/
4338
4339static asn_INTEGER_enum_map_t asn_MAP_Enum0_value2enum_1[] = {
4340 { 0, 3, "one" },
4341 { 1, 3, "two" }
4342};
4343static unsigned int asn_MAP_Enum0_enum2value_1[] = {
4344 0, /* one(0) */
4345 1 /* two(1) */
4346};
4347static asn_INTEGER_specifics_t asn_SPC_Enum0_specs_1 = {
4348 asn_MAP_Enum0_value2enum_1, /* "tag" => N; sorted by tag */
4349 asn_MAP_Enum0_enum2value_1, /* N => "tag"; sorted by N */
4350 2, /* Number of elements in the maps */
4351 0, /* Enumeration is not extensible */
4352 1 /* Strict enumeration */
4353};
4354static ber_tlv_tag_t asn_DEF_Enum0_tags_1[] = {
4355 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
4356};
4357static asn_per_constraints_t asn_PER_Enum0_constr_1 = {
4358 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
4359 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4360};
4361asn_TYPE_descriptor_t asn_DEF_Enum0 = {
4362 "Enum0",
4363 "Enum0",
4364 Enum0_free,
4365 Enum0_print,
4366 Enum0_constraint,
4367 Enum0_decode_ber,
4368 Enum0_encode_der,
4369 Enum0_decode_xer,
4370 Enum0_encode_xer,
4371 Enum0_decode_uper,
4372 0, /* Use generic outmost tag fetcher */
4373 asn_DEF_Enum0_tags_1,
4374 sizeof(asn_DEF_Enum0_tags_1)
4375 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
4376 asn_DEF_Enum0_tags_1, /* Same as above */
4377 sizeof(asn_DEF_Enum0_tags_1)
4378 /sizeof(asn_DEF_Enum0_tags_1[0]), /* 1 */
4379 &asn_PER_Enum0_constr_1,
4380 0, 0, /* Defined elsewhere */
4381 &asn_SPC_Enum0_specs_1 /* Additional specs */
4382};
4383
4384
4385/*** <<< INCLUDES [Enum1] >>> ***/
4386
4387#include <NativeEnumerated.h>
4388
4389/*** <<< DEPS [Enum1] >>> ***/
4390
4391typedef enum Enum1 {
4392 Enum1_one = 0,
4393 Enum1_two = 1
4394} Enum1_e;
4395
4396/*** <<< TYPE-DECLS [Enum1] >>> ***/
4397
4398typedef long Enum1_t;
4399
4400/*** <<< FUNC-DECLS [Enum1] >>> ***/
4401
4402extern asn_TYPE_descriptor_t asn_DEF_Enum1;
4403asn_struct_free_f Enum1_free;
4404asn_struct_print_f Enum1_print;
4405asn_constr_check_f Enum1_constraint;
4406ber_type_decoder_f Enum1_decode_ber;
4407der_type_encoder_f Enum1_encode_der;
4408xer_type_decoder_f Enum1_decode_xer;
4409xer_type_encoder_f Enum1_encode_xer;
4410per_type_decoder_f Enum1_decode_uper;
4411
4412/*** <<< CODE [Enum1] >>> ***/
4413
4414int
4415Enum1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
4416 asn_app_consume_bytes_f *app_errlog, void *app_key) {
4417 long value;
4418
4419 if(!sptr) {
4420 _ASN_ERRLOG(app_errlog, app_key,
4421 "%s: value not given (%s:%d)",
4422 td->name, __FILE__, __LINE__);
4423 return -1;
4424 }
4425
4426 value = *(const long *)sptr;
4427
4428 if((value == 0)) {
4429 /* Constraint check succeeded */
4430 return 0;
4431 } else {
4432 _ASN_ERRLOG(app_errlog, app_key,
4433 "%s: constraint failed (%s:%d)",
4434 td->name, __FILE__, __LINE__);
4435 return -1;
4436 }
4437}
4438
4439/*
4440 * This type is implemented using NativeEnumerated,
4441 * so here we adjust the DEF accordingly.
4442 */
4443static void
4444Enum1_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
4445 td->free_struct = asn_DEF_NativeEnumerated.free_struct;
4446 td->print_struct = asn_DEF_NativeEnumerated.print_struct;
4447 td->ber_decoder = asn_DEF_NativeEnumerated.ber_decoder;
4448 td->der_encoder = asn_DEF_NativeEnumerated.der_encoder;
4449 td->xer_decoder = asn_DEF_NativeEnumerated.xer_decoder;
4450 td->xer_encoder = asn_DEF_NativeEnumerated.xer_encoder;
4451 td->uper_decoder = asn_DEF_NativeEnumerated.uper_decoder;
4452 if(!td->per_constraints)
4453 td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
4454 td->elements = asn_DEF_NativeEnumerated.elements;
4455 td->elements_count = asn_DEF_NativeEnumerated.elements_count;
4456 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
4457}
4458
4459void
4460Enum1_free(asn_TYPE_descriptor_t *td,
4461 void *struct_ptr, int contents_only) {
4462 Enum1_1_inherit_TYPE_descriptor(td);
4463 td->free_struct(td, struct_ptr, contents_only);
4464}
4465
4466int
4467Enum1_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
4468 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
4469 Enum1_1_inherit_TYPE_descriptor(td);
4470 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4471}
4472
4473asn_dec_rval_t
4474Enum1_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4475 void **structure, const void *bufptr, size_t size, int tag_mode) {
4476 Enum1_1_inherit_TYPE_descriptor(td);
4477 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
4478}
4479
4480asn_enc_rval_t
4481Enum1_encode_der(asn_TYPE_descriptor_t *td,
4482 void *structure, int tag_mode, ber_tlv_tag_t tag,
4483 asn_app_consume_bytes_f *cb, void *app_key) {
4484 Enum1_1_inherit_TYPE_descriptor(td);
4485 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4486}
4487
4488asn_dec_rval_t
4489Enum1_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4490 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
4491 Enum1_1_inherit_TYPE_descriptor(td);
4492 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4493}
4494
4495asn_enc_rval_t
4496Enum1_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
4497 int ilevel, enum xer_encoder_flags_e flags,
4498 asn_app_consume_bytes_f *cb, void *app_key) {
4499 Enum1_1_inherit_TYPE_descriptor(td);
4500 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
4501}
4502
4503asn_dec_rval_t
4504Enum1_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4505 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
4506 Enum1_1_inherit_TYPE_descriptor(td);
4507 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
4508}
4509
4510
4511/*** <<< STAT-DEFS [Enum1] >>> ***/
4512
4513static asn_INTEGER_enum_map_t asn_MAP_Enum1_value2enum_1[] = {
4514 { 0, 3, "one" },
4515 { 1, 3, "two" }
4516};
4517static unsigned int asn_MAP_Enum1_enum2value_1[] = {
4518 0, /* one(0) */
4519 1 /* two(1) */
4520};
4521static asn_INTEGER_specifics_t asn_SPC_Enum1_specs_1 = {
4522 asn_MAP_Enum1_value2enum_1, /* "tag" => N; sorted by tag */
4523 asn_MAP_Enum1_enum2value_1, /* N => "tag"; sorted by N */
4524 2, /* Number of elements in the maps */
4525 0, /* Enumeration is not extensible */
4526 1 /* Strict enumeration */
4527};
4528static ber_tlv_tag_t asn_DEF_Enum1_tags_1[] = {
4529 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
4530};
4531static asn_per_constraints_t asn_PER_Enum1_constr_1 = {
4532 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
4533 { APC_UNCONSTRAINED, -1, -1, 0, 0 }
4534};
4535asn_TYPE_descriptor_t asn_DEF_Enum1 = {
4536 "Enum1",
4537 "Enum1",
4538 Enum1_free,
4539 Enum1_print,
4540 Enum1_constraint,
4541 Enum1_decode_ber,
4542 Enum1_encode_der,
4543 Enum1_decode_xer,
4544 Enum1_encode_xer,
4545 Enum1_decode_uper,
4546 0, /* Use generic outmost tag fetcher */
4547 asn_DEF_Enum1_tags_1,
4548 sizeof(asn_DEF_Enum1_tags_1)
4549 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
4550 asn_DEF_Enum1_tags_1, /* Same as above */
4551 sizeof(asn_DEF_Enum1_tags_1)
4552 /sizeof(asn_DEF_Enum1_tags_1[0]), /* 1 */
4553 &asn_PER_Enum1_constr_1,
4554 0, 0, /* Defined elsewhere */
4555 &asn_SPC_Enum1_specs_1 /* Additional specs */
4556};
4557
4558
4559/*** <<< INCLUDES [Identifier] >>> ***/
4560
4561#include <VisibleString.h>
4562
4563/*** <<< TYPE-DECLS [Identifier] >>> ***/
4564
4565typedef VisibleString_t Identifier_t;
4566
4567/*** <<< FUNC-DECLS [Identifier] >>> ***/
4568
4569extern asn_TYPE_descriptor_t asn_DEF_Identifier;
4570asn_struct_free_f Identifier_free;
4571asn_struct_print_f Identifier_print;
4572asn_constr_check_f Identifier_constraint;
4573ber_type_decoder_f Identifier_decode_ber;
4574der_type_encoder_f Identifier_encode_der;
4575xer_type_decoder_f Identifier_decode_xer;
4576xer_type_encoder_f Identifier_encode_xer;
4577per_type_decoder_f Identifier_decode_uper;
4578
4579/*** <<< CTABLES [Identifier] >>> ***/
4580
4581static int permitted_alphabet_table_1[256] = {
45820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
45830,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* */
45840,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* $ */
45851,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 0123456789 */
45860,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ABCDEFGHIJKLMNO */
45871,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* PQRSTUVWXYZ _ */
45880,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* abcdefghijklmno */
45891,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, /* pqrstuvwxyz */
4590};
4591
4592static int check_permitted_alphabet_1(const void *sptr) {
4593 int *table = permitted_alphabet_table_1;
4594 /* The underlying type is VisibleString */
4595 const VisibleString_t *st = (const VisibleString_t *)sptr;
4596 const uint8_t *ch = st->buf;
4597 const uint8_t *end = ch + st->size;
4598
4599 for(; ch < end; ch++) {
4600 uint8_t cv = *ch;
4601 if(!table[cv]) return -1;
4602 }
4603 return 0;
4604}
4605
4606
4607/*** <<< CODE [Identifier] >>> ***/
4608
4609int
4610Identifier_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
4611 asn_app_consume_bytes_f *app_errlog, void *app_key) {
4612 const VisibleString_t *st = (const VisibleString_t *)sptr;
4613 size_t size;
4614
4615 if(!sptr) {
4616 _ASN_ERRLOG(app_errlog, app_key,
4617 "%s: value not given (%s:%d)",
4618 td->name, __FILE__, __LINE__);
4619 return -1;
4620 }
4621
4622 size = st->size;
4623
4624 if((size >= 1 && size <= 32)
4625 && !check_permitted_alphabet_1(st)) {
4626 /* Constraint check succeeded */
4627 return 0;
4628 } else {
4629 _ASN_ERRLOG(app_errlog, app_key,
4630 "%s: constraint failed (%s:%d)",
4631 td->name, __FILE__, __LINE__);
4632 return -1;
4633 }
4634}
4635
4636/*
4637 * This type is implemented using VisibleString,
4638 * so here we adjust the DEF accordingly.
4639 */
4640static void
4641Identifier_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
4642 td->free_struct = asn_DEF_VisibleString.free_struct;
4643 td->print_struct = asn_DEF_VisibleString.print_struct;
4644 td->ber_decoder = asn_DEF_VisibleString.ber_decoder;
4645 td->der_encoder = asn_DEF_VisibleString.der_encoder;
4646 td->xer_decoder = asn_DEF_VisibleString.xer_decoder;
4647 td->xer_encoder = asn_DEF_VisibleString.xer_encoder;
4648 td->uper_decoder = asn_DEF_VisibleString.uper_decoder;
4649 if(!td->per_constraints)
4650 td->per_constraints = asn_DEF_VisibleString.per_constraints;
4651 td->elements = asn_DEF_VisibleString.elements;
4652 td->elements_count = asn_DEF_VisibleString.elements_count;
4653 td->specifics = asn_DEF_VisibleString.specifics;
4654}
4655
4656void
4657Identifier_free(asn_TYPE_descriptor_t *td,
4658 void *struct_ptr, int contents_only) {
4659 Identifier_1_inherit_TYPE_descriptor(td);
4660 td->free_struct(td, struct_ptr, contents_only);
4661}
4662
4663int
4664Identifier_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
4665 int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
4666 Identifier_1_inherit_TYPE_descriptor(td);
4667 return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
4668}
4669
4670asn_dec_rval_t
4671Identifier_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4672 void **structure, const void *bufptr, size_t size, int tag_mode) {
4673 Identifier_1_inherit_TYPE_descriptor(td);
4674 return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
4675}
4676
4677asn_enc_rval_t
4678Identifier_encode_der(asn_TYPE_descriptor_t *td,
4679 void *structure, int tag_mode, ber_tlv_tag_t tag,
4680 asn_app_consume_bytes_f *cb, void *app_key) {
4681 Identifier_1_inherit_TYPE_descriptor(td);
4682 return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
4683}
4684
4685asn_dec_rval_t
4686Identifier_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4687 void **structure, const char *opt_mname, const void *bufptr, size_t size) {
4688 Identifier_1_inherit_TYPE_descriptor(td);
4689 return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
4690}
4691
4692asn_enc_rval_t
4693Identifier_encode_xer(asn_TYPE_descriptor_t *td, void *structure,
4694 int ilevel, enum xer_encoder_flags_e flags,
4695 asn_app_consume_bytes_f *cb, void *app_key) {
4696 Identifier_1_inherit_TYPE_descriptor(td);
4697 return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
4698}
4699
4700asn_dec_rval_t
4701Identifier_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
4702 asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
4703 Identifier_1_inherit_TYPE_descriptor(td);
4704 return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
4705}
4706
4707
4708/*** <<< STAT-DEFS [Identifier] >>> ***/
4709
4710static ber_tlv_tag_t asn_DEF_Identifier_tags_1[] = {
4711 (ASN_TAG_CLASS_UNIVERSAL | (26 << 2))
4712};
4713static asn_per_constraints_t asn_PER_Identifier_constr_1 = {
4714 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
4715 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */
4716};
4717asn_TYPE_descriptor_t asn_DEF_Identifier = {
4718 "Identifier",
4719 "Identifier",
4720 Identifier_free,
4721 Identifier_print,
4722 Identifier_constraint,
4723 Identifier_decode_ber,
4724 Identifier_encode_der,
4725 Identifier_decode_xer,
4726 Identifier_encode_xer,
4727 Identifier_decode_uper,
4728 0, /* Use generic outmost tag fetcher */
4729 asn_DEF_Identifier_tags_1,
4730 sizeof(asn_DEF_Identifier_tags_1)
4731 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
4732 asn_DEF_Identifier_tags_1, /* Same as above */
4733 sizeof(asn_DEF_Identifier_tags_1)
4734 /sizeof(asn_DEF_Identifier_tags_1[0]), /* 1 */
4735 &asn_PER_Identifier_constr_1,
4736 0, 0, /* No members */
4737 0 /* No specifics */
4738};
4739