[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / NZP-CSI-RS-ResourceSet.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 "NZP-CSI-RS-ResourceSet.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 static int
19 memb_nzp_CSI_RS_Resources_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         size_t size;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         /* Determine the number of elements */
31         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
32         
33         if((size >= 1 && size <= 64)) {
34                 /* Perform validation of the inner elements */
35                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
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 int
45 memb_aperiodicTriggeringOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
46                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
47         long value;
48         
49         if(!sptr) {
50                 ASN__CTFAIL(app_key, td, sptr,
51                         "%s: value not given (%s:%d)",
52                         td->name, __FILE__, __LINE__);
53                 return -1;
54         }
55         
56         value = *(const long *)sptr;
57         
58         if((value >= 0 && value <= 6)) {
59                 /* Constraint check succeeded */
60                 return 0;
61         } else {
62                 ASN__CTFAIL(app_key, td, sptr,
63                         "%s: constraint failed (%s:%d)",
64                         td->name, __FILE__, __LINE__);
65                 return -1;
66         }
67 }
68
69 static asn_oer_constraints_t asn_OER_type_nzp_CSI_RS_Resources_constr_3 CC_NOTUSED = {
70         { 0, 0 },
71         -1      /* (SIZE(1..64)) */};
72 static asn_per_constraints_t asn_PER_type_nzp_CSI_RS_Resources_constr_3 CC_NOTUSED = {
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
75         0, 0    /* No PER value map */
76 };
77 static asn_oer_constraints_t asn_OER_type_repetition_constr_5 CC_NOTUSED = {
78         { 0, 0 },
79         -1};
80 static asn_per_constraints_t asn_PER_type_repetition_constr_5 CC_NOTUSED = {
81         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
82         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
83         0, 0    /* No PER value map */
84 };
85 static asn_oer_constraints_t asn_OER_type_trs_Info_constr_9 CC_NOTUSED = {
86         { 0, 0 },
87         -1};
88 static asn_per_constraints_t asn_PER_type_trs_Info_constr_9 CC_NOTUSED = {
89         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
90         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
91         0, 0    /* No PER value map */
92 };
93 static asn_oer_constraints_t asn_OER_memb_nzp_CSI_RS_Resources_constr_3 CC_NOTUSED = {
94         { 0, 0 },
95         -1      /* (SIZE(1..64)) */};
96 static asn_per_constraints_t asn_PER_memb_nzp_CSI_RS_Resources_constr_3 CC_NOTUSED = {
97         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
98         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
99         0, 0    /* No PER value map */
100 };
101 static asn_oer_constraints_t asn_OER_memb_aperiodicTriggeringOffset_constr_8 CC_NOTUSED = {
102         { 1, 1 }        /* (0..6) */,
103         -1};
104 static asn_per_constraints_t asn_PER_memb_aperiodicTriggeringOffset_constr_8 CC_NOTUSED = {
105         { APC_CONSTRAINED,       3,  3,  0,  6 }        /* (0..6) */,
106         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
107         0, 0    /* No PER value map */
108 };
109 static asn_TYPE_member_t asn_MBR_nzp_CSI_RS_Resources_3[] = {
110         { ATF_POINTER, 0, 0,
111                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
112                 0,
113                 &asn_DEF_NZP_CSI_RS_ResourceId,
114                 0,
115                 { 0, 0, 0 },
116                 0, 0, /* No default value */
117                 ""
118                 },
119 };
120 static const ber_tlv_tag_t asn_DEF_nzp_CSI_RS_Resources_tags_3[] = {
121         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
122         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
123 };
124 static asn_SET_OF_specifics_t asn_SPC_nzp_CSI_RS_Resources_specs_3 = {
125         sizeof(struct NZP_CSI_RS_ResourceSet__nzp_CSI_RS_Resources),
126         offsetof(struct NZP_CSI_RS_ResourceSet__nzp_CSI_RS_Resources, _asn_ctx),
127         0,      /* XER encoding is XMLDelimitedItemList */
128 };
129 static /* Use -fall-defs-global to expose */
130 asn_TYPE_descriptor_t asn_DEF_nzp_CSI_RS_Resources_3 = {
131         "nzp-CSI-RS-Resources",
132         "nzp-CSI-RS-Resources",
133         &asn_OP_SEQUENCE_OF,
134         asn_DEF_nzp_CSI_RS_Resources_tags_3,
135         sizeof(asn_DEF_nzp_CSI_RS_Resources_tags_3)
136                 /sizeof(asn_DEF_nzp_CSI_RS_Resources_tags_3[0]) - 1, /* 1 */
137         asn_DEF_nzp_CSI_RS_Resources_tags_3,    /* Same as above */
138         sizeof(asn_DEF_nzp_CSI_RS_Resources_tags_3)
139                 /sizeof(asn_DEF_nzp_CSI_RS_Resources_tags_3[0]), /* 2 */
140         { &asn_OER_type_nzp_CSI_RS_Resources_constr_3, &asn_PER_type_nzp_CSI_RS_Resources_constr_3, SEQUENCE_OF_constraint },
141         asn_MBR_nzp_CSI_RS_Resources_3,
142         1,      /* Single element */
143         &asn_SPC_nzp_CSI_RS_Resources_specs_3   /* Additional specs */
144 };
145
146 static const asn_INTEGER_enum_map_t asn_MAP_repetition_value2enum_5[] = {
147         { 0,    2,      "on" },
148         { 1,    3,      "off" }
149 };
150 static const unsigned int asn_MAP_repetition_enum2value_5[] = {
151         1,      /* off(1) */
152         0       /* on(0) */
153 };
154 static const asn_INTEGER_specifics_t asn_SPC_repetition_specs_5 = {
155         asn_MAP_repetition_value2enum_5,        /* "tag" => N; sorted by tag */
156         asn_MAP_repetition_enum2value_5,        /* N => "tag"; sorted by N */
157         2,      /* Number of elements in the maps */
158         0,      /* Enumeration is not extensible */
159         1,      /* Strict enumeration */
160         0,      /* Native long size */
161         0
162 };
163 static const ber_tlv_tag_t asn_DEF_repetition_tags_5[] = {
164         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
165         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
166 };
167 static /* Use -fall-defs-global to expose */
168 asn_TYPE_descriptor_t asn_DEF_repetition_5 = {
169         "repetition",
170         "repetition",
171         &asn_OP_NativeEnumerated,
172         asn_DEF_repetition_tags_5,
173         sizeof(asn_DEF_repetition_tags_5)
174                 /sizeof(asn_DEF_repetition_tags_5[0]) - 1, /* 1 */
175         asn_DEF_repetition_tags_5,      /* Same as above */
176         sizeof(asn_DEF_repetition_tags_5)
177                 /sizeof(asn_DEF_repetition_tags_5[0]), /* 2 */
178         { &asn_OER_type_repetition_constr_5, &asn_PER_type_repetition_constr_5, NativeEnumerated_constraint },
179         0, 0,   /* Defined elsewhere */
180         &asn_SPC_repetition_specs_5     /* Additional specs */
181 };
182
183 static const asn_INTEGER_enum_map_t asn_MAP_trs_Info_value2enum_9[] = {
184         { 0,    4,      "true" }
185 };
186 static const unsigned int asn_MAP_trs_Info_enum2value_9[] = {
187         0       /* true(0) */
188 };
189 static const asn_INTEGER_specifics_t asn_SPC_trs_Info_specs_9 = {
190         asn_MAP_trs_Info_value2enum_9,  /* "tag" => N; sorted by tag */
191         asn_MAP_trs_Info_enum2value_9,  /* N => "tag"; sorted by N */
192         1,      /* Number of elements in the maps */
193         0,      /* Enumeration is not extensible */
194         1,      /* Strict enumeration */
195         0,      /* Native long size */
196         0
197 };
198 static const ber_tlv_tag_t asn_DEF_trs_Info_tags_9[] = {
199         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
200         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
201 };
202 static /* Use -fall-defs-global to expose */
203 asn_TYPE_descriptor_t asn_DEF_trs_Info_9 = {
204         "trs-Info",
205         "trs-Info",
206         &asn_OP_NativeEnumerated,
207         asn_DEF_trs_Info_tags_9,
208         sizeof(asn_DEF_trs_Info_tags_9)
209                 /sizeof(asn_DEF_trs_Info_tags_9[0]) - 1, /* 1 */
210         asn_DEF_trs_Info_tags_9,        /* Same as above */
211         sizeof(asn_DEF_trs_Info_tags_9)
212                 /sizeof(asn_DEF_trs_Info_tags_9[0]), /* 2 */
213         { &asn_OER_type_trs_Info_constr_9, &asn_PER_type_trs_Info_constr_9, NativeEnumerated_constraint },
214         0, 0,   /* Defined elsewhere */
215         &asn_SPC_trs_Info_specs_9       /* Additional specs */
216 };
217
218 asn_TYPE_member_t asn_MBR_NZP_CSI_RS_ResourceSet_1[] = {
219         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_ResourceSet, nzp_CSI_ResourceSetId),
220                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
221                 -1,     /* IMPLICIT tag at current level */
222                 &asn_DEF_NZP_CSI_RS_ResourceSetId,
223                 0,
224                 { 0, 0, 0 },
225                 0, 0, /* No default value */
226                 "nzp-CSI-ResourceSetId"
227                 },
228         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_ResourceSet, nzp_CSI_RS_Resources),
229                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
230                 0,
231                 &asn_DEF_nzp_CSI_RS_Resources_3,
232                 0,
233                 { &asn_OER_memb_nzp_CSI_RS_Resources_constr_3, &asn_PER_memb_nzp_CSI_RS_Resources_constr_3,  memb_nzp_CSI_RS_Resources_constraint_1 },
234                 0, 0, /* No default value */
235                 "nzp-CSI-RS-Resources"
236                 },
237         { ATF_POINTER, 3, offsetof(struct NZP_CSI_RS_ResourceSet, repetition),
238                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
239                 -1,     /* IMPLICIT tag at current level */
240                 &asn_DEF_repetition_5,
241                 0,
242                 { 0, 0, 0 },
243                 0, 0, /* No default value */
244                 "repetition"
245                 },
246         { ATF_POINTER, 2, offsetof(struct NZP_CSI_RS_ResourceSet, aperiodicTriggeringOffset),
247                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
248                 -1,     /* IMPLICIT tag at current level */
249                 &asn_DEF_NativeInteger,
250                 0,
251                 { &asn_OER_memb_aperiodicTriggeringOffset_constr_8, &asn_PER_memb_aperiodicTriggeringOffset_constr_8,  memb_aperiodicTriggeringOffset_constraint_1 },
252                 0, 0, /* No default value */
253                 "aperiodicTriggeringOffset"
254                 },
255         { ATF_POINTER, 1, offsetof(struct NZP_CSI_RS_ResourceSet, trs_Info),
256                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
257                 -1,     /* IMPLICIT tag at current level */
258                 &asn_DEF_trs_Info_9,
259                 0,
260                 { 0, 0, 0 },
261                 0, 0, /* No default value */
262                 "trs-Info"
263                 },
264 };
265 static const int asn_MAP_NZP_CSI_RS_ResourceSet_oms_1[] = { 2, 3, 4 };
266 static const ber_tlv_tag_t asn_DEF_NZP_CSI_RS_ResourceSet_tags_1[] = {
267         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
268 };
269 static const asn_TYPE_tag2member_t asn_MAP_NZP_CSI_RS_ResourceSet_tag2el_1[] = {
270     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nzp-CSI-ResourceSetId */
271     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nzp-CSI-RS-Resources */
272     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* repetition */
273     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* aperiodicTriggeringOffset */
274     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* trs-Info */
275 };
276 asn_SEQUENCE_specifics_t asn_SPC_NZP_CSI_RS_ResourceSet_specs_1 = {
277         sizeof(struct NZP_CSI_RS_ResourceSet),
278         offsetof(struct NZP_CSI_RS_ResourceSet, _asn_ctx),
279         asn_MAP_NZP_CSI_RS_ResourceSet_tag2el_1,
280         5,      /* Count of tags in the map */
281         asn_MAP_NZP_CSI_RS_ResourceSet_oms_1,   /* Optional members */
282         3, 0,   /* Root/Additions */
283         5,      /* First extension addition */
284 };
285 asn_TYPE_descriptor_t asn_DEF_NZP_CSI_RS_ResourceSet = {
286         "NZP-CSI-RS-ResourceSet",
287         "NZP-CSI-RS-ResourceSet",
288         &asn_OP_SEQUENCE,
289         asn_DEF_NZP_CSI_RS_ResourceSet_tags_1,
290         sizeof(asn_DEF_NZP_CSI_RS_ResourceSet_tags_1)
291                 /sizeof(asn_DEF_NZP_CSI_RS_ResourceSet_tags_1[0]), /* 1 */
292         asn_DEF_NZP_CSI_RS_ResourceSet_tags_1,  /* Same as above */
293         sizeof(asn_DEF_NZP_CSI_RS_ResourceSet_tags_1)
294                 /sizeof(asn_DEF_NZP_CSI_RS_ResourceSet_tags_1[0]), /* 1 */
295         { 0, 0, SEQUENCE_constraint },
296         asn_MBR_NZP_CSI_RS_ResourceSet_1,
297         5,      /* Elements count */
298         &asn_SPC_NZP_CSI_RS_ResourceSet_specs_1 /* Additional specs */
299 };
300