[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / CSI-AssociatedReportConfigInfo.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "./22April22_Paging/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./22April22_Paging -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "CSI-AssociatedReportConfigInfo.h"
9
10 static int
11 memb_resourceSet_constraint_4(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 >= 1 && value <= 16)) {
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_qcl_info_constraint_4(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         size_t size;
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         /* Determine the number of elements */
48         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
49         
50         if((size >= 1 && size <= 16)) {
51                 /* Perform validation of the inner elements */
52                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
53         } else {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: constraint failed (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59 }
60
61 static int
62 memb_csi_SSB_ResourceSet_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
63                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
64         long value;
65         
66         if(!sptr) {
67                 ASN__CTFAIL(app_key, td, sptr,
68                         "%s: value not given (%s:%d)",
69                         td->name, __FILE__, __LINE__);
70                 return -1;
71         }
72         
73         value = *(const long *)sptr;
74         
75         if((value == 1)) {
76                 /* Constraint check succeeded */
77                 return 0;
78         } else {
79                 ASN__CTFAIL(app_key, td, sptr,
80                         "%s: constraint failed (%s:%d)",
81                         td->name, __FILE__, __LINE__);
82                 return -1;
83         }
84 }
85
86 static int
87 memb_csi_IM_ResourcesForInterference_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
88                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
89         long value;
90         
91         if(!sptr) {
92                 ASN__CTFAIL(app_key, td, sptr,
93                         "%s: value not given (%s:%d)",
94                         td->name, __FILE__, __LINE__);
95                 return -1;
96         }
97         
98         value = *(const long *)sptr;
99         
100         if((value >= 1 && value <= 16)) {
101                 /* Constraint check succeeded */
102                 return 0;
103         } else {
104                 ASN__CTFAIL(app_key, td, sptr,
105                         "%s: constraint failed (%s:%d)",
106                         td->name, __FILE__, __LINE__);
107                 return -1;
108         }
109 }
110
111 static int
112 memb_nzp_CSI_RS_ResourcesForInterference_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
113                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
114         long value;
115         
116         if(!sptr) {
117                 ASN__CTFAIL(app_key, td, sptr,
118                         "%s: value not given (%s:%d)",
119                         td->name, __FILE__, __LINE__);
120                 return -1;
121         }
122         
123         value = *(const long *)sptr;
124         
125         if((value >= 1 && value <= 16)) {
126                 /* Constraint check succeeded */
127                 return 0;
128         } else {
129                 ASN__CTFAIL(app_key, td, sptr,
130                         "%s: constraint failed (%s:%d)",
131                         td->name, __FILE__, __LINE__);
132                 return -1;
133         }
134 }
135
136 static asn_oer_constraints_t asn_OER_type_qcl_info_constr_6 CC_NOTUSED = {
137         { 0, 0 },
138         -1      /* (SIZE(1..16)) */};
139 static asn_per_constraints_t asn_PER_type_qcl_info_constr_6 CC_NOTUSED = {
140         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
141         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
142         0, 0    /* No PER value map */
143 };
144 static asn_oer_constraints_t asn_OER_memb_resourceSet_constr_5 CC_NOTUSED = {
145         { 1, 1 }        /* (1..16) */,
146         -1};
147 static asn_per_constraints_t asn_PER_memb_resourceSet_constr_5 CC_NOTUSED = {
148         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (1..16) */,
149         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
150         0, 0    /* No PER value map */
151 };
152 static asn_oer_constraints_t asn_OER_memb_qcl_info_constr_6 CC_NOTUSED = {
153         { 0, 0 },
154         -1      /* (SIZE(1..16)) */};
155 static asn_per_constraints_t asn_PER_memb_qcl_info_constr_6 CC_NOTUSED = {
156         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
157         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
158         0, 0    /* No PER value map */
159 };
160 static asn_oer_constraints_t asn_OER_memb_csi_SSB_ResourceSet_constr_8 CC_NOTUSED = {
161         { 1, 1 }        /* (1..1) */,
162         -1};
163 static asn_per_constraints_t asn_PER_memb_csi_SSB_ResourceSet_constr_8 CC_NOTUSED = {
164         { APC_CONSTRAINED,       0,  0,  1,  1 }        /* (1..1) */,
165         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
166         0, 0    /* No PER value map */
167 };
168 static asn_oer_constraints_t asn_OER_type_resourcesForChannel_constr_3 CC_NOTUSED = {
169         { 0, 0 },
170         -1};
171 static asn_per_constraints_t asn_PER_type_resourcesForChannel_constr_3 CC_NOTUSED = {
172         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
173         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
174         0, 0    /* No PER value map */
175 };
176 static asn_oer_constraints_t asn_OER_memb_csi_IM_ResourcesForInterference_constr_9 CC_NOTUSED = {
177         { 1, 1 }        /* (1..16) */,
178         -1};
179 static asn_per_constraints_t asn_PER_memb_csi_IM_ResourcesForInterference_constr_9 CC_NOTUSED = {
180         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (1..16) */,
181         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
182         0, 0    /* No PER value map */
183 };
184 static asn_oer_constraints_t asn_OER_memb_nzp_CSI_RS_ResourcesForInterference_constr_10 CC_NOTUSED = {
185         { 1, 1 }        /* (1..16) */,
186         -1};
187 static asn_per_constraints_t asn_PER_memb_nzp_CSI_RS_ResourcesForInterference_constr_10 CC_NOTUSED = {
188         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (1..16) */,
189         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
190         0, 0    /* No PER value map */
191 };
192 static asn_TYPE_member_t asn_MBR_qcl_info_6[] = {
193         { ATF_POINTER, 0, 0,
194                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
195                 0,
196                 &asn_DEF_TCI_StateId,
197                 0,
198                 { 0, 0, 0 },
199                 0, 0, /* No default value */
200                 ""
201                 },
202 };
203 static const ber_tlv_tag_t asn_DEF_qcl_info_tags_6[] = {
204         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
205         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
206 };
207 static asn_SET_OF_specifics_t asn_SPC_qcl_info_specs_6 = {
208         sizeof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS__qcl_info),
209         offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS__qcl_info, _asn_ctx),
210         0,      /* XER encoding is XMLDelimitedItemList */
211 };
212 static /* Use -fall-defs-global to expose */
213 asn_TYPE_descriptor_t asn_DEF_qcl_info_6 = {
214         "qcl-info",
215         "qcl-info",
216         &asn_OP_SEQUENCE_OF,
217         asn_DEF_qcl_info_tags_6,
218         sizeof(asn_DEF_qcl_info_tags_6)
219                 /sizeof(asn_DEF_qcl_info_tags_6[0]) - 1, /* 1 */
220         asn_DEF_qcl_info_tags_6,        /* Same as above */
221         sizeof(asn_DEF_qcl_info_tags_6)
222                 /sizeof(asn_DEF_qcl_info_tags_6[0]), /* 2 */
223         { &asn_OER_type_qcl_info_constr_6, &asn_PER_type_qcl_info_constr_6, SEQUENCE_OF_constraint },
224         asn_MBR_qcl_info_6,
225         1,      /* Single element */
226         &asn_SPC_qcl_info_specs_6       /* Additional specs */
227 };
228
229 static asn_TYPE_member_t asn_MBR_nzp_CSI_RS_4[] = {
230         { ATF_NOFLAGS, 0, offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS, resourceSet),
231                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
232                 -1,     /* IMPLICIT tag at current level */
233                 &asn_DEF_NativeInteger,
234                 0,
235                 { &asn_OER_memb_resourceSet_constr_5, &asn_PER_memb_resourceSet_constr_5,  memb_resourceSet_constraint_4 },
236                 0, 0, /* No default value */
237                 "resourceSet"
238                 },
239         { ATF_POINTER, 1, offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS, qcl_info),
240                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
241                 0,
242                 &asn_DEF_qcl_info_6,
243                 0,
244                 { &asn_OER_memb_qcl_info_constr_6, &asn_PER_memb_qcl_info_constr_6,  memb_qcl_info_constraint_4 },
245                 0, 0, /* No default value */
246                 "qcl-info"
247                 },
248 };
249 static const int asn_MAP_nzp_CSI_RS_oms_4[] = { 1 };
250 static const ber_tlv_tag_t asn_DEF_nzp_CSI_RS_tags_4[] = {
251         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
252         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
253 };
254 static const asn_TYPE_tag2member_t asn_MAP_nzp_CSI_RS_tag2el_4[] = {
255     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* resourceSet */
256     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* qcl-info */
257 };
258 static asn_SEQUENCE_specifics_t asn_SPC_nzp_CSI_RS_specs_4 = {
259         sizeof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS),
260         offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel__nzp_CSI_RS, _asn_ctx),
261         asn_MAP_nzp_CSI_RS_tag2el_4,
262         2,      /* Count of tags in the map */
263         asn_MAP_nzp_CSI_RS_oms_4,       /* Optional members */
264         1, 0,   /* Root/Additions */
265         -1,     /* First extension addition */
266 };
267 static /* Use -fall-defs-global to expose */
268 asn_TYPE_descriptor_t asn_DEF_nzp_CSI_RS_4 = {
269         "nzp-CSI-RS",
270         "nzp-CSI-RS",
271         &asn_OP_SEQUENCE,
272         asn_DEF_nzp_CSI_RS_tags_4,
273         sizeof(asn_DEF_nzp_CSI_RS_tags_4)
274                 /sizeof(asn_DEF_nzp_CSI_RS_tags_4[0]) - 1, /* 1 */
275         asn_DEF_nzp_CSI_RS_tags_4,      /* Same as above */
276         sizeof(asn_DEF_nzp_CSI_RS_tags_4)
277                 /sizeof(asn_DEF_nzp_CSI_RS_tags_4[0]), /* 2 */
278         { 0, 0, SEQUENCE_constraint },
279         asn_MBR_nzp_CSI_RS_4,
280         2,      /* Elements count */
281         &asn_SPC_nzp_CSI_RS_specs_4     /* Additional specs */
282 };
283
284 static asn_TYPE_member_t asn_MBR_resourcesForChannel_3[] = {
285         { ATF_POINTER, 0, offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel, choice.nzp_CSI_RS),
286                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
287                 0,
288                 &asn_DEF_nzp_CSI_RS_4,
289                 0,
290                 { 0, 0, 0 },
291                 0, 0, /* No default value */
292                 "nzp-CSI-RS"
293                 },
294         { ATF_NOFLAGS, 0, offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel, choice.csi_SSB_ResourceSet),
295                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
296                 -1,     /* IMPLICIT tag at current level */
297                 &asn_DEF_NativeInteger,
298                 0,
299                 { &asn_OER_memb_csi_SSB_ResourceSet_constr_8, &asn_PER_memb_csi_SSB_ResourceSet_constr_8,  memb_csi_SSB_ResourceSet_constraint_3 },
300                 0, 0, /* No default value */
301                 "csi-SSB-ResourceSet"
302                 },
303 };
304 static const asn_TYPE_tag2member_t asn_MAP_resourcesForChannel_tag2el_3[] = {
305     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nzp-CSI-RS */
306     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* csi-SSB-ResourceSet */
307 };
308 static asn_CHOICE_specifics_t asn_SPC_resourcesForChannel_specs_3 = {
309         sizeof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel),
310         offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel, _asn_ctx),
311         offsetof(struct CSI_AssociatedReportConfigInfo__resourcesForChannel, present),
312         sizeof(((struct CSI_AssociatedReportConfigInfo__resourcesForChannel *)0)->present),
313         asn_MAP_resourcesForChannel_tag2el_3,
314         2,      /* Count of tags in the map */
315         0, 0,
316         -1      /* Extensions start */
317 };
318 static /* Use -fall-defs-global to expose */
319 asn_TYPE_descriptor_t asn_DEF_resourcesForChannel_3 = {
320         "resourcesForChannel",
321         "resourcesForChannel",
322         &asn_OP_CHOICE,
323         0,      /* No effective tags (pointer) */
324         0,      /* No effective tags (count) */
325         0,      /* No tags (pointer) */
326         0,      /* No tags (count) */
327         { &asn_OER_type_resourcesForChannel_constr_3, &asn_PER_type_resourcesForChannel_constr_3, CHOICE_constraint },
328         asn_MBR_resourcesForChannel_3,
329         2,      /* Elements count */
330         &asn_SPC_resourcesForChannel_specs_3    /* Additional specs */
331 };
332
333 asn_TYPE_member_t asn_MBR_CSI_AssociatedReportConfigInfo_1[] = {
334         { ATF_NOFLAGS, 0, offsetof(struct CSI_AssociatedReportConfigInfo, reportConfigId),
335                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
336                 -1,     /* IMPLICIT tag at current level */
337                 &asn_DEF_CSI_ReportConfigId,
338                 0,
339                 { 0, 0, 0 },
340                 0, 0, /* No default value */
341                 "reportConfigId"
342                 },
343         { ATF_NOFLAGS, 0, offsetof(struct CSI_AssociatedReportConfigInfo, resourcesForChannel),
344                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
345                 +1,     /* EXPLICIT tag at current level */
346                 &asn_DEF_resourcesForChannel_3,
347                 0,
348                 { 0, 0, 0 },
349                 0, 0, /* No default value */
350                 "resourcesForChannel"
351                 },
352         { ATF_POINTER, 2, offsetof(struct CSI_AssociatedReportConfigInfo, csi_IM_ResourcesForInterference),
353                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
354                 -1,     /* IMPLICIT tag at current level */
355                 &asn_DEF_NativeInteger,
356                 0,
357                 { &asn_OER_memb_csi_IM_ResourcesForInterference_constr_9, &asn_PER_memb_csi_IM_ResourcesForInterference_constr_9,  memb_csi_IM_ResourcesForInterference_constraint_1 },
358                 0, 0, /* No default value */
359                 "csi-IM-ResourcesForInterference"
360                 },
361         { ATF_POINTER, 1, offsetof(struct CSI_AssociatedReportConfigInfo, nzp_CSI_RS_ResourcesForInterference),
362                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
363                 -1,     /* IMPLICIT tag at current level */
364                 &asn_DEF_NativeInteger,
365                 0,
366                 { &asn_OER_memb_nzp_CSI_RS_ResourcesForInterference_constr_10, &asn_PER_memb_nzp_CSI_RS_ResourcesForInterference_constr_10,  memb_nzp_CSI_RS_ResourcesForInterference_constraint_1 },
367                 0, 0, /* No default value */
368                 "nzp-CSI-RS-ResourcesForInterference"
369                 },
370 };
371 static const int asn_MAP_CSI_AssociatedReportConfigInfo_oms_1[] = { 2, 3 };
372 static const ber_tlv_tag_t asn_DEF_CSI_AssociatedReportConfigInfo_tags_1[] = {
373         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
374 };
375 static const asn_TYPE_tag2member_t asn_MAP_CSI_AssociatedReportConfigInfo_tag2el_1[] = {
376     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* reportConfigId */
377     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* resourcesForChannel */
378     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* csi-IM-ResourcesForInterference */
379     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* nzp-CSI-RS-ResourcesForInterference */
380 };
381 asn_SEQUENCE_specifics_t asn_SPC_CSI_AssociatedReportConfigInfo_specs_1 = {
382         sizeof(struct CSI_AssociatedReportConfigInfo),
383         offsetof(struct CSI_AssociatedReportConfigInfo, _asn_ctx),
384         asn_MAP_CSI_AssociatedReportConfigInfo_tag2el_1,
385         4,      /* Count of tags in the map */
386         asn_MAP_CSI_AssociatedReportConfigInfo_oms_1,   /* Optional members */
387         2, 0,   /* Root/Additions */
388         4,      /* First extension addition */
389 };
390 asn_TYPE_descriptor_t asn_DEF_CSI_AssociatedReportConfigInfo = {
391         "CSI-AssociatedReportConfigInfo",
392         "CSI-AssociatedReportConfigInfo",
393         &asn_OP_SEQUENCE,
394         asn_DEF_CSI_AssociatedReportConfigInfo_tags_1,
395         sizeof(asn_DEF_CSI_AssociatedReportConfigInfo_tags_1)
396                 /sizeof(asn_DEF_CSI_AssociatedReportConfigInfo_tags_1[0]), /* 1 */
397         asn_DEF_CSI_AssociatedReportConfigInfo_tags_1,  /* Same as above */
398         sizeof(asn_DEF_CSI_AssociatedReportConfigInfo_tags_1)
399                 /sizeof(asn_DEF_CSI_AssociatedReportConfigInfo_tags_1[0]), /* 1 */
400         { 0, 0, SEQUENCE_constraint },
401         asn_MBR_CSI_AssociatedReportConfigInfo_1,
402         4,      /* Elements count */
403         &asn_SPC_CSI_AssociatedReportConfigInfo_specs_1 /* Additional specs */
404 };
405