[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-437] Establishing communication between Sourc...
[o-du/l2.git] / src / codec_utils / RRC / SlotFormatCombinationsPerCell.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 "SlotFormatCombinationsPerCell.h"
9
10 #include "SlotFormatCombination.h"
11 static int
12 memb_slotFormatCombinations_constraint_1(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 >= 1 && size <= 512)) {
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 static int
38 memb_positionInDCI_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
39                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40         long value;
41         
42         if(!sptr) {
43                 ASN__CTFAIL(app_key, td, sptr,
44                         "%s: value not given (%s:%d)",
45                         td->name, __FILE__, __LINE__);
46                 return -1;
47         }
48         
49         value = *(const long *)sptr;
50         
51         if((value >= 0 && value <= 127)) {
52                 /* Constraint check succeeded */
53                 return 0;
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 asn_oer_constraints_t asn_OER_type_slotFormatCombinations_constr_5 CC_NOTUSED = {
63         { 0, 0 },
64         -1      /* (SIZE(1..512)) */};
65 static asn_per_constraints_t asn_PER_type_slotFormatCombinations_constr_5 CC_NOTUSED = {
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         { APC_CONSTRAINED,       9,  9,  1,  512 }      /* (SIZE(1..512)) */,
68         0, 0    /* No PER value map */
69 };
70 static asn_oer_constraints_t asn_OER_memb_slotFormatCombinations_constr_5 CC_NOTUSED = {
71         { 0, 0 },
72         -1      /* (SIZE(1..512)) */};
73 static asn_per_constraints_t asn_PER_memb_slotFormatCombinations_constr_5 CC_NOTUSED = {
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         { APC_CONSTRAINED,       9,  9,  1,  512 }      /* (SIZE(1..512)) */,
76         0, 0    /* No PER value map */
77 };
78 static asn_oer_constraints_t asn_OER_memb_positionInDCI_constr_7 CC_NOTUSED = {
79         { 1, 1 }        /* (0..127) */,
80         -1};
81 static asn_per_constraints_t asn_PER_memb_positionInDCI_constr_7 CC_NOTUSED = {
82         { APC_CONSTRAINED,       7,  7,  0,  127 }      /* (0..127) */,
83         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
84         0, 0    /* No PER value map */
85 };
86 static asn_TYPE_member_t asn_MBR_slotFormatCombinations_5[] = {
87         { ATF_POINTER, 0, 0,
88                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
89                 0,
90                 &asn_DEF_SlotFormatCombination,
91                 0,
92                 { 0, 0, 0 },
93                 0, 0, /* No default value */
94                 ""
95                 },
96 };
97 static const ber_tlv_tag_t asn_DEF_slotFormatCombinations_tags_5[] = {
98         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
99         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
100 };
101 static asn_SET_OF_specifics_t asn_SPC_slotFormatCombinations_specs_5 = {
102         sizeof(struct SlotFormatCombinationsPerCell__slotFormatCombinations),
103         offsetof(struct SlotFormatCombinationsPerCell__slotFormatCombinations, _asn_ctx),
104         0,      /* XER encoding is XMLDelimitedItemList */
105 };
106 static /* Use -fall-defs-global to expose */
107 asn_TYPE_descriptor_t asn_DEF_slotFormatCombinations_5 = {
108         "slotFormatCombinations",
109         "slotFormatCombinations",
110         &asn_OP_SEQUENCE_OF,
111         asn_DEF_slotFormatCombinations_tags_5,
112         sizeof(asn_DEF_slotFormatCombinations_tags_5)
113                 /sizeof(asn_DEF_slotFormatCombinations_tags_5[0]) - 1, /* 1 */
114         asn_DEF_slotFormatCombinations_tags_5,  /* Same as above */
115         sizeof(asn_DEF_slotFormatCombinations_tags_5)
116                 /sizeof(asn_DEF_slotFormatCombinations_tags_5[0]), /* 2 */
117         { &asn_OER_type_slotFormatCombinations_constr_5, &asn_PER_type_slotFormatCombinations_constr_5, SEQUENCE_OF_constraint },
118         asn_MBR_slotFormatCombinations_5,
119         1,      /* Single element */
120         &asn_SPC_slotFormatCombinations_specs_5 /* Additional specs */
121 };
122
123 asn_TYPE_member_t asn_MBR_SlotFormatCombinationsPerCell_1[] = {
124         { ATF_NOFLAGS, 0, offsetof(struct SlotFormatCombinationsPerCell, servingCellId),
125                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
126                 -1,     /* IMPLICIT tag at current level */
127                 &asn_DEF_ServCellIndex,
128                 0,
129                 { 0, 0, 0 },
130                 0, 0, /* No default value */
131                 "servingCellId"
132                 },
133         { ATF_NOFLAGS, 0, offsetof(struct SlotFormatCombinationsPerCell, subcarrierSpacing),
134                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
135                 -1,     /* IMPLICIT tag at current level */
136                 &asn_DEF_SubcarrierSpacing,
137                 0,
138                 { 0, 0, 0 },
139                 0, 0, /* No default value */
140                 "subcarrierSpacing"
141                 },
142         { ATF_POINTER, 3, offsetof(struct SlotFormatCombinationsPerCell, subcarrierSpacing2),
143                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
144                 -1,     /* IMPLICIT tag at current level */
145                 &asn_DEF_SubcarrierSpacing,
146                 0,
147                 { 0, 0, 0 },
148                 0, 0, /* No default value */
149                 "subcarrierSpacing2"
150                 },
151         { ATF_POINTER, 2, offsetof(struct SlotFormatCombinationsPerCell, slotFormatCombinations),
152                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
153                 0,
154                 &asn_DEF_slotFormatCombinations_5,
155                 0,
156                 { &asn_OER_memb_slotFormatCombinations_constr_5, &asn_PER_memb_slotFormatCombinations_constr_5,  memb_slotFormatCombinations_constraint_1 },
157                 0, 0, /* No default value */
158                 "slotFormatCombinations"
159                 },
160         { ATF_POINTER, 1, offsetof(struct SlotFormatCombinationsPerCell, positionInDCI),
161                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
162                 -1,     /* IMPLICIT tag at current level */
163                 &asn_DEF_NativeInteger,
164                 0,
165                 { &asn_OER_memb_positionInDCI_constr_7, &asn_PER_memb_positionInDCI_constr_7,  memb_positionInDCI_constraint_1 },
166                 0, 0, /* No default value */
167                 "positionInDCI"
168                 },
169 };
170 static const int asn_MAP_SlotFormatCombinationsPerCell_oms_1[] = { 2, 3, 4 };
171 static const ber_tlv_tag_t asn_DEF_SlotFormatCombinationsPerCell_tags_1[] = {
172         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
173 };
174 static const asn_TYPE_tag2member_t asn_MAP_SlotFormatCombinationsPerCell_tag2el_1[] = {
175     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* servingCellId */
176     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* subcarrierSpacing */
177     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* subcarrierSpacing2 */
178     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* slotFormatCombinations */
179     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* positionInDCI */
180 };
181 asn_SEQUENCE_specifics_t asn_SPC_SlotFormatCombinationsPerCell_specs_1 = {
182         sizeof(struct SlotFormatCombinationsPerCell),
183         offsetof(struct SlotFormatCombinationsPerCell, _asn_ctx),
184         asn_MAP_SlotFormatCombinationsPerCell_tag2el_1,
185         5,      /* Count of tags in the map */
186         asn_MAP_SlotFormatCombinationsPerCell_oms_1,    /* Optional members */
187         3, 0,   /* Root/Additions */
188         5,      /* First extension addition */
189 };
190 asn_TYPE_descriptor_t asn_DEF_SlotFormatCombinationsPerCell = {
191         "SlotFormatCombinationsPerCell",
192         "SlotFormatCombinationsPerCell",
193         &asn_OP_SEQUENCE,
194         asn_DEF_SlotFormatCombinationsPerCell_tags_1,
195         sizeof(asn_DEF_SlotFormatCombinationsPerCell_tags_1)
196                 /sizeof(asn_DEF_SlotFormatCombinationsPerCell_tags_1[0]), /* 1 */
197         asn_DEF_SlotFormatCombinationsPerCell_tags_1,   /* Same as above */
198         sizeof(asn_DEF_SlotFormatCombinationsPerCell_tags_1)
199                 /sizeof(asn_DEF_SlotFormatCombinationsPerCell_tags_1[0]), /* 1 */
200         { 0, 0, SEQUENCE_constraint },
201         asn_MBR_SlotFormatCombinationsPerCell_1,
202         5,      /* Elements count */
203         &asn_SPC_SlotFormatCombinationsPerCell_specs_1  /* Additional specs */
204 };
205