8a87b336d7f114554ccb17d7408fcf1cc3574078
[o-du/l2.git] / src / codec_utils / RRC / PDSCH-ServingCellConfig.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "/home/labadmin/hlal/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./15_3_rrc/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "PDSCH-ServingCellConfig.h"
9
10 #include "PDSCH-CodeBlockGroupTransmission.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_maxMIMO_Layers_constraint_18(const asn_TYPE_descriptor_t *td, const void *sptr,
21                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
22         long value;
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         value = *(const long *)sptr;
32         
33         if((value >= 1 && value <= 8)) {
34                 /* Constraint check succeeded */
35                 return 0;
36         } else {
37                 ASN__CTFAIL(app_key, td, sptr,
38                         "%s: constraint failed (%s:%d)",
39                         td->name, __FILE__, __LINE__);
40                 return -1;
41         }
42 }
43
44 static asn_oer_constraints_t asn_OER_type_codeBlockGroupTransmission_constr_2 CC_NOTUSED = {
45         { 0, 0 },
46         -1};
47 static asn_per_constraints_t asn_PER_type_codeBlockGroupTransmission_constr_2 CC_NOTUSED = {
48         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
49         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
50         0, 0    /* No PER value map */
51 };
52 static asn_oer_constraints_t asn_OER_type_xOverhead_constr_5 CC_NOTUSED = {
53         { 0, 0 },
54         -1};
55 static asn_per_constraints_t asn_PER_type_xOverhead_constr_5 CC_NOTUSED = {
56         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
57         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
58         0, 0    /* No PER value map */
59 };
60 static asn_oer_constraints_t asn_OER_type_nrofHARQ_ProcessesForPDSCH_constr_9 CC_NOTUSED = {
61         { 0, 0 },
62         -1};
63 static asn_per_constraints_t asn_PER_type_nrofHARQ_ProcessesForPDSCH_constr_9 CC_NOTUSED = {
64         { APC_CONSTRAINED,       3,  3,  0,  5 }        /* (0..5) */,
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         0, 0    /* No PER value map */
67 };
68 static asn_oer_constraints_t asn_OER_memb_maxMIMO_Layers_constr_19 CC_NOTUSED = {
69         { 1, 1 }        /* (1..8) */,
70         -1};
71 static asn_per_constraints_t asn_PER_memb_maxMIMO_Layers_constr_19 CC_NOTUSED = {
72         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (1..8) */,
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         0, 0    /* No PER value map */
75 };
76 static asn_TYPE_member_t asn_MBR_codeBlockGroupTransmission_2[] = {
77         { ATF_NOFLAGS, 0, offsetof(struct PDSCH_ServingCellConfig__codeBlockGroupTransmission, choice.release),
78                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
79                 -1,     /* IMPLICIT tag at current level */
80                 &asn_DEF_NULL,
81                 0,
82                 { 0, 0, 0 },
83                 0, 0, /* No default value */
84                 "release"
85                 },
86         { ATF_POINTER, 0, offsetof(struct PDSCH_ServingCellConfig__codeBlockGroupTransmission, choice.setup),
87                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
88                 -1,     /* IMPLICIT tag at current level */
89                 &asn_DEF_PDSCH_CodeBlockGroupTransmission,
90                 0,
91                 { 0, 0, 0 },
92                 0, 0, /* No default value */
93                 "setup"
94                 },
95 };
96 static const asn_TYPE_tag2member_t asn_MAP_codeBlockGroupTransmission_tag2el_2[] = {
97     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* release */
98     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* setup */
99 };
100 static asn_CHOICE_specifics_t asn_SPC_codeBlockGroupTransmission_specs_2 = {
101         sizeof(struct PDSCH_ServingCellConfig__codeBlockGroupTransmission),
102         offsetof(struct PDSCH_ServingCellConfig__codeBlockGroupTransmission, _asn_ctx),
103         offsetof(struct PDSCH_ServingCellConfig__codeBlockGroupTransmission, present),
104         sizeof(((struct PDSCH_ServingCellConfig__codeBlockGroupTransmission *)0)->present),
105         asn_MAP_codeBlockGroupTransmission_tag2el_2,
106         2,      /* Count of tags in the map */
107         0, 0,
108         -1      /* Extensions start */
109 };
110 static /* Use -fall-defs-global to expose */
111 asn_TYPE_descriptor_t asn_DEF_codeBlockGroupTransmission_2 = {
112         "codeBlockGroupTransmission",
113         "codeBlockGroupTransmission",
114         &asn_OP_CHOICE,
115         0,      /* No effective tags (pointer) */
116         0,      /* No effective tags (count) */
117         0,      /* No tags (pointer) */
118         0,      /* No tags (count) */
119         { &asn_OER_type_codeBlockGroupTransmission_constr_2, &asn_PER_type_codeBlockGroupTransmission_constr_2, CHOICE_constraint },
120         asn_MBR_codeBlockGroupTransmission_2,
121         2,      /* Elements count */
122         &asn_SPC_codeBlockGroupTransmission_specs_2     /* Additional specs */
123 };
124
125 static const asn_INTEGER_enum_map_t asn_MAP_xOverhead_value2enum_5[] = {
126         { 0,    4,      "xOh6" },
127         { 1,    5,      "xOh12" },
128         { 2,    5,      "xOh18" }
129 };
130 static const unsigned int asn_MAP_xOverhead_enum2value_5[] = {
131         1,      /* xOh12(1) */
132         2,      /* xOh18(2) */
133         0       /* xOh6(0) */
134 };
135 static const asn_INTEGER_specifics_t asn_SPC_xOverhead_specs_5 = {
136         asn_MAP_xOverhead_value2enum_5, /* "tag" => N; sorted by tag */
137         asn_MAP_xOverhead_enum2value_5, /* N => "tag"; sorted by N */
138         3,      /* Number of elements in the maps */
139         0,      /* Enumeration is not extensible */
140         1,      /* Strict enumeration */
141         0,      /* Native long size */
142         0
143 };
144 static const ber_tlv_tag_t asn_DEF_xOverhead_tags_5[] = {
145         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
146         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
147 };
148 static /* Use -fall-defs-global to expose */
149 asn_TYPE_descriptor_t asn_DEF_xOverhead_5 = {
150         "xOverhead",
151         "xOverhead",
152         &asn_OP_NativeEnumerated,
153         asn_DEF_xOverhead_tags_5,
154         sizeof(asn_DEF_xOverhead_tags_5)
155                 /sizeof(asn_DEF_xOverhead_tags_5[0]) - 1, /* 1 */
156         asn_DEF_xOverhead_tags_5,       /* Same as above */
157         sizeof(asn_DEF_xOverhead_tags_5)
158                 /sizeof(asn_DEF_xOverhead_tags_5[0]), /* 2 */
159         { &asn_OER_type_xOverhead_constr_5, &asn_PER_type_xOverhead_constr_5, NativeEnumerated_constraint },
160         0, 0,   /* Defined elsewhere */
161         &asn_SPC_xOverhead_specs_5      /* Additional specs */
162 };
163
164 static const asn_INTEGER_enum_map_t asn_MAP_nrofHARQ_ProcessesForPDSCH_value2enum_9[] = {
165         { 0,    2,      "n2" },
166         { 1,    2,      "n4" },
167         { 2,    2,      "n6" },
168         { 3,    3,      "n10" },
169         { 4,    3,      "n12" },
170         { 5,    3,      "n16" }
171 };
172 static const unsigned int asn_MAP_nrofHARQ_ProcessesForPDSCH_enum2value_9[] = {
173         3,      /* n10(3) */
174         4,      /* n12(4) */
175         5,      /* n16(5) */
176         0,      /* n2(0) */
177         1,      /* n4(1) */
178         2       /* n6(2) */
179 };
180 static const asn_INTEGER_specifics_t asn_SPC_nrofHARQ_ProcessesForPDSCH_specs_9 = {
181         asn_MAP_nrofHARQ_ProcessesForPDSCH_value2enum_9,        /* "tag" => N; sorted by tag */
182         asn_MAP_nrofHARQ_ProcessesForPDSCH_enum2value_9,        /* N => "tag"; sorted by N */
183         6,      /* Number of elements in the maps */
184         0,      /* Enumeration is not extensible */
185         1,      /* Strict enumeration */
186         0,      /* Native long size */
187         0
188 };
189 static const ber_tlv_tag_t asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9[] = {
190         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
191         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
192 };
193 static /* Use -fall-defs-global to expose */
194 asn_TYPE_descriptor_t asn_DEF_nrofHARQ_ProcessesForPDSCH_9 = {
195         "nrofHARQ-ProcessesForPDSCH",
196         "nrofHARQ-ProcessesForPDSCH",
197         &asn_OP_NativeEnumerated,
198         asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9,
199         sizeof(asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9)
200                 /sizeof(asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9[0]) - 1, /* 1 */
201         asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9,      /* Same as above */
202         sizeof(asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9)
203                 /sizeof(asn_DEF_nrofHARQ_ProcessesForPDSCH_tags_9[0]), /* 2 */
204         { &asn_OER_type_nrofHARQ_ProcessesForPDSCH_constr_9, &asn_PER_type_nrofHARQ_ProcessesForPDSCH_constr_9, NativeEnumerated_constraint },
205         0, 0,   /* Defined elsewhere */
206         &asn_SPC_nrofHARQ_ProcessesForPDSCH_specs_9     /* Additional specs */
207 };
208
209 static asn_TYPE_member_t asn_MBR_ext1_18[] = {
210         { ATF_POINTER, 2, offsetof(struct PDSCH_ServingCellConfig__ext1, maxMIMO_Layers),
211                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
212                 -1,     /* IMPLICIT tag at current level */
213                 &asn_DEF_NativeInteger,
214                 0,
215                 { &asn_OER_memb_maxMIMO_Layers_constr_19, &asn_PER_memb_maxMIMO_Layers_constr_19,  memb_maxMIMO_Layers_constraint_18 },
216                 0, 0, /* No default value */
217                 "maxMIMO-Layers"
218                 },
219         { ATF_POINTER, 1, offsetof(struct PDSCH_ServingCellConfig__ext1, processingType2Enabled),
220                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
221                 -1,     /* IMPLICIT tag at current level */
222                 &asn_DEF_BOOLEAN,
223                 0,
224                 { 0, 0, 0 },
225                 0, 0, /* No default value */
226                 "processingType2Enabled"
227                 },
228 };
229 static const int asn_MAP_ext1_oms_18[] = { 0, 1 };
230 static const ber_tlv_tag_t asn_DEF_ext1_tags_18[] = {
231         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
232         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
233 };
234 static const asn_TYPE_tag2member_t asn_MAP_ext1_tag2el_18[] = {
235     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* maxMIMO-Layers */
236     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* processingType2Enabled */
237 };
238 static asn_SEQUENCE_specifics_t asn_SPC_ext1_specs_18 = {
239         sizeof(struct PDSCH_ServingCellConfig__ext1),
240         offsetof(struct PDSCH_ServingCellConfig__ext1, _asn_ctx),
241         asn_MAP_ext1_tag2el_18,
242         2,      /* Count of tags in the map */
243         asn_MAP_ext1_oms_18,    /* Optional members */
244         2, 0,   /* Root/Additions */
245         -1,     /* First extension addition */
246 };
247 static /* Use -fall-defs-global to expose */
248 asn_TYPE_descriptor_t asn_DEF_ext1_18 = {
249         "ext1",
250         "ext1",
251         &asn_OP_SEQUENCE,
252         asn_DEF_ext1_tags_18,
253         sizeof(asn_DEF_ext1_tags_18)
254                 /sizeof(asn_DEF_ext1_tags_18[0]) - 1, /* 1 */
255         asn_DEF_ext1_tags_18,   /* Same as above */
256         sizeof(asn_DEF_ext1_tags_18)
257                 /sizeof(asn_DEF_ext1_tags_18[0]), /* 2 */
258         { 0, 0, SEQUENCE_constraint },
259         asn_MBR_ext1_18,
260         2,      /* Elements count */
261         &asn_SPC_ext1_specs_18  /* Additional specs */
262 };
263
264 asn_TYPE_member_t asn_MBR_PDSCH_ServingCellConfig_1[] = {
265         { ATF_POINTER, 5, offsetof(struct PDSCH_ServingCellConfig, codeBlockGroupTransmission),
266                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
267                 +1,     /* EXPLICIT tag at current level */
268                 &asn_DEF_codeBlockGroupTransmission_2,
269                 0,
270                 { 0, 0, 0 },
271                 0, 0, /* No default value */
272                 "codeBlockGroupTransmission"
273                 },
274         { ATF_POINTER, 4, offsetof(struct PDSCH_ServingCellConfig, xOverhead),
275                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
276                 -1,     /* IMPLICIT tag at current level */
277                 &asn_DEF_xOverhead_5,
278                 0,
279                 { 0, 0, 0 },
280                 0, 0, /* No default value */
281                 "xOverhead"
282                 },
283         { ATF_POINTER, 3, offsetof(struct PDSCH_ServingCellConfig, nrofHARQ_ProcessesForPDSCH),
284                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
285                 -1,     /* IMPLICIT tag at current level */
286                 &asn_DEF_nrofHARQ_ProcessesForPDSCH_9,
287                 0,
288                 { 0, 0, 0 },
289                 0, 0, /* No default value */
290                 "nrofHARQ-ProcessesForPDSCH"
291                 },
292         { ATF_POINTER, 2, offsetof(struct PDSCH_ServingCellConfig, pucch_Cell),
293                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
294                 -1,     /* IMPLICIT tag at current level */
295                 &asn_DEF_ServCellIndex,
296                 0,
297                 { 0, 0, 0 },
298                 0, 0, /* No default value */
299                 "pucch-Cell"
300                 },
301         { ATF_POINTER, 1, offsetof(struct PDSCH_ServingCellConfig, ext1),
302                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
303                 0,
304                 &asn_DEF_ext1_18,
305                 0,
306                 { 0, 0, 0 },
307                 0, 0, /* No default value */
308                 "ext1"
309                 },
310 };
311 static const int asn_MAP_PDSCH_ServingCellConfig_oms_1[] = { 0, 1, 2, 3, 4 };
312 static const ber_tlv_tag_t asn_DEF_PDSCH_ServingCellConfig_tags_1[] = {
313         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
314 };
315 static const asn_TYPE_tag2member_t asn_MAP_PDSCH_ServingCellConfig_tag2el_1[] = {
316     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* codeBlockGroupTransmission */
317     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* xOverhead */
318     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nrofHARQ-ProcessesForPDSCH */
319     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* pucch-Cell */
320     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ext1 */
321 };
322 asn_SEQUENCE_specifics_t asn_SPC_PDSCH_ServingCellConfig_specs_1 = {
323         sizeof(struct PDSCH_ServingCellConfig),
324         offsetof(struct PDSCH_ServingCellConfig, _asn_ctx),
325         asn_MAP_PDSCH_ServingCellConfig_tag2el_1,
326         5,      /* Count of tags in the map */
327         asn_MAP_PDSCH_ServingCellConfig_oms_1,  /* Optional members */
328         4, 1,   /* Root/Additions */
329         4,      /* First extension addition */
330 };
331 asn_TYPE_descriptor_t asn_DEF_PDSCH_ServingCellConfig = {
332         "PDSCH-ServingCellConfig",
333         "PDSCH-ServingCellConfig",
334         &asn_OP_SEQUENCE,
335         asn_DEF_PDSCH_ServingCellConfig_tags_1,
336         sizeof(asn_DEF_PDSCH_ServingCellConfig_tags_1)
337                 /sizeof(asn_DEF_PDSCH_ServingCellConfig_tags_1[0]), /* 1 */
338         asn_DEF_PDSCH_ServingCellConfig_tags_1, /* Same as above */
339         sizeof(asn_DEF_PDSCH_ServingCellConfig_tags_1)
340                 /sizeof(asn_DEF_PDSCH_ServingCellConfig_tags_1[0]), /* 1 */
341         { 0, 0, SEQUENCE_constraint },
342         asn_MBR_PDSCH_ServingCellConfig_1,
343         5,      /* Elements count */
344         &asn_SPC_PDSCH_ServingCellConfig_specs_1        /* Additional specs */
345 };
346