[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / TypeII-Codebook.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 "TypeII-Codebook.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_parameterLx_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 >= 2 && value <= 4)) {
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 int
98 memb_maxNumberCSI_RS_PerResourceSet_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
99                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
100         long value;
101         
102         if(!sptr) {
103                 ASN__CTFAIL(app_key, td, sptr,
104                         "%s: value not given (%s:%d)",
105                         td->name, __FILE__, __LINE__);
106                 return -1;
107         }
108         
109         value = *(const long *)sptr;
110         
111         if((value >= 1 && value <= 8)) {
112                 /* Constraint check succeeded */
113                 return 0;
114         } else {
115                 ASN__CTFAIL(app_key, td, sptr,
116                         "%s: constraint failed (%s:%d)",
117                         td->name, __FILE__, __LINE__);
118                 return -1;
119         }
120 }
121
122 static asn_oer_constraints_t asn_OER_type_maxNumberTxPortsPerResource_constr_2 CC_NOTUSED = {
123         { 0, 0 },
124         -1};
125 static asn_per_constraints_t asn_PER_type_maxNumberTxPortsPerResource_constr_2 CC_NOTUSED = {
126         { APC_CONSTRAINED,       3,  3,  0,  5 }        /* (0..5) */,
127         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
128         0, 0    /* No PER value map */
129 };
130 static asn_oer_constraints_t asn_OER_type_amplitudeScalingType_constr_12 CC_NOTUSED = {
131         { 0, 0 },
132         -1};
133 static asn_per_constraints_t asn_PER_type_amplitudeScalingType_constr_12 CC_NOTUSED = {
134         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
135         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
136         0, 0    /* No PER value map */
137 };
138 static asn_oer_constraints_t asn_OER_type_amplitudeSubsetRestriction_constr_15 CC_NOTUSED = {
139         { 0, 0 },
140         -1};
141 static asn_per_constraints_t asn_PER_type_amplitudeSubsetRestriction_constr_15 CC_NOTUSED = {
142         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
143         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
144         0, 0    /* No PER value map */
145 };
146 static asn_oer_constraints_t asn_OER_memb_maxNumberResources_constr_9 CC_NOTUSED = {
147         { 1, 1 }        /* (1..64) */,
148         -1};
149 static asn_per_constraints_t asn_PER_memb_maxNumberResources_constr_9 CC_NOTUSED = {
150         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (1..64) */,
151         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
152         0, 0    /* No PER value map */
153 };
154 static asn_oer_constraints_t asn_OER_memb_totalNumberTxPorts_constr_10 CC_NOTUSED = {
155         { 2, 1 }        /* (2..256) */,
156         -1};
157 static asn_per_constraints_t asn_PER_memb_totalNumberTxPorts_constr_10 CC_NOTUSED = {
158         { APC_CONSTRAINED,       8,  8,  2,  256 }      /* (2..256) */,
159         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
160         0, 0    /* No PER value map */
161 };
162 static asn_oer_constraints_t asn_OER_memb_parameterLx_constr_11 CC_NOTUSED = {
163         { 1, 1 }        /* (2..4) */,
164         -1};
165 static asn_per_constraints_t asn_PER_memb_parameterLx_constr_11 CC_NOTUSED = {
166         { APC_CONSTRAINED,       2,  2,  2,  4 }        /* (2..4) */,
167         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
168         0, 0    /* No PER value map */
169 };
170 static asn_oer_constraints_t asn_OER_memb_maxNumberCSI_RS_PerResourceSet_constr_17 CC_NOTUSED = {
171         { 1, 1 }        /* (1..8) */,
172         -1};
173 static asn_per_constraints_t asn_PER_memb_maxNumberCSI_RS_PerResourceSet_constr_17 CC_NOTUSED = {
174         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (1..8) */,
175         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
176         0, 0    /* No PER value map */
177 };
178 static const asn_INTEGER_enum_map_t asn_MAP_maxNumberTxPortsPerResource_value2enum_2[] = {
179         { 0,    2,      "p4" },
180         { 1,    2,      "p8" },
181         { 2,    3,      "p12" },
182         { 3,    3,      "p16" },
183         { 4,    3,      "p24" },
184         { 5,    3,      "p32" }
185 };
186 static const unsigned int asn_MAP_maxNumberTxPortsPerResource_enum2value_2[] = {
187         2,      /* p12(2) */
188         3,      /* p16(3) */
189         4,      /* p24(4) */
190         5,      /* p32(5) */
191         0,      /* p4(0) */
192         1       /* p8(1) */
193 };
194 static const asn_INTEGER_specifics_t asn_SPC_maxNumberTxPortsPerResource_specs_2 = {
195         asn_MAP_maxNumberTxPortsPerResource_value2enum_2,       /* "tag" => N; sorted by tag */
196         asn_MAP_maxNumberTxPortsPerResource_enum2value_2,       /* N => "tag"; sorted by N */
197         6,      /* 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_maxNumberTxPortsPerResource_tags_2[] = {
204         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
205         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
206 };
207 static /* Use -fall-defs-global to expose */
208 asn_TYPE_descriptor_t asn_DEF_maxNumberTxPortsPerResource_2 = {
209         "maxNumberTxPortsPerResource",
210         "maxNumberTxPortsPerResource",
211         &asn_OP_NativeEnumerated,
212         asn_DEF_maxNumberTxPortsPerResource_tags_2,
213         sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2)
214                 /sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2[0]) - 1, /* 1 */
215         asn_DEF_maxNumberTxPortsPerResource_tags_2,     /* Same as above */
216         sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2)
217                 /sizeof(asn_DEF_maxNumberTxPortsPerResource_tags_2[0]), /* 2 */
218         { &asn_OER_type_maxNumberTxPortsPerResource_constr_2, &asn_PER_type_maxNumberTxPortsPerResource_constr_2, NativeEnumerated_constraint },
219         0, 0,   /* Defined elsewhere */
220         &asn_SPC_maxNumberTxPortsPerResource_specs_2    /* Additional specs */
221 };
222
223 static const asn_INTEGER_enum_map_t asn_MAP_amplitudeScalingType_value2enum_12[] = {
224         { 0,    8,      "wideband" },
225         { 1,    18,     "widebandAndSubband" }
226 };
227 static const unsigned int asn_MAP_amplitudeScalingType_enum2value_12[] = {
228         0,      /* wideband(0) */
229         1       /* widebandAndSubband(1) */
230 };
231 static const asn_INTEGER_specifics_t asn_SPC_amplitudeScalingType_specs_12 = {
232         asn_MAP_amplitudeScalingType_value2enum_12,     /* "tag" => N; sorted by tag */
233         asn_MAP_amplitudeScalingType_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_amplitudeScalingType_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_amplitudeScalingType_12 = {
246         "amplitudeScalingType",
247         "amplitudeScalingType",
248         &asn_OP_NativeEnumerated,
249         asn_DEF_amplitudeScalingType_tags_12,
250         sizeof(asn_DEF_amplitudeScalingType_tags_12)
251                 /sizeof(asn_DEF_amplitudeScalingType_tags_12[0]) - 1, /* 1 */
252         asn_DEF_amplitudeScalingType_tags_12,   /* Same as above */
253         sizeof(asn_DEF_amplitudeScalingType_tags_12)
254                 /sizeof(asn_DEF_amplitudeScalingType_tags_12[0]), /* 2 */
255         { &asn_OER_type_amplitudeScalingType_constr_12, &asn_PER_type_amplitudeScalingType_constr_12, NativeEnumerated_constraint },
256         0, 0,   /* Defined elsewhere */
257         &asn_SPC_amplitudeScalingType_specs_12  /* Additional specs */
258 };
259
260 static const asn_INTEGER_enum_map_t asn_MAP_amplitudeSubsetRestriction_value2enum_15[] = {
261         { 0,    9,      "supported" }
262 };
263 static const unsigned int asn_MAP_amplitudeSubsetRestriction_enum2value_15[] = {
264         0       /* supported(0) */
265 };
266 static const asn_INTEGER_specifics_t asn_SPC_amplitudeSubsetRestriction_specs_15 = {
267         asn_MAP_amplitudeSubsetRestriction_value2enum_15,       /* "tag" => N; sorted by tag */
268         asn_MAP_amplitudeSubsetRestriction_enum2value_15,       /* N => "tag"; sorted by N */
269         1,      /* Number of elements in the maps */
270         0,      /* Enumeration is not extensible */
271         1,      /* Strict enumeration */
272         0,      /* Native long size */
273         0
274 };
275 static const ber_tlv_tag_t asn_DEF_amplitudeSubsetRestriction_tags_15[] = {
276         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
277         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
278 };
279 static /* Use -fall-defs-global to expose */
280 asn_TYPE_descriptor_t asn_DEF_amplitudeSubsetRestriction_15 = {
281         "amplitudeSubsetRestriction",
282         "amplitudeSubsetRestriction",
283         &asn_OP_NativeEnumerated,
284         asn_DEF_amplitudeSubsetRestriction_tags_15,
285         sizeof(asn_DEF_amplitudeSubsetRestriction_tags_15)
286                 /sizeof(asn_DEF_amplitudeSubsetRestriction_tags_15[0]) - 1, /* 1 */
287         asn_DEF_amplitudeSubsetRestriction_tags_15,     /* Same as above */
288         sizeof(asn_DEF_amplitudeSubsetRestriction_tags_15)
289                 /sizeof(asn_DEF_amplitudeSubsetRestriction_tags_15[0]), /* 2 */
290         { &asn_OER_type_amplitudeSubsetRestriction_constr_15, &asn_PER_type_amplitudeSubsetRestriction_constr_15, NativeEnumerated_constraint },
291         0, 0,   /* Defined elsewhere */
292         &asn_SPC_amplitudeSubsetRestriction_specs_15    /* Additional specs */
293 };
294
295 asn_TYPE_member_t asn_MBR_TypeII_Codebook_1[] = {
296         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, maxNumberTxPortsPerResource),
297                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
298                 -1,     /* IMPLICIT tag at current level */
299                 &asn_DEF_maxNumberTxPortsPerResource_2,
300                 0,
301                 { 0, 0, 0 },
302                 0, 0, /* No default value */
303                 "maxNumberTxPortsPerResource"
304                 },
305         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, maxNumberResources),
306                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
307                 -1,     /* IMPLICIT tag at current level */
308                 &asn_DEF_NativeInteger,
309                 0,
310                 { &asn_OER_memb_maxNumberResources_constr_9, &asn_PER_memb_maxNumberResources_constr_9,  memb_maxNumberResources_constraint_1 },
311                 0, 0, /* No default value */
312                 "maxNumberResources"
313                 },
314         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, totalNumberTxPorts),
315                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
316                 -1,     /* IMPLICIT tag at current level */
317                 &asn_DEF_NativeInteger,
318                 0,
319                 { &asn_OER_memb_totalNumberTxPorts_constr_10, &asn_PER_memb_totalNumberTxPorts_constr_10,  memb_totalNumberTxPorts_constraint_1 },
320                 0, 0, /* No default value */
321                 "totalNumberTxPorts"
322                 },
323         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, parameterLx),
324                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
325                 -1,     /* IMPLICIT tag at current level */
326                 &asn_DEF_NativeInteger,
327                 0,
328                 { &asn_OER_memb_parameterLx_constr_11, &asn_PER_memb_parameterLx_constr_11,  memb_parameterLx_constraint_1 },
329                 0, 0, /* No default value */
330                 "parameterLx"
331                 },
332         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, amplitudeScalingType),
333                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
334                 -1,     /* IMPLICIT tag at current level */
335                 &asn_DEF_amplitudeScalingType_12,
336                 0,
337                 { 0, 0, 0 },
338                 0, 0, /* No default value */
339                 "amplitudeScalingType"
340                 },
341         { ATF_POINTER, 1, offsetof(struct TypeII_Codebook, amplitudeSubsetRestriction),
342                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
343                 -1,     /* IMPLICIT tag at current level */
344                 &asn_DEF_amplitudeSubsetRestriction_15,
345                 0,
346                 { 0, 0, 0 },
347                 0, 0, /* No default value */
348                 "amplitudeSubsetRestriction"
349                 },
350         { ATF_NOFLAGS, 0, offsetof(struct TypeII_Codebook, maxNumberCSI_RS_PerResourceSet),
351                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
352                 -1,     /* IMPLICIT tag at current level */
353                 &asn_DEF_NativeInteger,
354                 0,
355                 { &asn_OER_memb_maxNumberCSI_RS_PerResourceSet_constr_17, &asn_PER_memb_maxNumberCSI_RS_PerResourceSet_constr_17,  memb_maxNumberCSI_RS_PerResourceSet_constraint_1 },
356                 0, 0, /* No default value */
357                 "maxNumberCSI-RS-PerResourceSet"
358                 },
359 };
360 static const int asn_MAP_TypeII_Codebook_oms_1[] = { 5 };
361 static const ber_tlv_tag_t asn_DEF_TypeII_Codebook_tags_1[] = {
362         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
363 };
364 static const asn_TYPE_tag2member_t asn_MAP_TypeII_Codebook_tag2el_1[] = {
365     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* maxNumberTxPortsPerResource */
366     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* maxNumberResources */
367     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* totalNumberTxPorts */
368     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* parameterLx */
369     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* amplitudeScalingType */
370     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* amplitudeSubsetRestriction */
371     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* maxNumberCSI-RS-PerResourceSet */
372 };
373 asn_SEQUENCE_specifics_t asn_SPC_TypeII_Codebook_specs_1 = {
374         sizeof(struct TypeII_Codebook),
375         offsetof(struct TypeII_Codebook, _asn_ctx),
376         asn_MAP_TypeII_Codebook_tag2el_1,
377         7,      /* Count of tags in the map */
378         asn_MAP_TypeII_Codebook_oms_1,  /* Optional members */
379         1, 0,   /* Root/Additions */
380         -1,     /* First extension addition */
381 };
382 asn_TYPE_descriptor_t asn_DEF_TypeII_Codebook = {
383         "TypeII-Codebook",
384         "TypeII-Codebook",
385         &asn_OP_SEQUENCE,
386         asn_DEF_TypeII_Codebook_tags_1,
387         sizeof(asn_DEF_TypeII_Codebook_tags_1)
388                 /sizeof(asn_DEF_TypeII_Codebook_tags_1[0]), /* 1 */
389         asn_DEF_TypeII_Codebook_tags_1, /* Same as above */
390         sizeof(asn_DEF_TypeII_Codebook_tags_1)
391                 /sizeof(asn_DEF_TypeII_Codebook_tags_1[0]), /* 1 */
392         { 0, 0, SEQUENCE_constraint },
393         asn_MBR_TypeII_Codebook_1,
394         7,      /* Elements count */
395         &asn_SPC_TypeII_Codebook_specs_1        /* Additional specs */
396 };
397