[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / RateMatchPatternLTE-CRS.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 "RateMatchPatternLTE-CRS.h"
9
10 #include "EUTRA-MBSFN-SubframeConfigList.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 /*
20  * This type is implemented using NativeEnumerated,
21  * so here we adjust the DEF accordingly.
22  */
23 static int
24 memb_carrierFreqDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
25                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
26         long value;
27         
28         if(!sptr) {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: value not given (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34         
35         value = *(const long *)sptr;
36         
37         if((value >= 0 && value <= 16383)) {
38                 /* Constraint check succeeded */
39                 return 0;
40         } else {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: constraint failed (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46 }
47
48 static asn_oer_constraints_t asn_OER_type_carrierBandwidthDL_constr_3 CC_NOTUSED = {
49         { 0, 0 },
50         -1};
51 static asn_per_constraints_t asn_PER_type_carrierBandwidthDL_constr_3 CC_NOTUSED = {
52         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         0, 0    /* No PER value map */
55 };
56 static asn_oer_constraints_t asn_OER_type_nrofCRS_Ports_constr_13 CC_NOTUSED = {
57         { 0, 0 },
58         -1};
59 static asn_per_constraints_t asn_PER_type_nrofCRS_Ports_constr_13 CC_NOTUSED = {
60         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         0, 0    /* No PER value map */
63 };
64 static asn_oer_constraints_t asn_OER_type_v_Shift_constr_17 CC_NOTUSED = {
65         { 0, 0 },
66         -1};
67 static asn_per_constraints_t asn_PER_type_v_Shift_constr_17 CC_NOTUSED = {
68         { APC_CONSTRAINED,       3,  3,  0,  5 }        /* (0..5) */,
69         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
70         0, 0    /* No PER value map */
71 };
72 static asn_oer_constraints_t asn_OER_memb_carrierFreqDL_constr_2 CC_NOTUSED = {
73         { 2, 1 }        /* (0..16383) */,
74         -1};
75 static asn_per_constraints_t asn_PER_memb_carrierFreqDL_constr_2 CC_NOTUSED = {
76         { APC_CONSTRAINED,       14,  14,  0,  16383 }  /* (0..16383) */,
77         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
78         0, 0    /* No PER value map */
79 };
80 static const asn_INTEGER_enum_map_t asn_MAP_carrierBandwidthDL_value2enum_3[] = {
81         { 0,    2,      "n6" },
82         { 1,    3,      "n15" },
83         { 2,    3,      "n25" },
84         { 3,    3,      "n50" },
85         { 4,    3,      "n75" },
86         { 5,    4,      "n100" },
87         { 6,    6,      "spare2" },
88         { 7,    6,      "spare1" }
89 };
90 static const unsigned int asn_MAP_carrierBandwidthDL_enum2value_3[] = {
91         5,      /* n100(5) */
92         1,      /* n15(1) */
93         2,      /* n25(2) */
94         3,      /* n50(3) */
95         0,      /* n6(0) */
96         4,      /* n75(4) */
97         7,      /* spare1(7) */
98         6       /* spare2(6) */
99 };
100 static const asn_INTEGER_specifics_t asn_SPC_carrierBandwidthDL_specs_3 = {
101         asn_MAP_carrierBandwidthDL_value2enum_3,        /* "tag" => N; sorted by tag */
102         asn_MAP_carrierBandwidthDL_enum2value_3,        /* N => "tag"; sorted by N */
103         8,      /* Number of elements in the maps */
104         0,      /* Enumeration is not extensible */
105         1,      /* Strict enumeration */
106         0,      /* Native long size */
107         0
108 };
109 static const ber_tlv_tag_t asn_DEF_carrierBandwidthDL_tags_3[] = {
110         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
111         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
112 };
113 static /* Use -fall-defs-global to expose */
114 asn_TYPE_descriptor_t asn_DEF_carrierBandwidthDL_3 = {
115         "carrierBandwidthDL",
116         "carrierBandwidthDL",
117         &asn_OP_NativeEnumerated,
118         asn_DEF_carrierBandwidthDL_tags_3,
119         sizeof(asn_DEF_carrierBandwidthDL_tags_3)
120                 /sizeof(asn_DEF_carrierBandwidthDL_tags_3[0]) - 1, /* 1 */
121         asn_DEF_carrierBandwidthDL_tags_3,      /* Same as above */
122         sizeof(asn_DEF_carrierBandwidthDL_tags_3)
123                 /sizeof(asn_DEF_carrierBandwidthDL_tags_3[0]), /* 2 */
124         { &asn_OER_type_carrierBandwidthDL_constr_3, &asn_PER_type_carrierBandwidthDL_constr_3, NativeEnumerated_constraint },
125         0, 0,   /* Defined elsewhere */
126         &asn_SPC_carrierBandwidthDL_specs_3     /* Additional specs */
127 };
128
129 static const asn_INTEGER_enum_map_t asn_MAP_nrofCRS_Ports_value2enum_13[] = {
130         { 0,    2,      "n1" },
131         { 1,    2,      "n2" },
132         { 2,    2,      "n4" }
133 };
134 static const unsigned int asn_MAP_nrofCRS_Ports_enum2value_13[] = {
135         0,      /* n1(0) */
136         1,      /* n2(1) */
137         2       /* n4(2) */
138 };
139 static const asn_INTEGER_specifics_t asn_SPC_nrofCRS_Ports_specs_13 = {
140         asn_MAP_nrofCRS_Ports_value2enum_13,    /* "tag" => N; sorted by tag */
141         asn_MAP_nrofCRS_Ports_enum2value_13,    /* N => "tag"; sorted by N */
142         3,      /* Number of elements in the maps */
143         0,      /* Enumeration is not extensible */
144         1,      /* Strict enumeration */
145         0,      /* Native long size */
146         0
147 };
148 static const ber_tlv_tag_t asn_DEF_nrofCRS_Ports_tags_13[] = {
149         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
150         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
151 };
152 static /* Use -fall-defs-global to expose */
153 asn_TYPE_descriptor_t asn_DEF_nrofCRS_Ports_13 = {
154         "nrofCRS-Ports",
155         "nrofCRS-Ports",
156         &asn_OP_NativeEnumerated,
157         asn_DEF_nrofCRS_Ports_tags_13,
158         sizeof(asn_DEF_nrofCRS_Ports_tags_13)
159                 /sizeof(asn_DEF_nrofCRS_Ports_tags_13[0]) - 1, /* 1 */
160         asn_DEF_nrofCRS_Ports_tags_13,  /* Same as above */
161         sizeof(asn_DEF_nrofCRS_Ports_tags_13)
162                 /sizeof(asn_DEF_nrofCRS_Ports_tags_13[0]), /* 2 */
163         { &asn_OER_type_nrofCRS_Ports_constr_13, &asn_PER_type_nrofCRS_Ports_constr_13, NativeEnumerated_constraint },
164         0, 0,   /* Defined elsewhere */
165         &asn_SPC_nrofCRS_Ports_specs_13 /* Additional specs */
166 };
167
168 static const asn_INTEGER_enum_map_t asn_MAP_v_Shift_value2enum_17[] = {
169         { 0,    2,      "n0" },
170         { 1,    2,      "n1" },
171         { 2,    2,      "n2" },
172         { 3,    2,      "n3" },
173         { 4,    2,      "n4" },
174         { 5,    2,      "n5" }
175 };
176 static const unsigned int asn_MAP_v_Shift_enum2value_17[] = {
177         0,      /* n0(0) */
178         1,      /* n1(1) */
179         2,      /* n2(2) */
180         3,      /* n3(3) */
181         4,      /* n4(4) */
182         5       /* n5(5) */
183 };
184 static const asn_INTEGER_specifics_t asn_SPC_v_Shift_specs_17 = {
185         asn_MAP_v_Shift_value2enum_17,  /* "tag" => N; sorted by tag */
186         asn_MAP_v_Shift_enum2value_17,  /* N => "tag"; sorted by N */
187         6,      /* Number of elements in the maps */
188         0,      /* Enumeration is not extensible */
189         1,      /* Strict enumeration */
190         0,      /* Native long size */
191         0
192 };
193 static const ber_tlv_tag_t asn_DEF_v_Shift_tags_17[] = {
194         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
195         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
196 };
197 static /* Use -fall-defs-global to expose */
198 asn_TYPE_descriptor_t asn_DEF_v_Shift_17 = {
199         "v-Shift",
200         "v-Shift",
201         &asn_OP_NativeEnumerated,
202         asn_DEF_v_Shift_tags_17,
203         sizeof(asn_DEF_v_Shift_tags_17)
204                 /sizeof(asn_DEF_v_Shift_tags_17[0]) - 1, /* 1 */
205         asn_DEF_v_Shift_tags_17,        /* Same as above */
206         sizeof(asn_DEF_v_Shift_tags_17)
207                 /sizeof(asn_DEF_v_Shift_tags_17[0]), /* 2 */
208         { &asn_OER_type_v_Shift_constr_17, &asn_PER_type_v_Shift_constr_17, NativeEnumerated_constraint },
209         0, 0,   /* Defined elsewhere */
210         &asn_SPC_v_Shift_specs_17       /* Additional specs */
211 };
212
213 asn_TYPE_member_t asn_MBR_RateMatchPatternLTE_CRS_1[] = {
214         { ATF_NOFLAGS, 0, offsetof(struct RateMatchPatternLTE_CRS, carrierFreqDL),
215                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
216                 -1,     /* IMPLICIT tag at current level */
217                 &asn_DEF_NativeInteger,
218                 0,
219                 { &asn_OER_memb_carrierFreqDL_constr_2, &asn_PER_memb_carrierFreqDL_constr_2,  memb_carrierFreqDL_constraint_1 },
220                 0, 0, /* No default value */
221                 "carrierFreqDL"
222                 },
223         { ATF_NOFLAGS, 0, offsetof(struct RateMatchPatternLTE_CRS, carrierBandwidthDL),
224                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
225                 -1,     /* IMPLICIT tag at current level */
226                 &asn_DEF_carrierBandwidthDL_3,
227                 0,
228                 { 0, 0, 0 },
229                 0, 0, /* No default value */
230                 "carrierBandwidthDL"
231                 },
232         { ATF_POINTER, 1, offsetof(struct RateMatchPatternLTE_CRS, mbsfn_SubframeConfigList),
233                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
234                 -1,     /* IMPLICIT tag at current level */
235                 &asn_DEF_EUTRA_MBSFN_SubframeConfigList,
236                 0,
237                 { 0, 0, 0 },
238                 0, 0, /* No default value */
239                 "mbsfn-SubframeConfigList"
240                 },
241         { ATF_NOFLAGS, 0, offsetof(struct RateMatchPatternLTE_CRS, nrofCRS_Ports),
242                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
243                 -1,     /* IMPLICIT tag at current level */
244                 &asn_DEF_nrofCRS_Ports_13,
245                 0,
246                 { 0, 0, 0 },
247                 0, 0, /* No default value */
248                 "nrofCRS-Ports"
249                 },
250         { ATF_NOFLAGS, 0, offsetof(struct RateMatchPatternLTE_CRS, v_Shift),
251                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
252                 -1,     /* IMPLICIT tag at current level */
253                 &asn_DEF_v_Shift_17,
254                 0,
255                 { 0, 0, 0 },
256                 0, 0, /* No default value */
257                 "v-Shift"
258                 },
259 };
260 static const int asn_MAP_RateMatchPatternLTE_CRS_oms_1[] = { 2 };
261 static const ber_tlv_tag_t asn_DEF_RateMatchPatternLTE_CRS_tags_1[] = {
262         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
263 };
264 static const asn_TYPE_tag2member_t asn_MAP_RateMatchPatternLTE_CRS_tag2el_1[] = {
265     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* carrierFreqDL */
266     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* carrierBandwidthDL */
267     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mbsfn-SubframeConfigList */
268     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* nrofCRS-Ports */
269     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* v-Shift */
270 };
271 asn_SEQUENCE_specifics_t asn_SPC_RateMatchPatternLTE_CRS_specs_1 = {
272         sizeof(struct RateMatchPatternLTE_CRS),
273         offsetof(struct RateMatchPatternLTE_CRS, _asn_ctx),
274         asn_MAP_RateMatchPatternLTE_CRS_tag2el_1,
275         5,      /* Count of tags in the map */
276         asn_MAP_RateMatchPatternLTE_CRS_oms_1,  /* Optional members */
277         1, 0,   /* Root/Additions */
278         -1,     /* First extension addition */
279 };
280 asn_TYPE_descriptor_t asn_DEF_RateMatchPatternLTE_CRS = {
281         "RateMatchPatternLTE-CRS",
282         "RateMatchPatternLTE-CRS",
283         &asn_OP_SEQUENCE,
284         asn_DEF_RateMatchPatternLTE_CRS_tags_1,
285         sizeof(asn_DEF_RateMatchPatternLTE_CRS_tags_1)
286                 /sizeof(asn_DEF_RateMatchPatternLTE_CRS_tags_1[0]), /* 1 */
287         asn_DEF_RateMatchPatternLTE_CRS_tags_1, /* Same as above */
288         sizeof(asn_DEF_RateMatchPatternLTE_CRS_tags_1)
289                 /sizeof(asn_DEF_RateMatchPatternLTE_CRS_tags_1[0]), /* 1 */
290         { 0, 0, SEQUENCE_constraint },
291         asn_MBR_RateMatchPatternLTE_CRS_1,
292         5,      /* Elements count */
293         &asn_SPC_RateMatchPatternLTE_CRS_specs_1        /* Additional specs */
294 };
295