[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / EUTRA-ParametersCommon.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 "EUTRA-ParametersCommon.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_modifiedMPR_BehaviorEUTRA_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
24                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
25         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
26         size_t size;
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         if(st->size > 0) {
36                 /* Size in bits */
37                 size = 8 * st->size - (st->bits_unused & 0x07);
38         } else {
39                 size = 0;
40         }
41         
42         if((size == 32)) {
43                 /* Constraint check succeeded */
44                 return 0;
45         } else {
46                 ASN__CTFAIL(app_key, td, sptr,
47                         "%s: constraint failed (%s:%d)",
48                         td->name, __FILE__, __LINE__);
49                 return -1;
50         }
51 }
52
53 static asn_oer_constraints_t asn_OER_type_mfbi_EUTRA_constr_2 CC_NOTUSED = {
54         { 0, 0 },
55         -1};
56 static asn_per_constraints_t asn_PER_type_mfbi_EUTRA_constr_2 CC_NOTUSED = {
57         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
58         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
59         0, 0    /* No PER value map */
60 };
61 static asn_oer_constraints_t asn_OER_type_multiNS_Pmax_EUTRA_constr_5 CC_NOTUSED = {
62         { 0, 0 },
63         -1};
64 static asn_per_constraints_t asn_PER_type_multiNS_Pmax_EUTRA_constr_5 CC_NOTUSED = {
65         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         0, 0    /* No PER value map */
68 };
69 static asn_oer_constraints_t asn_OER_type_rs_SINR_MeasEUTRA_constr_7 CC_NOTUSED = {
70         { 0, 0 },
71         -1};
72 static asn_per_constraints_t asn_PER_type_rs_SINR_MeasEUTRA_constr_7 CC_NOTUSED = {
73         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         0, 0    /* No PER value map */
76 };
77 static asn_oer_constraints_t asn_OER_memb_modifiedMPR_BehaviorEUTRA_constr_4 CC_NOTUSED = {
78         { 0, 0 },
79         32      /* (SIZE(32..32)) */};
80 static asn_per_constraints_t asn_PER_memb_modifiedMPR_BehaviorEUTRA_constr_4 CC_NOTUSED = {
81         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
82         { APC_CONSTRAINED,       0,  0,  32,  32 }      /* (SIZE(32..32)) */,
83         0, 0    /* No PER value map */
84 };
85 static const asn_INTEGER_enum_map_t asn_MAP_mfbi_EUTRA_value2enum_2[] = {
86         { 0,    9,      "supported" }
87 };
88 static const unsigned int asn_MAP_mfbi_EUTRA_enum2value_2[] = {
89         0       /* supported(0) */
90 };
91 static const asn_INTEGER_specifics_t asn_SPC_mfbi_EUTRA_specs_2 = {
92         asn_MAP_mfbi_EUTRA_value2enum_2,        /* "tag" => N; sorted by tag */
93         asn_MAP_mfbi_EUTRA_enum2value_2,        /* N => "tag"; sorted by N */
94         1,      /* Number of elements in the maps */
95         0,      /* Enumeration is not extensible */
96         1,      /* Strict enumeration */
97         0,      /* Native long size */
98         0
99 };
100 static const ber_tlv_tag_t asn_DEF_mfbi_EUTRA_tags_2[] = {
101         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
102         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
103 };
104 static /* Use -fall-defs-global to expose */
105 asn_TYPE_descriptor_t asn_DEF_mfbi_EUTRA_2 = {
106         "mfbi-EUTRA",
107         "mfbi-EUTRA",
108         &asn_OP_NativeEnumerated,
109         asn_DEF_mfbi_EUTRA_tags_2,
110         sizeof(asn_DEF_mfbi_EUTRA_tags_2)
111                 /sizeof(asn_DEF_mfbi_EUTRA_tags_2[0]) - 1, /* 1 */
112         asn_DEF_mfbi_EUTRA_tags_2,      /* Same as above */
113         sizeof(asn_DEF_mfbi_EUTRA_tags_2)
114                 /sizeof(asn_DEF_mfbi_EUTRA_tags_2[0]), /* 2 */
115         { &asn_OER_type_mfbi_EUTRA_constr_2, &asn_PER_type_mfbi_EUTRA_constr_2, NativeEnumerated_constraint },
116         0, 0,   /* Defined elsewhere */
117         &asn_SPC_mfbi_EUTRA_specs_2     /* Additional specs */
118 };
119
120 static const asn_INTEGER_enum_map_t asn_MAP_multiNS_Pmax_EUTRA_value2enum_5[] = {
121         { 0,    9,      "supported" }
122 };
123 static const unsigned int asn_MAP_multiNS_Pmax_EUTRA_enum2value_5[] = {
124         0       /* supported(0) */
125 };
126 static const asn_INTEGER_specifics_t asn_SPC_multiNS_Pmax_EUTRA_specs_5 = {
127         asn_MAP_multiNS_Pmax_EUTRA_value2enum_5,        /* "tag" => N; sorted by tag */
128         asn_MAP_multiNS_Pmax_EUTRA_enum2value_5,        /* N => "tag"; sorted by N */
129         1,      /* Number of elements in the maps */
130         0,      /* Enumeration is not extensible */
131         1,      /* Strict enumeration */
132         0,      /* Native long size */
133         0
134 };
135 static const ber_tlv_tag_t asn_DEF_multiNS_Pmax_EUTRA_tags_5[] = {
136         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
137         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
138 };
139 static /* Use -fall-defs-global to expose */
140 asn_TYPE_descriptor_t asn_DEF_multiNS_Pmax_EUTRA_5 = {
141         "multiNS-Pmax-EUTRA",
142         "multiNS-Pmax-EUTRA",
143         &asn_OP_NativeEnumerated,
144         asn_DEF_multiNS_Pmax_EUTRA_tags_5,
145         sizeof(asn_DEF_multiNS_Pmax_EUTRA_tags_5)
146                 /sizeof(asn_DEF_multiNS_Pmax_EUTRA_tags_5[0]) - 1, /* 1 */
147         asn_DEF_multiNS_Pmax_EUTRA_tags_5,      /* Same as above */
148         sizeof(asn_DEF_multiNS_Pmax_EUTRA_tags_5)
149                 /sizeof(asn_DEF_multiNS_Pmax_EUTRA_tags_5[0]), /* 2 */
150         { &asn_OER_type_multiNS_Pmax_EUTRA_constr_5, &asn_PER_type_multiNS_Pmax_EUTRA_constr_5, NativeEnumerated_constraint },
151         0, 0,   /* Defined elsewhere */
152         &asn_SPC_multiNS_Pmax_EUTRA_specs_5     /* Additional specs */
153 };
154
155 static const asn_INTEGER_enum_map_t asn_MAP_rs_SINR_MeasEUTRA_value2enum_7[] = {
156         { 0,    9,      "supported" }
157 };
158 static const unsigned int asn_MAP_rs_SINR_MeasEUTRA_enum2value_7[] = {
159         0       /* supported(0) */
160 };
161 static const asn_INTEGER_specifics_t asn_SPC_rs_SINR_MeasEUTRA_specs_7 = {
162         asn_MAP_rs_SINR_MeasEUTRA_value2enum_7, /* "tag" => N; sorted by tag */
163         asn_MAP_rs_SINR_MeasEUTRA_enum2value_7, /* N => "tag"; sorted by N */
164         1,      /* Number of elements in the maps */
165         0,      /* Enumeration is not extensible */
166         1,      /* Strict enumeration */
167         0,      /* Native long size */
168         0
169 };
170 static const ber_tlv_tag_t asn_DEF_rs_SINR_MeasEUTRA_tags_7[] = {
171         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
172         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
173 };
174 static /* Use -fall-defs-global to expose */
175 asn_TYPE_descriptor_t asn_DEF_rs_SINR_MeasEUTRA_7 = {
176         "rs-SINR-MeasEUTRA",
177         "rs-SINR-MeasEUTRA",
178         &asn_OP_NativeEnumerated,
179         asn_DEF_rs_SINR_MeasEUTRA_tags_7,
180         sizeof(asn_DEF_rs_SINR_MeasEUTRA_tags_7)
181                 /sizeof(asn_DEF_rs_SINR_MeasEUTRA_tags_7[0]) - 1, /* 1 */
182         asn_DEF_rs_SINR_MeasEUTRA_tags_7,       /* Same as above */
183         sizeof(asn_DEF_rs_SINR_MeasEUTRA_tags_7)
184                 /sizeof(asn_DEF_rs_SINR_MeasEUTRA_tags_7[0]), /* 2 */
185         { &asn_OER_type_rs_SINR_MeasEUTRA_constr_7, &asn_PER_type_rs_SINR_MeasEUTRA_constr_7, NativeEnumerated_constraint },
186         0, 0,   /* Defined elsewhere */
187         &asn_SPC_rs_SINR_MeasEUTRA_specs_7      /* Additional specs */
188 };
189
190 asn_TYPE_member_t asn_MBR_EUTRA_ParametersCommon_1[] = {
191         { ATF_POINTER, 4, offsetof(struct EUTRA_ParametersCommon, mfbi_EUTRA),
192                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
193                 -1,     /* IMPLICIT tag at current level */
194                 &asn_DEF_mfbi_EUTRA_2,
195                 0,
196                 { 0, 0, 0 },
197                 0, 0, /* No default value */
198                 "mfbi-EUTRA"
199                 },
200         { ATF_POINTER, 3, offsetof(struct EUTRA_ParametersCommon, modifiedMPR_BehaviorEUTRA),
201                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
202                 -1,     /* IMPLICIT tag at current level */
203                 &asn_DEF_BIT_STRING,
204                 0,
205                 { &asn_OER_memb_modifiedMPR_BehaviorEUTRA_constr_4, &asn_PER_memb_modifiedMPR_BehaviorEUTRA_constr_4,  memb_modifiedMPR_BehaviorEUTRA_constraint_1 },
206                 0, 0, /* No default value */
207                 "modifiedMPR-BehaviorEUTRA"
208                 },
209         { ATF_POINTER, 2, offsetof(struct EUTRA_ParametersCommon, multiNS_Pmax_EUTRA),
210                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
211                 -1,     /* IMPLICIT tag at current level */
212                 &asn_DEF_multiNS_Pmax_EUTRA_5,
213                 0,
214                 { 0, 0, 0 },
215                 0, 0, /* No default value */
216                 "multiNS-Pmax-EUTRA"
217                 },
218         { ATF_POINTER, 1, offsetof(struct EUTRA_ParametersCommon, rs_SINR_MeasEUTRA),
219                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
220                 -1,     /* IMPLICIT tag at current level */
221                 &asn_DEF_rs_SINR_MeasEUTRA_7,
222                 0,
223                 { 0, 0, 0 },
224                 0, 0, /* No default value */
225                 "rs-SINR-MeasEUTRA"
226                 },
227 };
228 static const int asn_MAP_EUTRA_ParametersCommon_oms_1[] = { 0, 1, 2, 3 };
229 static const ber_tlv_tag_t asn_DEF_EUTRA_ParametersCommon_tags_1[] = {
230         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
231 };
232 static const asn_TYPE_tag2member_t asn_MAP_EUTRA_ParametersCommon_tag2el_1[] = {
233     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mfbi-EUTRA */
234     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* modifiedMPR-BehaviorEUTRA */
235     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* multiNS-Pmax-EUTRA */
236     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* rs-SINR-MeasEUTRA */
237 };
238 asn_SEQUENCE_specifics_t asn_SPC_EUTRA_ParametersCommon_specs_1 = {
239         sizeof(struct EUTRA_ParametersCommon),
240         offsetof(struct EUTRA_ParametersCommon, _asn_ctx),
241         asn_MAP_EUTRA_ParametersCommon_tag2el_1,
242         4,      /* Count of tags in the map */
243         asn_MAP_EUTRA_ParametersCommon_oms_1,   /* Optional members */
244         4, 0,   /* Root/Additions */
245         4,      /* First extension addition */
246 };
247 asn_TYPE_descriptor_t asn_DEF_EUTRA_ParametersCommon = {
248         "EUTRA-ParametersCommon",
249         "EUTRA-ParametersCommon",
250         &asn_OP_SEQUENCE,
251         asn_DEF_EUTRA_ParametersCommon_tags_1,
252         sizeof(asn_DEF_EUTRA_ParametersCommon_tags_1)
253                 /sizeof(asn_DEF_EUTRA_ParametersCommon_tags_1[0]), /* 1 */
254         asn_DEF_EUTRA_ParametersCommon_tags_1,  /* Same as above */
255         sizeof(asn_DEF_EUTRA_ParametersCommon_tags_1)
256                 /sizeof(asn_DEF_EUTRA_ParametersCommon_tags_1[0]), /* 1 */
257         { 0, 0, SEQUENCE_constraint },
258         asn_MBR_EUTRA_ParametersCommon_1,
259         4,      /* Elements count */
260         &asn_SPC_EUTRA_ParametersCommon_specs_1 /* Additional specs */
261 };
262