3 * Copyright 2020 AT&T Intellectual Property
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21 * From ASN.1 module "E2AP-PDU-Descriptions"
22 * found in "e2ap-v01.01.00.asn"
23 * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
26 #include "UnsuccessfulOutcome.h"
28 static const long asn_VAL_1_id_RICsubscription = 8;
29 static const long asn_VAL_1_reject = 0;
30 static const long asn_VAL_2_id_RICsubscriptionDelete = 9;
31 static const long asn_VAL_2_reject = 0;
32 static const long asn_VAL_3_id_RICserviceUpdate = 7;
33 static const long asn_VAL_3_reject = 0;
34 static const long asn_VAL_4_id_RICcontrol = 4;
35 static const long asn_VAL_4_reject = 0;
36 static const long asn_VAL_5_id_E2setup = 1;
37 static const long asn_VAL_5_reject = 0;
38 static const long asn_VAL_6_id_E2nodeConfigurationUpdate = 10;
39 static const long asn_VAL_6_reject = 0;
40 static const long asn_VAL_7_id_E2connectionUpdate = 11;
41 static const long asn_VAL_7_reject = 0;
42 static const long asn_VAL_8_id_Reset = 3;
43 static const long asn_VAL_8_reject = 0;
44 static const long asn_VAL_9_id_RICindication = 5;
45 static const long asn_VAL_9_ignore = 1;
46 static const long asn_VAL_10_id_RICserviceQuery = 6;
47 static const long asn_VAL_10_ignore = 1;
48 static const long asn_VAL_11_id_ErrorIndication = 2;
49 static const long asn_VAL_11_ignore = 1;
50 static const asn_ioc_cell_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows[] = {
51 { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionRequest },
52 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionResponse },
53 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionFailure },
54 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_1_id_RICsubscription },
55 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_1_reject },
56 { "&InitiatingMessage", aioc__type, &asn_DEF_RICsubscriptionDeleteRequest },
57 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteResponse },
58 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICsubscriptionDeleteFailure },
59 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_2_id_RICsubscriptionDelete },
60 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_2_reject },
61 { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceUpdate },
62 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateAcknowledge },
63 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICserviceUpdateFailure },
64 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_3_id_RICserviceUpdate },
65 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_3_reject },
66 { "&InitiatingMessage", aioc__type, &asn_DEF_RICcontrolRequest },
67 { "&SuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolAcknowledge },
68 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_RICcontrolFailure },
69 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_4_id_RICcontrol },
70 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_4_reject },
71 { "&InitiatingMessage", aioc__type, &asn_DEF_E2setupRequest },
72 { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2setupResponse },
73 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2setupFailure },
74 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_5_id_E2setup },
75 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_5_reject },
76 { "&InitiatingMessage", aioc__type, &asn_DEF_E2nodeConfigurationUpdate },
77 { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateAcknowledge },
78 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2nodeConfigurationUpdateFailure },
79 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_6_id_E2nodeConfigurationUpdate },
80 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_6_reject },
81 { "&InitiatingMessage", aioc__type, &asn_DEF_E2connectionUpdate },
82 { "&SuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateAcknowledge },
83 { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_E2connectionUpdateFailure },
84 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_7_id_E2connectionUpdate },
85 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_7_reject },
86 { "&InitiatingMessage", aioc__type, &asn_DEF_ResetRequest },
87 { "&SuccessfulOutcome", aioc__type, &asn_DEF_ResetResponse },
88 { "&UnsuccessfulOutcome", },
89 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_8_id_Reset },
90 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_8_reject },
91 { "&InitiatingMessage", aioc__type, &asn_DEF_RICindication },
92 { "&SuccessfulOutcome", },
93 { "&UnsuccessfulOutcome", },
94 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_9_id_RICindication },
95 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_9_ignore },
96 { "&InitiatingMessage", aioc__type, &asn_DEF_RICserviceQuery },
97 { "&SuccessfulOutcome", },
98 { "&UnsuccessfulOutcome", },
99 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_10_id_RICserviceQuery },
100 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_10_ignore },
101 { "&InitiatingMessage", aioc__type, &asn_DEF_ErrorIndication },
102 { "&SuccessfulOutcome", },
103 { "&UnsuccessfulOutcome", },
104 { "&procedureCode", aioc__value, &asn_DEF_ProcedureCode, &asn_VAL_11_id_ErrorIndication },
105 { "&criticality", aioc__value, &asn_DEF_Criticality, &asn_VAL_11_ignore }
107 static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = {
108 { 11, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows }
111 memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
112 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
116 ASN__CTFAIL(app_key, td, sptr,
117 "%s: value not given (%s:%d)",
118 td->name, __FILE__, __LINE__);
122 value = *(const long *)sptr;
124 if((value >= 0 && value <= 255)) {
125 /* Constraint check succeeded */
128 ASN__CTFAIL(app_key, td, sptr,
129 "%s: constraint failed (%s:%d)",
130 td->name, __FILE__, __LINE__);
135 static asn_type_selector_result_t
136 select_UnsuccessfulOutcome_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
137 asn_type_selector_result_t result = {0, 0};
138 const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
139 size_t constraining_column = 3; /* &procedureCode */
140 size_t for_column = 4; /* &criticality */
141 size_t row, presence_index = 0;
142 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode));
144 for(row=0; row < itable->rows_count; row++) {
145 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
146 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
148 if(type_cell->cell_kind == aioc__undefined)
152 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
153 result.type_descriptor = type_cell->type_descriptor;
154 result.presence_index = presence_index;
163 memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
164 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
167 ASN__CTFAIL(app_key, td, sptr,
168 "%s: value not given (%s:%d)",
169 td->name, __FILE__, __LINE__);
174 if(1 /* No applicable constraints whatsoever */) {
175 /* Nothing is here. See below */
178 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
181 static asn_type_selector_result_t
182 select_UnsuccessfulOutcome_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) {
183 asn_type_selector_result_t result = {0, 0};
184 const asn_ioc_set_t *itable = asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1;
185 size_t constraining_column = 3; /* &procedureCode */
186 size_t for_column = 2; /* &UnsuccessfulOutcome */
187 size_t row, presence_index = 0;
188 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode));
190 for(row=0; row < itable->rows_count; row++) {
191 const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column];
192 const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column];
194 if(type_cell->cell_kind == aioc__undefined)
198 if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) {
199 result.type_descriptor = type_cell->type_descriptor;
200 result.presence_index = presence_index;
209 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
210 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
213 ASN__CTFAIL(app_key, td, sptr,
214 "%s: value not given (%s:%d)",
215 td->name, __FILE__, __LINE__);
220 if(1 /* No applicable constraints whatsoever */) {
221 /* Nothing is here. See below */
224 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
227 static asn_per_constraints_t asn_PER_memb_procedureCode_constr_2 CC_NOTUSED = {
228 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
229 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
230 0, 0 /* No PER value map */
232 static asn_per_constraints_t asn_PER_memb_criticality_constr_3 CC_NOTUSED = {
233 { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
234 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
235 0, 0 /* No PER value map */
237 static asn_per_constraints_t asn_PER_memb_value_constr_4 CC_NOTUSED = {
238 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
239 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
240 0, 0 /* No PER value map */
242 static asn_TYPE_member_t asn_MBR_value_4[] = {
243 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionFailure),
244 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
246 &asn_DEF_RICsubscriptionFailure,
249 0, 0, /* No default value */
250 "RICsubscriptionFailure"
252 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionDeleteFailure),
253 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
255 &asn_DEF_RICsubscriptionDeleteFailure,
258 0, 0, /* No default value */
259 "RICsubscriptionDeleteFailure"
261 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICserviceUpdateFailure),
262 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
264 &asn_DEF_RICserviceUpdateFailure,
267 0, 0, /* No default value */
268 "RICserviceUpdateFailure"
270 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICcontrolFailure),
271 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
273 &asn_DEF_RICcontrolFailure,
276 0, 0, /* No default value */
279 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2setupFailure),
280 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
282 &asn_DEF_E2setupFailure,
285 0, 0, /* No default value */
288 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2nodeConfigurationUpdateFailure),
289 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
291 &asn_DEF_E2nodeConfigurationUpdateFailure,
294 0, 0, /* No default value */
295 "E2nodeConfigurationUpdateFailure"
297 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2connectionUpdateFailure),
298 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
300 &asn_DEF_E2connectionUpdateFailure,
303 0, 0, /* No default value */
304 "E2connectionUpdateFailure"
307 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
308 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 6 }, /* RICsubscriptionFailure */
309 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 5 }, /* RICsubscriptionDeleteFailure */
310 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 4 }, /* RICserviceUpdateFailure */
311 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 3 }, /* RICcontrolFailure */
312 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 2 }, /* E2setupFailure */
313 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 1 }, /* E2nodeConfigurationUpdateFailure */
314 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 0 } /* E2connectionUpdateFailure */
316 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
317 sizeof(struct UnsuccessfulOutcome__value),
318 offsetof(struct UnsuccessfulOutcome__value, _asn_ctx),
319 offsetof(struct UnsuccessfulOutcome__value, present),
320 sizeof(((struct UnsuccessfulOutcome__value *)0)->present),
321 asn_MAP_value_tag2el_4,
322 7, /* Count of tags in the map */
324 -1 /* Extensions start */
326 static /* Use -fall-defs-global to expose */
327 asn_TYPE_descriptor_t asn_DEF_value_4 = {
331 0, /* No effective tags (pointer) */
332 0, /* No effective tags (count) */
333 0, /* No tags (pointer) */
334 0, /* No tags (count) */
335 { 0, 0, OPEN_TYPE_constraint },
337 7, /* Elements count */
338 &asn_SPC_value_specs_4 /* Additional specs */
341 asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = {
342 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, procedureCode),
343 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
344 -1, /* IMPLICIT tag at current level */
345 &asn_DEF_ProcedureCode,
347 { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
348 0, 0, /* No default value */
351 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, criticality),
352 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
353 -1, /* IMPLICIT tag at current level */
354 &asn_DEF_Criticality,
355 select_UnsuccessfulOutcome_criticality_type,
356 { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
357 0, 0, /* No default value */
360 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, value),
361 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
362 +1, /* EXPLICIT tag at current level */
364 select_UnsuccessfulOutcome_value_type,
365 { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
366 0, 0, /* No default value */
370 static const ber_tlv_tag_t asn_DEF_UnsuccessfulOutcome_tags_1[] = {
371 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
373 static const asn_TYPE_tag2member_t asn_MAP_UnsuccessfulOutcome_tag2el_1[] = {
374 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
375 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
376 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
378 asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1 = {
379 sizeof(struct UnsuccessfulOutcome),
380 offsetof(struct UnsuccessfulOutcome, _asn_ctx),
381 asn_MAP_UnsuccessfulOutcome_tag2el_1,
382 3, /* Count of tags in the map */
383 0, 0, 0, /* Optional elements (not needed) */
384 -1, /* First extension addition */
386 asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome = {
387 "UnsuccessfulOutcome",
388 "UnsuccessfulOutcome",
390 asn_DEF_UnsuccessfulOutcome_tags_1,
391 sizeof(asn_DEF_UnsuccessfulOutcome_tags_1)
392 /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */
393 asn_DEF_UnsuccessfulOutcome_tags_1, /* Same as above */
394 sizeof(asn_DEF_UnsuccessfulOutcome_tags_1)
395 /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */
396 { 0, 0, SEQUENCE_constraint },
397 asn_MBR_UnsuccessfulOutcome_1,
398 3, /* Elements count */
399 &asn_SPC_UnsuccessfulOutcome_specs_1 /* Additional specs */