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