[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PUCCH-ResourceSet.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 "PUCCH-ResourceSet.h"
9
10 static int
11 memb_resourceList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         size_t size;
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         /* Determine the number of elements */
23         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
24         
25         if((size >= 1 && size <= 32)) {
26                 /* Perform validation of the inner elements */
27                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static int
37 memb_maxPayloadMinus1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39         long value;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         value = *(const long *)sptr;
49         
50         if((value >= 4 && value <= 256)) {
51                 /* Constraint check succeeded */
52                 return 0;
53         } else {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: constraint failed (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59 }
60
61 static asn_oer_constraints_t asn_OER_type_resourceList_constr_3 CC_NOTUSED = {
62         { 0, 0 },
63         -1      /* (SIZE(1..32)) */};
64 static asn_per_constraints_t asn_PER_type_resourceList_constr_3 CC_NOTUSED = {
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
67         0, 0    /* No PER value map */
68 };
69 static asn_oer_constraints_t asn_OER_memb_resourceList_constr_3 CC_NOTUSED = {
70         { 0, 0 },
71         -1      /* (SIZE(1..32)) */};
72 static asn_per_constraints_t asn_PER_memb_resourceList_constr_3 CC_NOTUSED = {
73         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
74         { APC_CONSTRAINED,       5,  5,  1,  32 }       /* (SIZE(1..32)) */,
75         0, 0    /* No PER value map */
76 };
77 static asn_oer_constraints_t asn_OER_memb_maxPayloadMinus1_constr_5 CC_NOTUSED = {
78         { 2, 1 }        /* (4..256) */,
79         -1};
80 static asn_per_constraints_t asn_PER_memb_maxPayloadMinus1_constr_5 CC_NOTUSED = {
81         { APC_CONSTRAINED,       8,  8,  4,  256 }      /* (4..256) */,
82         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
83         0, 0    /* No PER value map */
84 };
85 static asn_TYPE_member_t asn_MBR_resourceList_3[] = {
86         { ATF_POINTER, 0, 0,
87                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
88                 0,
89                 &asn_DEF_PUCCH_ResourceId,
90                 0,
91                 { 0, 0, 0 },
92                 0, 0, /* No default value */
93                 ""
94                 },
95 };
96 static const ber_tlv_tag_t asn_DEF_resourceList_tags_3[] = {
97         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
98         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
99 };
100 static asn_SET_OF_specifics_t asn_SPC_resourceList_specs_3 = {
101         sizeof(struct PUCCH_ResourceSet__resourceList),
102         offsetof(struct PUCCH_ResourceSet__resourceList, _asn_ctx),
103         0,      /* XER encoding is XMLDelimitedItemList */
104 };
105 static /* Use -fall-defs-global to expose */
106 asn_TYPE_descriptor_t asn_DEF_resourceList_3 = {
107         "resourceList",
108         "resourceList",
109         &asn_OP_SEQUENCE_OF,
110         asn_DEF_resourceList_tags_3,
111         sizeof(asn_DEF_resourceList_tags_3)
112                 /sizeof(asn_DEF_resourceList_tags_3[0]) - 1, /* 1 */
113         asn_DEF_resourceList_tags_3,    /* Same as above */
114         sizeof(asn_DEF_resourceList_tags_3)
115                 /sizeof(asn_DEF_resourceList_tags_3[0]), /* 2 */
116         { &asn_OER_type_resourceList_constr_3, &asn_PER_type_resourceList_constr_3, SEQUENCE_OF_constraint },
117         asn_MBR_resourceList_3,
118         1,      /* Single element */
119         &asn_SPC_resourceList_specs_3   /* Additional specs */
120 };
121
122 asn_TYPE_member_t asn_MBR_PUCCH_ResourceSet_1[] = {
123         { ATF_NOFLAGS, 0, offsetof(struct PUCCH_ResourceSet, pucch_ResourceSetId),
124                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
125                 -1,     /* IMPLICIT tag at current level */
126                 &asn_DEF_PUCCH_ResourceSetId,
127                 0,
128                 { 0, 0, 0 },
129                 0, 0, /* No default value */
130                 "pucch-ResourceSetId"
131                 },
132         { ATF_NOFLAGS, 0, offsetof(struct PUCCH_ResourceSet, resourceList),
133                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
134                 0,
135                 &asn_DEF_resourceList_3,
136                 0,
137                 { &asn_OER_memb_resourceList_constr_3, &asn_PER_memb_resourceList_constr_3,  memb_resourceList_constraint_1 },
138                 0, 0, /* No default value */
139                 "resourceList"
140                 },
141         { ATF_POINTER, 1, offsetof(struct PUCCH_ResourceSet, maxPayloadMinus1),
142                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
143                 -1,     /* IMPLICIT tag at current level */
144                 &asn_DEF_NativeInteger,
145                 0,
146                 { &asn_OER_memb_maxPayloadMinus1_constr_5, &asn_PER_memb_maxPayloadMinus1_constr_5,  memb_maxPayloadMinus1_constraint_1 },
147                 0, 0, /* No default value */
148                 "maxPayloadMinus1"
149                 },
150 };
151 static const int asn_MAP_PUCCH_ResourceSet_oms_1[] = { 2 };
152 static const ber_tlv_tag_t asn_DEF_PUCCH_ResourceSet_tags_1[] = {
153         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
154 };
155 static const asn_TYPE_tag2member_t asn_MAP_PUCCH_ResourceSet_tag2el_1[] = {
156     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pucch-ResourceSetId */
157     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* resourceList */
158     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* maxPayloadMinus1 */
159 };
160 asn_SEQUENCE_specifics_t asn_SPC_PUCCH_ResourceSet_specs_1 = {
161         sizeof(struct PUCCH_ResourceSet),
162         offsetof(struct PUCCH_ResourceSet, _asn_ctx),
163         asn_MAP_PUCCH_ResourceSet_tag2el_1,
164         3,      /* Count of tags in the map */
165         asn_MAP_PUCCH_ResourceSet_oms_1,        /* Optional members */
166         1, 0,   /* Root/Additions */
167         -1,     /* First extension addition */
168 };
169 asn_TYPE_descriptor_t asn_DEF_PUCCH_ResourceSet = {
170         "PUCCH-ResourceSet",
171         "PUCCH-ResourceSet",
172         &asn_OP_SEQUENCE,
173         asn_DEF_PUCCH_ResourceSet_tags_1,
174         sizeof(asn_DEF_PUCCH_ResourceSet_tags_1)
175                 /sizeof(asn_DEF_PUCCH_ResourceSet_tags_1[0]), /* 1 */
176         asn_DEF_PUCCH_ResourceSet_tags_1,       /* Same as above */
177         sizeof(asn_DEF_PUCCH_ResourceSet_tags_1)
178                 /sizeof(asn_DEF_PUCCH_ResourceSet_tags_1[0]), /* 1 */
179         { 0, 0, SEQUENCE_constraint },
180         asn_MBR_PUCCH_ResourceSet_1,
181         3,      /* Elements count */
182         &asn_SPC_PUCCH_ResourceSet_specs_1      /* Additional specs */
183 };
184