[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PeriodicalReportConfig.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 "PeriodicalReportConfig.h"
9
10 #include "MeasReportQuantity.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 static int
16 memb_maxReportCells_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18         long value;
19         
20         if(!sptr) {
21                 ASN__CTFAIL(app_key, td, sptr,
22                         "%s: value not given (%s:%d)",
23                         td->name, __FILE__, __LINE__);
24                 return -1;
25         }
26         
27         value = *(const long *)sptr;
28         
29         if((value >= 1 && value <= 8)) {
30                 /* Constraint check succeeded */
31                 return 0;
32         } else {
33                 ASN__CTFAIL(app_key, td, sptr,
34                         "%s: constraint failed (%s:%d)",
35                         td->name, __FILE__, __LINE__);
36                 return -1;
37         }
38 }
39
40 static int
41 memb_maxNrofRS_IndexesToReport_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
42                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
43         long value;
44         
45         if(!sptr) {
46                 ASN__CTFAIL(app_key, td, sptr,
47                         "%s: value not given (%s:%d)",
48                         td->name, __FILE__, __LINE__);
49                 return -1;
50         }
51         
52         value = *(const long *)sptr;
53         
54         if((value >= 1 && value <= 32)) {
55                 /* Constraint check succeeded */
56                 return 0;
57         } else {
58                 ASN__CTFAIL(app_key, td, sptr,
59                         "%s: constraint failed (%s:%d)",
60                         td->name, __FILE__, __LINE__);
61                 return -1;
62         }
63 }
64
65 static asn_oer_constraints_t asn_OER_type_reportAmount_constr_4 CC_NOTUSED = {
66         { 0, 0 },
67         -1};
68 static asn_per_constraints_t asn_PER_type_reportAmount_constr_4 CC_NOTUSED = {
69         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
70         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
71         0, 0    /* No PER value map */
72 };
73 static asn_oer_constraints_t asn_OER_memb_maxReportCells_constr_14 CC_NOTUSED = {
74         { 1, 1 }        /* (1..8) */,
75         -1};
76 static asn_per_constraints_t asn_PER_memb_maxReportCells_constr_14 CC_NOTUSED = {
77         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (1..8) */,
78         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
79         0, 0    /* No PER value map */
80 };
81 static asn_oer_constraints_t asn_OER_memb_maxNrofRS_IndexesToReport_constr_16 CC_NOTUSED = {
82         { 1, 1 }        /* (1..32) */,
83         -1};
84 static asn_per_constraints_t asn_PER_memb_maxNrofRS_IndexesToReport_constr_16 CC_NOTUSED = {
85         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (1..32) */,
86         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
87         0, 0    /* No PER value map */
88 };
89 static const asn_INTEGER_enum_map_t asn_MAP_reportAmount_value2enum_4[] = {
90         { 0,    2,      "r1" },
91         { 1,    2,      "r2" },
92         { 2,    2,      "r4" },
93         { 3,    2,      "r8" },
94         { 4,    3,      "r16" },
95         { 5,    3,      "r32" },
96         { 6,    3,      "r64" },
97         { 7,    8,      "infinity" }
98 };
99 static const unsigned int asn_MAP_reportAmount_enum2value_4[] = {
100         7,      /* infinity(7) */
101         0,      /* r1(0) */
102         4,      /* r16(4) */
103         1,      /* r2(1) */
104         5,      /* r32(5) */
105         2,      /* r4(2) */
106         6,      /* r64(6) */
107         3       /* r8(3) */
108 };
109 static const asn_INTEGER_specifics_t asn_SPC_reportAmount_specs_4 = {
110         asn_MAP_reportAmount_value2enum_4,      /* "tag" => N; sorted by tag */
111         asn_MAP_reportAmount_enum2value_4,      /* N => "tag"; sorted by N */
112         8,      /* Number of elements in the maps */
113         0,      /* Enumeration is not extensible */
114         1,      /* Strict enumeration */
115         0,      /* Native long size */
116         0
117 };
118 static const ber_tlv_tag_t asn_DEF_reportAmount_tags_4[] = {
119         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
120         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
121 };
122 static /* Use -fall-defs-global to expose */
123 asn_TYPE_descriptor_t asn_DEF_reportAmount_4 = {
124         "reportAmount",
125         "reportAmount",
126         &asn_OP_NativeEnumerated,
127         asn_DEF_reportAmount_tags_4,
128         sizeof(asn_DEF_reportAmount_tags_4)
129                 /sizeof(asn_DEF_reportAmount_tags_4[0]) - 1, /* 1 */
130         asn_DEF_reportAmount_tags_4,    /* Same as above */
131         sizeof(asn_DEF_reportAmount_tags_4)
132                 /sizeof(asn_DEF_reportAmount_tags_4[0]), /* 2 */
133         { &asn_OER_type_reportAmount_constr_4, &asn_PER_type_reportAmount_constr_4, NativeEnumerated_constraint },
134         0, 0,   /* Defined elsewhere */
135         &asn_SPC_reportAmount_specs_4   /* Additional specs */
136 };
137
138 asn_TYPE_member_t asn_MBR_PeriodicalReportConfig_1[] = {
139         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, rsType),
140                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
141                 -1,     /* IMPLICIT tag at current level */
142                 &asn_DEF_NR_RS_Type,
143                 0,
144                 { 0, 0, 0 },
145                 0, 0, /* No default value */
146                 "rsType"
147                 },
148         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, reportInterval),
149                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
150                 -1,     /* IMPLICIT tag at current level */
151                 &asn_DEF_ReportInterval,
152                 0,
153                 { 0, 0, 0 },
154                 0, 0, /* No default value */
155                 "reportInterval"
156                 },
157         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, reportAmount),
158                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
159                 -1,     /* IMPLICIT tag at current level */
160                 &asn_DEF_reportAmount_4,
161                 0,
162                 { 0, 0, 0 },
163                 0, 0, /* No default value */
164                 "reportAmount"
165                 },
166         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, reportQuantityCell),
167                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
168                 -1,     /* IMPLICIT tag at current level */
169                 &asn_DEF_MeasReportQuantity,
170                 0,
171                 { 0, 0, 0 },
172                 0, 0, /* No default value */
173                 "reportQuantityCell"
174                 },
175         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, maxReportCells),
176                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
177                 -1,     /* IMPLICIT tag at current level */
178                 &asn_DEF_NativeInteger,
179                 0,
180                 { &asn_OER_memb_maxReportCells_constr_14, &asn_PER_memb_maxReportCells_constr_14,  memb_maxReportCells_constraint_1 },
181                 0, 0, /* No default value */
182                 "maxReportCells"
183                 },
184         { ATF_POINTER, 2, offsetof(struct PeriodicalReportConfig, reportQuantityRS_Indexes),
185                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
186                 -1,     /* IMPLICIT tag at current level */
187                 &asn_DEF_MeasReportQuantity,
188                 0,
189                 { 0, 0, 0 },
190                 0, 0, /* No default value */
191                 "reportQuantityRS-Indexes"
192                 },
193         { ATF_POINTER, 1, offsetof(struct PeriodicalReportConfig, maxNrofRS_IndexesToReport),
194                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
195                 -1,     /* IMPLICIT tag at current level */
196                 &asn_DEF_NativeInteger,
197                 0,
198                 { &asn_OER_memb_maxNrofRS_IndexesToReport_constr_16, &asn_PER_memb_maxNrofRS_IndexesToReport_constr_16,  memb_maxNrofRS_IndexesToReport_constraint_1 },
199                 0, 0, /* No default value */
200                 "maxNrofRS-IndexesToReport"
201                 },
202         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, includeBeamMeasurements),
203                 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
204                 -1,     /* IMPLICIT tag at current level */
205                 &asn_DEF_BOOLEAN,
206                 0,
207                 { 0, 0, 0 },
208                 0, 0, /* No default value */
209                 "includeBeamMeasurements"
210                 },
211         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfig, useWhiteCellList),
212                 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
213                 -1,     /* IMPLICIT tag at current level */
214                 &asn_DEF_BOOLEAN,
215                 0,
216                 { 0, 0, 0 },
217                 0, 0, /* No default value */
218                 "useWhiteCellList"
219                 },
220 };
221 static const int asn_MAP_PeriodicalReportConfig_oms_1[] = { 5, 6 };
222 static const ber_tlv_tag_t asn_DEF_PeriodicalReportConfig_tags_1[] = {
223         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
224 };
225 static const asn_TYPE_tag2member_t asn_MAP_PeriodicalReportConfig_tag2el_1[] = {
226     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rsType */
227     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* reportInterval */
228     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* reportAmount */
229     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* reportQuantityCell */
230     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* maxReportCells */
231     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* reportQuantityRS-Indexes */
232     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* maxNrofRS-IndexesToReport */
233     { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* includeBeamMeasurements */
234     { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* useWhiteCellList */
235 };
236 asn_SEQUENCE_specifics_t asn_SPC_PeriodicalReportConfig_specs_1 = {
237         sizeof(struct PeriodicalReportConfig),
238         offsetof(struct PeriodicalReportConfig, _asn_ctx),
239         asn_MAP_PeriodicalReportConfig_tag2el_1,
240         9,      /* Count of tags in the map */
241         asn_MAP_PeriodicalReportConfig_oms_1,   /* Optional members */
242         2, 0,   /* Root/Additions */
243         9,      /* First extension addition */
244 };
245 asn_TYPE_descriptor_t asn_DEF_PeriodicalReportConfig = {
246         "PeriodicalReportConfig",
247         "PeriodicalReportConfig",
248         &asn_OP_SEQUENCE,
249         asn_DEF_PeriodicalReportConfig_tags_1,
250         sizeof(asn_DEF_PeriodicalReportConfig_tags_1)
251                 /sizeof(asn_DEF_PeriodicalReportConfig_tags_1[0]), /* 1 */
252         asn_DEF_PeriodicalReportConfig_tags_1,  /* Same as above */
253         sizeof(asn_DEF_PeriodicalReportConfig_tags_1)
254                 /sizeof(asn_DEF_PeriodicalReportConfig_tags_1[0]), /* 1 */
255         { 0, 0, SEQUENCE_constraint },
256         asn_MBR_PeriodicalReportConfig_1,
257         9,      /* Elements count */
258         &asn_SPC_PeriodicalReportConfig_specs_1 /* Additional specs */
259 };
260