Added debugging and fixes for incorrect messages
[ric-app/admin.git] / asn1c_defs / all-defs / ResumeID.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "../../asn_defs/asn1/x2ap-modified-15-05.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
6  */
7
8 #include "ResumeID.h"
9
10 static int
11 memb_non_truncated_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
14         size_t size;
15         
16         if(!sptr) {
17                 ASN__CTFAIL(app_key, td, sptr,
18                         "%s: value not given (%s:%d)",
19                         td->name, __FILE__, __LINE__);
20                 return -1;
21         }
22         
23         if(st->size > 0) {
24                 /* Size in bits */
25                 size = 8 * st->size - (st->bits_unused & 0x07);
26         } else {
27                 size = 0;
28         }
29         
30         if((size == 40)) {
31                 /* Constraint check succeeded */
32                 return 0;
33         } else {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: constraint failed (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39 }
40
41 static int
42 memb_truncated_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
43                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
44         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
45         size_t size;
46         
47         if(!sptr) {
48                 ASN__CTFAIL(app_key, td, sptr,
49                         "%s: value not given (%s:%d)",
50                         td->name, __FILE__, __LINE__);
51                 return -1;
52         }
53         
54         if(st->size > 0) {
55                 /* Size in bits */
56                 size = 8 * st->size - (st->bits_unused & 0x07);
57         } else {
58                 size = 0;
59         }
60         
61         if((size == 24)) {
62                 /* Constraint check succeeded */
63                 return 0;
64         } else {
65                 ASN__CTFAIL(app_key, td, sptr,
66                         "%s: constraint failed (%s:%d)",
67                         td->name, __FILE__, __LINE__);
68                 return -1;
69         }
70 }
71
72 static asn_per_constraints_t asn_PER_memb_non_truncated_constr_2 CC_NOTUSED = {
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         { APC_CONSTRAINED,       0,  0,  40,  40 }      /* (SIZE(40..40)) */,
75         0, 0    /* No PER value map */
76 };
77 static asn_per_constraints_t asn_PER_memb_truncated_constr_3 CC_NOTUSED = {
78         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
79         { APC_CONSTRAINED,       0,  0,  24,  24 }      /* (SIZE(24..24)) */,
80         0, 0    /* No PER value map */
81 };
82 static asn_per_constraints_t asn_PER_type_ResumeID_constr_1 CC_NOTUSED = {
83         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
84         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
85         0, 0    /* No PER value map */
86 };
87 static asn_TYPE_member_t asn_MBR_ResumeID_1[] = {
88         { ATF_NOFLAGS, 0, offsetof(struct ResumeID, choice.non_truncated),
89                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
90                 -1,     /* IMPLICIT tag at current level */
91                 &asn_DEF_BIT_STRING,
92                 0,
93                 { 0, &asn_PER_memb_non_truncated_constr_2,  memb_non_truncated_constraint_1 },
94                 0, 0, /* No default value */
95                 "non-truncated"
96                 },
97         { ATF_NOFLAGS, 0, offsetof(struct ResumeID, choice.truncated),
98                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
99                 -1,     /* IMPLICIT tag at current level */
100                 &asn_DEF_BIT_STRING,
101                 0,
102                 { 0, &asn_PER_memb_truncated_constr_3,  memb_truncated_constraint_1 },
103                 0, 0, /* No default value */
104                 "truncated"
105                 },
106 };
107 static const asn_TYPE_tag2member_t asn_MAP_ResumeID_tag2el_1[] = {
108     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* non-truncated */
109     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* truncated */
110 };
111 static asn_CHOICE_specifics_t asn_SPC_ResumeID_specs_1 = {
112         sizeof(struct ResumeID),
113         offsetof(struct ResumeID, _asn_ctx),
114         offsetof(struct ResumeID, present),
115         sizeof(((struct ResumeID *)0)->present),
116         asn_MAP_ResumeID_tag2el_1,
117         2,      /* Count of tags in the map */
118         0, 0,
119         2       /* Extensions start */
120 };
121 asn_TYPE_descriptor_t asn_DEF_ResumeID = {
122         "ResumeID",
123         "ResumeID",
124         &asn_OP_CHOICE,
125         0,      /* No effective tags (pointer) */
126         0,      /* No effective tags (count) */
127         0,      /* No tags (pointer) */
128         0,      /* No tags (count) */
129         { 0, &asn_PER_type_ResumeID_constr_1, CHOICE_constraint },
130         asn_MBR_ResumeID_1,
131         2,      /* Elements count */
132         &asn_SPC_ResumeID_specs_1       /* Additional specs */
133 };
134