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