Merge "[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures MeasC...
[o-du/l2.git] / src / codec_utils / RRC / MeasConfigMN.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-InterNodeDefinitions"
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 "MeasConfigMN.h"
9
10 #include "NR-FreqInfo.h"
11 #include "GapConfig.h"
12 /*
13  * This type is implemented using NativeEnumerated,
14  * so here we adjust the DEF accordingly.
15  */
16 static int
17 memb_measuredFrequenciesMN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
18                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
19         size_t size;
20         
21         if(!sptr) {
22                 ASN__CTFAIL(app_key, td, sptr,
23                         "%s: value not given (%s:%d)",
24                         td->name, __FILE__, __LINE__);
25                 return -1;
26         }
27         
28         /* Determine the number of elements */
29         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
30         
31         if((size >= 1 && size <= 32)) {
32                 /* Perform validation of the inner elements */
33                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
34         } else {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: constraint failed (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40 }
41
42 static asn_oer_constraints_t asn_OER_type_measuredFrequenciesMN_constr_2 CC_NOTUSED = {
43         { 0, 0 },
44         -1      /* (SIZE(1..32)) */};
45 static asn_per_constraints_t asn_PER_type_measuredFrequenciesMN_constr_2 CC_NOTUSED = {
46         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
47         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
48         0, 0    /* No PER value map */
49 };
50 static asn_oer_constraints_t asn_OER_type_measGapConfig_constr_4 CC_NOTUSED = {
51         { 0, 0 },
52         -1};
53 static asn_per_constraints_t asn_PER_type_measGapConfig_constr_4 CC_NOTUSED = {
54         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
55         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
56         0, 0    /* No PER value map */
57 };
58 static asn_oer_constraints_t asn_OER_type_gapPurpose_constr_7 CC_NOTUSED = {
59         { 0, 0 },
60         -1};
61 static asn_per_constraints_t asn_PER_type_gapPurpose_constr_7 CC_NOTUSED = {
62         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
63         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
64         0, 0    /* No PER value map */
65 };
66 static asn_oer_constraints_t asn_OER_memb_measuredFrequenciesMN_constr_2 CC_NOTUSED = {
67         { 0, 0 },
68         -1      /* (SIZE(1..32)) */};
69 static asn_per_constraints_t asn_PER_memb_measuredFrequenciesMN_constr_2 CC_NOTUSED = {
70         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
71         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
72         0, 0    /* No PER value map */
73 };
74 static asn_TYPE_member_t asn_MBR_measuredFrequenciesMN_2[] = {
75         { ATF_POINTER, 0, 0,
76                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
77                 0,
78                 &asn_DEF_NR_FreqInfo,
79                 0,
80                 { 0, 0, 0 },
81                 0, 0, /* No default value */
82                 ""
83                 },
84 };
85 static const ber_tlv_tag_t asn_DEF_measuredFrequenciesMN_tags_2[] = {
86         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
87         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
88 };
89 static asn_SET_OF_specifics_t asn_SPC_measuredFrequenciesMN_specs_2 = {
90         sizeof(struct MeasConfigMN__measuredFrequenciesMN),
91         offsetof(struct MeasConfigMN__measuredFrequenciesMN, _asn_ctx),
92         0,      /* XER encoding is XMLDelimitedItemList */
93 };
94 static /* Use -fall-defs-global to expose */
95 asn_TYPE_descriptor_t asn_DEF_measuredFrequenciesMN_2 = {
96         "measuredFrequenciesMN",
97         "measuredFrequenciesMN",
98         &asn_OP_SEQUENCE_OF,
99         asn_DEF_measuredFrequenciesMN_tags_2,
100         sizeof(asn_DEF_measuredFrequenciesMN_tags_2)
101                 /sizeof(asn_DEF_measuredFrequenciesMN_tags_2[0]) - 1, /* 1 */
102         asn_DEF_measuredFrequenciesMN_tags_2,   /* Same as above */
103         sizeof(asn_DEF_measuredFrequenciesMN_tags_2)
104                 /sizeof(asn_DEF_measuredFrequenciesMN_tags_2[0]), /* 2 */
105         { &asn_OER_type_measuredFrequenciesMN_constr_2, &asn_PER_type_measuredFrequenciesMN_constr_2, SEQUENCE_OF_constraint },
106         asn_MBR_measuredFrequenciesMN_2,
107         1,      /* Single element */
108         &asn_SPC_measuredFrequenciesMN_specs_2  /* Additional specs */
109 };
110
111 static asn_TYPE_member_t asn_MBR_measGapConfig_4[] = {
112         { ATF_NOFLAGS, 0, offsetof(struct MeasConfigMN__measGapConfig, choice.release),
113                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
114                 -1,     /* IMPLICIT tag at current level */
115                 &asn_DEF_NULL,
116                 0,
117                 { 0, 0, 0 },
118                 0, 0, /* No default value */
119                 "release"
120                 },
121         { ATF_POINTER, 0, offsetof(struct MeasConfigMN__measGapConfig, choice.setup),
122                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
123                 -1,     /* IMPLICIT tag at current level */
124                 &asn_DEF_GapConfig,
125                 0,
126                 { 0, 0, 0 },
127                 0, 0, /* No default value */
128                 "setup"
129                 },
130 };
131 static const asn_TYPE_tag2member_t asn_MAP_measGapConfig_tag2el_4[] = {
132     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* release */
133     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* setup */
134 };
135 static asn_CHOICE_specifics_t asn_SPC_measGapConfig_specs_4 = {
136         sizeof(struct MeasConfigMN__measGapConfig),
137         offsetof(struct MeasConfigMN__measGapConfig, _asn_ctx),
138         offsetof(struct MeasConfigMN__measGapConfig, present),
139         sizeof(((struct MeasConfigMN__measGapConfig *)0)->present),
140         asn_MAP_measGapConfig_tag2el_4,
141         2,      /* Count of tags in the map */
142         0, 0,
143         -1      /* Extensions start */
144 };
145 static /* Use -fall-defs-global to expose */
146 asn_TYPE_descriptor_t asn_DEF_measGapConfig_4 = {
147         "measGapConfig",
148         "measGapConfig",
149         &asn_OP_CHOICE,
150         0,      /* No effective tags (pointer) */
151         0,      /* No effective tags (count) */
152         0,      /* No tags (pointer) */
153         0,      /* No tags (count) */
154         { &asn_OER_type_measGapConfig_constr_4, &asn_PER_type_measGapConfig_constr_4, CHOICE_constraint },
155         asn_MBR_measGapConfig_4,
156         2,      /* Elements count */
157         &asn_SPC_measGapConfig_specs_4  /* Additional specs */
158 };
159
160 static const asn_INTEGER_enum_map_t asn_MAP_gapPurpose_value2enum_7[] = {
161         { 0,    5,      "perUE" },
162         { 1,    6,      "perFR1" }
163 };
164 static const unsigned int asn_MAP_gapPurpose_enum2value_7[] = {
165         1,      /* perFR1(1) */
166         0       /* perUE(0) */
167 };
168 static const asn_INTEGER_specifics_t asn_SPC_gapPurpose_specs_7 = {
169         asn_MAP_gapPurpose_value2enum_7,        /* "tag" => N; sorted by tag */
170         asn_MAP_gapPurpose_enum2value_7,        /* N => "tag"; sorted by N */
171         2,      /* Number of elements in the maps */
172         0,      /* Enumeration is not extensible */
173         1,      /* Strict enumeration */
174         0,      /* Native long size */
175         0
176 };
177 static const ber_tlv_tag_t asn_DEF_gapPurpose_tags_7[] = {
178         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
179         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
180 };
181 static /* Use -fall-defs-global to expose */
182 asn_TYPE_descriptor_t asn_DEF_gapPurpose_7 = {
183         "gapPurpose",
184         "gapPurpose",
185         &asn_OP_NativeEnumerated,
186         asn_DEF_gapPurpose_tags_7,
187         sizeof(asn_DEF_gapPurpose_tags_7)
188                 /sizeof(asn_DEF_gapPurpose_tags_7[0]) - 1, /* 1 */
189         asn_DEF_gapPurpose_tags_7,      /* Same as above */
190         sizeof(asn_DEF_gapPurpose_tags_7)
191                 /sizeof(asn_DEF_gapPurpose_tags_7[0]), /* 2 */
192         { &asn_OER_type_gapPurpose_constr_7, &asn_PER_type_gapPurpose_constr_7, NativeEnumerated_constraint },
193         0, 0,   /* Defined elsewhere */
194         &asn_SPC_gapPurpose_specs_7     /* Additional specs */
195 };
196
197 asn_TYPE_member_t asn_MBR_MeasConfigMN_1[] = {
198         { ATF_POINTER, 3, offsetof(struct MeasConfigMN, measuredFrequenciesMN),
199                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
200                 0,
201                 &asn_DEF_measuredFrequenciesMN_2,
202                 0,
203                 { &asn_OER_memb_measuredFrequenciesMN_constr_2, &asn_PER_memb_measuredFrequenciesMN_constr_2,  memb_measuredFrequenciesMN_constraint_1 },
204                 0, 0, /* No default value */
205                 "measuredFrequenciesMN"
206                 },
207         { ATF_POINTER, 2, offsetof(struct MeasConfigMN, measGapConfig),
208                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
209                 +1,     /* EXPLICIT tag at current level */
210                 &asn_DEF_measGapConfig_4,
211                 0,
212                 { 0, 0, 0 },
213                 0, 0, /* No default value */
214                 "measGapConfig"
215                 },
216         { ATF_POINTER, 1, offsetof(struct MeasConfigMN, gapPurpose),
217                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
218                 -1,     /* IMPLICIT tag at current level */
219                 &asn_DEF_gapPurpose_7,
220                 0,
221                 { 0, 0, 0 },
222                 0, 0, /* No default value */
223                 "gapPurpose"
224                 },
225 };
226 static const int asn_MAP_MeasConfigMN_oms_1[] = { 0, 1, 2 };
227 static const ber_tlv_tag_t asn_DEF_MeasConfigMN_tags_1[] = {
228         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
229 };
230 static const asn_TYPE_tag2member_t asn_MAP_MeasConfigMN_tag2el_1[] = {
231     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measuredFrequenciesMN */
232     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* measGapConfig */
233     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gapPurpose */
234 };
235 asn_SEQUENCE_specifics_t asn_SPC_MeasConfigMN_specs_1 = {
236         sizeof(struct MeasConfigMN),
237         offsetof(struct MeasConfigMN, _asn_ctx),
238         asn_MAP_MeasConfigMN_tag2el_1,
239         3,      /* Count of tags in the map */
240         asn_MAP_MeasConfigMN_oms_1,     /* Optional members */
241         3, 0,   /* Root/Additions */
242         3,      /* First extension addition */
243 };
244 asn_TYPE_descriptor_t asn_DEF_MeasConfigMN = {
245         "MeasConfigMN",
246         "MeasConfigMN",
247         &asn_OP_SEQUENCE,
248         asn_DEF_MeasConfigMN_tags_1,
249         sizeof(asn_DEF_MeasConfigMN_tags_1)
250                 /sizeof(asn_DEF_MeasConfigMN_tags_1[0]), /* 1 */
251         asn_DEF_MeasConfigMN_tags_1,    /* Same as above */
252         sizeof(asn_DEF_MeasConfigMN_tags_1)
253                 /sizeof(asn_DEF_MeasConfigMN_tags_1[0]), /* 1 */
254         { 0, 0, SEQUENCE_constraint },
255         asn_MBR_MeasConfigMN_1,
256         3,      /* Elements count */
257         &asn_SPC_MeasConfigMN_specs_1   /* Additional specs */
258 };
259