[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / GapConfig.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 "GapConfig.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 /*
19  * This type is implemented using NativeEnumerated,
20  * so here we adjust the DEF accordingly.
21  */
22 static int
23 memb_gapOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
24                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
25         long value;
26         
27         if(!sptr) {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: value not given (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33         
34         value = *(const long *)sptr;
35         
36         if((value >= 0 && value <= 159)) {
37                 /* Constraint check succeeded */
38                 return 0;
39         } else {
40                 ASN__CTFAIL(app_key, td, sptr,
41                         "%s: constraint failed (%s:%d)",
42                         td->name, __FILE__, __LINE__);
43                 return -1;
44         }
45 }
46
47 static asn_oer_constraints_t asn_OER_type_mgl_constr_3 CC_NOTUSED = {
48         { 0, 0 },
49         -1};
50 static asn_per_constraints_t asn_PER_type_mgl_constr_3 CC_NOTUSED = {
51         { APC_CONSTRAINED,       3,  3,  0,  5 }        /* (0..5) */,
52         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
53         0, 0    /* No PER value map */
54 };
55 static asn_oer_constraints_t asn_OER_type_mgrp_constr_10 CC_NOTUSED = {
56         { 0, 0 },
57         -1};
58 static asn_per_constraints_t asn_PER_type_mgrp_constr_10 CC_NOTUSED = {
59         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
60         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
61         0, 0    /* No PER value map */
62 };
63 static asn_oer_constraints_t asn_OER_type_mgta_constr_15 CC_NOTUSED = {
64         { 0, 0 },
65         -1};
66 static asn_per_constraints_t asn_PER_type_mgta_constr_15 CC_NOTUSED = {
67         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
68         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
69         0, 0    /* No PER value map */
70 };
71 static asn_oer_constraints_t asn_OER_memb_gapOffset_constr_2 CC_NOTUSED = {
72         { 1, 1 }        /* (0..159) */,
73         -1};
74 static asn_per_constraints_t asn_PER_memb_gapOffset_constr_2 CC_NOTUSED = {
75         { APC_CONSTRAINED,       8,  8,  0,  159 }      /* (0..159) */,
76         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
77         0, 0    /* No PER value map */
78 };
79 static const asn_INTEGER_enum_map_t asn_MAP_mgl_value2enum_3[] = {
80         { 0,    7,      "ms1dot5" },
81         { 1,    3,      "ms3" },
82         { 2,    7,      "ms3dot5" },
83         { 3,    3,      "ms4" },
84         { 4,    7,      "ms5dot5" },
85         { 5,    3,      "ms6" }
86 };
87 static const unsigned int asn_MAP_mgl_enum2value_3[] = {
88         0,      /* ms1dot5(0) */
89         1,      /* ms3(1) */
90         2,      /* ms3dot5(2) */
91         3,      /* ms4(3) */
92         4,      /* ms5dot5(4) */
93         5       /* ms6(5) */
94 };
95 static const asn_INTEGER_specifics_t asn_SPC_mgl_specs_3 = {
96         asn_MAP_mgl_value2enum_3,       /* "tag" => N; sorted by tag */
97         asn_MAP_mgl_enum2value_3,       /* N => "tag"; sorted by N */
98         6,      /* Number of elements in the maps */
99         0,      /* Enumeration is not extensible */
100         1,      /* Strict enumeration */
101         0,      /* Native long size */
102         0
103 };
104 static const ber_tlv_tag_t asn_DEF_mgl_tags_3[] = {
105         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
106         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
107 };
108 static /* Use -fall-defs-global to expose */
109 asn_TYPE_descriptor_t asn_DEF_mgl_3 = {
110         "mgl",
111         "mgl",
112         &asn_OP_NativeEnumerated,
113         asn_DEF_mgl_tags_3,
114         sizeof(asn_DEF_mgl_tags_3)
115                 /sizeof(asn_DEF_mgl_tags_3[0]) - 1, /* 1 */
116         asn_DEF_mgl_tags_3,     /* Same as above */
117         sizeof(asn_DEF_mgl_tags_3)
118                 /sizeof(asn_DEF_mgl_tags_3[0]), /* 2 */
119         { &asn_OER_type_mgl_constr_3, &asn_PER_type_mgl_constr_3, NativeEnumerated_constraint },
120         0, 0,   /* Defined elsewhere */
121         &asn_SPC_mgl_specs_3    /* Additional specs */
122 };
123
124 static const asn_INTEGER_enum_map_t asn_MAP_mgrp_value2enum_10[] = {
125         { 0,    4,      "ms20" },
126         { 1,    4,      "ms40" },
127         { 2,    4,      "ms80" },
128         { 3,    5,      "ms160" }
129 };
130 static const unsigned int asn_MAP_mgrp_enum2value_10[] = {
131         3,      /* ms160(3) */
132         0,      /* ms20(0) */
133         1,      /* ms40(1) */
134         2       /* ms80(2) */
135 };
136 static const asn_INTEGER_specifics_t asn_SPC_mgrp_specs_10 = {
137         asn_MAP_mgrp_value2enum_10,     /* "tag" => N; sorted by tag */
138         asn_MAP_mgrp_enum2value_10,     /* N => "tag"; sorted by N */
139         4,      /* Number of elements in the maps */
140         0,      /* Enumeration is not extensible */
141         1,      /* Strict enumeration */
142         0,      /* Native long size */
143         0
144 };
145 static const ber_tlv_tag_t asn_DEF_mgrp_tags_10[] = {
146         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
147         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
148 };
149 static /* Use -fall-defs-global to expose */
150 asn_TYPE_descriptor_t asn_DEF_mgrp_10 = {
151         "mgrp",
152         "mgrp",
153         &asn_OP_NativeEnumerated,
154         asn_DEF_mgrp_tags_10,
155         sizeof(asn_DEF_mgrp_tags_10)
156                 /sizeof(asn_DEF_mgrp_tags_10[0]) - 1, /* 1 */
157         asn_DEF_mgrp_tags_10,   /* Same as above */
158         sizeof(asn_DEF_mgrp_tags_10)
159                 /sizeof(asn_DEF_mgrp_tags_10[0]), /* 2 */
160         { &asn_OER_type_mgrp_constr_10, &asn_PER_type_mgrp_constr_10, NativeEnumerated_constraint },
161         0, 0,   /* Defined elsewhere */
162         &asn_SPC_mgrp_specs_10  /* Additional specs */
163 };
164
165 static const asn_INTEGER_enum_map_t asn_MAP_mgta_value2enum_15[] = {
166         { 0,    3,      "ms0" },
167         { 1,    8,      "ms0dot25" },
168         { 2,    7,      "ms0dot5" }
169 };
170 static const unsigned int asn_MAP_mgta_enum2value_15[] = {
171         0,      /* ms0(0) */
172         1,      /* ms0dot25(1) */
173         2       /* ms0dot5(2) */
174 };
175 static const asn_INTEGER_specifics_t asn_SPC_mgta_specs_15 = {
176         asn_MAP_mgta_value2enum_15,     /* "tag" => N; sorted by tag */
177         asn_MAP_mgta_enum2value_15,     /* N => "tag"; sorted by N */
178         3,      /* Number of elements in the maps */
179         0,      /* Enumeration is not extensible */
180         1,      /* Strict enumeration */
181         0,      /* Native long size */
182         0
183 };
184 static const ber_tlv_tag_t asn_DEF_mgta_tags_15[] = {
185         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
186         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
187 };
188 static /* Use -fall-defs-global to expose */
189 asn_TYPE_descriptor_t asn_DEF_mgta_15 = {
190         "mgta",
191         "mgta",
192         &asn_OP_NativeEnumerated,
193         asn_DEF_mgta_tags_15,
194         sizeof(asn_DEF_mgta_tags_15)
195                 /sizeof(asn_DEF_mgta_tags_15[0]) - 1, /* 1 */
196         asn_DEF_mgta_tags_15,   /* Same as above */
197         sizeof(asn_DEF_mgta_tags_15)
198                 /sizeof(asn_DEF_mgta_tags_15[0]), /* 2 */
199         { &asn_OER_type_mgta_constr_15, &asn_PER_type_mgta_constr_15, NativeEnumerated_constraint },
200         0, 0,   /* Defined elsewhere */
201         &asn_SPC_mgta_specs_15  /* Additional specs */
202 };
203
204 asn_TYPE_member_t asn_MBR_GapConfig_1[] = {
205         { ATF_NOFLAGS, 0, offsetof(struct GapConfig, gapOffset),
206                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
207                 -1,     /* IMPLICIT tag at current level */
208                 &asn_DEF_NativeInteger,
209                 0,
210                 { &asn_OER_memb_gapOffset_constr_2, &asn_PER_memb_gapOffset_constr_2,  memb_gapOffset_constraint_1 },
211                 0, 0, /* No default value */
212                 "gapOffset"
213                 },
214         { ATF_NOFLAGS, 0, offsetof(struct GapConfig, mgl),
215                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
216                 -1,     /* IMPLICIT tag at current level */
217                 &asn_DEF_mgl_3,
218                 0,
219                 { 0, 0, 0 },
220                 0, 0, /* No default value */
221                 "mgl"
222                 },
223         { ATF_NOFLAGS, 0, offsetof(struct GapConfig, mgrp),
224                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
225                 -1,     /* IMPLICIT tag at current level */
226                 &asn_DEF_mgrp_10,
227                 0,
228                 { 0, 0, 0 },
229                 0, 0, /* No default value */
230                 "mgrp"
231                 },
232         { ATF_NOFLAGS, 0, offsetof(struct GapConfig, mgta),
233                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
234                 -1,     /* IMPLICIT tag at current level */
235                 &asn_DEF_mgta_15,
236                 0,
237                 { 0, 0, 0 },
238                 0, 0, /* No default value */
239                 "mgta"
240                 },
241 };
242 static const ber_tlv_tag_t asn_DEF_GapConfig_tags_1[] = {
243         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
244 };
245 static const asn_TYPE_tag2member_t asn_MAP_GapConfig_tag2el_1[] = {
246     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gapOffset */
247     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* mgl */
248     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mgrp */
249     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* mgta */
250 };
251 asn_SEQUENCE_specifics_t asn_SPC_GapConfig_specs_1 = {
252         sizeof(struct GapConfig),
253         offsetof(struct GapConfig, _asn_ctx),
254         asn_MAP_GapConfig_tag2el_1,
255         4,      /* Count of tags in the map */
256         0, 0, 0,        /* Optional elements (not needed) */
257         4,      /* First extension addition */
258 };
259 asn_TYPE_descriptor_t asn_DEF_GapConfig = {
260         "GapConfig",
261         "GapConfig",
262         &asn_OP_SEQUENCE,
263         asn_DEF_GapConfig_tags_1,
264         sizeof(asn_DEF_GapConfig_tags_1)
265                 /sizeof(asn_DEF_GapConfig_tags_1[0]), /* 1 */
266         asn_DEF_GapConfig_tags_1,       /* Same as above */
267         sizeof(asn_DEF_GapConfig_tags_1)
268                 /sizeof(asn_DEF_GapConfig_tags_1[0]), /* 1 */
269         { 0, 0, SEQUENCE_constraint },
270         asn_MBR_GapConfig_1,
271         4,      /* Elements count */
272         &asn_SPC_GapConfig_specs_1      /* Additional specs */
273 };
274