blob: 950ceb53686376da5787444365ca2549aed9f5f4 [file] [log] [blame]
aa7133@att.com84bd3342020-03-16 18:04:57 +02001/*
2 *
3 * Copyright 2020 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 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21 * From ASN.1 module "E2AP-PDU-Descriptions"
22 * found in "../asnTextFiles/e2ap-v01.00.00.asn"
23 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
24 */
25
26#include "InitiatingMessage.h"
27
28static const long asn_VAL_1_id_RICsubscription = 8;
29static const long asn_VAL_1_reject = 0;
30static const long asn_VAL_2_id_RICsubscriptionDelete = 9;
31static const long asn_VAL_2_reject = 0;
32static const long asn_VAL_3_id_RICserviceUpdate = 7;
33static const long asn_VAL_3_reject = 0;
34static const long asn_VAL_4_id_RICcontrol = 4;
35static const long asn_VAL_4_reject = 0;
36static const long asn_VAL_5_id_E2setup = 1;
37static const long asn_VAL_5_reject = 0;
38static const long asn_VAL_6_id_Reset = 3;
39static const long asn_VAL_6_reject = 0;
40static const long asn_VAL_7_id_RICindication = 5;
41static const long asn_VAL_7_ignore = 1;
42static const long asn_VAL_8_id_RICserviceQuery = 6;
43static const long asn_VAL_8_ignore = 1;
44static const long asn_VAL_9_id_ErrorIndication = 2;
45static const long asn_VAL_9_ignore = 1;
46static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = {
47 { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest },
48 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse },
49 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure },
50 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription },
51 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject },
52 { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest },
53 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse },
54 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure },
55 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete },
56 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject },
57 { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate },
58 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge },
59 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure },
60 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate },
61 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject },
62 { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest },
63 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge },
64 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure },
65 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol },
66 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject },
67 { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest },
68 { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse },
69 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure },
70 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup },
71 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject },
72 { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest },
73 { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse },
74 { "&UnsuccessfulOutcome", },
75 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_Reset },
76 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject },
77 { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication },
78 { "&SuccessfulOutcome", },
79 { "&UnsuccessfulOutcome", },
80 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_RICindication },
81 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_ignore },
82 { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery },
83 { "&SuccessfulOutcome", },
84 { "&UnsuccessfulOutcome", },
85 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_RICserviceQuery },
86 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_ignore },
87 { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication },
88 { "&SuccessfulOutcome", },
89 { "&UnsuccessfulOutcome", },
90 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_ErrorIndication },
91 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore }
92};
93static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = {
94 { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows }
95};
96static int
97memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
98 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
99 long value;
100
101 if(!sptr) {
102 ASN__CTFAIL(app_key, td, sptr,
103 "%s: value not given (%s:%d)",
104 td->name, __FILE__, __LINE__);
105 return -1;
106 }
107
108 value = *(const long *)sptr;
109
110 if((value >= 0 && value <= 255)) {
111 /* Constraint check succeeded */
112 return 0;
113 } else {
114 ASN__CTFAIL(app_key, td, sptr,
115 "%s: constraint failed (%s:%d)",
116 td->name, __FILE__, __LINE__);
117 return -1;
118 }
119}
120
121static asn_type_selector_result_t
122select_InitiatingMessage_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
123 asn_type_selector_result_t result = {0, 0};
124 const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
125 size_t constraining_column = 3; /* &procedureCode */
126 size_t for_column = 4; /* &criticality */
127 size_t row, presence_index = 0;
128 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode));
129
130 for(row=0; row < itable->rows_count; row++) {
131 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
132 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
133
134 if(type_cell->cell_kind == aioc__undefined)
135 continue;
136
137 presence_index++;
138 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
139 result.type_descriptor = type_cell->type_descriptor;
140 result.presence_index = presence_index;
141 break;
142 }
143 }
144
145 return result;
146}
147
148static int
149memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
150 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
151
152 if(!sptr) {
153 ASN__CTFAIL(app_key, td, sptr,
154 "%s: value not given (%s:%d)",
155 td->name, __FILE__, __LINE__);
156 return -1;
157 }
158
159
160 if(1 /* No applicable constraints whatsoever */) {
161 /* Nothing is here. See below */
162 }
163
164 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
165}
166
167static asn_type_selector_result_t
168select_InitiatingMessage_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
169 asn_type_selector_result_t result = {0, 0};
170 const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
171 size_t constraining_column = 3; /* &procedureCode */
172 size_t for_column = 0; /* &InitiatingMessage */
173 size_t row, presence_index = 0;
174 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, procedureCode));
175
176 for(row=0; row < itable->rows_count; row++) {
177 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
178 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
179
180 if(type_cell->cell_kind == aioc__undefined)
181 continue;
182
183 presence_index++;
184 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
185 result.type_descriptor = type_cell->type_descriptor;
186 result.presence_index = presence_index;
187 break;
188 }
189 }
190
191 return result;
192}
193
194static int
195memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
196 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
197
198 if(!sptr) {
199 ASN__CTFAIL(app_key, td, sptr,
200 "%s: value not given (%s:%d)",
201 td->name, __FILE__, __LINE__);
202 return -1;
203 }
204
205
206 if(1 /* No applicable constraints whatsoever */) {
207 /* Nothing is here. See below */
208 }
209
210 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
211}
212
213static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = {
214 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
215 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
216 0, 0 /* No PER value map */
217};
218static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = {
219 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
220 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
221 0, 0 /* No PER value map */
222};
223static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
224 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
225 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
226 0, 0 /* No PER value map */
227};
228static asn_TYPE_member_t asn_MBR_value_4[] = {
229 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionRequest),
230 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
231 0,
232 &asn_DEF_RICsubscriptionRequest,
233 0,
234 { 0, 0, 0 },
235 0, 0, /* No default value */
236 "RICsubscriptionRequest"
237 },
238 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequest),
239 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
240 0,
241 &asn_DEF_RICsubscriptionDeleteRequest,
242 0,
243 { 0, 0, 0 },
244 0, 0, /* No default value */
245 "RICsubscriptionDeleteRequest"
246 },
247 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceUpdate),
248 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
249 0,
250 &asn_DEF_RICserviceUpdate,
251 0,
252 { 0, 0, 0 },
253 0, 0, /* No default value */
254 "RICserviceUpdate"
255 },
256 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICcontrolRequest),
257 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
258 0,
259 &asn_DEF_RICcontrolRequest,
260 0,
261 { 0, 0, 0 },
262 0, 0, /* No default value */
263 "RICcontrolRequest"
264 },
265 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2setupRequest),
266 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
267 0,
268 &asn_DEF_E2setupRequest,
269 0,
270 { 0, 0, 0 },
271 0, 0, /* No default value */
272 "E2setupRequest"
273 },
274 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest),
275 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
276 0,
277 &asn_DEF_ResetRequest,
278 0,
279 { 0, 0, 0 },
280 0, 0, /* No default value */
281 "ResetRequest"
282 },
283 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICindication),
284 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
285 0,
286 &asn_DEF_RICindication,
287 0,
288 { 0, 0, 0 },
289 0, 0, /* No default value */
290 "RICindication"
291 },
292 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceQuery),
293 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
294 0,
295 &asn_DEF_RICserviceQuery,
296 0,
297 { 0, 0, 0 },
298 0, 0, /* No default value */
299 "RICserviceQuery"
300 },
301 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ErrorIndication),
302 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
303 0,
304 &asn_DEF_ErrorIndication,
305 0,
306 { 0, 0, 0 },
307 0, 0, /* No default value */
308 "ErrorIndication"
309 },
310};
311static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
312 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 8 }, /* RICsubscriptionRequest */
313 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 7 }, /* RICsubscriptionDeleteRequest */
314 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 6 }, /* RICserviceUpdate */
315 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 5 }, /* RICcontrolRequest */
316 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 4 }, /* E2setupRequest */
317 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 3 }, /* ResetRequest */
318 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 2 }, /* RICindication */
319 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 1 }, /* RICserviceQuery */
320 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 0 } /* ErrorIndication */
321};
322static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
323 sizeof(struct InitiatingMessage__value),
324 offsetof(struct InitiatingMessage__value, _asn_ctx),
325 offsetof(struct InitiatingMessage__value, present),
326 sizeof(((struct InitiatingMessage__value *)0)->present),
327 asn_MAP_value_tag2el_4,
328 9, /* Count of tags in the map */
329 0, 0,
330 -1 /* Extensions start */
331};
332static /* Use -fall-defs-global to expose */
333asn_TYPE_descriptor_t asn_DEF_value_4 = {
334 "value",
335 "value",
336 &asn_OP_OPEN_TYPE,
337 0, /* No effective tags (pointer) */
338 0, /* No effective tags (count) */
339 0, /* No tags (pointer) */
340 0, /* No tags (count) */
341 { 0, 0, OPEN_TYPE_constraint },
342 asn_MBR_value_4,
343 9, /* Elements count */
344 &asn_SPC_value_specs_4 /* Additional specs */
345};
346
347asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = {
348 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, procedureCode),
349 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
350 -1, /* IMPLICIT tag at current level */
351 &asn_DEF_ProcedureCode,
352 0,
353 { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
354 0, 0, /* No default value */
355 "procedureCode"
356 },
357 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, criticality),
358 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
359 -1, /* IMPLICIT tag at current level */
360 &asn_DEF_Criticality,
361 select_InitiatingMessage_criticality_type,
362 { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
363 0, 0, /* No default value */
364 "criticality"
365 },
366 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, value),
367 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
368 +1, /* EXPLICIT tag at current level */
369 &asn_DEF_value_4,
370 select_InitiatingMessage_value_type,
371 { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
372 0, 0, /* No default value */
373 "value"
374 },
375};
376static const ber_tlv_tag_t asn_DEF_InitiatingMessage_tags_1[] = {
377 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
378};
379static const asn_TYPE_tag2member_t asn_MAP_InitiatingMessage_tag2el_1[] = {
380 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
381 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
382 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
383};
384asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1 = {
385 sizeof(struct InitiatingMessage),
386 offsetof(struct InitiatingMessage, _asn_ctx),
387 asn_MAP_InitiatingMessage_tag2el_1,
388 3, /* Count of tags in the map */
389 0, 0, 0, /* Optional elements (not needed) */
390 -1, /* First extension addition */
391};
392asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = {
393 "InitiatingMessage",
394 "InitiatingMessage",
395 &asn_OP_SEQUENCE,
396 asn_DEF_InitiatingMessage_tags_1,
397 sizeof(asn_DEF_InitiatingMessage_tags_1)
398 /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
399 asn_DEF_InitiatingMessage_tags_1, /* Same as above */
400 sizeof(asn_DEF_InitiatingMessage_tags_1)
401 /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
402 { 0, 0, SEQUENCE_constraint },
403 asn_MBR_InitiatingMessage_1,
404 3, /* Elements count */
405 &asn_SPC_InitiatingMessage_specs_1 /* Additional specs */
406};
407