[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / SlotFormatIndicator.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../ASN1_Input/rrc_15_3_asn.asn1"
5  *      `asn1c -D ../RRC_output_14Nov/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
6  */
7
8 #include "SlotFormatIndicator.h"
9
10 #include "SlotFormatCombinationsPerCell.h"
11 static int
12 memb_dci_PayloadSize_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         long value;
15         
16         if(!sptr) {
17                 ASN__CTFAIL(app_key, td, sptr,
18                         "%s: value not given (%s:%d)",
19                         td->name, __FILE__, __LINE__);
20                 return -1;
21         }
22         
23         value = *(const long *)sptr;
24         
25         if((value >= 1 && value <= 128)) {
26                 /* Constraint check succeeded */
27                 return 0;
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static int
37 memb_slotFormatCombToAddModList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39         size_t size;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         /* Determine the number of elements */
49         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
50         
51         if((size >= 1 && size <= 16)) {
52                 /* Perform validation of the inner elements */
53                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
54         } else {
55                 ASN__CTFAIL(app_key, td, sptr,
56                         "%s: constraint failed (%s:%d)",
57                         td->name, __FILE__, __LINE__);
58                 return -1;
59         }
60 }
61
62 static int
63 memb_slotFormatCombToReleaseList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
64                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
65         size_t size;
66         
67         if(!sptr) {
68                 ASN__CTFAIL(app_key, td, sptr,
69                         "%s: value not given (%s:%d)",
70                         td->name, __FILE__, __LINE__);
71                 return -1;
72         }
73         
74         /* Determine the number of elements */
75         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
76         
77         if((size >= 1 && size <= 16)) {
78                 /* Perform validation of the inner elements */
79                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
80         } else {
81                 ASN__CTFAIL(app_key, td, sptr,
82                         "%s: constraint failed (%s:%d)",
83                         td->name, __FILE__, __LINE__);
84                 return -1;
85         }
86 }
87
88 static asn_oer_constraints_t asn_OER_type_slotFormatCombToAddModList_constr_4 CC_NOTUSED = {
89         { 0, 0 },
90         -1      /* (SIZE(1..16)) */};
91 static asn_per_constraints_t asn_PER_type_slotFormatCombToAddModList_constr_4 CC_NOTUSED = {
92         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
93         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
94         0, 0    /* No PER value map */
95 };
96 static asn_oer_constraints_t asn_OER_type_slotFormatCombToReleaseList_constr_6 CC_NOTUSED = {
97         { 0, 0 },
98         -1      /* (SIZE(1..16)) */};
99 static asn_per_constraints_t asn_PER_type_slotFormatCombToReleaseList_constr_6 CC_NOTUSED = {
100         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
101         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
102         0, 0    /* No PER value map */
103 };
104 static asn_oer_constraints_t asn_OER_memb_dci_PayloadSize_constr_3 CC_NOTUSED = {
105         { 1, 1 }        /* (1..128) */,
106         -1};
107 static asn_per_constraints_t asn_PER_memb_dci_PayloadSize_constr_3 CC_NOTUSED = {
108         { APC_CONSTRAINED,       7,  7,  1,  128 }      /* (1..128) */,
109         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
110         0, 0    /* No PER value map */
111 };
112 static asn_oer_constraints_t asn_OER_memb_slotFormatCombToAddModList_constr_4 CC_NOTUSED = {
113         { 0, 0 },
114         -1      /* (SIZE(1..16)) */};
115 static asn_per_constraints_t asn_PER_memb_slotFormatCombToAddModList_constr_4 CC_NOTUSED = {
116         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
117         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
118         0, 0    /* No PER value map */
119 };
120 static asn_oer_constraints_t asn_OER_memb_slotFormatCombToReleaseList_constr_6 CC_NOTUSED = {
121         { 0, 0 },
122         -1      /* (SIZE(1..16)) */};
123 static asn_per_constraints_t asn_PER_memb_slotFormatCombToReleaseList_constr_6 CC_NOTUSED = {
124         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
125         { APC_CONSTRAINED,       4,  4,  1,  16 }       /* (SIZE(1..16)) */,
126         0, 0    /* No PER value map */
127 };
128 static asn_TYPE_member_t asn_MBR_slotFormatCombToAddModList_4[] = {
129         { ATF_POINTER, 0, 0,
130                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
131                 0,
132                 &asn_DEF_SlotFormatCombinationsPerCell,
133                 0,
134                 { 0, 0, 0 },
135                 0, 0, /* No default value */
136                 ""
137                 },
138 };
139 static const ber_tlv_tag_t asn_DEF_slotFormatCombToAddModList_tags_4[] = {
140         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
141         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
142 };
143 static asn_SET_OF_specifics_t asn_SPC_slotFormatCombToAddModList_specs_4 = {
144         sizeof(struct SlotFormatIndicator__slotFormatCombToAddModList),
145         offsetof(struct SlotFormatIndicator__slotFormatCombToAddModList, _asn_ctx),
146         0,      /* XER encoding is XMLDelimitedItemList */
147 };
148 static /* Use -fall-defs-global to expose */
149 asn_TYPE_descriptor_t asn_DEF_slotFormatCombToAddModList_4 = {
150         "slotFormatCombToAddModList",
151         "slotFormatCombToAddModList",
152         &asn_OP_SEQUENCE_OF,
153         asn_DEF_slotFormatCombToAddModList_tags_4,
154         sizeof(asn_DEF_slotFormatCombToAddModList_tags_4)
155                 /sizeof(asn_DEF_slotFormatCombToAddModList_tags_4[0]) - 1, /* 1 */
156         asn_DEF_slotFormatCombToAddModList_tags_4,      /* Same as above */
157         sizeof(asn_DEF_slotFormatCombToAddModList_tags_4)
158                 /sizeof(asn_DEF_slotFormatCombToAddModList_tags_4[0]), /* 2 */
159         { &asn_OER_type_slotFormatCombToAddModList_constr_4, &asn_PER_type_slotFormatCombToAddModList_constr_4, SEQUENCE_OF_constraint },
160         asn_MBR_slotFormatCombToAddModList_4,
161         1,      /* Single element */
162         &asn_SPC_slotFormatCombToAddModList_specs_4     /* Additional specs */
163 };
164
165 static asn_TYPE_member_t asn_MBR_slotFormatCombToReleaseList_6[] = {
166         { ATF_POINTER, 0, 0,
167                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
168                 0,
169                 &asn_DEF_ServCellIndexRrc,
170                 0,
171                 { 0, 0, 0 },
172                 0, 0, /* No default value */
173                 ""
174                 },
175 };
176 static const ber_tlv_tag_t asn_DEF_slotFormatCombToReleaseList_tags_6[] = {
177         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
178         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
179 };
180 static asn_SET_OF_specifics_t asn_SPC_slotFormatCombToReleaseList_specs_6 = {
181         sizeof(struct SlotFormatIndicator__slotFormatCombToReleaseList),
182         offsetof(struct SlotFormatIndicator__slotFormatCombToReleaseList, _asn_ctx),
183         0,      /* XER encoding is XMLDelimitedItemList */
184 };
185 static /* Use -fall-defs-global to expose */
186 asn_TYPE_descriptor_t asn_DEF_slotFormatCombToReleaseList_6 = {
187         "slotFormatCombToReleaseList",
188         "slotFormatCombToReleaseList",
189         &asn_OP_SEQUENCE_OF,
190         asn_DEF_slotFormatCombToReleaseList_tags_6,
191         sizeof(asn_DEF_slotFormatCombToReleaseList_tags_6)
192                 /sizeof(asn_DEF_slotFormatCombToReleaseList_tags_6[0]) - 1, /* 1 */
193         asn_DEF_slotFormatCombToReleaseList_tags_6,     /* Same as above */
194         sizeof(asn_DEF_slotFormatCombToReleaseList_tags_6)
195                 /sizeof(asn_DEF_slotFormatCombToReleaseList_tags_6[0]), /* 2 */
196         { &asn_OER_type_slotFormatCombToReleaseList_constr_6, &asn_PER_type_slotFormatCombToReleaseList_constr_6, SEQUENCE_OF_constraint },
197         asn_MBR_slotFormatCombToReleaseList_6,
198         1,      /* Single element */
199         &asn_SPC_slotFormatCombToReleaseList_specs_6    /* Additional specs */
200 };
201
202 asn_TYPE_member_t asn_MBR_SlotFormatIndicator_1[] = {
203         { ATF_NOFLAGS, 0, offsetof(struct SlotFormatIndicator, sfi_RNTI),
204                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
205                 -1,     /* IMPLICIT tag at current level */
206                 &asn_DEF_RNTI_Value,
207                 0,
208                 { 0, 0, 0 },
209                 0, 0, /* No default value */
210                 "sfi-RNTI"
211                 },
212         { ATF_NOFLAGS, 0, offsetof(struct SlotFormatIndicator, dci_PayloadSize),
213                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
214                 -1,     /* IMPLICIT tag at current level */
215                 &asn_DEF_NativeInteger,
216                 0,
217                 { &asn_OER_memb_dci_PayloadSize_constr_3, &asn_PER_memb_dci_PayloadSize_constr_3,  memb_dci_PayloadSize_constraint_1 },
218                 0, 0, /* No default value */
219                 "dci-PayloadSize"
220                 },
221         { ATF_POINTER, 2, offsetof(struct SlotFormatIndicator, slotFormatCombToAddModList),
222                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
223                 0,
224                 &asn_DEF_slotFormatCombToAddModList_4,
225                 0,
226                 { &asn_OER_memb_slotFormatCombToAddModList_constr_4, &asn_PER_memb_slotFormatCombToAddModList_constr_4,  memb_slotFormatCombToAddModList_constraint_1 },
227                 0, 0, /* No default value */
228                 "slotFormatCombToAddModList"
229                 },
230         { ATF_POINTER, 1, offsetof(struct SlotFormatIndicator, slotFormatCombToReleaseList),
231                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
232                 0,
233                 &asn_DEF_slotFormatCombToReleaseList_6,
234                 0,
235                 { &asn_OER_memb_slotFormatCombToReleaseList_constr_6, &asn_PER_memb_slotFormatCombToReleaseList_constr_6,  memb_slotFormatCombToReleaseList_constraint_1 },
236                 0, 0, /* No default value */
237                 "slotFormatCombToReleaseList"
238                 },
239 };
240 static const int asn_MAP_SlotFormatIndicator_oms_1[] = { 2, 3 };
241 static const ber_tlv_tag_t asn_DEF_SlotFormatIndicator_tags_1[] = {
242         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
243 };
244 static const asn_TYPE_tag2member_t asn_MAP_SlotFormatIndicator_tag2el_1[] = {
245     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sfi-RNTI */
246     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dci-PayloadSize */
247     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* slotFormatCombToAddModList */
248     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* slotFormatCombToReleaseList */
249 };
250 asn_SEQUENCE_specifics_t asn_SPC_SlotFormatIndicator_specs_1 = {
251         sizeof(struct SlotFormatIndicator),
252         offsetof(struct SlotFormatIndicator, _asn_ctx),
253         asn_MAP_SlotFormatIndicator_tag2el_1,
254         4,      /* Count of tags in the map */
255         asn_MAP_SlotFormatIndicator_oms_1,      /* Optional members */
256         2, 0,   /* Root/Additions */
257         4,      /* First extension addition */
258 };
259 asn_TYPE_descriptor_t asn_DEF_SlotFormatIndicator = {
260         "SlotFormatIndicator",
261         "SlotFormatIndicator",
262         &asn_OP_SEQUENCE,
263         asn_DEF_SlotFormatIndicator_tags_1,
264         sizeof(asn_DEF_SlotFormatIndicator_tags_1)
265                 /sizeof(asn_DEF_SlotFormatIndicator_tags_1[0]), /* 1 */
266         asn_DEF_SlotFormatIndicator_tags_1,     /* Same as above */
267         sizeof(asn_DEF_SlotFormatIndicator_tags_1)
268                 /sizeof(asn_DEF_SlotFormatIndicator_tags_1[0]), /* 1 */
269         { 0, 0, SEQUENCE_constraint },
270         asn_MBR_SlotFormatIndicator_1,
271         4,      /* Elements count */
272         &asn_SPC_SlotFormatIndicator_specs_1    /* Additional specs */
273 };
274