2 /*** <<< INCLUDES [T] >>> ***/
4 #include <NativeInteger.h>
6 #include <constr_SEQUENCE.h>
8 /*** <<< TYPE-DECLS [T] >>> ***/
14 long unsigned16stack_ext;
16 long *minmax; /* OPTIONAL */
18 * This type is extensible,
19 * possible extensions are below.
21 long *signed8; /* DEFAULT 3 */
24 long *signed16stack_ext;
26 INTEGER_t *signed33ext;
28 /* Context for parsing across buffer boundaries */
29 asn_struct_ctx_t _asn_ctx;
32 /*** <<< FUNC-DECLS [T] >>> ***/
34 extern asn_TYPE_descriptor_t asn_DEF_T;
36 /*** <<< CODE [T] >>> ***/
39 memb_unsigned8_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
40 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
44 ASN__CTFAIL(app_key, td, sptr,
45 "%s: value not given (%s:%d)",
46 td->name, __FILE__, __LINE__);
50 value = *(const long *)sptr;
52 if((value >= 0 && value <= 255)) {
53 /* Constraint check succeeded */
56 ASN__CTFAIL(app_key, td, sptr,
57 "%s: constraint failed (%s:%d)",
58 td->name, __FILE__, __LINE__);
64 memb_unsigned16_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
65 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
69 ASN__CTFAIL(app_key, td, sptr,
70 "%s: value not given (%s:%d)",
71 td->name, __FILE__, __LINE__);
75 value = *(const long *)sptr;
77 if((value >= 0 && value <= 65535)) {
78 /* Constraint check succeeded */
81 ASN__CTFAIL(app_key, td, sptr,
82 "%s: constraint failed (%s:%d)",
83 td->name, __FILE__, __LINE__);
89 memb_unsigned16stack_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
90 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
94 ASN__CTFAIL(app_key, td, sptr,
95 "%s: value not given (%s:%d)",
96 td->name, __FILE__, __LINE__);
100 value = *(const long *)sptr;
102 if((value >= 0 && value <= 255)) {
103 /* Constraint check succeeded */
106 ASN__CTFAIL(app_key, td, sptr,
107 "%s: constraint failed (%s:%d)",
108 td->name, __FILE__, __LINE__);
114 memb_unsigned16stack_ext_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
115 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
119 ASN__CTFAIL(app_key, td, sptr,
120 "%s: value not given (%s:%d)",
121 td->name, __FILE__, __LINE__);
125 value = *(const long *)sptr;
127 if((value >= 0 && value <= 255)) {
128 /* Constraint check succeeded */
131 ASN__CTFAIL(app_key, td, sptr,
132 "%s: constraint failed (%s:%d)",
133 td->name, __FILE__, __LINE__);
139 memb_unsigned33_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
140 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
141 const INTEGER_t *st = (const INTEGER_t *)sptr;
145 ASN__CTFAIL(app_key, td, sptr,
146 "%s: value not given (%s:%d)",
147 td->name, __FILE__, __LINE__);
151 if(asn_INTEGER2long(st, &value)) {
152 ASN__CTFAIL(app_key, td, sptr,
153 "%s: value too large (%s:%d)",
154 td->name, __FILE__, __LINE__);
158 if((value >= 0 && value <= 5000000000)) {
159 /* Constraint check succeeded */
162 ASN__CTFAIL(app_key, td, sptr,
163 "%s: constraint failed (%s:%d)",
164 td->name, __FILE__, __LINE__);
170 memb_minmax_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
171 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
174 ASN__CTFAIL(app_key, td, sptr,
175 "%s: value not given (%s:%d)",
176 td->name, __FILE__, __LINE__);
181 if(1 /* No applicable constraints whatsoever */) {
182 /* Nothing is here. See below */
185 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
189 memb_signed8_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
190 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
194 ASN__CTFAIL(app_key, td, sptr,
195 "%s: value not given (%s:%d)",
196 td->name, __FILE__, __LINE__);
200 value = *(const long *)sptr;
202 if((value >= -128 && value <= 127)) {
203 /* Constraint check succeeded */
206 ASN__CTFAIL(app_key, td, sptr,
207 "%s: constraint failed (%s:%d)",
208 td->name, __FILE__, __LINE__);
214 memb_signed16_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
215 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
219 ASN__CTFAIL(app_key, td, sptr,
220 "%s: value not given (%s:%d)",
221 td->name, __FILE__, __LINE__);
225 value = *(const long *)sptr;
227 if((value >= -32768 && value <= 32767)) {
228 /* Constraint check succeeded */
231 ASN__CTFAIL(app_key, td, sptr,
232 "%s: constraint failed (%s:%d)",
233 td->name, __FILE__, __LINE__);
239 memb_signed16stack_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
240 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
244 ASN__CTFAIL(app_key, td, sptr,
245 "%s: value not given (%s:%d)",
246 td->name, __FILE__, __LINE__);
250 value = *(const long *)sptr;
252 if((value >= -128 && value <= 127)) {
253 /* Constraint check succeeded */
256 ASN__CTFAIL(app_key, td, sptr,
257 "%s: constraint failed (%s:%d)",
258 td->name, __FILE__, __LINE__);
264 memb_signed16stack_ext_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
265 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
269 ASN__CTFAIL(app_key, td, sptr,
270 "%s: value not given (%s:%d)",
271 td->name, __FILE__, __LINE__);
275 value = *(const long *)sptr;
277 if((value >= -128 && value <= 127)) {
278 /* Constraint check succeeded */
281 ASN__CTFAIL(app_key, td, sptr,
282 "%s: constraint failed (%s:%d)",
283 td->name, __FILE__, __LINE__);
289 memb_signed32_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
290 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
294 ASN__CTFAIL(app_key, td, sptr,
295 "%s: value not given (%s:%d)",
296 td->name, __FILE__, __LINE__);
300 value = *(const long *)sptr;
302 if((value >= -2000000000 && value <= 2000000000)) {
303 /* Constraint check succeeded */
306 ASN__CTFAIL(app_key, td, sptr,
307 "%s: constraint failed (%s:%d)",
308 td->name, __FILE__, __LINE__);
314 memb_signed33ext_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
315 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
316 const INTEGER_t *st = (const INTEGER_t *)sptr;
320 ASN__CTFAIL(app_key, td, sptr,
321 "%s: value not given (%s:%d)",
322 td->name, __FILE__, __LINE__);
326 if(asn_INTEGER2long(st, &value)) {
327 ASN__CTFAIL(app_key, td, sptr,
328 "%s: value too large (%s:%d)",
329 td->name, __FILE__, __LINE__);
333 if((value >= -4000000000 && value <= 4000000000)) {
334 /* Constraint check succeeded */
337 ASN__CTFAIL(app_key, td, sptr,
338 "%s: constraint failed (%s:%d)",
339 td->name, __FILE__, __LINE__);
345 /*** <<< CTDEFS [T] >>> ***/
347 static asn_oer_constraints_t asn_OER_memb_unsigned8_constr_2 CC_NOTUSED = {
348 { 1, 1 } /* (0..255) */,
350 static asn_oer_constraints_t asn_OER_memb_unsigned16_constr_3 CC_NOTUSED = {
351 { 2, 1 } /* (0..65535) */,
353 static asn_oer_constraints_t asn_OER_memb_unsigned16stack_constr_4 CC_NOTUSED = {
354 { 1, 1 } /* (0..255) */,
356 static asn_oer_constraints_t asn_OER_memb_unsigned16stack_ext_constr_5 CC_NOTUSED = {
357 { 2, 1 } /* (0..32767) */,
359 static asn_oer_constraints_t asn_OER_memb_unsigned33_constr_6 CC_NOTUSED = {
360 { 8, 1 } /* (0..5000000000) */,
362 static asn_oer_constraints_t asn_OER_memb_minmax_constr_7 CC_NOTUSED = {
365 static asn_oer_constraints_t asn_OER_memb_signed8_constr_9 CC_NOTUSED = {
366 { 1, 0 } /* (-128..127) */,
368 static asn_oer_constraints_t asn_OER_memb_signed16_constr_10 CC_NOTUSED = {
369 { 2, 0 } /* (-32768..32767) */,
371 static asn_oer_constraints_t asn_OER_memb_signed16stack_constr_11 CC_NOTUSED = {
372 { 1, 0 } /* (-128..127) */,
374 static asn_oer_constraints_t asn_OER_memb_signed16stack_ext_constr_12 CC_NOTUSED = {
375 { 2, 0 } /* (-32768..32767) */,
377 static asn_oer_constraints_t asn_OER_memb_signed32_constr_13 CC_NOTUSED = {
378 { 4, 0 } /* (-2000000000..2000000000) */,
380 static asn_oer_constraints_t asn_OER_memb_signed33ext_constr_14 CC_NOTUSED = {
384 /*** <<< STAT-DEFS [T] >>> ***/
386 static int asn_DFL_9_cmp_3(const void *sptr) {
387 const long *st = sptr;
390 return -1; /* No value is not a default value */
393 /* Test default value 3 */
396 static int asn_DFL_9_set_3(void **sptr) {
400 st = (*sptr = CALLOC(1, sizeof(*st)));
404 /* Install default value 3 */
408 static asn_TYPE_member_t asn_MBR_T_1[] = {
409 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned8),
410 .tag = (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
411 .tag_mode = -1, /* IMPLICIT tag at current level */
412 .type = &asn_DEF_NativeInteger,
414 { .oer_constraints = &asn_OER_memb_unsigned8_constr_2, .per_constraints = 0, .general_constraints = memb_unsigned8_constraint_1 },
415 0, 0, /* No default value */
418 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16),
419 .tag = (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
420 .tag_mode = -1, /* IMPLICIT tag at current level */
421 .type = &asn_DEF_NativeInteger,
423 { .oer_constraints = &asn_OER_memb_unsigned16_constr_3, .per_constraints = 0, .general_constraints = memb_unsigned16_constraint_1 },
424 0, 0, /* No default value */
427 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16stack),
428 .tag = (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
429 .tag_mode = -1, /* IMPLICIT tag at current level */
430 .type = &asn_DEF_NativeInteger,
432 { .oer_constraints = &asn_OER_memb_unsigned16stack_constr_4, .per_constraints = 0, .general_constraints = memb_unsigned16stack_constraint_1 },
433 0, 0, /* No default value */
434 .name = "unsigned16stack"
436 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned16stack_ext),
437 .tag = (ASN_TAG_CLASS_CONTEXT | (15 << 2)),
438 .tag_mode = -1, /* IMPLICIT tag at current level */
439 .type = &asn_DEF_NativeInteger,
441 { .oer_constraints = &asn_OER_memb_unsigned16stack_ext_constr_5, .per_constraints = 0, .general_constraints = memb_unsigned16stack_ext_constraint_1 },
442 0, 0, /* No default value */
443 .name = "unsigned16stack-ext"
445 { ATF_NOFLAGS, 0, offsetof(struct T, unsigned33),
446 .tag = (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
447 .tag_mode = -1, /* IMPLICIT tag at current level */
448 .type = &asn_DEF_INTEGER,
450 { .oer_constraints = &asn_OER_memb_unsigned33_constr_6, .per_constraints = 0, .general_constraints = memb_unsigned33_constraint_1 },
451 0, 0, /* No default value */
454 { ATF_POINTER, 7, offsetof(struct T, minmax),
455 .tag = (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
456 .tag_mode = -1, /* IMPLICIT tag at current level */
457 .type = &asn_DEF_NativeInteger,
459 { .oer_constraints = &asn_OER_memb_minmax_constr_7, .per_constraints = 0, .general_constraints = memb_minmax_constraint_1 },
460 0, 0, /* No default value */
463 { ATF_POINTER, 6, offsetof(struct T, signed8),
464 .tag = (ASN_TAG_CLASS_CONTEXT | (10 << 2)),
465 .tag_mode = -1, /* IMPLICIT tag at current level */
466 .type = &asn_DEF_NativeInteger,
468 { .oer_constraints = &asn_OER_memb_signed8_constr_9, .per_constraints = 0, .general_constraints = memb_signed8_constraint_1 },
469 .default_value_cmp = &asn_DFL_9_cmp_3, /* Compare DEFAULT 3 */
470 .default_value_set = &asn_DFL_9_set_3, /* Set DEFAULT 3 */
473 { ATF_POINTER, 5, offsetof(struct T, signed16),
474 .tag = (ASN_TAG_CLASS_CONTEXT | (11 << 2)),
475 .tag_mode = -1, /* IMPLICIT tag at current level */
476 .type = &asn_DEF_NativeInteger,
478 { .oer_constraints = &asn_OER_memb_signed16_constr_10, .per_constraints = 0, .general_constraints = memb_signed16_constraint_1 },
479 0, 0, /* No default value */
482 { ATF_POINTER, 4, offsetof(struct T, signed16stack),
483 .tag = (ASN_TAG_CLASS_CONTEXT | (12 << 2)),
484 .tag_mode = -1, /* IMPLICIT tag at current level */
485 .type = &asn_DEF_NativeInteger,
487 { .oer_constraints = &asn_OER_memb_signed16stack_constr_11, .per_constraints = 0, .general_constraints = memb_signed16stack_constraint_1 },
488 0, 0, /* No default value */
489 .name = "signed16stack"
491 { ATF_POINTER, 3, offsetof(struct T, signed16stack_ext),
492 .tag = (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
493 .tag_mode = -1, /* IMPLICIT tag at current level */
494 .type = &asn_DEF_NativeInteger,
496 { .oer_constraints = &asn_OER_memb_signed16stack_ext_constr_12, .per_constraints = 0, .general_constraints = memb_signed16stack_ext_constraint_1 },
497 0, 0, /* No default value */
498 .name = "signed16stack-ext"
500 { ATF_POINTER, 2, offsetof(struct T, signed32),
501 .tag = (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
502 .tag_mode = -1, /* IMPLICIT tag at current level */
503 .type = &asn_DEF_NativeInteger,
505 { .oer_constraints = &asn_OER_memb_signed32_constr_13, .per_constraints = 0, .general_constraints = memb_signed32_constraint_1 },
506 0, 0, /* No default value */
509 { ATF_POINTER, 1, offsetof(struct T, signed33ext),
510 .tag = (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
511 .tag_mode = -1, /* IMPLICIT tag at current level */
512 .type = &asn_DEF_INTEGER,
514 { .oer_constraints = &asn_OER_memb_signed33ext_constr_14, .per_constraints = 0, .general_constraints = memb_signed33ext_constraint_1 },
515 0, 0, /* No default value */
516 .name = "signed33ext"
519 static const int asn_MAP_T_oms_1[] = { 5, 6, 7, 8, 9, 10, 11 };
520 static const ber_tlv_tag_t asn_DEF_T_tags_1[] = {
521 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
523 static const asn_TYPE_tag2member_t asn_MAP_T_tag2el_1[] = {
524 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* unsigned8 */
525 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* unsigned16 */
526 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned16stack */
527 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 4, 0, 0 }, /* unsigned33 */
528 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 9, 0, 0 }, /* signed16stack-ext */
529 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 5, 0, 0 }, /* minmax */
530 { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 10, 0, 0 }, /* signed32 */
531 { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 11, 0, 0 }, /* signed33ext */
532 { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 6, 0, 0 }, /* signed8 */
533 { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 7, 0, 0 }, /* signed16 */
534 { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 8, 0, 0 }, /* signed16stack */
535 { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 3, 0, 0 } /* unsigned16stack-ext */
537 static asn_SEQUENCE_specifics_t asn_SPC_T_specs_1 = {
539 offsetof(struct T, _asn_ctx),
540 .tag2el = asn_MAP_T_tag2el_1,
541 .tag2el_count = 12, /* Count of tags in the map */
542 asn_MAP_T_oms_1, /* Optional members */
543 1, 6, /* Root/Additions */
544 6, /* First extension addition */
546 asn_TYPE_descriptor_t asn_DEF_T = {
551 sizeof(asn_DEF_T_tags_1)
552 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
553 asn_DEF_T_tags_1, /* Same as above */
554 sizeof(asn_DEF_T_tags_1)
555 /sizeof(asn_DEF_T_tags_1[0]), /* 1 */
556 { 0, 0, SEQUENCE_constraint },
558 12, /* Elements count */
559 &asn_SPC_T_specs_1 /* Additional specs */