[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / UCI-OnPUSCH.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "./22April22_Paging/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./22April22_Paging -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "UCI-OnPUSCH.h"
9
10 #include "BetaOffsets.h"
11 static int
12 memb_dynamic_constraint_2(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         size_t size;
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         /* Determine the number of elements */
24         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
25         
26         if((size == 4)) {
27                 /* Perform validation of the inner elements */
28                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
29         } else {
30                 ASN__CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 /*
38  * This type is implemented using NativeEnumerated,
39  * so here we adjust the DEF accordingly.
40  */
41 static asn_oer_constraints_t asn_OER_type_dynamic_constr_3 CC_NOTUSED = {
42         { 0, 0 },
43         4       /* (SIZE(4..4)) */};
44 static asn_per_constraints_t asn_PER_type_dynamic_constr_3 CC_NOTUSED = {
45         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
46         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
47         0, 0    /* No PER value map */
48 };
49 static asn_oer_constraints_t asn_OER_memb_dynamic_constr_3 CC_NOTUSED = {
50         { 0, 0 },
51         4       /* (SIZE(4..4)) */};
52 static asn_per_constraints_t asn_PER_memb_dynamic_constr_3 CC_NOTUSED = {
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
55         0, 0    /* No PER value map */
56 };
57 static asn_oer_constraints_t asn_OER_type_betaOffsets_constr_2 CC_NOTUSED = {
58         { 0, 0 },
59         -1};
60 static asn_per_constraints_t asn_PER_type_betaOffsets_constr_2 CC_NOTUSED = {
61         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
62         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
63         0, 0    /* No PER value map */
64 };
65 static asn_oer_constraints_t asn_OER_type_scaling_constr_6 CC_NOTUSED = {
66         { 0, 0 },
67         -1};
68 static asn_per_constraints_t asn_PER_type_scaling_constr_6 CC_NOTUSED = {
69         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
70         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
71         0, 0    /* No PER value map */
72 };
73 static asn_TYPE_member_t asn_MBR_dynamic_3[] = {
74         { ATF_POINTER, 0, 0,
75                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
76                 0,
77                 &asn_DEF_BetaOffsets,
78                 0,
79                 { 0, 0, 0 },
80                 0, 0, /* No default value */
81                 ""
82                 },
83 };
84 static const ber_tlv_tag_t asn_DEF_dynamic_tags_3[] = {
85         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
86         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
87 };
88 static asn_SET_OF_specifics_t asn_SPC_dynamic_specs_3 = {
89         sizeof(struct UCI_OnPUSCH__betaOffsets__dynamic),
90         offsetof(struct UCI_OnPUSCH__betaOffsets__dynamic, _asn_ctx),
91         0,      /* XER encoding is XMLDelimitedItemList */
92 };
93 static /* Use -fall-defs-global to expose */
94 asn_TYPE_descriptor_t asn_DEF_dynamic_3 = {
95         "dynamic",
96         "dynamic",
97         &asn_OP_SEQUENCE_OF,
98         asn_DEF_dynamic_tags_3,
99         sizeof(asn_DEF_dynamic_tags_3)
100                 /sizeof(asn_DEF_dynamic_tags_3[0]) - 1, /* 1 */
101         asn_DEF_dynamic_tags_3, /* Same as above */
102         sizeof(asn_DEF_dynamic_tags_3)
103                 /sizeof(asn_DEF_dynamic_tags_3[0]), /* 2 */
104         { &asn_OER_type_dynamic_constr_3, &asn_PER_type_dynamic_constr_3, SEQUENCE_OF_constraint },
105         asn_MBR_dynamic_3,
106         1,      /* Single element */
107         &asn_SPC_dynamic_specs_3        /* Additional specs */
108 };
109
110 static asn_TYPE_member_t asn_MBR_betaOffsets_2[] = {
111         { ATF_POINTER, 0, offsetof(struct UCI_OnPUSCH__betaOffsets, choice.dynamic),
112                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
113                 0,
114                 &asn_DEF_dynamic_3,
115                 0,
116                 { &asn_OER_memb_dynamic_constr_3, &asn_PER_memb_dynamic_constr_3,  memb_dynamic_constraint_2 },
117                 0, 0, /* No default value */
118                 "dynamic"
119                 },
120         { ATF_POINTER, 0, offsetof(struct UCI_OnPUSCH__betaOffsets, choice.semiStatic),
121                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
122                 -1,     /* IMPLICIT tag at current level */
123                 &asn_DEF_BetaOffsets,
124                 0,
125                 { 0, 0, 0 },
126                 0, 0, /* No default value */
127                 "semiStatic"
128                 },
129 };
130 static const asn_TYPE_tag2member_t asn_MAP_betaOffsets_tag2el_2[] = {
131     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dynamic */
132     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* semiStatic */
133 };
134 static asn_CHOICE_specifics_t asn_SPC_betaOffsets_specs_2 = {
135         sizeof(struct UCI_OnPUSCH__betaOffsets),
136         offsetof(struct UCI_OnPUSCH__betaOffsets, _asn_ctx),
137         offsetof(struct UCI_OnPUSCH__betaOffsets, present),
138         sizeof(((struct UCI_OnPUSCH__betaOffsets *)0)->present),
139         asn_MAP_betaOffsets_tag2el_2,
140         2,      /* Count of tags in the map */
141         0, 0,
142         -1      /* Extensions start */
143 };
144 static /* Use -fall-defs-global to expose */
145 asn_TYPE_descriptor_t asn_DEF_betaOffsets_2 = {
146         "betaOffsets",
147         "betaOffsets",
148         &asn_OP_CHOICE,
149         0,      /* No effective tags (pointer) */
150         0,      /* No effective tags (count) */
151         0,      /* No tags (pointer) */
152         0,      /* No tags (count) */
153         { &asn_OER_type_betaOffsets_constr_2, &asn_PER_type_betaOffsets_constr_2, CHOICE_constraint },
154         asn_MBR_betaOffsets_2,
155         2,      /* Elements count */
156         &asn_SPC_betaOffsets_specs_2    /* Additional specs */
157 };
158
159 static const asn_INTEGER_enum_map_t asn_MAP_scaling_value2enum_6[] = {
160         { 0,    4,      "f0p5" },
161         { 1,    5,      "f0p65" },
162         { 2,    4,      "f0p8" },
163         { 3,    2,      "f1" }
164 };
165 static const unsigned int asn_MAP_scaling_enum2value_6[] = {
166         0,      /* f0p5(0) */
167         1,      /* f0p65(1) */
168         2,      /* f0p8(2) */
169         3       /* f1(3) */
170 };
171 static const asn_INTEGER_specifics_t asn_SPC_scaling_specs_6 = {
172         asn_MAP_scaling_value2enum_6,   /* "tag" => N; sorted by tag */
173         asn_MAP_scaling_enum2value_6,   /* N => "tag"; sorted by N */
174         4,      /* Number of elements in the maps */
175         0,      /* Enumeration is not extensible */
176         1,      /* Strict enumeration */
177         0,      /* Native long size */
178         0
179 };
180 static const ber_tlv_tag_t asn_DEF_scaling_tags_6[] = {
181         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
182         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
183 };
184 static /* Use -fall-defs-global to expose */
185 asn_TYPE_descriptor_t asn_DEF_scaling_6 = {
186         "scaling",
187         "scaling",
188         &asn_OP_NativeEnumerated,
189         asn_DEF_scaling_tags_6,
190         sizeof(asn_DEF_scaling_tags_6)
191                 /sizeof(asn_DEF_scaling_tags_6[0]) - 1, /* 1 */
192         asn_DEF_scaling_tags_6, /* Same as above */
193         sizeof(asn_DEF_scaling_tags_6)
194                 /sizeof(asn_DEF_scaling_tags_6[0]), /* 2 */
195         { &asn_OER_type_scaling_constr_6, &asn_PER_type_scaling_constr_6, NativeEnumerated_constraint },
196         0, 0,   /* Defined elsewhere */
197         &asn_SPC_scaling_specs_6        /* Additional specs */
198 };
199
200 asn_TYPE_member_t asn_MBR_UCI_OnPUSCH_1[] = {
201         { ATF_POINTER, 1, offsetof(struct UCI_OnPUSCH, betaOffsets),
202                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
203                 +1,     /* EXPLICIT tag at current level */
204                 &asn_DEF_betaOffsets_2,
205                 0,
206                 { 0, 0, 0 },
207                 0, 0, /* No default value */
208                 "betaOffsets"
209                 },
210         { ATF_NOFLAGS, 0, offsetof(struct UCI_OnPUSCH, scaling),
211                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
212                 -1,     /* IMPLICIT tag at current level */
213                 &asn_DEF_scaling_6,
214                 0,
215                 { 0, 0, 0 },
216                 0, 0, /* No default value */
217                 "scaling"
218                 },
219 };
220 static const int asn_MAP_UCI_OnPUSCH_oms_1[] = { 0 };
221 static const ber_tlv_tag_t asn_DEF_UCI_OnPUSCH_tags_1[] = {
222         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
223 };
224 static const asn_TYPE_tag2member_t asn_MAP_UCI_OnPUSCH_tag2el_1[] = {
225     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* betaOffsets */
226     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* scaling */
227 };
228 asn_SEQUENCE_specifics_t asn_SPC_UCI_OnPUSCH_specs_1 = {
229         sizeof(struct UCI_OnPUSCH),
230         offsetof(struct UCI_OnPUSCH, _asn_ctx),
231         asn_MAP_UCI_OnPUSCH_tag2el_1,
232         2,      /* Count of tags in the map */
233         asn_MAP_UCI_OnPUSCH_oms_1,      /* Optional members */
234         1, 0,   /* Root/Additions */
235         -1,     /* First extension addition */
236 };
237 asn_TYPE_descriptor_t asn_DEF_UCI_OnPUSCH = {
238         "UCI-OnPUSCH",
239         "UCI-OnPUSCH",
240         &asn_OP_SEQUENCE,
241         asn_DEF_UCI_OnPUSCH_tags_1,
242         sizeof(asn_DEF_UCI_OnPUSCH_tags_1)
243                 /sizeof(asn_DEF_UCI_OnPUSCH_tags_1[0]), /* 1 */
244         asn_DEF_UCI_OnPUSCH_tags_1,     /* Same as above */
245         sizeof(asn_DEF_UCI_OnPUSCH_tags_1)
246                 /sizeof(asn_DEF_UCI_OnPUSCH_tags_1[0]), /* 1 */
247         { 0, 0, SEQUENCE_constraint },
248         asn_MBR_UCI_OnPUSCH_1,
249         2,      /* Elements count */
250         &asn_SPC_UCI_OnPUSCH_specs_1    /* Additional specs */
251 };
252