[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / TypeI-MultiPanelCodebook.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 "TypeI-MultiPanelCodebook.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 /*
15  * This type is implemented using NativeEnumerated,
16  * so here we adjust the DEF accordingly.
17  */
18 /*
19  * This type is implemented using NativeEnumerated,
20  * so here we adjust the DEF accordingly.
21  */
22 static int
23 memb_maxNumberResources_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
24                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
25         long value;
26         
27         if(!sptr) {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: value not given (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33         
34         value = *(const long *)sptr;
35         
36         if((value >= 1 && value <= 64)) {
37                 /* Constraint check succeeded */
38                 return 0;
39         } else {
40                 ASN__CTFAIL(app_key, td, sptr,
41                         "%s: constraint failed (%s:%d)",
42                         td->name, __FILE__, __LINE__);
43                 return -1;
44         }
45 }
46
47 static int
48 memb_totalNumberTxPorts_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
49                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
50         long value;
51         
52         if(!sptr) {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: value not given (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58         
59         value = *(const long *)sptr;
60         
61         if((value >= 2 && value <= 256)) {
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 int
73 memb_maxNumberCSI_RS_PerResourceSet_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
74                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
75         long value;
76         
77         if(!sptr) {
78                 ASN__CTFAIL(app_key, td, sptr,
79                         "%s: value not given (%s:%d)",
80                         td->name, __FILE__, __LINE__);
81                 return -1;
82         }
83         
84         value = *(const long *)sptr;
85         
86         if((value >= 1 && value <= 8)) {
87                 /* Constraint check succeeded */
88                 return 0;
89         } else {
90                 ASN__CTFAIL(app_key, td, sptr,
91                         "%s: constraint failed (%s:%d)",
92                         td->name, __FILE__, __LINE__);
93                 return -1;
94         }
95 }
96
97 static asn_oer_constraints_t asn_OER_type_maxNumberTxPortsPerResource_constr_2 CC_NOTUSED = {
98         { 0, 0 },
99         -1};
100 static asn_per_constraints_t asn_PER_type_maxNumberTxPortsPerResource_constr_2 CC_NOTUSED = {
101         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
103         0, 0    /* No PER value map */
104 };
105 static asn_oer_constraints_t asn_OER_type_supportedCodebookMode_constr_8 CC_NOTUSED = {
106         { 0, 0 },
107         -1};
108 static asn_per_constraints_t asn_PER_type_supportedCodebookMode_constr_8 CC_NOTUSED = {
109         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         0, 0    /* No PER value map */
112 };
113 static asn_oer_constraints_t asn_OER_type_supportedNumberPanels_constr_12 CC_NOTUSED = {
114         { 0, 0 },
115         -1};
116 static asn_per_constraints_t asn_PER_type_supportedNumberPanels_constr_12 CC_NOTUSED = {
117         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 static asn_oer_constraints_t asn_OER_memb_maxNumberResources_constr_6 CC_NOTUSED = {
122         { 1, 1 }        /* (1..64) */,
123         -1};
124 static asn_per_constraints_t asn_PER_memb_maxNumberResources_constr_6 CC_NOTUSED = {
125         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (1..64) */,
126         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
127         0, 0    /* No PER value map */
128 };
129 static asn_oer_constraints_t asn_OER_memb_totalNumberTxPorts_constr_7 CC_NOTUSED = {
130         { 2, 1 }        /* (2..256) */,
131         -1};
132 static asn_per_constraints_t asn_PER_memb_totalNumberTxPorts_constr_7 CC_NOTUSED = {
133         { APC_CONSTRAINED,       8,  8,  2,  256 }      /* (2..256) */,
134         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
135         0, 0    /* No PER value map */
136 };
137 static asn_oer_constraints_t asn_OER_memb_maxNumberCSI_RS_PerResourceSet_constr_15 CC_NOTUSED = {
138         { 1, 1 }        /* (1..8) */,
139         -1};
140 static asn_per_constraints_t asn_PER_memb_maxNumberCSI_RS_PerResourceSet_constr_15 CC_NOTUSED = {
141         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (1..8) */,
142         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
143         0, 0    /* No PER value map */
144 };
145 static const asn_INTEGER_enum_map_t asn_MAP_maxNumberTxPortsPerResource_value2enum_2[] = {
146         { 0,    2,      "p8" },
147         { 1,    3,      "p16" },
148         { 2,    3,      "p32" }
149 };
150 static const unsigned int asn_MAP_maxNumberTxPortsPerResource_enum2value_2[] = {
151         1,      /* p16(1) */
152         2,      /* p32(2) */
153         0       /* p8(0) */
154 };
155 static const asn_INTEGER_specifics_t asn_SPC_maxNumberTxPortsPerResource_specs_2 = {
156         asn_MAP_maxNumberTxPortsPerResource_value2enum_2,       /* "tag" => N; sorted by tag */
157         asn_MAP_maxNumberTxPortsPerResource_enum2value_2,       /* N => "tag"; sorted by N */
158         3,      /* Number of elements in the maps */
159         0,      /* Enumeration is not extensible */
160         1,      /* Strict enumeration */
161         0,      /* Native long size */
162         0
163 };
164 static const ber_tlv_tag_t asn_DEF_maxNumberTxPortsPerResource_tags_2[] = {
165         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
166         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
167 };
168 static /* Use -fall-defs-global to expose */
169 asn_TYPE_descriptor_t asn_DEF_maxNumberTxPortsPerResource_2 = {
170         "maxNumberTxPortsPerResource",
171         "maxNumberTxPortsPerResource",
172         &asn_OP_NativeEnumerated,
173         asn_DEF_maxNumberTxPortsPerResource_tags_2,
174         sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2)
175                 /sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2[0]) - 1, /* 1 */
176         asn_DEF_maxNumberTxPortsPerResource_tags_2,     /* Same as above */
177         sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2)
178                 /sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2[0]), /* 2 */
179         { &asn_OER_type_maxNumberTxPortsPerResource_constr_2, &asn_PER_type_maxNumberTxPortsPerResource_constr_2, NativeEnumerated_constraint },
180         0, 0,   /* Defined elsewhere */
181         &asn_SPC_maxNumberTxPortsPerResource_specs_2    /* Additional specs */
182 };
183
184 static const asn_INTEGER_enum_map_t asn_MAP_supportedCodebookMode_value2enum_8[] = {
185         { 0,    5,      "mode1" },
186         { 1,    5,      "mode2" },
187         { 2,    4,      "both" }
188 };
189 static const unsigned int asn_MAP_supportedCodebookMode_enum2value_8[] = {
190         2,      /* both(2) */
191         0,      /* mode1(0) */
192         1       /* mode2(1) */
193 };
194 static const asn_INTEGER_specifics_t asn_SPC_supportedCodebookMode_specs_8 = {
195         asn_MAP_supportedCodebookMode_value2enum_8,     /* "tag" => N; sorted by tag */
196         asn_MAP_supportedCodebookMode_enum2value_8,     /* N => "tag"; sorted by N */
197         3,      /* Number of elements in the maps */
198         0,      /* Enumeration is not extensible */
199         1,      /* Strict enumeration */
200         0,      /* Native long size */
201         0
202 };
203 static const ber_tlv_tag_t asn_DEF_supportedCodebookMode_tags_8[] = {
204         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
205         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
206 };
207 static /* Use -fall-defs-global to expose */
208 asn_TYPE_descriptor_t asn_DEF_supportedCodebookMode_8 = {
209         "supportedCodebookMode",
210         "supportedCodebookMode",
211         &asn_OP_NativeEnumerated,
212         asn_DEF_supportedCodebookMode_tags_8,
213         sizeof(asn_DEF_supportedCodebookMode_tags_8)
214                 /sizeof(asn_DEF_supportedCodebookMode_tags_8[0]) - 1, /* 1 */
215         asn_DEF_supportedCodebookMode_tags_8,   /* Same as above */
216         sizeof(asn_DEF_supportedCodebookMode_tags_8)
217                 /sizeof(asn_DEF_supportedCodebookMode_tags_8[0]), /* 2 */
218         { &asn_OER_type_supportedCodebookMode_constr_8, &asn_PER_type_supportedCodebookMode_constr_8, NativeEnumerated_constraint },
219         0, 0,   /* Defined elsewhere */
220         &asn_SPC_supportedCodebookMode_specs_8  /* Additional specs */
221 };
222
223 static const asn_INTEGER_enum_map_t asn_MAP_supportedNumberPanels_value2enum_12[] = {
224         { 0,    2,      "n2" },
225         { 1,    2,      "n4" }
226 };
227 static const unsigned int asn_MAP_supportedNumberPanels_enum2value_12[] = {
228         0,      /* n2(0) */
229         1       /* n4(1) */
230 };
231 static const asn_INTEGER_specifics_t asn_SPC_supportedNumberPanels_specs_12 = {
232         asn_MAP_supportedNumberPanels_value2enum_12,    /* "tag" => N; sorted by tag */
233         asn_MAP_supportedNumberPanels_enum2value_12,    /* N => "tag"; sorted by N */
234         2,      /* Number of elements in the maps */
235         0,      /* Enumeration is not extensible */
236         1,      /* Strict enumeration */
237         0,      /* Native long size */
238         0
239 };
240 static const ber_tlv_tag_t asn_DEF_supportedNumberPanels_tags_12[] = {
241         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
242         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
243 };
244 static /* Use -fall-defs-global to expose */
245 asn_TYPE_descriptor_t asn_DEF_supportedNumberPanels_12 = {
246         "supportedNumberPanels",
247         "supportedNumberPanels",
248         &asn_OP_NativeEnumerated,
249         asn_DEF_supportedNumberPanels_tags_12,
250         sizeof(asn_DEF_supportedNumberPanels_tags_12)
251                 /sizeof(asn_DEF_supportedNumberPanels_tags_12[0]) - 1, /* 1 */
252         asn_DEF_supportedNumberPanels_tags_12,  /* Same as above */
253         sizeof(asn_DEF_supportedNumberPanels_tags_12)
254                 /sizeof(asn_DEF_supportedNumberPanels_tags_12[0]), /* 2 */
255         { &asn_OER_type_supportedNumberPanels_constr_12, &asn_PER_type_supportedNumberPanels_constr_12, NativeEnumerated_constraint },
256         0, 0,   /* Defined elsewhere */
257         &asn_SPC_supportedNumberPanels_specs_12 /* Additional specs */
258 };
259
260 asn_TYPE_member_t asn_MBR_TypeI_MultiPanelCodebook_1[] = {
261         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, maxNumberTxPortsPerResource),
262                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
263                 -1,     /* IMPLICIT tag at current level */
264                 &asn_DEF_maxNumberTxPortsPerResource_2,
265                 0,
266                 { 0, 0, 0 },
267                 0, 0, /* No default value */
268                 "maxNumberTxPortsPerResource"
269                 },
270         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, maxNumberResources),
271                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
272                 -1,     /* IMPLICIT tag at current level */
273                 &asn_DEF_NativeInteger,
274                 0,
275                 { &asn_OER_memb_maxNumberResources_constr_6, &asn_PER_memb_maxNumberResources_constr_6,  memb_maxNumberResources_constraint_1 },
276                 0, 0, /* No default value */
277                 "maxNumberResources"
278                 },
279         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, totalNumberTxPorts),
280                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
281                 -1,     /* IMPLICIT tag at current level */
282                 &asn_DEF_NativeInteger,
283                 0,
284                 { &asn_OER_memb_totalNumberTxPorts_constr_7, &asn_PER_memb_totalNumberTxPorts_constr_7,  memb_totalNumberTxPorts_constraint_1 },
285                 0, 0, /* No default value */
286                 "totalNumberTxPorts"
287                 },
288         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, supportedCodebookMode),
289                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
290                 -1,     /* IMPLICIT tag at current level */
291                 &asn_DEF_supportedCodebookMode_8,
292                 0,
293                 { 0, 0, 0 },
294                 0, 0, /* No default value */
295                 "supportedCodebookMode"
296                 },
297         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, supportedNumberPanels),
298                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
299                 -1,     /* IMPLICIT tag at current level */
300                 &asn_DEF_supportedNumberPanels_12,
301                 0,
302                 { 0, 0, 0 },
303                 0, 0, /* No default value */
304                 "supportedNumberPanels"
305                 },
306         { ATF_NOFLAGS, 0, offsetof(struct TypeI_MultiPanelCodebook, maxNumberCSI_RS_PerResourceSet),
307                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
308                 -1,     /* IMPLICIT tag at current level */
309                 &asn_DEF_NativeInteger,
310                 0,
311                 { &asn_OER_memb_maxNumberCSI_RS_PerResourceSet_constr_15, &asn_PER_memb_maxNumberCSI_RS_PerResourceSet_constr_15,  memb_maxNumberCSI_RS_PerResourceSet_constraint_1 },
312                 0, 0, /* No default value */
313                 "maxNumberCSI-RS-PerResourceSet"
314                 },
315 };
316 static const ber_tlv_tag_t asn_DEF_TypeI_MultiPanelCodebook_tags_1[] = {
317         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
318 };
319 static const asn_TYPE_tag2member_t asn_MAP_TypeI_MultiPanelCodebook_tag2el_1[] = {
320     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* maxNumberTxPortsPerResource */
321     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* maxNumberResources */
322     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* totalNumberTxPorts */
323     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* supportedCodebookMode */
324     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* supportedNumberPanels */
325     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* maxNumberCSI-RS-PerResourceSet */
326 };
327 asn_SEQUENCE_specifics_t asn_SPC_TypeI_MultiPanelCodebook_specs_1 = {
328         sizeof(struct TypeI_MultiPanelCodebook),
329         offsetof(struct TypeI_MultiPanelCodebook, _asn_ctx),
330         asn_MAP_TypeI_MultiPanelCodebook_tag2el_1,
331         6,      /* Count of tags in the map */
332         0, 0, 0,        /* Optional elements (not needed) */
333         -1,     /* First extension addition */
334 };
335 asn_TYPE_descriptor_t asn_DEF_TypeI_MultiPanelCodebook = {
336         "TypeI-MultiPanelCodebook",
337         "TypeI-MultiPanelCodebook",
338         &asn_OP_SEQUENCE,
339         asn_DEF_TypeI_MultiPanelCodebook_tags_1,
340         sizeof(asn_DEF_TypeI_MultiPanelCodebook_tags_1)
341                 /sizeof(asn_DEF_TypeI_MultiPanelCodebook_tags_1[0]), /* 1 */
342         asn_DEF_TypeI_MultiPanelCodebook_tags_1,        /* Same as above */
343         sizeof(asn_DEF_TypeI_MultiPanelCodebook_tags_1)
344                 /sizeof(asn_DEF_TypeI_MultiPanelCodebook_tags_1[0]), /* 1 */
345         { 0, 0, SEQUENCE_constraint },
346         asn_MBR_TypeI_MultiPanelCodebook_1,
347         6,      /* Elements count */
348         &asn_SPC_TypeI_MultiPanelCodebook_specs_1       /* Additional specs */
349 };
350