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 "SuccessfulOutcome.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_SuccessfulOutcome_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 SuccessfulOutcome, 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_SuccessfulOutcome_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 = 1; /* &SuccessfulOutcome */
173 size_t row, presence_index = 0;
174 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct SuccessfulOutcome, 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 SuccessfulOutcome__value, choice.RICsubscriptionResponse),
230 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
232 &asn_DEF_RICsubscriptionResponse,
235 0, 0, /* No default value */
236 "RICsubscriptionResponse"
238 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICsubscriptionDeleteResponse),
239 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
241 &asn_DEF_RICsubscriptionDeleteResponse,
244 0, 0, /* No default value */
245 "RICsubscriptionDeleteResponse"
247 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICserviceUpdateAcknowledge),
248 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
250 &asn_DEF_RICserviceUpdateAcknowledge,
253 0, 0, /* No default value */
254 "RICserviceUpdateAcknowledge"
256 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.RICcontrolAcknowledge),
257 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
259 &asn_DEF_RICcontrolAcknowledge,
262 0, 0, /* No default value */
263 "RICcontrolAcknowledge"
265 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.E2setupResponse),
266 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
268 &asn_DEF_E2setupResponse,
271 0, 0, /* No default value */
274 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome__value, choice.ResetResponse),
275 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
277 &asn_DEF_ResetResponse,
280 0, 0, /* No default value */
284 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
285 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 5 }, /* RICsubscriptionResponse */
286 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 4 }, /* RICsubscriptionDeleteResponse */
287 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 3 }, /* RICserviceUpdateAcknowledge */
288 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 2 }, /* RICcontrolAcknowledge */
289 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 1 }, /* E2setupResponse */
290 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 0 } /* ResetResponse */
292 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
293 sizeof(struct SuccessfulOutcome__value),
294 offsetof(struct SuccessfulOutcome__value, _asn_ctx),
295 offsetof(struct SuccessfulOutcome__value, present),
296 sizeof(((struct SuccessfulOutcome__value *)0)->present),
297 asn_MAP_value_tag2el_4,
298 6, /* Count of tags in the map */
300 -1 /* Extensions start */
302 static /* Use -fall-defs-global to expose */
303 asn_TYPE_descriptor_t asn_DEF_value_4 = {
307 0, /* No effective tags (pointer) */
308 0, /* No effective tags (count) */
309 0, /* No tags (pointer) */
310 0, /* No tags (count) */
311 { 0, 0, OPEN_TYPE_constraint },
313 6, /* Elements count */
314 &asn_SPC_value_specs_4 /* Additional specs */
317 asn_TYPE_member_t asn_MBR_SuccessfulOutcome_1[] = {
318 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, procedureCode),
319 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
320 -1, /* IMPLICIT tag at current level */
321 &asn_DEF_ProcedureCode,
323 { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
324 0, 0, /* No default value */
327 { ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, criticality),
328 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
329 -1, /* IMPLICIT tag at current level */
330 &asn_DEF_Criticality,
331 select_SuccessfulOutcome_criticality_type,
332 { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
333 0, 0, /* No default value */
336 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct SuccessfulOutcome, value),
337 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
338 +1, /* EXPLICIT tag at current level */
340 select_SuccessfulOutcome_value_type,
341 { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
342 0, 0, /* No default value */
346 static const ber_tlv_tag_t asn_DEF_SuccessfulOutcome_tags_1[] = {
347 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
349 static const asn_TYPE_tag2member_t asn_MAP_SuccessfulOutcome_tag2el_1[] = {
350 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
351 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
352 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
354 asn_SEQUENCE_specifics_t asn_SPC_SuccessfulOutcome_specs_1 = {
355 sizeof(struct SuccessfulOutcome),
356 offsetof(struct SuccessfulOutcome, _asn_ctx),
357 asn_MAP_SuccessfulOutcome_tag2el_1,
358 3, /* Count of tags in the map */
359 0, 0, 0, /* Optional elements (not needed) */
360 -1, /* First extension addition */
362 asn_TYPE_descriptor_t asn_DEF_SuccessfulOutcome = {
366 asn_DEF_SuccessfulOutcome_tags_1,
367 sizeof(asn_DEF_SuccessfulOutcome_tags_1)
368 /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */
369 asn_DEF_SuccessfulOutcome_tags_1, /* Same as above */
370 sizeof(asn_DEF_SuccessfulOutcome_tags_1)
371 /sizeof(asn_DEF_SuccessfulOutcome_tags_1[0]), /* 1 */
372 { 0, 0, SEQUENCE_constraint },
373 asn_MBR_SuccessfulOutcome_1,
374 3, /* Elements count */
375 &asn_SPC_SuccessfulOutcome_specs_1 /* Additional specs */