Updated documentation for mock a1 tool
[ric-app/admin.git] / asn1c_defs / X2N_Subscription-Based-UE-DifferentiationInfo.c
1 /*
2  * Generated by asn1c-0.9.29 n1 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "../../asn_defs/asn1/x2ap-15-04.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
6  */
7
8 #include "X2N_Subscription-Based-UE-DifferentiationInfo.h"
9
10 #include "X2N_ScheduledCommunicationTime.h"
11 #include "X2N_ProtocolExtensionContainer.h"
12 /*
13  * This type is implemented using NativeEnumerated,
14  * so here we adjust the DEF accordingly.
15  */
16 /*
17  * This type is implemented using NativeEnumerated,
18  * so here we adjust the DEF accordingly.
19  */
20 /*
21  * This type is implemented using NativeEnumerated,
22  * so here we adjust the DEF accordingly.
23  */
24 /*
25  * This type is implemented using NativeEnumerated,
26  * so here we adjust the DEF accordingly.
27  */
28 static int
29 memb_X2N_periodicTime_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
30                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
31         long value;
32         
33         if(!sptr) {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: value not given (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39         
40         value = *(const long *)sptr;
41         
42         if((value >= 1 && value <= 3600)) {
43                 /* Constraint check succeeded */
44                 return 0;
45         } else {
46                 ASN__CTFAIL(app_key, td, sptr,
47                         "%s: constraint failed (%s:%d)",
48                         td->name, __FILE__, __LINE__);
49                 return -1;
50         }
51 }
52
53 static asn_per_constraints_t asn_PER_type_X2N_periodicCommunicationIndicator_constr_2 CC_NOTUSED = {
54         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
55         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
56         0, 0    /* No PER value map */
57 };
58 static asn_per_constraints_t asn_PER_type_X2N_stationaryIndication_constr_8 CC_NOTUSED = {
59         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
60         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
61         0, 0    /* No PER value map */
62 };
63 static asn_per_constraints_t asn_PER_type_X2N_trafficProfile_constr_12 CC_NOTUSED = {
64         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
65         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
66         0, 0    /* No PER value map */
67 };
68 static asn_per_constraints_t asn_PER_type_X2N_batteryIndication_constr_17 CC_NOTUSED = {
69         { APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }    /* (0..2,...) */,
70         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
71         0, 0    /* No PER value map */
72 };
73 static asn_per_constraints_t asn_PER_memb_X2N_periodicTime_constr_6 CC_NOTUSED = {
74         { APC_CONSTRAINED | APC_EXTENSIBLE,  12,  12,  1,  3600 }       /* (1..3600,...) */,
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         0, 0    /* No PER value map */
77 };
78 static const asn_INTEGER_enum_map_t asn_MAP_X2N_periodicCommunicationIndicator_value2enum_2[] = {
79         { 0,    12,     "periodically" },
80         { 1,    8,      "ondemand" }
81         /* This list is extensible */
82 };
83 static const unsigned int asn_MAP_X2N_periodicCommunicationIndicator_enum2value_2[] = {
84         1,      /* ondemand(1) */
85         0       /* periodically(0) */
86         /* This list is extensible */
87 };
88 static const asn_INTEGER_specifics_t asn_SPC_X2N_periodicCommunicationIndicator_specs_2 = {
89         asn_MAP_X2N_periodicCommunicationIndicator_value2enum_2,        /* "tag" => N; sorted by tag */
90         asn_MAP_X2N_periodicCommunicationIndicator_enum2value_2,        /* N => "tag"; sorted by N */
91         2,      /* Number of elements in the maps */
92         3,      /* Extensions before this member */
93         1,      /* Strict enumeration */
94         0,      /* Native long size */
95         0
96 };
97 static const ber_tlv_tag_t asn_DEF_X2N_periodicCommunicationIndicator_tags_2[] = {
98         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
99         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
100 };
101 static /* Use -fall-defs-global to expose */
102 asn_TYPE_descriptor_t asn_DEF_X2N_periodicCommunicationIndicator_2 = {
103         "periodicCommunicationIndicator",
104         "periodicCommunicationIndicator",
105         &asn_OP_NativeEnumerated,
106         asn_DEF_X2N_periodicCommunicationIndicator_tags_2,
107         sizeof(asn_DEF_X2N_periodicCommunicationIndicator_tags_2)
108                 /sizeof(asn_DEF_X2N_periodicCommunicationIndicator_tags_2[0]) - 1, /* 1 */
109         asn_DEF_X2N_periodicCommunicationIndicator_tags_2,      /* Same as above */
110         sizeof(asn_DEF_X2N_periodicCommunicationIndicator_tags_2)
111                 /sizeof(asn_DEF_X2N_periodicCommunicationIndicator_tags_2[0]), /* 2 */
112         { 0, &asn_PER_type_X2N_periodicCommunicationIndicator_constr_2, NativeEnumerated_constraint },
113         0, 0,   /* Defined elsewhere */
114         &asn_SPC_X2N_periodicCommunicationIndicator_specs_2     /* Additional specs */
115 };
116
117 static const asn_INTEGER_enum_map_t asn_MAP_X2N_stationaryIndication_value2enum_8[] = {
118         { 0,    10,     "stationary" },
119         { 1,    6,      "mobile" }
120         /* This list is extensible */
121 };
122 static const unsigned int asn_MAP_X2N_stationaryIndication_enum2value_8[] = {
123         1,      /* mobile(1) */
124         0       /* stationary(0) */
125         /* This list is extensible */
126 };
127 static const asn_INTEGER_specifics_t asn_SPC_X2N_stationaryIndication_specs_8 = {
128         asn_MAP_X2N_stationaryIndication_value2enum_8,  /* "tag" => N; sorted by tag */
129         asn_MAP_X2N_stationaryIndication_enum2value_8,  /* N => "tag"; sorted by N */
130         2,      /* Number of elements in the maps */
131         3,      /* Extensions before this member */
132         1,      /* Strict enumeration */
133         0,      /* Native long size */
134         0
135 };
136 static const ber_tlv_tag_t asn_DEF_X2N_stationaryIndication_tags_8[] = {
137         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
138         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
139 };
140 static /* Use -fall-defs-global to expose */
141 asn_TYPE_descriptor_t asn_DEF_X2N_stationaryIndication_8 = {
142         "stationaryIndication",
143         "stationaryIndication",
144         &asn_OP_NativeEnumerated,
145         asn_DEF_X2N_stationaryIndication_tags_8,
146         sizeof(asn_DEF_X2N_stationaryIndication_tags_8)
147                 /sizeof(asn_DEF_X2N_stationaryIndication_tags_8[0]) - 1, /* 1 */
148         asn_DEF_X2N_stationaryIndication_tags_8,        /* Same as above */
149         sizeof(asn_DEF_X2N_stationaryIndication_tags_8)
150                 /sizeof(asn_DEF_X2N_stationaryIndication_tags_8[0]), /* 2 */
151         { 0, &asn_PER_type_X2N_stationaryIndication_constr_8, NativeEnumerated_constraint },
152         0, 0,   /* Defined elsewhere */
153         &asn_SPC_X2N_stationaryIndication_specs_8       /* Additional specs */
154 };
155
156 static const asn_INTEGER_enum_map_t asn_MAP_X2N_trafficProfile_value2enum_12[] = {
157         { 0,    13,     "single-packet" },
158         { 1,    12,     "dual-packets" },
159         { 2,    16,     "multiple-packets" }
160         /* This list is extensible */
161 };
162 static const unsigned int asn_MAP_X2N_trafficProfile_enum2value_12[] = {
163         1,      /* dual-packets(1) */
164         2,      /* multiple-packets(2) */
165         0       /* single-packet(0) */
166         /* This list is extensible */
167 };
168 static const asn_INTEGER_specifics_t asn_SPC_X2N_trafficProfile_specs_12 = {
169         asn_MAP_X2N_trafficProfile_value2enum_12,       /* "tag" => N; sorted by tag */
170         asn_MAP_X2N_trafficProfile_enum2value_12,       /* N => "tag"; sorted by N */
171         3,      /* Number of elements in the maps */
172         4,      /* Extensions before this member */
173         1,      /* Strict enumeration */
174         0,      /* Native long size */
175         0
176 };
177 static const ber_tlv_tag_t asn_DEF_X2N_trafficProfile_tags_12[] = {
178         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
179         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
180 };
181 static /* Use -fall-defs-global to expose */
182 asn_TYPE_descriptor_t asn_DEF_X2N_trafficProfile_12 = {
183         "trafficProfile",
184         "trafficProfile",
185         &asn_OP_NativeEnumerated,
186         asn_DEF_X2N_trafficProfile_tags_12,
187         sizeof(asn_DEF_X2N_trafficProfile_tags_12)
188                 /sizeof(asn_DEF_X2N_trafficProfile_tags_12[0]) - 1, /* 1 */
189         asn_DEF_X2N_trafficProfile_tags_12,     /* Same as above */
190         sizeof(asn_DEF_X2N_trafficProfile_tags_12)
191                 /sizeof(asn_DEF_X2N_trafficProfile_tags_12[0]), /* 2 */
192         { 0, &asn_PER_type_X2N_trafficProfile_constr_12, NativeEnumerated_constraint },
193         0, 0,   /* Defined elsewhere */
194         &asn_SPC_X2N_trafficProfile_specs_12    /* Additional specs */
195 };
196
197 static const asn_INTEGER_enum_map_t asn_MAP_X2N_batteryIndication_value2enum_17[] = {
198         { 0,    15,     "battery-powered" },
199         { 1,    47,     "battery-powered-not-rechargeable-or-replaceable" },
200         { 2,    19,     "not-battery-powered" }
201         /* This list is extensible */
202 };
203 static const unsigned int asn_MAP_X2N_batteryIndication_enum2value_17[] = {
204         0,      /* battery-powered(0) */
205         1,      /* battery-powered-not-rechargeable-or-replaceable(1) */
206         2       /* not-battery-powered(2) */
207         /* This list is extensible */
208 };
209 static const asn_INTEGER_specifics_t asn_SPC_X2N_batteryIndication_specs_17 = {
210         asn_MAP_X2N_batteryIndication_value2enum_17,    /* "tag" => N; sorted by tag */
211         asn_MAP_X2N_batteryIndication_enum2value_17,    /* N => "tag"; sorted by N */
212         3,      /* Number of elements in the maps */
213         4,      /* Extensions before this member */
214         1,      /* Strict enumeration */
215         0,      /* Native long size */
216         0
217 };
218 static const ber_tlv_tag_t asn_DEF_X2N_batteryIndication_tags_17[] = {
219         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
220         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
221 };
222 static /* Use -fall-defs-global to expose */
223 asn_TYPE_descriptor_t asn_DEF_X2N_batteryIndication_17 = {
224         "batteryIndication",
225         "batteryIndication",
226         &asn_OP_NativeEnumerated,
227         asn_DEF_X2N_batteryIndication_tags_17,
228         sizeof(asn_DEF_X2N_batteryIndication_tags_17)
229                 /sizeof(asn_DEF_X2N_batteryIndication_tags_17[0]) - 1, /* 1 */
230         asn_DEF_X2N_batteryIndication_tags_17,  /* Same as above */
231         sizeof(asn_DEF_X2N_batteryIndication_tags_17)
232                 /sizeof(asn_DEF_X2N_batteryIndication_tags_17[0]), /* 2 */
233         { 0, &asn_PER_type_X2N_batteryIndication_constr_17, NativeEnumerated_constraint },
234         0, 0,   /* Defined elsewhere */
235         &asn_SPC_X2N_batteryIndication_specs_17 /* Additional specs */
236 };
237
238 static asn_TYPE_member_t asn_MBR_X2N_Subscription_Based_UE_DifferentiationInfo_1[] = {
239         { ATF_POINTER, 7, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, periodicCommunicationIndicator),
240                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
241                 -1,     /* IMPLICIT tag at current level */
242                 &asn_DEF_X2N_periodicCommunicationIndicator_2,
243                 0,
244                 { 0, 0, 0 },
245                 0, 0, /* No default value */
246                 "periodicCommunicationIndicator"
247                 },
248         { ATF_POINTER, 6, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, periodicTime),
249                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
250                 -1,     /* IMPLICIT tag at current level */
251                 &asn_DEF_NativeInteger,
252                 0,
253                 { 0, &asn_PER_memb_X2N_periodicTime_constr_6,  memb_X2N_periodicTime_constraint_1 },
254                 0, 0, /* No default value */
255                 "periodicTime"
256                 },
257         { ATF_POINTER, 5, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, scheduledCommunicationTime),
258                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
259                 -1,     /* IMPLICIT tag at current level */
260                 &asn_DEF_X2N_ScheduledCommunicationTime,
261                 0,
262                 { 0, 0, 0 },
263                 0, 0, /* No default value */
264                 "scheduledCommunicationTime"
265                 },
266         { ATF_POINTER, 4, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, stationaryIndication),
267                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
268                 -1,     /* IMPLICIT tag at current level */
269                 &asn_DEF_X2N_stationaryIndication_8,
270                 0,
271                 { 0, 0, 0 },
272                 0, 0, /* No default value */
273                 "stationaryIndication"
274                 },
275         { ATF_POINTER, 3, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, trafficProfile),
276                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
277                 -1,     /* IMPLICIT tag at current level */
278                 &asn_DEF_X2N_trafficProfile_12,
279                 0,
280                 { 0, 0, 0 },
281                 0, 0, /* No default value */
282                 "trafficProfile"
283                 },
284         { ATF_POINTER, 2, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, batteryIndication),
285                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
286                 -1,     /* IMPLICIT tag at current level */
287                 &asn_DEF_X2N_batteryIndication_17,
288                 0,
289                 { 0, 0, 0 },
290                 0, 0, /* No default value */
291                 "batteryIndication"
292                 },
293         { ATF_POINTER, 1, offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, iE_Extensions),
294                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
295                 -1,     /* IMPLICIT tag at current level */
296                 &asn_DEF_X2N_ProtocolExtensionContainer_8231P196,
297                 0,
298                 { 0, 0, 0 },
299                 0, 0, /* No default value */
300                 "iE-Extensions"
301                 },
302 };
303 static const int asn_MAP_X2N_Subscription_Based_UE_DifferentiationInfo_oms_1[] = { 0, 1, 2, 3, 4, 5, 6 };
304 static const ber_tlv_tag_t asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1[] = {
305         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
306 };
307 static const asn_TYPE_tag2member_t asn_MAP_X2N_Subscription_Based_UE_DifferentiationInfo_tag2el_1[] = {
308     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* periodicCommunicationIndicator */
309     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* periodicTime */
310     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* scheduledCommunicationTime */
311     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* stationaryIndication */
312     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* trafficProfile */
313     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* batteryIndication */
314     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* iE-Extensions */
315 };
316 static asn_SEQUENCE_specifics_t asn_SPC_X2N_Subscription_Based_UE_DifferentiationInfo_specs_1 = {
317         sizeof(struct X2N_Subscription_Based_UE_DifferentiationInfo),
318         offsetof(struct X2N_Subscription_Based_UE_DifferentiationInfo, _asn_ctx),
319         asn_MAP_X2N_Subscription_Based_UE_DifferentiationInfo_tag2el_1,
320         7,      /* Count of tags in the map */
321         asn_MAP_X2N_Subscription_Based_UE_DifferentiationInfo_oms_1,    /* Optional members */
322         7, 0,   /* Root/Additions */
323         7,      /* First extension addition */
324 };
325 asn_TYPE_descriptor_t asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo = {
326         "Subscription-Based-UE-DifferentiationInfo",
327         "Subscription-Based-UE-DifferentiationInfo",
328         &asn_OP_SEQUENCE,
329         asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1,
330         sizeof(asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1)
331                 /sizeof(asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
332         asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1,   /* Same as above */
333         sizeof(asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1)
334                 /sizeof(asn_DEF_X2N_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
335         { 0, 0, SEQUENCE_constraint },
336         asn_MBR_X2N_Subscription_Based_UE_DifferentiationInfo_1,
337         7,      /* Elements count */
338         &asn_SPC_X2N_Subscription_Based_UE_DifferentiationInfo_specs_1  /* Additional specs */
339 };
340