[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / TDD-UL-DL-SlotConfig.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 "TDD-UL-DL-SlotConfig.h"
9
10 static int
11 memb_nrofDownlinkSymbols_constraint_6(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         long value;
14         
15         if(!sptr) {
16                 ASN__CTFAIL(app_key, td, sptr,
17                         "%s: value not given (%s:%d)",
18                         td->name, __FILE__, __LINE__);
19                 return -1;
20         }
21         
22         value = *(const long *)sptr;
23         
24         if((value >= 1 && value <= 13)) {
25                 /* Constraint check succeeded */
26                 return 0;
27         } else {
28                 ASN__CTFAIL(app_key, td, sptr,
29                         "%s: constraint failed (%s:%d)",
30                         td->name, __FILE__, __LINE__);
31                 return -1;
32         }
33 }
34
35 static int
36 memb_nrofUplinkSymbols_constraint_6(const asn_TYPE_descriptor_t *td, const void *sptr,
37                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38         long value;
39         
40         if(!sptr) {
41                 ASN__CTFAIL(app_key, td, sptr,
42                         "%s: value not given (%s:%d)",
43                         td->name, __FILE__, __LINE__);
44                 return -1;
45         }
46         
47         value = *(const long *)sptr;
48         
49         if((value >= 1 && value <= 13)) {
50                 /* Constraint check succeeded */
51                 return 0;
52         } else {
53                 ASN__CTFAIL(app_key, td, sptr,
54                         "%s: constraint failed (%s:%d)",
55                         td->name, __FILE__, __LINE__);
56                 return -1;
57         }
58 }
59
60 static asn_oer_constraints_t asn_OER_memb_nrofDownlinkSymbols_constr_7 CC_NOTUSED = {
61         { 1, 1 }        /* (1..13) */,
62         -1};
63 static asn_per_constraints_t asn_PER_memb_nrofDownlinkSymbols_constr_7 CC_NOTUSED = {
64         { APC_CONSTRAINED,       4,  4,  1,  13 }       /* (1..13) */,
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         0, 0    /* No PER value map */
67 };
68 static asn_oer_constraints_t asn_OER_memb_nrofUplinkSymbols_constr_8 CC_NOTUSED = {
69         { 1, 1 }        /* (1..13) */,
70         -1};
71 static asn_per_constraints_t asn_PER_memb_nrofUplinkSymbols_constr_8 CC_NOTUSED = {
72         { APC_CONSTRAINED,       4,  4,  1,  13 }       /* (1..13) */,
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         0, 0    /* No PER value map */
75 };
76 static asn_oer_constraints_t asn_OER_type_symbols_constr_3 CC_NOTUSED = {
77         { 0, 0 },
78         -1};
79 static asn_per_constraints_t asn_PER_type_symbols_constr_3 CC_NOTUSED = {
80         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
81         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
82         0, 0    /* No PER value map */
83 };
84 static asn_TYPE_member_t asn_MBR_explicit_6[] = {
85         { ATF_POINTER, 2, offsetof(struct TDD_UL_DL_SlotConfig__symbols__explicit, nrofDownlinkSymbols),
86                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
87                 -1,     /* IMPLICIT tag at current level */
88                 &asn_DEF_NativeInteger,
89                 0,
90                 { &asn_OER_memb_nrofDownlinkSymbols_constr_7, &asn_PER_memb_nrofDownlinkSymbols_constr_7,  memb_nrofDownlinkSymbols_constraint_6 },
91                 0, 0, /* No default value */
92                 "nrofDownlinkSymbols"
93                 },
94         { ATF_POINTER, 1, offsetof(struct TDD_UL_DL_SlotConfig__symbols__explicit, nrofUplinkSymbols),
95                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
96                 -1,     /* IMPLICIT tag at current level */
97                 &asn_DEF_NativeInteger,
98                 0,
99                 { &asn_OER_memb_nrofUplinkSymbols_constr_8, &asn_PER_memb_nrofUplinkSymbols_constr_8,  memb_nrofUplinkSymbols_constraint_6 },
100                 0, 0, /* No default value */
101                 "nrofUplinkSymbols"
102                 },
103 };
104 static const int asn_MAP_explicit_oms_6[] = { 0, 1 };
105 static const ber_tlv_tag_t asn_DEF_explicit_tags_6[] = {
106         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
107         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
108 };
109 static const asn_TYPE_tag2member_t asn_MAP_explicit_tag2el_6[] = {
110     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nrofDownlinkSymbols */
111     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* nrofUplinkSymbols */
112 };
113 static asn_SEQUENCE_specifics_t asn_SPC_explicit_specs_6 = {
114         sizeof(struct TDD_UL_DL_SlotConfig__symbols__explicit),
115         offsetof(struct TDD_UL_DL_SlotConfig__symbols__explicit, _asn_ctx),
116         asn_MAP_explicit_tag2el_6,
117         2,      /* Count of tags in the map */
118         asn_MAP_explicit_oms_6, /* Optional members */
119         2, 0,   /* Root/Additions */
120         -1,     /* First extension addition */
121 };
122 static /* Use -fall-defs-global to expose */
123 asn_TYPE_descriptor_t asn_DEF_explicit_6 = {
124         "explicit",
125         "explicit",
126         &asn_OP_SEQUENCE,
127         asn_DEF_explicit_tags_6,
128         sizeof(asn_DEF_explicit_tags_6)
129                 /sizeof(asn_DEF_explicit_tags_6[0]) - 1, /* 1 */
130         asn_DEF_explicit_tags_6,        /* Same as above */
131         sizeof(asn_DEF_explicit_tags_6)
132                 /sizeof(asn_DEF_explicit_tags_6[0]), /* 2 */
133         { 0, 0, SEQUENCE_constraint },
134         asn_MBR_explicit_6,
135         2,      /* Elements count */
136         &asn_SPC_explicit_specs_6       /* Additional specs */
137 };
138
139 static asn_TYPE_member_t asn_MBR_symbols_3[] = {
140         { ATF_NOFLAGS, 0, offsetof(struct TDD_UL_DL_SlotConfig__symbols, choice.allDownlink),
141                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
142                 -1,     /* IMPLICIT tag at current level */
143                 &asn_DEF_NULL,
144                 0,
145                 { 0, 0, 0 },
146                 0, 0, /* No default value */
147                 "allDownlink"
148                 },
149         { ATF_NOFLAGS, 0, offsetof(struct TDD_UL_DL_SlotConfig__symbols, choice.allUplink),
150                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
151                 -1,     /* IMPLICIT tag at current level */
152                 &asn_DEF_NULL,
153                 0,
154                 { 0, 0, 0 },
155                 0, 0, /* No default value */
156                 "allUplink"
157                 },
158         { ATF_POINTER, 0, offsetof(struct TDD_UL_DL_SlotConfig__symbols, choice.Explicit),
159                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
160                 0,
161                 &asn_DEF_explicit_6,
162                 0,
163                 { 0, 0, 0 },
164                 0, 0, /* No default value */
165                 "explicit"
166                 },
167 };
168 static const asn_TYPE_tag2member_t asn_MAP_symbols_tag2el_3[] = {
169     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* allDownlink */
170     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* allUplink */
171     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* explicit */
172 };
173 static asn_CHOICE_specifics_t asn_SPC_symbols_specs_3 = {
174         sizeof(struct TDD_UL_DL_SlotConfig__symbols),
175         offsetof(struct TDD_UL_DL_SlotConfig__symbols, _asn_ctx),
176         offsetof(struct TDD_UL_DL_SlotConfig__symbols, present),
177         sizeof(((struct TDD_UL_DL_SlotConfig__symbols *)0)->present),
178         asn_MAP_symbols_tag2el_3,
179         3,      /* Count of tags in the map */
180         0, 0,
181         -1      /* Extensions start */
182 };
183 static /* Use -fall-defs-global to expose */
184 asn_TYPE_descriptor_t asn_DEF_symbols_3 = {
185         "symbols",
186         "symbols",
187         &asn_OP_CHOICE,
188         0,      /* No effective tags (pointer) */
189         0,      /* No effective tags (count) */
190         0,      /* No tags (pointer) */
191         0,      /* No tags (count) */
192         { &asn_OER_type_symbols_constr_3, &asn_PER_type_symbols_constr_3, CHOICE_constraint },
193         asn_MBR_symbols_3,
194         3,      /* Elements count */
195         &asn_SPC_symbols_specs_3        /* Additional specs */
196 };
197
198 asn_TYPE_member_t asn_MBR_TDD_UL_DL_SlotConfig_1[] = {
199         { ATF_NOFLAGS, 0, offsetof(struct TDD_UL_DL_SlotConfig, slotIndex),
200                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
201                 -1,     /* IMPLICIT tag at current level */
202                 &asn_DEF_TDD_UL_DL_SlotIndex,
203                 0,
204                 { 0, 0, 0 },
205                 0, 0, /* No default value */
206                 "slotIndex"
207                 },
208         { ATF_NOFLAGS, 0, offsetof(struct TDD_UL_DL_SlotConfig, symbols),
209                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
210                 +1,     /* EXPLICIT tag at current level */
211                 &asn_DEF_symbols_3,
212                 0,
213                 { 0, 0, 0 },
214                 0, 0, /* No default value */
215                 "symbols"
216                 },
217 };
218 static const ber_tlv_tag_t asn_DEF_TDD_UL_DL_SlotConfig_tags_1[] = {
219         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
220 };
221 static const asn_TYPE_tag2member_t asn_MAP_TDD_UL_DL_SlotConfig_tag2el_1[] = {
222     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* slotIndex */
223     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* symbols */
224 };
225 asn_SEQUENCE_specifics_t asn_SPC_TDD_UL_DL_SlotConfig_specs_1 = {
226         sizeof(struct TDD_UL_DL_SlotConfig),
227         offsetof(struct TDD_UL_DL_SlotConfig, _asn_ctx),
228         asn_MAP_TDD_UL_DL_SlotConfig_tag2el_1,
229         2,      /* Count of tags in the map */
230         0, 0, 0,        /* Optional elements (not needed) */
231         -1,     /* First extension addition */
232 };
233 asn_TYPE_descriptor_t asn_DEF_TDD_UL_DL_SlotConfig = {
234         "TDD-UL-DL-SlotConfig",
235         "TDD-UL-DL-SlotConfig",
236         &asn_OP_SEQUENCE,
237         asn_DEF_TDD_UL_DL_SlotConfig_tags_1,
238         sizeof(asn_DEF_TDD_UL_DL_SlotConfig_tags_1)
239                 /sizeof(asn_DEF_TDD_UL_DL_SlotConfig_tags_1[0]), /* 1 */
240         asn_DEF_TDD_UL_DL_SlotConfig_tags_1,    /* Same as above */
241         sizeof(asn_DEF_TDD_UL_DL_SlotConfig_tags_1)
242                 /sizeof(asn_DEF_TDD_UL_DL_SlotConfig_tags_1[0]), /* 1 */
243         { 0, 0, SEQUENCE_constraint },
244         asn_MBR_TDD_UL_DL_SlotConfig_1,
245         2,      /* Elements count */
246         &asn_SPC_TDD_UL_DL_SlotConfig_specs_1   /* Additional specs */
247 };
248