Adding new comments for Oran in all files with licenses
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / E-RABUsageReport-Item.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 "E-RABUsageReport-Item.h"
32
33 #include "ProtocolExtensionContainer.h"
34 static int
35 usageCountUL_4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
36                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
37         
38         if(!sptr) {
39                 ASN__CTFAIL(app_key, td, sptr,
40                         "%s: value not given (%s:%d)",
41                         td->name, __FILE__, __LINE__);
42                 return -1;
43         }
44         
45         
46         /* Constraint check succeeded */
47         return 0;
48 }
49
50 /*
51  * This type is implemented using NativeInteger,
52  * so here we adjust the DEF accordingly.
53  */
54 static int
55 usageCountDL_5_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
56                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
57         
58         if(!sptr) {
59                 ASN__CTFAIL(app_key, td, sptr,
60                         "%s: value not given (%s:%d)",
61                         td->name, __FILE__, __LINE__);
62                 return -1;
63         }
64         
65         
66         /* Constraint check succeeded */
67         return 0;
68 }
69
70 /*
71  * This type is implemented using NativeInteger,
72  * so here we adjust the DEF accordingly.
73  */
74 static int
75 memb_startTimeStamp_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
76                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
77         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
78         size_t size;
79         
80         if(!sptr) {
81                 ASN__CTFAIL(app_key, td, sptr,
82                         "%s: value not given (%s:%d)",
83                         td->name, __FILE__, __LINE__);
84                 return -1;
85         }
86         
87         size = st->size;
88         
89         if((size == 4)) {
90                 /* Constraint check succeeded */
91                 return 0;
92         } else {
93                 ASN__CTFAIL(app_key, td, sptr,
94                         "%s: constraint failed (%s:%d)",
95                         td->name, __FILE__, __LINE__);
96                 return -1;
97         }
98 }
99
100 static int
101 memb_endTimeStamp_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
102                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
103         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
104         size_t size;
105         
106         if(!sptr) {
107                 ASN__CTFAIL(app_key, td, sptr,
108                         "%s: value not given (%s:%d)",
109                         td->name, __FILE__, __LINE__);
110                 return -1;
111         }
112         
113         size = st->size;
114         
115         if((size == 4)) {
116                 /* Constraint check succeeded */
117                 return 0;
118         } else {
119                 ASN__CTFAIL(app_key, td, sptr,
120                         "%s: constraint failed (%s:%d)",
121                         td->name, __FILE__, __LINE__);
122                 return -1;
123         }
124 }
125
126 static int
127 memb_usageCountUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
128                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
129         
130         if(!sptr) {
131                 ASN__CTFAIL(app_key, td, sptr,
132                         "%s: value not given (%s:%d)",
133                         td->name, __FILE__, __LINE__);
134                 return -1;
135         }
136         
137         
138         /* Constraint check succeeded */
139         return 0;
140 }
141
142 static int
143 memb_usageCountDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
144                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
145         
146         if(!sptr) {
147                 ASN__CTFAIL(app_key, td, sptr,
148                         "%s: value not given (%s:%d)",
149                         td->name, __FILE__, __LINE__);
150                 return -1;
151         }
152         
153         
154         /* Constraint check succeeded */
155         return 0;
156 }
157
158 static asn_per_constraints_t asn_PER_type_usageCountUL_constr_4 CC_NOTUSED = {
159         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
160         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
161         0, 0    /* No PER value map */
162 };
163 static asn_per_constraints_t asn_PER_type_usageCountDL_constr_5 CC_NOTUSED = {
164         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
165         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
166         0, 0    /* No PER value map */
167 };
168 static asn_per_constraints_t asn_PER_memb_startTimeStamp_constr_2 CC_NOTUSED = {
169         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
170         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
171         0, 0    /* No PER value map */
172 };
173 static asn_per_constraints_t asn_PER_memb_endTimeStamp_constr_3 CC_NOTUSED = {
174         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
175         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
176         0, 0    /* No PER value map */
177 };
178 static asn_per_constraints_t asn_PER_memb_usageCountUL_constr_4 CC_NOTUSED = {
179         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
180         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
181         0, 0    /* No PER value map */
182 };
183 static asn_per_constraints_t asn_PER_memb_usageCountDL_constr_5 CC_NOTUSED = {
184         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
185         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
186         0, 0    /* No PER value map */
187 };
188 static const asn_INTEGER_specifics_t asn_SPC_usageCountUL_specs_4 = {
189         0,      0,      0,      0,      0,
190         0,      /* Native long size */
191         1       /* Unsigned representation */
192 };
193 static const ber_tlv_tag_t asn_DEF_usageCountUL_tags_4[] = {
194         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
195         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
196 };
197 static /* Use -fall-defs-global to expose */
198 asn_TYPE_descriptor_t asn_DEF_usageCountUL_4 = {
199         "usageCountUL",
200         "usageCountUL",
201         &asn_OP_NativeInteger,
202         asn_DEF_usageCountUL_tags_4,
203         sizeof(asn_DEF_usageCountUL_tags_4)
204                 /sizeof(asn_DEF_usageCountUL_tags_4[0]) - 1, /* 1 */
205         asn_DEF_usageCountUL_tags_4,    /* Same as above */
206         sizeof(asn_DEF_usageCountUL_tags_4)
207                 /sizeof(asn_DEF_usageCountUL_tags_4[0]), /* 2 */
208         { 0, &asn_PER_type_usageCountUL_constr_4, usageCountUL_4_constraint },
209         0, 0,   /* No members */
210         &asn_SPC_usageCountUL_specs_4   /* Additional specs */
211 };
212
213 static const asn_INTEGER_specifics_t asn_SPC_usageCountDL_specs_5 = {
214         0,      0,      0,      0,      0,
215         0,      /* Native long size */
216         1       /* Unsigned representation */
217 };
218 static const ber_tlv_tag_t asn_DEF_usageCountDL_tags_5[] = {
219         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
220         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
221 };
222 static /* Use -fall-defs-global to expose */
223 asn_TYPE_descriptor_t asn_DEF_usageCountDL_5 = {
224         "usageCountDL",
225         "usageCountDL",
226         &asn_OP_NativeInteger,
227         asn_DEF_usageCountDL_tags_5,
228         sizeof(asn_DEF_usageCountDL_tags_5)
229                 /sizeof(asn_DEF_usageCountDL_tags_5[0]) - 1, /* 1 */
230         asn_DEF_usageCountDL_tags_5,    /* Same as above */
231         sizeof(asn_DEF_usageCountDL_tags_5)
232                 /sizeof(asn_DEF_usageCountDL_tags_5[0]), /* 2 */
233         { 0, &asn_PER_type_usageCountDL_constr_5, usageCountDL_5_constraint },
234         0, 0,   /* No members */
235         &asn_SPC_usageCountDL_specs_5   /* Additional specs */
236 };
237
238 asn_TYPE_member_t asn_MBR_E_RABUsageReport_Item_1[] = {
239         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, startTimeStamp),
240                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
241                 -1,     /* IMPLICIT tag at current level */
242                 &asn_DEF_OCTET_STRING,
243                 0,
244                 { 0, &asn_PER_memb_startTimeStamp_constr_2,  memb_startTimeStamp_constraint_1 },
245                 0, 0, /* No default value */
246                 "startTimeStamp"
247                 },
248         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, endTimeStamp),
249                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
250                 -1,     /* IMPLICIT tag at current level */
251                 &asn_DEF_OCTET_STRING,
252                 0,
253                 { 0, &asn_PER_memb_endTimeStamp_constr_3,  memb_endTimeStamp_constraint_1 },
254                 0, 0, /* No default value */
255                 "endTimeStamp"
256                 },
257         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, usageCountUL),
258                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
259                 -1,     /* IMPLICIT tag at current level */
260                 &asn_DEF_usageCountUL_4,
261                 0,
262                 { 0, &asn_PER_memb_usageCountUL_constr_4,  memb_usageCountUL_constraint_1 },
263                 0, 0, /* No default value */
264                 "usageCountUL"
265                 },
266         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, usageCountDL),
267                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
268                 -1,     /* IMPLICIT tag at current level */
269                 &asn_DEF_usageCountDL_5,
270                 0,
271                 { 0, &asn_PER_memb_usageCountDL_constr_5,  memb_usageCountDL_constraint_1 },
272                 0, 0, /* No default value */
273                 "usageCountDL"
274                 },
275         { ATF_POINTER, 1, offsetof(struct E_RABUsageReport_Item, iE_Extensions),
276                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
277                 -1,     /* IMPLICIT tag at current level */
278                 &asn_DEF_ProtocolExtensionContainer_170P141,
279                 0,
280                 { 0, 0, 0 },
281                 0, 0, /* No default value */
282                 "iE-Extensions"
283                 },
284 };
285 static const int asn_MAP_E_RABUsageReport_Item_oms_1[] = { 4 };
286 static const ber_tlv_tag_t asn_DEF_E_RABUsageReport_Item_tags_1[] = {
287         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
288 };
289 static const asn_TYPE_tag2member_t asn_MAP_E_RABUsageReport_Item_tag2el_1[] = {
290     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startTimeStamp */
291     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* endTimeStamp */
292     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* usageCountUL */
293     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* usageCountDL */
294     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */
295 };
296 asn_SEQUENCE_specifics_t asn_SPC_E_RABUsageReport_Item_specs_1 = {
297         sizeof(struct E_RABUsageReport_Item),
298         offsetof(struct E_RABUsageReport_Item, _asn_ctx),
299         asn_MAP_E_RABUsageReport_Item_tag2el_1,
300         5,      /* Count of tags in the map */
301         asn_MAP_E_RABUsageReport_Item_oms_1,    /* Optional members */
302         1, 0,   /* Root/Additions */
303         5,      /* First extension addition */
304 };
305 asn_TYPE_descriptor_t asn_DEF_E_RABUsageReport_Item = {
306         "E-RABUsageReport-Item",
307         "E-RABUsageReport-Item",
308         &asn_OP_SEQUENCE,
309         asn_DEF_E_RABUsageReport_Item_tags_1,
310         sizeof(asn_DEF_E_RABUsageReport_Item_tags_1)
311                 /sizeof(asn_DEF_E_RABUsageReport_Item_tags_1[0]), /* 1 */
312         asn_DEF_E_RABUsageReport_Item_tags_1,   /* Same as above */
313         sizeof(asn_DEF_E_RABUsageReport_Item_tags_1)
314                 /sizeof(asn_DEF_E_RABUsageReport_Item_tags_1[0]), /* 1 */
315         { 0, 0, SEQUENCE_constraint },
316         asn_MBR_E_RABUsageReport_Item_1,
317         5,      /* Elements count */
318         &asn_SPC_E_RABUsageReport_Item_specs_1  /* Additional specs */
319 };
320