[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / codec_utils / RRC / FrequencyInfoUL.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 "FrequencyInfoUL.h"
9
10 #include "MultiFrequencyBandListNR.h"
11 #include "SCS-SpecificCarrier.h"
12 /*
13  * This type is implemented using NativeEnumerated,
14  * so here we adjust the DEF accordingly.
15  */
16 static int
17 memb_scs_SpecificCarrierList_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 <= 5)) {
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_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
43         { 0, 0 },
44         -1      /* (SIZE(1..5)) */};
45 static asn_per_constraints_t asn_PER_type_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
46         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
47         { APC_CONSTRAINED,       3,  3,  1,  5 }        /* (SIZE(1..5)) */,
48         0, 0    /* No PER value map */
49 };
50 static asn_oer_constraints_t asn_OER_type_frequencyShift7p5khz_constr_8 CC_NOTUSED = {
51         { 0, 0 },
52         -1};
53 static asn_per_constraints_t asn_PER_type_frequencyShift7p5khz_constr_8 CC_NOTUSED = {
54         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
55         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
56         0, 0    /* No PER value map */
57 };
58 static asn_oer_constraints_t asn_OER_memb_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
59         { 0, 0 },
60         -1      /* (SIZE(1..5)) */};
61 static asn_per_constraints_t asn_PER_memb_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
62         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
63         { APC_CONSTRAINED,       3,  3,  1,  5 }        /* (SIZE(1..5)) */,
64         0, 0    /* No PER value map */
65 };
66 static asn_TYPE_member_t asn_MBR_scs_SpecificCarrierList_4[] = {
67         { ATF_POINTER, 0, 0,
68                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
69                 0,
70                 &asn_DEF_SCS_SpecificCarrier,
71                 0,
72                 { 0, 0, 0 },
73                 0, 0, /* No default value */
74                 ""
75                 },
76 };
77 static const ber_tlv_tag_t asn_DEF_scs_SpecificCarrierList_tags_4[] = {
78         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
79         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
80 };
81 static asn_SET_OF_specifics_t asn_SPC_scs_SpecificCarrierList_specs_4 = {
82         sizeof(struct FrequencyInfoUL__scs_SpecificCarrierList),
83         offsetof(struct FrequencyInfoUL__scs_SpecificCarrierList, _asn_ctx),
84         0,      /* XER encoding is XMLDelimitedItemList */
85 };
86 static /* Use -fall-defs-global to expose */
87 asn_TYPE_descriptor_t asn_DEF_scs_SpecificCarrierList_4 = {
88         "scs-SpecificCarrierList",
89         "scs-SpecificCarrierList",
90         &asn_OP_SEQUENCE_OF,
91         asn_DEF_scs_SpecificCarrierList_tags_4,
92         sizeof(asn_DEF_scs_SpecificCarrierList_tags_4)
93                 /sizeof(asn_DEF_scs_SpecificCarrierList_tags_4[0]) - 1, /* 1 */
94         asn_DEF_scs_SpecificCarrierList_tags_4, /* Same as above */
95         sizeof(asn_DEF_scs_SpecificCarrierList_tags_4)
96                 /sizeof(asn_DEF_scs_SpecificCarrierList_tags_4[0]), /* 2 */
97         { &asn_OER_type_scs_SpecificCarrierList_constr_4, &asn_PER_type_scs_SpecificCarrierList_constr_4, SEQUENCE_OF_constraint },
98         asn_MBR_scs_SpecificCarrierList_4,
99         1,      /* Single element */
100         &asn_SPC_scs_SpecificCarrierList_specs_4        /* Additional specs */
101 };
102
103 static const asn_INTEGER_enum_map_t asn_MAP_frequencyShift7p5khz_value2enum_8[] = {
104         { 0,    4,      "true" }
105 };
106 static const unsigned int asn_MAP_frequencyShift7p5khz_enum2value_8[] = {
107         0       /* true(0) */
108 };
109 static const asn_INTEGER_specifics_t asn_SPC_frequencyShift7p5khz_specs_8 = {
110         asn_MAP_frequencyShift7p5khz_value2enum_8,      /* "tag" => N; sorted by tag */
111         asn_MAP_frequencyShift7p5khz_enum2value_8,      /* N => "tag"; sorted by N */
112         1,      /* 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_frequencyShift7p5khz_tags_8[] = {
119         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
120         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
121 };
122 static /* Use -fall-defs-global to expose */
123 asn_TYPE_descriptor_t asn_DEF_frequencyShift7p5khz_8 = {
124         "frequencyShift7p5khz",
125         "frequencyShift7p5khz",
126         &asn_OP_NativeEnumerated,
127         asn_DEF_frequencyShift7p5khz_tags_8,
128         sizeof(asn_DEF_frequencyShift7p5khz_tags_8)
129                 /sizeof(asn_DEF_frequencyShift7p5khz_tags_8[0]) - 1, /* 1 */
130         asn_DEF_frequencyShift7p5khz_tags_8,    /* Same as above */
131         sizeof(asn_DEF_frequencyShift7p5khz_tags_8)
132                 /sizeof(asn_DEF_frequencyShift7p5khz_tags_8[0]), /* 2 */
133         { &asn_OER_type_frequencyShift7p5khz_constr_8, &asn_PER_type_frequencyShift7p5khz_constr_8, NativeEnumerated_constraint },
134         0, 0,   /* Defined elsewhere */
135         &asn_SPC_frequencyShift7p5khz_specs_8   /* Additional specs */
136 };
137
138 asn_TYPE_member_t asn_MBR_FrequencyInfoUL_1[] = {
139         { ATF_POINTER, 2, offsetof(struct FrequencyInfoUL, frequencyBandList),
140                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
141                 -1,     /* IMPLICIT tag at current level */
142                 &asn_DEF_MultiFrequencyBandListNR,
143                 0,
144                 { 0, 0, 0 },
145                 0, 0, /* No default value */
146                 "frequencyBandList"
147                 },
148         { ATF_POINTER, 1, offsetof(struct FrequencyInfoUL, absoluteFrequencyPointA),
149                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
150                 -1,     /* IMPLICIT tag at current level */
151                 &asn_DEF_ARFCN_ValueNR,
152                 0,
153                 { 0, 0, 0 },
154                 0, 0, /* No default value */
155                 "absoluteFrequencyPointA"
156                 },
157         { ATF_NOFLAGS, 0, offsetof(struct FrequencyInfoUL, scs_SpecificCarrierList),
158                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
159                 0,
160                 &asn_DEF_scs_SpecificCarrierList_4,
161                 0,
162                 { &asn_OER_memb_scs_SpecificCarrierList_constr_4, &asn_PER_memb_scs_SpecificCarrierList_constr_4,  memb_scs_SpecificCarrierList_constraint_1 },
163                 0, 0, /* No default value */
164                 "scs-SpecificCarrierList"
165                 },
166         { ATF_POINTER, 3, offsetof(struct FrequencyInfoUL, additionalSpectrumEmission),
167                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
168                 -1,     /* IMPLICIT tag at current level */
169                 &asn_DEF_AdditionalSpectrumEmission,
170                 0,
171                 { 0, 0, 0 },
172                 0, 0, /* No default value */
173                 "additionalSpectrumEmission"
174                 },
175         { ATF_POINTER, 2, offsetof(struct FrequencyInfoUL, p_Max),
176                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
177                 -1,     /* IMPLICIT tag at current level */
178                 &asn_DEF_P_Max,
179                 0,
180                 { 0, 0, 0 },
181                 0, 0, /* No default value */
182                 "p-Max"
183                 },
184         { ATF_POINTER, 1, offsetof(struct FrequencyInfoUL, frequencyShift7p5khz),
185                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
186                 -1,     /* IMPLICIT tag at current level */
187                 &asn_DEF_frequencyShift7p5khz_8,
188                 0,
189                 { 0, 0, 0 },
190                 0, 0, /* No default value */
191                 "frequencyShift7p5khz"
192                 },
193 };
194 static const int asn_MAP_FrequencyInfoUL_oms_1[] = { 0, 1, 3, 4, 5 };
195 static const ber_tlv_tag_t asn_DEF_FrequencyInfoUL_tags_1[] = {
196         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
197 };
198 static const asn_TYPE_tag2member_t asn_MAP_FrequencyInfoUL_tag2el_1[] = {
199     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* frequencyBandList */
200     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* absoluteFrequencyPointA */
201     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* scs-SpecificCarrierList */
202     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* additionalSpectrumEmission */
203     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* p-Max */
204     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* frequencyShift7p5khz */
205 };
206 asn_SEQUENCE_specifics_t asn_SPC_FrequencyInfoUL_specs_1 = {
207         sizeof(struct FrequencyInfoUL),
208         offsetof(struct FrequencyInfoUL, _asn_ctx),
209         asn_MAP_FrequencyInfoUL_tag2el_1,
210         6,      /* Count of tags in the map */
211         asn_MAP_FrequencyInfoUL_oms_1,  /* Optional members */
212         5, 0,   /* Root/Additions */
213         6,      /* First extension addition */
214 };
215 asn_TYPE_descriptor_t asn_DEF_FrequencyInfoUL = {
216         "FrequencyInfoUL",
217         "FrequencyInfoUL",
218         &asn_OP_SEQUENCE,
219         asn_DEF_FrequencyInfoUL_tags_1,
220         sizeof(asn_DEF_FrequencyInfoUL_tags_1)
221                 /sizeof(asn_DEF_FrequencyInfoUL_tags_1[0]), /* 1 */
222         asn_DEF_FrequencyInfoUL_tags_1, /* Same as above */
223         sizeof(asn_DEF_FrequencyInfoUL_tags_1)
224                 /sizeof(asn_DEF_FrequencyInfoUL_tags_1[0]), /* 1 */
225         { 0, 0, SEQUENCE_constraint },
226         asn_MBR_FrequencyInfoUL_1,
227         6,      /* Elements count */
228         &asn_SPC_FrequencyInfoUL_specs_1        /* Additional specs */
229 };
230