Fix licensing issues
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / E-RABUsageReport-Item.c
1 /*
2  *
3  * Copyright 2019 AT&T Intellectual Property
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18
19
20 /*
21  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
22  * From ASN.1 module "X2AP-IEs"
23  *      found in "../../asnFiles/X2AP-IEs.asn"
24  *      `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
25  */
26
27 #include "E-RABUsageReport-Item.h"
28
29 #include "ProtocolExtensionContainer.h"
30 static int
31 usageCountUL_4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
32                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
33         
34         if(!sptr) {
35                 ASN__CTFAIL(app_key, td, sptr,
36                         "%s: value not given (%s:%d)",
37                         td->name, __FILE__, __LINE__);
38                 return -1;
39         }
40         
41         
42         /* Constraint check succeeded */
43         return 0;
44 }
45
46 /*
47  * This type is implemented using NativeInteger,
48  * so here we adjust the DEF accordingly.
49  */
50 static int
51 usageCountDL_5_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
52                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
53         
54         if(!sptr) {
55                 ASN__CTFAIL(app_key, td, sptr,
56                         "%s: value not given (%s:%d)",
57                         td->name, __FILE__, __LINE__);
58                 return -1;
59         }
60         
61         
62         /* Constraint check succeeded */
63         return 0;
64 }
65
66 /*
67  * This type is implemented using NativeInteger,
68  * so here we adjust the DEF accordingly.
69  */
70 static int
71 memb_startTimeStamp_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
72                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
73         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
74         size_t size;
75         
76         if(!sptr) {
77                 ASN__CTFAIL(app_key, td, sptr,
78                         "%s: value not given (%s:%d)",
79                         td->name, __FILE__, __LINE__);
80                 return -1;
81         }
82         
83         size = st->size;
84         
85         if((size == 4)) {
86                 /* Constraint check succeeded */
87                 return 0;
88         } else {
89                 ASN__CTFAIL(app_key, td, sptr,
90                         "%s: constraint failed (%s:%d)",
91                         td->name, __FILE__, __LINE__);
92                 return -1;
93         }
94 }
95
96 static int
97 memb_endTimeStamp_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
98                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
99         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
100         size_t size;
101         
102         if(!sptr) {
103                 ASN__CTFAIL(app_key, td, sptr,
104                         "%s: value not given (%s:%d)",
105                         td->name, __FILE__, __LINE__);
106                 return -1;
107         }
108         
109         size = st->size;
110         
111         if((size == 4)) {
112                 /* Constraint check succeeded */
113                 return 0;
114         } else {
115                 ASN__CTFAIL(app_key, td, sptr,
116                         "%s: constraint failed (%s:%d)",
117                         td->name, __FILE__, __LINE__);
118                 return -1;
119         }
120 }
121
122 static int
123 memb_usageCountUL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
124                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
125         
126         if(!sptr) {
127                 ASN__CTFAIL(app_key, td, sptr,
128                         "%s: value not given (%s:%d)",
129                         td->name, __FILE__, __LINE__);
130                 return -1;
131         }
132         
133         
134         /* Constraint check succeeded */
135         return 0;
136 }
137
138 static int
139 memb_usageCountDL_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
140                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
141         
142         if(!sptr) {
143                 ASN__CTFAIL(app_key, td, sptr,
144                         "%s: value not given (%s:%d)",
145                         td->name, __FILE__, __LINE__);
146                 return -1;
147         }
148         
149         
150         /* Constraint check succeeded */
151         return 0;
152 }
153
154 static asn_per_constraints_t asn_PER_type_usageCountUL_constr_4 CC_NOTUSED = {
155         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
156         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
157         0, 0    /* No PER value map */
158 };
159 static asn_per_constraints_t asn_PER_type_usageCountDL_constr_5 CC_NOTUSED = {
160         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
161         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
162         0, 0    /* No PER value map */
163 };
164 static asn_per_constraints_t asn_PER_memb_startTimeStamp_constr_2 CC_NOTUSED = {
165         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
166         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
167         0, 0    /* No PER value map */
168 };
169 static asn_per_constraints_t asn_PER_memb_endTimeStamp_constr_3 CC_NOTUSED = {
170         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
171         { APC_CONSTRAINED,       0,  0,  4,  4 }        /* (SIZE(4..4)) */,
172         0, 0    /* No PER value map */
173 };
174 static asn_per_constraints_t asn_PER_memb_usageCountUL_constr_4 CC_NOTUSED = {
175         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
176         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
177         0, 0    /* No PER value map */
178 };
179 static asn_per_constraints_t asn_PER_memb_usageCountDL_constr_5 CC_NOTUSED = {
180         { APC_CONSTRAINED,       32, -1,  0,  4294967295 }      /* (0..4294967295) */,
181         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
182         0, 0    /* No PER value map */
183 };
184 static const asn_INTEGER_specifics_t asn_SPC_usageCountUL_specs_4 = {
185         0,      0,      0,      0,      0,
186         0,      /* Native long size */
187         1       /* Unsigned representation */
188 };
189 static const ber_tlv_tag_t asn_DEF_usageCountUL_tags_4[] = {
190         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
191         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
192 };
193 static /* Use -fall-defs-global to expose */
194 asn_TYPE_descriptor_t asn_DEF_usageCountUL_4 = {
195         "usageCountUL",
196         "usageCountUL",
197         &asn_OP_NativeInteger,
198         asn_DEF_usageCountUL_tags_4,
199         sizeof(asn_DEF_usageCountUL_tags_4)
200                 /sizeof(asn_DEF_usageCountUL_tags_4[0]) - 1, /* 1 */
201         asn_DEF_usageCountUL_tags_4,    /* Same as above */
202         sizeof(asn_DEF_usageCountUL_tags_4)
203                 /sizeof(asn_DEF_usageCountUL_tags_4[0]), /* 2 */
204         { 0, &asn_PER_type_usageCountUL_constr_4, usageCountUL_4_constraint },
205         0, 0,   /* No members */
206         &asn_SPC_usageCountUL_specs_4   /* Additional specs */
207 };
208
209 static const asn_INTEGER_specifics_t asn_SPC_usageCountDL_specs_5 = {
210         0,      0,      0,      0,      0,
211         0,      /* Native long size */
212         1       /* Unsigned representation */
213 };
214 static const ber_tlv_tag_t asn_DEF_usageCountDL_tags_5[] = {
215         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
216         (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
217 };
218 static /* Use -fall-defs-global to expose */
219 asn_TYPE_descriptor_t asn_DEF_usageCountDL_5 = {
220         "usageCountDL",
221         "usageCountDL",
222         &asn_OP_NativeInteger,
223         asn_DEF_usageCountDL_tags_5,
224         sizeof(asn_DEF_usageCountDL_tags_5)
225                 /sizeof(asn_DEF_usageCountDL_tags_5[0]) - 1, /* 1 */
226         asn_DEF_usageCountDL_tags_5,    /* Same as above */
227         sizeof(asn_DEF_usageCountDL_tags_5)
228                 /sizeof(asn_DEF_usageCountDL_tags_5[0]), /* 2 */
229         { 0, &asn_PER_type_usageCountDL_constr_5, usageCountDL_5_constraint },
230         0, 0,   /* No members */
231         &asn_SPC_usageCountDL_specs_5   /* Additional specs */
232 };
233
234 asn_TYPE_member_t asn_MBR_E_RABUsageReport_Item_1[] = {
235         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, startTimeStamp),
236                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
237                 -1,     /* IMPLICIT tag at current level */
238                 &asn_DEF_OCTET_STRING,
239                 0,
240                 { 0, &asn_PER_memb_startTimeStamp_constr_2,  memb_startTimeStamp_constraint_1 },
241                 0, 0, /* No default value */
242                 "startTimeStamp"
243                 },
244         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, endTimeStamp),
245                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
246                 -1,     /* IMPLICIT tag at current level */
247                 &asn_DEF_OCTET_STRING,
248                 0,
249                 { 0, &asn_PER_memb_endTimeStamp_constr_3,  memb_endTimeStamp_constraint_1 },
250                 0, 0, /* No default value */
251                 "endTimeStamp"
252                 },
253         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, usageCountUL),
254                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
255                 -1,     /* IMPLICIT tag at current level */
256                 &asn_DEF_usageCountUL_4,
257                 0,
258                 { 0, &asn_PER_memb_usageCountUL_constr_4,  memb_usageCountUL_constraint_1 },
259                 0, 0, /* No default value */
260                 "usageCountUL"
261                 },
262         { ATF_NOFLAGS, 0, offsetof(struct E_RABUsageReport_Item, usageCountDL),
263                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
264                 -1,     /* IMPLICIT tag at current level */
265                 &asn_DEF_usageCountDL_5,
266                 0,
267                 { 0, &asn_PER_memb_usageCountDL_constr_5,  memb_usageCountDL_constraint_1 },
268                 0, 0, /* No default value */
269                 "usageCountDL"
270                 },
271         { ATF_POINTER, 1, offsetof(struct E_RABUsageReport_Item, iE_Extensions),
272                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
273                 -1,     /* IMPLICIT tag at current level */
274                 &asn_DEF_ProtocolExtensionContainer_170P141,
275                 0,
276                 { 0, 0, 0 },
277                 0, 0, /* No default value */
278                 "iE-Extensions"
279                 },
280 };
281 static const int asn_MAP_E_RABUsageReport_Item_oms_1[] = { 4 };
282 static const ber_tlv_tag_t asn_DEF_E_RABUsageReport_Item_tags_1[] = {
283         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
284 };
285 static const asn_TYPE_tag2member_t asn_MAP_E_RABUsageReport_Item_tag2el_1[] = {
286     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* startTimeStamp */
287     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* endTimeStamp */
288     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* usageCountUL */
289     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* usageCountDL */
290     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */
291 };
292 asn_SEQUENCE_specifics_t asn_SPC_E_RABUsageReport_Item_specs_1 = {
293         sizeof(struct E_RABUsageReport_Item),
294         offsetof(struct E_RABUsageReport_Item, _asn_ctx),
295         asn_MAP_E_RABUsageReport_Item_tag2el_1,
296         5,      /* Count of tags in the map */
297         asn_MAP_E_RABUsageReport_Item_oms_1,    /* Optional members */
298         1, 0,   /* Root/Additions */
299         5,      /* First extension addition */
300 };
301 asn_TYPE_descriptor_t asn_DEF_E_RABUsageReport_Item = {
302         "E-RABUsageReport-Item",
303         "E-RABUsageReport-Item",
304         &asn_OP_SEQUENCE,
305         asn_DEF_E_RABUsageReport_Item_tags_1,
306         sizeof(asn_DEF_E_RABUsageReport_Item_tags_1)
307                 /sizeof(asn_DEF_E_RABUsageReport_Item_tags_1[0]), /* 1 */
308         asn_DEF_E_RABUsageReport_Item_tags_1,   /* Same as above */
309         sizeof(asn_DEF_E_RABUsageReport_Item_tags_1)
310                 /sizeof(asn_DEF_E_RABUsageReport_Item_tags_1[0]), /* 1 */
311         { 0, 0, SEQUENCE_constraint },
312         asn_MBR_E_RABUsageReport_Item_1,
313         5,      /* Elements count */
314         &asn_SPC_E_RABUsageReport_Item_specs_1  /* Additional specs */
315 };
316