Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / CSIReportPerCSIProcessItem.c
1 /*
2  * Copyright 2019 AT&T Intellectual Property
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20  */
21
22
23
24 /*
25  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
26  * From ASN.1 module "X2AP-IEs"
27  *      found in "../../asnFiles/X2AP-IEs.asn"
28  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
29  */
30
31 #include "CSIReportPerCSIProcessItem.h"
32
33 #include "SubbandCQIList.h"
34 #include "ProtocolExtensionContainer.h"
35 static int
36 memb_rI_constraint_2(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 <= 8)) {
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_per_constraints_t asn_PER_memb_rI_constr_3 CC_NOTUSED = {
61         { APC_CONSTRAINED | APC_EXTENSIBLE,  3,  3,  1,  8 }    /* (1..8,...) */,
62         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
63         0, 0    /* No PER value map */
64 };
65 asn_per_constraints_t asn_PER_type_CSIReportPerCSIProcessItem_constr_1 CC_NOTUSED = {
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         { APC_CONSTRAINED,       1,  1,  1,  2 }        /* (SIZE(1..2)) */,
68         0, 0    /* No PER value map */
69 };
70 static asn_TYPE_member_t asn_MBR_Member_2[] = {
71         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, rI),
72                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
73                 -1,     /* IMPLICIT tag at current level */
74                 &asn_DEF_NativeInteger,
75                 0,
76                 { 0, &asn_PER_memb_rI_constr_3,  memb_rI_constraint_2 },
77                 0, 0, /* No default value */
78                 "rI"
79                 },
80         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, widebandCQI),
81                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
82                 -1,     /* IMPLICIT tag at current level */
83                 &asn_DEF_WidebandCQI,
84                 0,
85                 { 0, 0, 0 },
86                 0, 0, /* No default value */
87                 "widebandCQI"
88                 },
89         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, subbandSize),
90                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
91                 -1,     /* IMPLICIT tag at current level */
92                 &asn_DEF_SubbandSize,
93                 0,
94                 { 0, 0, 0 },
95                 0, 0, /* No default value */
96                 "subbandSize"
97                 },
98         { ATF_POINTER, 2, offsetof(struct CSIReportPerCSIProcessItem__Member, subbandCQIList),
99                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
100                 -1,     /* IMPLICIT tag at current level */
101                 &asn_DEF_SubbandCQIList,
102                 0,
103                 { 0, 0, 0 },
104                 0, 0, /* No default value */
105                 "subbandCQIList"
106                 },
107         { ATF_POINTER, 1, offsetof(struct CSIReportPerCSIProcessItem__Member, iE_Extensions),
108                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
109                 -1,     /* IMPLICIT tag at current level */
110                 &asn_DEF_ProtocolExtensionContainer_170P130,
111                 0,
112                 { 0, 0, 0 },
113                 0, 0, /* No default value */
114                 "iE-Extensions"
115                 },
116 };
117 static const int asn_MAP_Member_oms_2[] = { 3, 4 };
118 static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
119         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
120 };
121 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
122     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rI */
123     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* widebandCQI */
124     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* subbandSize */
125     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* subbandCQIList */
126     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */
127 };
128 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
129         sizeof(struct CSIReportPerCSIProcessItem__Member),
130         offsetof(struct CSIReportPerCSIProcessItem__Member, _asn_ctx),
131         asn_MAP_Member_tag2el_2,
132         5,      /* Count of tags in the map */
133         asn_MAP_Member_oms_2,   /* Optional members */
134         2, 0,   /* Root/Additions */
135         5,      /* First extension addition */
136 };
137 static /* Use -fall-defs-global to expose */
138 asn_TYPE_descriptor_t asn_DEF_Member_2 = {
139         "SEQUENCE",
140         "SEQUENCE",
141         &asn_OP_SEQUENCE,
142         asn_DEF_Member_tags_2,
143         sizeof(asn_DEF_Member_tags_2)
144                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
145         asn_DEF_Member_tags_2,  /* Same as above */
146         sizeof(asn_DEF_Member_tags_2)
147                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
148         { 0, 0, SEQUENCE_constraint },
149         asn_MBR_Member_2,
150         5,      /* Elements count */
151         &asn_SPC_Member_specs_2 /* Additional specs */
152 };
153
154 asn_TYPE_member_t asn_MBR_CSIReportPerCSIProcessItem_1[] = {
155         { ATF_POINTER, 0, 0,
156                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
157                 0,
158                 &asn_DEF_Member_2,
159                 0,
160                 { 0, 0, 0 },
161                 0, 0, /* No default value */
162                 ""
163                 },
164 };
165 static const ber_tlv_tag_t asn_DEF_CSIReportPerCSIProcessItem_tags_1[] = {
166         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
167 };
168 asn_SET_OF_specifics_t asn_SPC_CSIReportPerCSIProcessItem_specs_1 = {
169         sizeof(struct CSIReportPerCSIProcessItem),
170         offsetof(struct CSIReportPerCSIProcessItem, _asn_ctx),
171         0,      /* XER encoding is XMLDelimitedItemList */
172 };
173 asn_TYPE_descriptor_t asn_DEF_CSIReportPerCSIProcessItem = {
174         "CSIReportPerCSIProcessItem",
175         "CSIReportPerCSIProcessItem",
176         &asn_OP_SEQUENCE_OF,
177         asn_DEF_CSIReportPerCSIProcessItem_tags_1,
178         sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1)
179                 /sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1[0]), /* 1 */
180         asn_DEF_CSIReportPerCSIProcessItem_tags_1,      /* Same as above */
181         sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1)
182                 /sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1[0]), /* 1 */
183         { 0, &asn_PER_type_CSIReportPerCSIProcessItem_constr_1, SEQUENCE_OF_constraint },
184         asn_MBR_CSIReportPerCSIProcessItem_1,
185         1,      /* Single element */
186         &asn_SPC_CSIReportPerCSIProcessItem_specs_1     /* Additional specs */
187 };
188