[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / RadioLinkMonitoringConfig.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../../../rrc_15.3_asn.asn1"
5  *      `asn1c -D ./25_02_2022_RRC/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "RadioLinkMonitoringConfig.h"
9
10 #include "RadioLinkMonitoringRS.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 /*
16  * This type is implemented using NativeEnumerated,
17  * so here we adjust the DEF accordingly.
18  */
19 static int
20 memb_failureDetectionResourcesToAddModList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
21                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
22         size_t size;
23         
24         if(!sptr) {
25                 ASN__CTFAIL(app_key, td, sptr,
26                         "%s: value not given (%s:%d)",
27                         td->name, __FILE__, __LINE__);
28                 return -1;
29         }
30         
31         /* Determine the number of elements */
32         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
33         
34         if((size >= 1 && size <= 10)) {
35                 /* Perform validation of the inner elements */
36                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
37         } else {
38                 ASN__CTFAIL(app_key, td, sptr,
39                         "%s: constraint failed (%s:%d)",
40                         td->name, __FILE__, __LINE__);
41                 return -1;
42         }
43 }
44
45 static int
46 memb_failureDetectionResourcesToReleaseList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
47                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
48         size_t size;
49         
50         if(!sptr) {
51                 ASN__CTFAIL(app_key, td, sptr,
52                         "%s: value not given (%s:%d)",
53                         td->name, __FILE__, __LINE__);
54                 return -1;
55         }
56         
57         /* Determine the number of elements */
58         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
59         
60         if((size >= 1 && size <= 10)) {
61                 /* Perform validation of the inner elements */
62                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
63         } else {
64                 ASN__CTFAIL(app_key, td, sptr,
65                         "%s: constraint failed (%s:%d)",
66                         td->name, __FILE__, __LINE__);
67                 return -1;
68         }
69 }
70
71 static asn_oer_constraints_t asn_OER_type_failureDetectionResourcesToAddModList_constr_2 CC_NOTUSED = {
72         { 0, 0 },
73         -1      /* (SIZE(1..10)) */};
74 static asn_per_constraints_t asn_PER_type_failureDetectionResourcesToAddModList_constr_2 CC_NOTUSED = {
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         { APC_CONSTRAINED,       4,  4,  1,  10 }       /* (SIZE(1..10)) */,
77         0, 0    /* No PER value map */
78 };
79 static asn_oer_constraints_t asn_OER_type_failureDetectionResourcesToReleaseList_constr_4 CC_NOTUSED = {
80         { 0, 0 },
81         -1      /* (SIZE(1..10)) */};
82 static asn_per_constraints_t asn_PER_type_failureDetectionResourcesToReleaseList_constr_4 CC_NOTUSED = {
83         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
84         { APC_CONSTRAINED,       4,  4,  1,  10 }       /* (SIZE(1..10)) */,
85         0, 0    /* No PER value map */
86 };
87 static asn_oer_constraints_t asn_OER_type_beamFailureInstanceMaxCount_constr_6 CC_NOTUSED = {
88         { 0, 0 },
89         -1};
90 static asn_per_constraints_t asn_PER_type_beamFailureInstanceMaxCount_constr_6 CC_NOTUSED = {
91         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
92         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
93         0, 0    /* No PER value map */
94 };
95 static asn_oer_constraints_t asn_OER_type_beamFailureDetectionTimer_constr_15 CC_NOTUSED = {
96         { 0, 0 },
97         -1};
98 static asn_per_constraints_t asn_PER_type_beamFailureDetectionTimer_constr_15 CC_NOTUSED = {
99         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
100         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
101         0, 0    /* No PER value map */
102 };
103 static asn_oer_constraints_t asn_OER_memb_failureDetectionResourcesToAddModList_constr_2 CC_NOTUSED = {
104         { 0, 0 },
105         -1      /* (SIZE(1..10)) */};
106 static asn_per_constraints_t asn_PER_memb_failureDetectionResourcesToAddModList_constr_2 CC_NOTUSED = {
107         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
108         { APC_CONSTRAINED,       4,  4,  1,  10 }       /* (SIZE(1..10)) */,
109         0, 0    /* No PER value map */
110 };
111 static asn_oer_constraints_t asn_OER_memb_failureDetectionResourcesToReleaseList_constr_4 CC_NOTUSED = {
112         { 0, 0 },
113         -1      /* (SIZE(1..10)) */};
114 static asn_per_constraints_t asn_PER_memb_failureDetectionResourcesToReleaseList_constr_4 CC_NOTUSED = {
115         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
116         { APC_CONSTRAINED,       4,  4,  1,  10 }       /* (SIZE(1..10)) */,
117         0, 0    /* No PER value map */
118 };
119 static asn_TYPE_member_t asn_MBR_failureDetectionResourcesToAddModList_2[] = {
120         { ATF_POINTER, 0, 0,
121                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
122                 0,
123                 &asn_DEF_RadioLinkMonitoringRS,
124                 0,
125                 { 0, 0, 0 },
126                 0, 0, /* No default value */
127                 ""
128                 },
129 };
130 static const ber_tlv_tag_t asn_DEF_failureDetectionResourcesToAddModList_tags_2[] = {
131         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
132         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
133 };
134 static asn_SET_OF_specifics_t asn_SPC_failureDetectionResourcesToAddModList_specs_2 = {
135         sizeof(struct RadioLinkMonitoringConfig__failureDetectionResourcesToAddModList),
136         offsetof(struct RadioLinkMonitoringConfig__failureDetectionResourcesToAddModList, _asn_ctx),
137         0,      /* XER encoding is XMLDelimitedItemList */
138 };
139 static /* Use -fall-defs-global to expose */
140 asn_TYPE_descriptor_t asn_DEF_failureDetectionResourcesToAddModList_2 = {
141         "failureDetectionResourcesToAddModList",
142         "failureDetectionResourcesToAddModList",
143         &asn_OP_SEQUENCE_OF,
144         asn_DEF_failureDetectionResourcesToAddModList_tags_2,
145         sizeof(asn_DEF_failureDetectionResourcesToAddModList_tags_2)
146                 /sizeof(asn_DEF_failureDetectionResourcesToAddModList_tags_2[0]) - 1, /* 1 */
147         asn_DEF_failureDetectionResourcesToAddModList_tags_2,   /* Same as above */
148         sizeof(asn_DEF_failureDetectionResourcesToAddModList_tags_2)
149                 /sizeof(asn_DEF_failureDetectionResourcesToAddModList_tags_2[0]), /* 2 */
150         { &asn_OER_type_failureDetectionResourcesToAddModList_constr_2, &asn_PER_type_failureDetectionResourcesToAddModList_constr_2, SEQUENCE_OF_constraint },
151         asn_MBR_failureDetectionResourcesToAddModList_2,
152         1,      /* Single element */
153         &asn_SPC_failureDetectionResourcesToAddModList_specs_2  /* Additional specs */
154 };
155
156 static asn_TYPE_member_t asn_MBR_failureDetectionResourcesToReleaseList_4[] = {
157         { ATF_POINTER, 0, 0,
158                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
159                 0,
160                 &asn_DEF_RadioLinkMonitoringRS_Id,
161                 0,
162                 { 0, 0, 0 },
163                 0, 0, /* No default value */
164                 ""
165                 },
166 };
167 static const ber_tlv_tag_t asn_DEF_failureDetectionResourcesToReleaseList_tags_4[] = {
168         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
169         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
170 };
171 static asn_SET_OF_specifics_t asn_SPC_failureDetectionResourcesToReleaseList_specs_4 = {
172         sizeof(struct RadioLinkMonitoringConfig__failureDetectionResourcesToReleaseList),
173         offsetof(struct RadioLinkMonitoringConfig__failureDetectionResourcesToReleaseList, _asn_ctx),
174         0,      /* XER encoding is XMLDelimitedItemList */
175 };
176 static /* Use -fall-defs-global to expose */
177 asn_TYPE_descriptor_t asn_DEF_failureDetectionResourcesToReleaseList_4 = {
178         "failureDetectionResourcesToReleaseList",
179         "failureDetectionResourcesToReleaseList",
180         &asn_OP_SEQUENCE_OF,
181         asn_DEF_failureDetectionResourcesToReleaseList_tags_4,
182         sizeof(asn_DEF_failureDetectionResourcesToReleaseList_tags_4)
183                 /sizeof(asn_DEF_failureDetectionResourcesToReleaseList_tags_4[0]) - 1, /* 1 */
184         asn_DEF_failureDetectionResourcesToReleaseList_tags_4,  /* Same as above */
185         sizeof(asn_DEF_failureDetectionResourcesToReleaseList_tags_4)
186                 /sizeof(asn_DEF_failureDetectionResourcesToReleaseList_tags_4[0]), /* 2 */
187         { &asn_OER_type_failureDetectionResourcesToReleaseList_constr_4, &asn_PER_type_failureDetectionResourcesToReleaseList_constr_4, SEQUENCE_OF_constraint },
188         asn_MBR_failureDetectionResourcesToReleaseList_4,
189         1,      /* Single element */
190         &asn_SPC_failureDetectionResourcesToReleaseList_specs_4 /* Additional specs */
191 };
192
193 static const asn_INTEGER_enum_map_t asn_MAP_beamFailureInstanceMaxCount_value2enum_6[] = {
194         { 0,    2,      "n1" },
195         { 1,    2,      "n2" },
196         { 2,    2,      "n3" },
197         { 3,    2,      "n4" },
198         { 4,    2,      "n5" },
199         { 5,    2,      "n6" },
200         { 6,    2,      "n8" },
201         { 7,    3,      "n10" }
202 };
203 static const unsigned int asn_MAP_beamFailureInstanceMaxCount_enum2value_6[] = {
204         0,      /* n1(0) */
205         7,      /* n10(7) */
206         1,      /* n2(1) */
207         2,      /* n3(2) */
208         3,      /* n4(3) */
209         4,      /* n5(4) */
210         5,      /* n6(5) */
211         6       /* n8(6) */
212 };
213 static const asn_INTEGER_specifics_t asn_SPC_beamFailureInstanceMaxCount_specs_6 = {
214         asn_MAP_beamFailureInstanceMaxCount_value2enum_6,       /* "tag" => N; sorted by tag */
215         asn_MAP_beamFailureInstanceMaxCount_enum2value_6,       /* N => "tag"; sorted by N */
216         8,      /* Number of elements in the maps */
217         0,      /* Enumeration is not extensible */
218         1,      /* Strict enumeration */
219         0,      /* Native long size */
220         0
221 };
222 static const ber_tlv_tag_t asn_DEF_beamFailureInstanceMaxCount_tags_6[] = {
223         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
224         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
225 };
226 static /* Use -fall-defs-global to expose */
227 asn_TYPE_descriptor_t asn_DEF_beamFailureInstanceMaxCount_6 = {
228         "beamFailureInstanceMaxCount",
229         "beamFailureInstanceMaxCount",
230         &asn_OP_NativeEnumerated,
231         asn_DEF_beamFailureInstanceMaxCount_tags_6,
232         sizeof(asn_DEF_beamFailureInstanceMaxCount_tags_6)
233                 /sizeof(asn_DEF_beamFailureInstanceMaxCount_tags_6[0]) - 1, /* 1 */
234         asn_DEF_beamFailureInstanceMaxCount_tags_6,     /* Same as above */
235         sizeof(asn_DEF_beamFailureInstanceMaxCount_tags_6)
236                 /sizeof(asn_DEF_beamFailureInstanceMaxCount_tags_6[0]), /* 2 */
237         { &asn_OER_type_beamFailureInstanceMaxCount_constr_6, &asn_PER_type_beamFailureInstanceMaxCount_constr_6, NativeEnumerated_constraint },
238         0, 0,   /* Defined elsewhere */
239         &asn_SPC_beamFailureInstanceMaxCount_specs_6    /* Additional specs */
240 };
241
242 static const asn_INTEGER_enum_map_t asn_MAP_beamFailureDetectionTimer_value2enum_15[] = {
243         { 0,    5,      "pbfd1" },
244         { 1,    5,      "pbfd2" },
245         { 2,    5,      "pbfd3" },
246         { 3,    5,      "pbfd4" },
247         { 4,    5,      "pbfd5" },
248         { 5,    5,      "pbfd6" },
249         { 6,    5,      "pbfd8" },
250         { 7,    6,      "pbfd10" }
251 };
252 static const unsigned int asn_MAP_beamFailureDetectionTimer_enum2value_15[] = {
253         0,      /* pbfd1(0) */
254         7,      /* pbfd10(7) */
255         1,      /* pbfd2(1) */
256         2,      /* pbfd3(2) */
257         3,      /* pbfd4(3) */
258         4,      /* pbfd5(4) */
259         5,      /* pbfd6(5) */
260         6       /* pbfd8(6) */
261 };
262 static const asn_INTEGER_specifics_t asn_SPC_beamFailureDetectionTimer_specs_15 = {
263         asn_MAP_beamFailureDetectionTimer_value2enum_15,        /* "tag" => N; sorted by tag */
264         asn_MAP_beamFailureDetectionTimer_enum2value_15,        /* N => "tag"; sorted by N */
265         8,      /* Number of elements in the maps */
266         0,      /* Enumeration is not extensible */
267         1,      /* Strict enumeration */
268         0,      /* Native long size */
269         0
270 };
271 static const ber_tlv_tag_t asn_DEF_beamFailureDetectionTimer_tags_15[] = {
272         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
273         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
274 };
275 static /* Use -fall-defs-global to expose */
276 asn_TYPE_descriptor_t asn_DEF_beamFailureDetectionTimer_15 = {
277         "beamFailureDetectionTimer",
278         "beamFailureDetectionTimer",
279         &asn_OP_NativeEnumerated,
280         asn_DEF_beamFailureDetectionTimer_tags_15,
281         sizeof(asn_DEF_beamFailureDetectionTimer_tags_15)
282                 /sizeof(asn_DEF_beamFailureDetectionTimer_tags_15[0]) - 1, /* 1 */
283         asn_DEF_beamFailureDetectionTimer_tags_15,      /* Same as above */
284         sizeof(asn_DEF_beamFailureDetectionTimer_tags_15)
285                 /sizeof(asn_DEF_beamFailureDetectionTimer_tags_15[0]), /* 2 */
286         { &asn_OER_type_beamFailureDetectionTimer_constr_15, &asn_PER_type_beamFailureDetectionTimer_constr_15, NativeEnumerated_constraint },
287         0, 0,   /* Defined elsewhere */
288         &asn_SPC_beamFailureDetectionTimer_specs_15     /* Additional specs */
289 };
290
291 asn_TYPE_member_t asn_MBR_RadioLinkMonitoringConfig_1[] = {
292         { ATF_POINTER, 4, offsetof(struct RadioLinkMonitoringConfig, failureDetectionResourcesToAddModList),
293                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
294                 0,
295                 &asn_DEF_failureDetectionResourcesToAddModList_2,
296                 0,
297                 { &asn_OER_memb_failureDetectionResourcesToAddModList_constr_2, &asn_PER_memb_failureDetectionResourcesToAddModList_constr_2,  memb_failureDetectionResourcesToAddModList_constraint_1 },
298                 0, 0, /* No default value */
299                 "failureDetectionResourcesToAddModList"
300                 },
301         { ATF_POINTER, 3, offsetof(struct RadioLinkMonitoringConfig, failureDetectionResourcesToReleaseList),
302                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
303                 0,
304                 &asn_DEF_failureDetectionResourcesToReleaseList_4,
305                 0,
306                 { &asn_OER_memb_failureDetectionResourcesToReleaseList_constr_4, &asn_PER_memb_failureDetectionResourcesToReleaseList_constr_4,  memb_failureDetectionResourcesToReleaseList_constraint_1 },
307                 0, 0, /* No default value */
308                 "failureDetectionResourcesToReleaseList"
309                 },
310         { ATF_POINTER, 2, offsetof(struct RadioLinkMonitoringConfig, beamFailureInstanceMaxCount),
311                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
312                 -1,     /* IMPLICIT tag at current level */
313                 &asn_DEF_beamFailureInstanceMaxCount_6,
314                 0,
315                 { 0, 0, 0 },
316                 0, 0, /* No default value */
317                 "beamFailureInstanceMaxCount"
318                 },
319         { ATF_POINTER, 1, offsetof(struct RadioLinkMonitoringConfig, beamFailureDetectionTimer),
320                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
321                 -1,     /* IMPLICIT tag at current level */
322                 &asn_DEF_beamFailureDetectionTimer_15,
323                 0,
324                 { 0, 0, 0 },
325                 0, 0, /* No default value */
326                 "beamFailureDetectionTimer"
327                 },
328 };
329 static const int asn_MAP_RadioLinkMonitoringConfig_oms_1[] = { 0, 1, 2, 3 };
330 static const ber_tlv_tag_t asn_DEF_RadioLinkMonitoringConfig_tags_1[] = {
331         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
332 };
333 static const asn_TYPE_tag2member_t asn_MAP_RadioLinkMonitoringConfig_tag2el_1[] = {
334     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* failureDetectionResourcesToAddModList */
335     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* failureDetectionResourcesToReleaseList */
336     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* beamFailureInstanceMaxCount */
337     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* beamFailureDetectionTimer */
338 };
339 asn_SEQUENCE_specifics_t asn_SPC_RadioLinkMonitoringConfig_specs_1 = {
340         sizeof(struct RadioLinkMonitoringConfig),
341         offsetof(struct RadioLinkMonitoringConfig, _asn_ctx),
342         asn_MAP_RadioLinkMonitoringConfig_tag2el_1,
343         4,      /* Count of tags in the map */
344         asn_MAP_RadioLinkMonitoringConfig_oms_1,        /* Optional members */
345         4, 0,   /* Root/Additions */
346         4,      /* First extension addition */
347 };
348 asn_TYPE_descriptor_t asn_DEF_RadioLinkMonitoringConfig = {
349         "RadioLinkMonitoringConfig",
350         "RadioLinkMonitoringConfig",
351         &asn_OP_SEQUENCE,
352         asn_DEF_RadioLinkMonitoringConfig_tags_1,
353         sizeof(asn_DEF_RadioLinkMonitoringConfig_tags_1)
354                 /sizeof(asn_DEF_RadioLinkMonitoringConfig_tags_1[0]), /* 1 */
355         asn_DEF_RadioLinkMonitoringConfig_tags_1,       /* Same as above */
356         sizeof(asn_DEF_RadioLinkMonitoringConfig_tags_1)
357                 /sizeof(asn_DEF_RadioLinkMonitoringConfig_tags_1[0]), /* 1 */
358         { 0, 0, SEQUENCE_constraint },
359         asn_MBR_RadioLinkMonitoringConfig_1,
360         4,      /* Elements count */
361         &asn_SPC_RadioLinkMonitoringConfig_specs_1      /* Additional specs */
362 };
363