13a182e3603636d5c9cc755553c18497fbc837bc
[ric-plt/resource-status-manager.git] / RSM / 3rdparty / asn1codec / e2ap_engine / Subscription-Based-UE-DifferentiationInfo.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 "Subscription-Based-UE-DifferentiationInfo.h"
32
33 #include "ScheduledCommunicationTime.h"
34 #include "ProtocolExtensionContainer.h"
35 /*
36  * This type is implemented using NativeEnumerated,
37  * so here we adjust the DEF accordingly.
38  */
39 /*
40  * This type is implemented using NativeEnumerated,
41  * so here we adjust the DEF accordingly.
42  */
43 /*
44  * This type is implemented using NativeEnumerated,
45  * so here we adjust the DEF accordingly.
46  */
47 /*
48  * This type is implemented using NativeEnumerated,
49  * so here we adjust the DEF accordingly.
50  */
51 static int
52 memb_periodicTime_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
53                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
54         long value;
55         
56         if(!sptr) {
57                 ASN__CTFAIL(app_key, td, sptr,
58                         "%s: value not given (%s:%d)",
59                         td->name, __FILE__, __LINE__);
60                 return -1;
61         }
62         
63         value = *(const long *)sptr;
64         
65         if((value >= 1 && value <= 3600)) {
66                 /* Constraint check succeeded */
67                 return 0;
68         } else {
69                 ASN__CTFAIL(app_key, td, sptr,
70                         "%s: constraint failed (%s:%d)",
71                         td->name, __FILE__, __LINE__);
72                 return -1;
73         }
74 }
75
76 static asn_per_constraints_t asn_PER_type_periodicCommunicationIndicator_constr_2 CC_NOTUSED = {
77         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
78         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
79         0, 0    /* No PER value map */
80 };
81 static asn_per_constraints_t asn_PER_type_stationaryIndication_constr_8 CC_NOTUSED = {
82         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
83         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
84         0, 0    /* No PER value map */
85 };
86 static asn_per_constraints_t asn_PER_type_trafficProfile_constr_12 CC_NOTUSED = {
87         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
88         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
89         0, 0    /* No PER value map */
90 };
91 static asn_per_constraints_t asn_PER_type_batteryIndication_constr_17 CC_NOTUSED = {
92         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
93         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
94         0, 0    /* No PER value map */
95 };
96 static asn_per_constraints_t asn_PER_memb_periodicTime_constr_6 CC_NOTUSED = {
97         { APC_CONSTRAINED | APC_EXTENSIBLE,  12,  12,  1,  3600 }       /* (1..3600,...) */,
98         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
99         0, 0    /* No PER value map */
100 };
101 static const asn_INTEGER_enum_map_t asn_MAP_periodicCommunicationIndicator_value2enum_2[] = {
102         { 0,    12,     "periodically" },
103         { 1,    8,      "ondemand" }
104         /* This list is extensible */
105 };
106 static const unsigned int asn_MAP_periodicCommunicationIndicator_enum2value_2[] = {
107         1,      /* ondemand(1) */
108         0       /* periodically(0) */
109         /* This list is extensible */
110 };
111 static const asn_INTEGER_specifics_t asn_SPC_periodicCommunicationIndicator_specs_2 = {
112         asn_MAP_periodicCommunicationIndicator_value2enum_2,    /* "tag" => N; sorted by tag */
113         asn_MAP_periodicCommunicationIndicator_enum2value_2,    /* N => "tag"; sorted by N */
114         2,      /* Number of elements in the maps */
115         3,      /* Extensions before this member */
116         1,      /* Strict enumeration */
117         0,      /* Native long size */
118         0
119 };
120 static const ber_tlv_tag_t asn_DEF_periodicCommunicationIndicator_tags_2[] = {
121         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
122         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
123 };
124 static /* Use -fall-defs-global to expose */
125 asn_TYPE_descriptor_t asn_DEF_periodicCommunicationIndicator_2 = {
126         "periodicCommunicationIndicator",
127         "periodicCommunicationIndicator",
128         &asn_OP_NativeEnumerated,
129         asn_DEF_periodicCommunicationIndicator_tags_2,
130         sizeof(asn_DEF_periodicCommunicationIndicator_tags_2)
131                 /sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]) - 1, /* 1 */
132         asn_DEF_periodicCommunicationIndicator_tags_2,  /* Same as above */
133         sizeof(asn_DEF_periodicCommunicationIndicator_tags_2)
134                 /sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]), /* 2 */
135         { 0, &asn_PER_type_periodicCommunicationIndicator_constr_2, NativeEnumerated_constraint },
136         0, 0,   /* Defined elsewhere */
137         &asn_SPC_periodicCommunicationIndicator_specs_2 /* Additional specs */
138 };
139
140 static const asn_INTEGER_enum_map_t asn_MAP_stationaryIndication_value2enum_8[] = {
141         { 0,    10,     "stationary" },
142         { 1,    6,      "mobile" }
143         /* This list is extensible */
144 };
145 static const unsigned int asn_MAP_stationaryIndication_enum2value_8[] = {
146         1,      /* mobile(1) */
147         0       /* stationary(0) */
148         /* This list is extensible */
149 };
150 static const asn_INTEGER_specifics_t asn_SPC_stationaryIndication_specs_8 = {
151         asn_MAP_stationaryIndication_value2enum_8,      /* "tag" => N; sorted by tag */
152         asn_MAP_stationaryIndication_enum2value_8,      /* N => "tag"; sorted by N */
153         2,      /* Number of elements in the maps */
154         3,      /* Extensions before this member */
155         1,      /* Strict enumeration */
156         0,      /* Native long size */
157         0
158 };
159 static const ber_tlv_tag_t asn_DEF_stationaryIndication_tags_8[] = {
160         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
161         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
162 };
163 static /* Use -fall-defs-global to expose */
164 asn_TYPE_descriptor_t asn_DEF_stationaryIndication_8 = {
165         "stationaryIndication",
166         "stationaryIndication",
167         &asn_OP_NativeEnumerated,
168         asn_DEF_stationaryIndication_tags_8,
169         sizeof(asn_DEF_stationaryIndication_tags_8)
170                 /sizeof(asn_DEF_stationaryIndication_tags_8[0]) - 1, /* 1 */
171         asn_DEF_stationaryIndication_tags_8,    /* Same as above */
172         sizeof(asn_DEF_stationaryIndication_tags_8)
173                 /sizeof(asn_DEF_stationaryIndication_tags_8[0]), /* 2 */
174         { 0, &asn_PER_type_stationaryIndication_constr_8, NativeEnumerated_constraint },
175         0, 0,   /* Defined elsewhere */
176         &asn_SPC_stationaryIndication_specs_8   /* Additional specs */
177 };
178
179 static const asn_INTEGER_enum_map_t asn_MAP_trafficProfile_value2enum_12[] = {
180         { 0,    13,     "single-packet" },
181         { 1,    12,     "dual-packets" },
182         { 2,    16,     "multiple-packets" }
183         /* This list is extensible */
184 };
185 static const unsigned int asn_MAP_trafficProfile_enum2value_12[] = {
186         1,      /* dual-packets(1) */
187         2,      /* multiple-packets(2) */
188         0       /* single-packet(0) */
189         /* This list is extensible */
190 };
191 static const asn_INTEGER_specifics_t asn_SPC_trafficProfile_specs_12 = {
192         asn_MAP_trafficProfile_value2enum_12,   /* "tag" => N; sorted by tag */
193         asn_MAP_trafficProfile_enum2value_12,   /* N => "tag"; sorted by N */
194         3,      /* Number of elements in the maps */
195         4,      /* Extensions before this member */
196         1,      /* Strict enumeration */
197         0,      /* Native long size */
198         0
199 };
200 static const ber_tlv_tag_t asn_DEF_trafficProfile_tags_12[] = {
201         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
202         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
203 };
204 static /* Use -fall-defs-global to expose */
205 asn_TYPE_descriptor_t asn_DEF_trafficProfile_12 = {
206         "trafficProfile",
207         "trafficProfile",
208         &asn_OP_NativeEnumerated,
209         asn_DEF_trafficProfile_tags_12,
210         sizeof(asn_DEF_trafficProfile_tags_12)
211                 /sizeof(asn_DEF_trafficProfile_tags_12[0]) - 1, /* 1 */
212         asn_DEF_trafficProfile_tags_12, /* Same as above */
213         sizeof(asn_DEF_trafficProfile_tags_12)
214                 /sizeof(asn_DEF_trafficProfile_tags_12[0]), /* 2 */
215         { 0, &asn_PER_type_trafficProfile_constr_12, NativeEnumerated_constraint },
216         0, 0,   /* Defined elsewhere */
217         &asn_SPC_trafficProfile_specs_12        /* Additional specs */
218 };
219
220 static const asn_INTEGER_enum_map_t asn_MAP_batteryIndication_value2enum_17[] = {
221         { 0,    15,     "battery-powered" },
222         { 1,    47,     "battery-powered-not-rechargeable-or-replaceable" },
223         { 2,    19,     "not-battery-powered" }
224         /* This list is extensible */
225 };
226 static const unsigned int asn_MAP_batteryIndication_enum2value_17[] = {
227         0,      /* battery-powered(0) */
228         1,      /* battery-powered-not-rechargeable-or-replaceable(1) */
229         2       /* not-battery-powered(2) */
230         /* This list is extensible */
231 };
232 static const asn_INTEGER_specifics_t asn_SPC_batteryIndication_specs_17 = {
233         asn_MAP_batteryIndication_value2enum_17,        /* "tag" => N; sorted by tag */
234         asn_MAP_batteryIndication_enum2value_17,        /* N => "tag"; sorted by N */
235         3,      /* Number of elements in the maps */
236         4,      /* Extensions before this member */
237         1,      /* Strict enumeration */
238         0,      /* Native long size */
239         0
240 };
241 static const ber_tlv_tag_t asn_DEF_batteryIndication_tags_17[] = {
242         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
243         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
244 };
245 static /* Use -fall-defs-global to expose */
246 asn_TYPE_descriptor_t asn_DEF_batteryIndication_17 = {
247         "batteryIndication",
248         "batteryIndication",
249         &asn_OP_NativeEnumerated,
250         asn_DEF_batteryIndication_tags_17,
251         sizeof(asn_DEF_batteryIndication_tags_17)
252                 /sizeof(asn_DEF_batteryIndication_tags_17[0]) - 1, /* 1 */
253         asn_DEF_batteryIndication_tags_17,      /* Same as above */
254         sizeof(asn_DEF_batteryIndication_tags_17)
255                 /sizeof(asn_DEF_batteryIndication_tags_17[0]), /* 2 */
256         { 0, &asn_PER_type_batteryIndication_constr_17, NativeEnumerated_constraint },
257         0, 0,   /* Defined elsewhere */
258         &asn_SPC_batteryIndication_specs_17     /* Additional specs */
259 };
260
261 asn_TYPE_member_t asn_MBR_Subscription_Based_UE_DifferentiationInfo_1[] = {
262         { ATF_POINTER, 7, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicCommunicationIndicator),
263                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
264                 -1,     /* IMPLICIT tag at current level */
265                 &asn_DEF_periodicCommunicationIndicator_2,
266                 0,
267                 { 0, 0, 0 },
268                 0, 0, /* No default value */
269                 "periodicCommunicationIndicator"
270                 },
271         { ATF_POINTER, 6, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicTime),
272                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
273                 -1,     /* IMPLICIT tag at current level */
274                 &asn_DEF_NativeInteger,
275                 0,
276                 { 0, &asn_PER_memb_periodicTime_constr_6,  memb_periodicTime_constraint_1 },
277                 0, 0, /* No default value */
278                 "periodicTime"
279                 },
280         { ATF_POINTER, 5, offsetof(struct Subscription_Based_UE_DifferentiationInfo, scheduledCommunicationTime),
281                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
282                 -1,     /* IMPLICIT tag at current level */
283                 &asn_DEF_ScheduledCommunicationTime,
284                 0,
285                 { 0, 0, 0 },
286                 0, 0, /* No default value */
287                 "scheduledCommunicationTime"
288                 },
289         { ATF_POINTER, 4, offsetof(struct Subscription_Based_UE_DifferentiationInfo, stationaryIndication),
290                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
291                 -1,     /* IMPLICIT tag at current level */
292                 &asn_DEF_stationaryIndication_8,
293                 0,
294                 { 0, 0, 0 },
295                 0, 0, /* No default value */
296                 "stationaryIndication"
297                 },
298         { ATF_POINTER, 3, offsetof(struct Subscription_Based_UE_DifferentiationInfo, trafficProfile),
299                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
300                 -1,     /* IMPLICIT tag at current level */
301                 &asn_DEF_trafficProfile_12,
302                 0,
303                 { 0, 0, 0 },
304                 0, 0, /* No default value */
305                 "trafficProfile"
306                 },
307         { ATF_POINTER, 2, offsetof(struct Subscription_Based_UE_DifferentiationInfo, batteryIndication),
308                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
309                 -1,     /* IMPLICIT tag at current level */
310                 &asn_DEF_batteryIndication_17,
311                 0,
312                 { 0, 0, 0 },
313                 0, 0, /* No default value */
314                 "batteryIndication"
315                 },
316         { ATF_POINTER, 1, offsetof(struct Subscription_Based_UE_DifferentiationInfo, iE_Extensions),
317                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
318                 -1,     /* IMPLICIT tag at current level */
319                 &asn_DEF_ProtocolExtensionContainer_170P196,
320                 0,
321                 { 0, 0, 0 },
322                 0, 0, /* No default value */
323                 "iE-Extensions"
324                 },
325 };
326 static const int asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1[] = { 0, 1, 2, 3, 4, 5, 6 };
327 static const ber_tlv_tag_t asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[] = {
328         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
329 };
330 static const asn_TYPE_tag2member_t asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1[] = {
331     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* periodicCommunicationIndicator */
332     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* periodicTime */
333     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* scheduledCommunicationTime */
334     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* stationaryIndication */
335     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* trafficProfile */
336     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* batteryIndication */
337     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* iE-Extensions */
338 };
339 asn_SEQUENCE_specifics_t asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1 = {
340         sizeof(struct Subscription_Based_UE_DifferentiationInfo),
341         offsetof(struct Subscription_Based_UE_DifferentiationInfo, _asn_ctx),
342         asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1,
343         7,      /* Count of tags in the map */
344         asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1,        /* Optional members */
345         7, 0,   /* Root/Additions */
346         7,      /* First extension addition */
347 };
348 asn_TYPE_descriptor_t asn_DEF_Subscription_Based_UE_DifferentiationInfo = {
349         "Subscription-Based-UE-DifferentiationInfo",
350         "Subscription-Based-UE-DifferentiationInfo",
351         &asn_OP_SEQUENCE,
352         asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1,
353         sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1)
354                 /sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
355         asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1,       /* Same as above */
356         sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1)
357                 /sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
358         { 0, 0, SEQUENCE_constraint },
359         asn_MBR_Subscription_Based_UE_DifferentiationInfo_1,
360         7,      /* Elements count */
361         &asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1      /* Additional specs */
362 };
363