[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / BetaOffsets.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../ASN1_Input/rrc_15_3_asn.asn1"
5  *      `asn1c -D ../RRC_output_14Nov/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
6  */
7
8 #include "BetaOffsets.h"
9
10 static int
11 memb_betaOffsetACK_Index1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const long *)sptr;
23         
24         if((value >= 0 && value <= 31)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 static int
36 memb_betaOffsetACK_Index2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         long value;
39         
40         if(!sptr) {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: value not given (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46         
47         value = *(const long *)sptr;
48         
49         if((value >= 0 && value <= 31)) {
50                 /* Constraint check succeeded */
51                 return 0;
52         } else {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: constraint failed (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58 }
59
60 static int
61 memb_betaOffsetACK_Index3_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
62                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63         long value;
64         
65         if(!sptr) {
66                 ASN__CTFAIL(app_key, td, sptr,
67                         "%s: value not given (%s:%d)",
68                         td->name, __FILE__, __LINE__);
69                 return -1;
70         }
71         
72         value = *(const long *)sptr;
73         
74         if((value >= 0 && value <= 31)) {
75                 /* Constraint check succeeded */
76                 return 0;
77         } else {
78                 ASN__CTFAIL(app_key, td, sptr,
79                         "%s: constraint failed (%s:%d)",
80                         td->name, __FILE__, __LINE__);
81                 return -1;
82         }
83 }
84
85 static int
86 memb_betaOffsetCSI_Part1_Index1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
87                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88         long value;
89         
90         if(!sptr) {
91                 ASN__CTFAIL(app_key, td, sptr,
92                         "%s: value not given (%s:%d)",
93                         td->name, __FILE__, __LINE__);
94                 return -1;
95         }
96         
97         value = *(const long *)sptr;
98         
99         if((value >= 0 && value <= 31)) {
100                 /* Constraint check succeeded */
101                 return 0;
102         } else {
103                 ASN__CTFAIL(app_key, td, sptr,
104                         "%s: constraint failed (%s:%d)",
105                         td->name, __FILE__, __LINE__);
106                 return -1;
107         }
108 }
109
110 static int
111 memb_betaOffsetCSI_Part1_Index2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
112                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
113         long value;
114         
115         if(!sptr) {
116                 ASN__CTFAIL(app_key, td, sptr,
117                         "%s: value not given (%s:%d)",
118                         td->name, __FILE__, __LINE__);
119                 return -1;
120         }
121         
122         value = *(const long *)sptr;
123         
124         if((value >= 0 && value <= 31)) {
125                 /* Constraint check succeeded */
126                 return 0;
127         } else {
128                 ASN__CTFAIL(app_key, td, sptr,
129                         "%s: constraint failed (%s:%d)",
130                         td->name, __FILE__, __LINE__);
131                 return -1;
132         }
133 }
134
135 static int
136 memb_betaOffsetCSI_Part2_Index1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
137                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
138         long value;
139         
140         if(!sptr) {
141                 ASN__CTFAIL(app_key, td, sptr,
142                         "%s: value not given (%s:%d)",
143                         td->name, __FILE__, __LINE__);
144                 return -1;
145         }
146         
147         value = *(const long *)sptr;
148         
149         if((value >= 0 && value <= 31)) {
150                 /* Constraint check succeeded */
151                 return 0;
152         } else {
153                 ASN__CTFAIL(app_key, td, sptr,
154                         "%s: constraint failed (%s:%d)",
155                         td->name, __FILE__, __LINE__);
156                 return -1;
157         }
158 }
159
160 static int
161 memb_betaOffsetCSI_Part2_Index2_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
162                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
163         long value;
164         
165         if(!sptr) {
166                 ASN__CTFAIL(app_key, td, sptr,
167                         "%s: value not given (%s:%d)",
168                         td->name, __FILE__, __LINE__);
169                 return -1;
170         }
171         
172         value = *(const long *)sptr;
173         
174         if((value >= 0 && value <= 31)) {
175                 /* Constraint check succeeded */
176                 return 0;
177         } else {
178                 ASN__CTFAIL(app_key, td, sptr,
179                         "%s: constraint failed (%s:%d)",
180                         td->name, __FILE__, __LINE__);
181                 return -1;
182         }
183 }
184
185 static asn_oer_constraints_t asn_OER_memb_betaOffsetACK_Index1_constr_2 CC_NOTUSED = {
186         { 1, 1 }        /* (0..31) */,
187         -1};
188 static asn_per_constraints_t asn_PER_memb_betaOffsetACK_Index1_constr_2 CC_NOTUSED = {
189         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
190         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
191         0, 0    /* No PER value map */
192 };
193 static asn_oer_constraints_t asn_OER_memb_betaOffsetACK_Index2_constr_3 CC_NOTUSED = {
194         { 1, 1 }        /* (0..31) */,
195         -1};
196 static asn_per_constraints_t asn_PER_memb_betaOffsetACK_Index2_constr_3 CC_NOTUSED = {
197         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
198         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
199         0, 0    /* No PER value map */
200 };
201 static asn_oer_constraints_t asn_OER_memb_betaOffsetACK_Index3_constr_4 CC_NOTUSED = {
202         { 1, 1 }        /* (0..31) */,
203         -1};
204 static asn_per_constraints_t asn_PER_memb_betaOffsetACK_Index3_constr_4 CC_NOTUSED = {
205         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
206         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
207         0, 0    /* No PER value map */
208 };
209 static asn_oer_constraints_t asn_OER_memb_betaOffsetCSI_Part1_Index1_constr_5 CC_NOTUSED = {
210         { 1, 1 }        /* (0..31) */,
211         -1};
212 static asn_per_constraints_t asn_PER_memb_betaOffsetCSI_Part1_Index1_constr_5 CC_NOTUSED = {
213         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
214         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
215         0, 0    /* No PER value map */
216 };
217 static asn_oer_constraints_t asn_OER_memb_betaOffsetCSI_Part1_Index2_constr_6 CC_NOTUSED = {
218         { 1, 1 }        /* (0..31) */,
219         -1};
220 static asn_per_constraints_t asn_PER_memb_betaOffsetCSI_Part1_Index2_constr_6 CC_NOTUSED = {
221         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
222         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
223         0, 0    /* No PER value map */
224 };
225 static asn_oer_constraints_t asn_OER_memb_betaOffsetCSI_Part2_Index1_constr_7 CC_NOTUSED = {
226         { 1, 1 }        /* (0..31) */,
227         -1};
228 static asn_per_constraints_t asn_PER_memb_betaOffsetCSI_Part2_Index1_constr_7 CC_NOTUSED = {
229         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
230         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
231         0, 0    /* No PER value map */
232 };
233 static asn_oer_constraints_t asn_OER_memb_betaOffsetCSI_Part2_Index2_constr_8 CC_NOTUSED = {
234         { 1, 1 }        /* (0..31) */,
235         -1};
236 static asn_per_constraints_t asn_PER_memb_betaOffsetCSI_Part2_Index2_constr_8 CC_NOTUSED = {
237         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
238         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
239         0, 0    /* No PER value map */
240 };
241 asn_TYPE_member_t asn_MBR_BetaOffsets_1[] = {
242         { ATF_POINTER, 7, offsetof(struct BetaOffsets, betaOffsetACK_Index1),
243                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
244                 -1,     /* IMPLICIT tag at current level */
245                 &asn_DEF_NativeInteger,
246                 0,
247                 { &asn_OER_memb_betaOffsetACK_Index1_constr_2, &asn_PER_memb_betaOffsetACK_Index1_constr_2,  memb_betaOffsetACK_Index1_constraint_1 },
248                 0, 0, /* No default value */
249                 "betaOffsetACK-Index1"
250                 },
251         { ATF_POINTER, 6, offsetof(struct BetaOffsets, betaOffsetACK_Index2),
252                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
253                 -1,     /* IMPLICIT tag at current level */
254                 &asn_DEF_NativeInteger,
255                 0,
256                 { &asn_OER_memb_betaOffsetACK_Index2_constr_3, &asn_PER_memb_betaOffsetACK_Index2_constr_3,  memb_betaOffsetACK_Index2_constraint_1 },
257                 0, 0, /* No default value */
258                 "betaOffsetACK-Index2"
259                 },
260         { ATF_POINTER, 5, offsetof(struct BetaOffsets, betaOffsetACK_Index3),
261                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
262                 -1,     /* IMPLICIT tag at current level */
263                 &asn_DEF_NativeInteger,
264                 0,
265                 { &asn_OER_memb_betaOffsetACK_Index3_constr_4, &asn_PER_memb_betaOffsetACK_Index3_constr_4,  memb_betaOffsetACK_Index3_constraint_1 },
266                 0, 0, /* No default value */
267                 "betaOffsetACK-Index3"
268                 },
269         { ATF_POINTER, 4, offsetof(struct BetaOffsets, betaOffsetCSI_Part1_Index1),
270                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
271                 -1,     /* IMPLICIT tag at current level */
272                 &asn_DEF_NativeInteger,
273                 0,
274                 { &asn_OER_memb_betaOffsetCSI_Part1_Index1_constr_5, &asn_PER_memb_betaOffsetCSI_Part1_Index1_constr_5,  memb_betaOffsetCSI_Part1_Index1_constraint_1 },
275                 0, 0, /* No default value */
276                 "betaOffsetCSI-Part1-Index1"
277                 },
278         { ATF_POINTER, 3, offsetof(struct BetaOffsets, betaOffsetCSI_Part1_Index2),
279                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
280                 -1,     /* IMPLICIT tag at current level */
281                 &asn_DEF_NativeInteger,
282                 0,
283                 { &asn_OER_memb_betaOffsetCSI_Part1_Index2_constr_6, &asn_PER_memb_betaOffsetCSI_Part1_Index2_constr_6,  memb_betaOffsetCSI_Part1_Index2_constraint_1 },
284                 0, 0, /* No default value */
285                 "betaOffsetCSI-Part1-Index2"
286                 },
287         { ATF_POINTER, 2, offsetof(struct BetaOffsets, betaOffsetCSI_Part2_Index1),
288                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
289                 -1,     /* IMPLICIT tag at current level */
290                 &asn_DEF_NativeInteger,
291                 0,
292                 { &asn_OER_memb_betaOffsetCSI_Part2_Index1_constr_7, &asn_PER_memb_betaOffsetCSI_Part2_Index1_constr_7,  memb_betaOffsetCSI_Part2_Index1_constraint_1 },
293                 0, 0, /* No default value */
294                 "betaOffsetCSI-Part2-Index1"
295                 },
296         { ATF_POINTER, 1, offsetof(struct BetaOffsets, betaOffsetCSI_Part2_Index2),
297                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
298                 -1,     /* IMPLICIT tag at current level */
299                 &asn_DEF_NativeInteger,
300                 0,
301                 { &asn_OER_memb_betaOffsetCSI_Part2_Index2_constr_8, &asn_PER_memb_betaOffsetCSI_Part2_Index2_constr_8,  memb_betaOffsetCSI_Part2_Index2_constraint_1 },
302                 0, 0, /* No default value */
303                 "betaOffsetCSI-Part2-Index2"
304                 },
305 };
306 static const int asn_MAP_BetaOffsets_oms_1[] = { 0, 1, 2, 3, 4, 5, 6 };
307 static const ber_tlv_tag_t asn_DEF_BetaOffsets_tags_1[] = {
308         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
309 };
310 static const asn_TYPE_tag2member_t asn_MAP_BetaOffsets_tag2el_1[] = {
311     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* betaOffsetACK-Index1 */
312     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* betaOffsetACK-Index2 */
313     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* betaOffsetACK-Index3 */
314     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* betaOffsetCSI-Part1-Index1 */
315     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* betaOffsetCSI-Part1-Index2 */
316     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* betaOffsetCSI-Part2-Index1 */
317     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* betaOffsetCSI-Part2-Index2 */
318 };
319 asn_SEQUENCE_specifics_t asn_SPC_BetaOffsets_specs_1 = {
320         sizeof(struct BetaOffsets),
321         offsetof(struct BetaOffsets, _asn_ctx),
322         asn_MAP_BetaOffsets_tag2el_1,
323         7,      /* Count of tags in the map */
324         asn_MAP_BetaOffsets_oms_1,      /* Optional members */
325         7, 0,   /* Root/Additions */
326         -1,     /* First extension addition */
327 };
328 asn_TYPE_descriptor_t asn_DEF_BetaOffsets = {
329         "BetaOffsets",
330         "BetaOffsets",
331         &asn_OP_SEQUENCE,
332         asn_DEF_BetaOffsets_tags_1,
333         sizeof(asn_DEF_BetaOffsets_tags_1)
334                 /sizeof(asn_DEF_BetaOffsets_tags_1[0]), /* 1 */
335         asn_DEF_BetaOffsets_tags_1,     /* Same as above */
336         sizeof(asn_DEF_BetaOffsets_tags_1)
337                 /sizeof(asn_DEF_BetaOffsets_tags_1[0]), /* 1 */
338         { 0, 0, SEQUENCE_constraint },
339         asn_MBR_BetaOffsets_1,
340         7,      /* Elements count */
341         &asn_SPC_BetaOffsets_specs_1    /* Additional specs */
342 };
343