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 "../asnTextFiles/e2ap-v01.00.00.asn"
23 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
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_Reset = 3;
39 static const long asn_VAL_6_reject = 0;
40 static const long asn_VAL_7_id_RICindication = 5;
41 static const long asn_VAL_7_ignore = 1;
42 static const long asn_VAL_8_id_RICserviceQuery = 6;
43 static const long asn_VAL_8_ignore = 1;
44 static const long asn_VAL_9_id_ErrorIndication = 2;
45 static const long asn_VAL_9_ignore = 1;
46 static 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 }
93 static const asn_ioc_set_t asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1[] = {
94 { 9, 5, asn_IOS_E2AP_ELEMENTARY_PROCEDURES_1_rows }
97 memb_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
98 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
102 ASN__CTFAIL(app_key, td, sptr,
103 "%s: value not given (%s:%d)",
104 td->name, __FILE__, __LINE__);
108 value = *(const long *)sptr;
110 if((value >= 0 && value <= 255)) {
111 /* Constraint check succeeded */
114 ASN__CTFAIL(app_key, td, sptr,
115 "%s: constraint failed (%s:%d)",
116 td->name, __FILE__, __LINE__);
121 static asn_type_selector_result_t
122 select_UnsuccessfulOutcome_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 UnsuccessfulOutcome, procedureCode));
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];
134 if(type_cell->cell_kind == aioc__undefined)
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;
149 memb_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
150 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
153 ASN__CTFAIL(app_key, td, sptr,
154 "%s: value not given (%s:%d)",
155 td->name, __FILE__, __LINE__);
160 if(1 /* No applicable constraints whatsoever */) {
161 /* Nothing is here. See below */
164 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
167 static asn_type_selector_result_t
168 select_UnsuccessfulOutcome_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 = 2; /* &UnsuccessfulOutcome */
173 size_t row, presence_index = 0;
174 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct UnsuccessfulOutcome, procedureCode));
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];
180 if(type_cell->cell_kind == aioc__undefined)
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;
195 memb_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
196 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
199 ASN__CTFAIL(app_key, td, sptr,
200 "%s: value not given (%s:%d)",
201 td->name, __FILE__, __LINE__);
206 if(1 /* No applicable constraints whatsoever */) {
207 /* Nothing is here. See below */
210 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
213 static 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 */
218 static 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 */
223 static 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 */
228 static asn_TYPE_member_t asn_MBR_value_4[] = {
229 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionFailure),
230 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
232 &asn_DEF_RICsubscriptionFailure,
235 0, 0, /* No default value */
236 "RICsubscriptionFailure"
238 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICsubscriptionDeleteFailure),
239 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
241 &asn_DEF_RICsubscriptionDeleteFailure,
244 0, 0, /* No default value */
245 "RICsubscriptionDeleteFailure"
247 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICserviceUpdateFailure),
248 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
250 &asn_DEF_RICserviceUpdateFailure,
253 0, 0, /* No default value */
254 "RICserviceUpdateFailure"
256 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.RICcontrolFailure),
257 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
259 &asn_DEF_RICcontrolFailure,
262 0, 0, /* No default value */
265 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome__value, choice.E2setupFailure),
266 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
268 &asn_DEF_E2setupFailure,
271 0, 0, /* No default value */
275 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
276 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 4 }, /* RICsubscriptionFailure */
277 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 3 }, /* RICsubscriptionDeleteFailure */
278 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 2 }, /* RICserviceUpdateFailure */
279 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 1 }, /* RICcontrolFailure */
280 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 0 } /* E2setupFailure */
282 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
283 sizeof(struct UnsuccessfulOutcome__value),
284 offsetof(struct UnsuccessfulOutcome__value, _asn_ctx),
285 offsetof(struct UnsuccessfulOutcome__value, present),
286 sizeof(((struct UnsuccessfulOutcome__value *)0)->present),
287 asn_MAP_value_tag2el_4,
288 5, /* Count of tags in the map */
290 -1 /* Extensions start */
292 static /* Use -fall-defs-global to expose */
293 asn_TYPE_descriptor_t asn_DEF_value_4 = {
297 0, /* No effective tags (pointer) */
298 0, /* No effective tags (count) */
299 0, /* No tags (pointer) */
300 0, /* No tags (count) */
301 { 0, 0, OPEN_TYPE_constraint },
303 5, /* Elements count */
304 &asn_SPC_value_specs_4 /* Additional specs */
307 asn_TYPE_member_t asn_MBR_UnsuccessfulOutcome_1[] = {
308 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, procedureCode),
309 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
310 -1, /* IMPLICIT tag at current level */
311 &asn_DEF_ProcedureCode,
313 { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
314 0, 0, /* No default value */
317 { ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, criticality),
318 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
319 -1, /* IMPLICIT tag at current level */
320 &asn_DEF_Criticality,
321 select_UnsuccessfulOutcome_criticality_type,
322 { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
323 0, 0, /* No default value */
326 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct UnsuccessfulOutcome, value),
327 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
328 +1, /* EXPLICIT tag at current level */
330 select_UnsuccessfulOutcome_value_type,
331 { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
332 0, 0, /* No default value */
336 static const ber_tlv_tag_t asn_DEF_UnsuccessfulOutcome_tags_1[] = {
337 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
339 static const asn_TYPE_tag2member_t asn_MAP_UnsuccessfulOutcome_tag2el_1[] = {
340 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
341 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
342 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
344 asn_SEQUENCE_specifics_t asn_SPC_UnsuccessfulOutcome_specs_1 = {
345 sizeof(struct UnsuccessfulOutcome),
346 offsetof(struct UnsuccessfulOutcome, _asn_ctx),
347 asn_MAP_UnsuccessfulOutcome_tag2el_1,
348 3, /* Count of tags in the map */
349 0, 0, 0, /* Optional elements (not needed) */
350 -1, /* First extension addition */
352 asn_TYPE_descriptor_t asn_DEF_UnsuccessfulOutcome = {
353 "UnsuccessfulOutcome",
354 "UnsuccessfulOutcome",
356 asn_DEF_UnsuccessfulOutcome_tags_1,
357 sizeof(asn_DEF_UnsuccessfulOutcome_tags_1)
358 /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */
359 asn_DEF_UnsuccessfulOutcome_tags_1, /* Same as above */
360 sizeof(asn_DEF_UnsuccessfulOutcome_tags_1)
361 /sizeof(asn_DEF_UnsuccessfulOutcome_tags_1[0]), /* 1 */
362 { 0, 0, SEQUENCE_constraint },
363 asn_MBR_UnsuccessfulOutcome_1,
364 3, /* Elements count */
365 &asn_SPC_UnsuccessfulOutcome_specs_1 /* Additional specs */