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 "InitiatingMessage.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_InitiatingMessage_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 InitiatingMessage, 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_InitiatingMessage_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 = 0; /* &InitiatingMessage */
187 size_t row, presence_index = 0;
188 const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct InitiatingMessage, 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 InitiatingMessage__value, choice.RICsubscriptionRequest),
244 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
246 &asn_DEF_RICsubscriptionRequest,
249 0, 0, /* No default value */
250 "RICsubscriptionRequest"
252 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICsubscriptionDeleteRequest),
253 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
255 &asn_DEF_RICsubscriptionDeleteRequest,
258 0, 0, /* No default value */
259 "RICsubscriptionDeleteRequest"
261 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceUpdate),
262 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
264 &asn_DEF_RICserviceUpdate,
267 0, 0, /* No default value */
270 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICcontrolRequest),
271 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
273 &asn_DEF_RICcontrolRequest,
276 0, 0, /* No default value */
279 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2setupRequest),
280 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
282 &asn_DEF_E2setupRequest,
285 0, 0, /* No default value */
288 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2nodeConfigurationUpdate),
289 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
291 &asn_DEF_E2nodeConfigurationUpdate,
294 0, 0, /* No default value */
295 "E2nodeConfigurationUpdate"
297 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.E2connectionUpdate),
298 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
300 &asn_DEF_E2connectionUpdate,
303 0, 0, /* No default value */
306 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ResetRequest),
307 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
309 &asn_DEF_ResetRequest,
312 0, 0, /* No default value */
315 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICindication),
316 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
318 &asn_DEF_RICindication,
321 0, 0, /* No default value */
324 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.RICserviceQuery),
325 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
327 &asn_DEF_RICserviceQuery,
330 0, 0, /* No default value */
333 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage__value, choice.ErrorIndication),
334 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
336 &asn_DEF_ErrorIndication,
339 0, 0, /* No default value */
343 static const asn_TYPE_tag2member_t asn_MAP_value_tag2el_4[] = {
344 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 10 }, /* RICsubscriptionRequest */
345 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 9 }, /* RICsubscriptionDeleteRequest */
346 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 8 }, /* RICserviceUpdate */
347 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 7 }, /* RICcontrolRequest */
348 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 6 }, /* E2setupRequest */
349 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 5 }, /* E2nodeConfigurationUpdate */
350 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 4 }, /* E2connectionUpdate */
351 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 3 }, /* ResetRequest */
352 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 2 }, /* RICindication */
353 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 1 }, /* RICserviceQuery */
354 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 0 } /* ErrorIndication */
356 static asn_CHOICE_specifics_t asn_SPC_value_specs_4 = {
357 sizeof(struct InitiatingMessage__value),
358 offsetof(struct InitiatingMessage__value, _asn_ctx),
359 offsetof(struct InitiatingMessage__value, present),
360 sizeof(((struct InitiatingMessage__value *)0)->present),
361 asn_MAP_value_tag2el_4,
362 11, /* Count of tags in the map */
364 -1 /* Extensions start */
366 static /* Use -fall-defs-global to expose */
367 asn_TYPE_descriptor_t asn_DEF_value_4 = {
371 0, /* No effective tags (pointer) */
372 0, /* No effective tags (count) */
373 0, /* No tags (pointer) */
374 0, /* No tags (count) */
375 { 0, 0, OPEN_TYPE_constraint },
377 11, /* Elements count */
378 &asn_SPC_value_specs_4 /* Additional specs */
381 asn_TYPE_member_t asn_MBR_InitiatingMessage_1[] = {
382 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, procedureCode),
383 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
384 -1, /* IMPLICIT tag at current level */
385 &asn_DEF_ProcedureCode,
387 { 0, &asn_PER_memb_procedureCode_constr_2, memb_procedureCode_constraint_1 },
388 0, 0, /* No default value */
391 { ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, criticality),
392 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
393 -1, /* IMPLICIT tag at current level */
394 &asn_DEF_Criticality,
395 select_InitiatingMessage_criticality_type,
396 { 0, &asn_PER_memb_criticality_constr_3, memb_criticality_constraint_1 },
397 0, 0, /* No default value */
400 { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct InitiatingMessage, value),
401 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
402 +1, /* EXPLICIT tag at current level */
404 select_InitiatingMessage_value_type,
405 { 0, &asn_PER_memb_value_constr_4, memb_value_constraint_1 },
406 0, 0, /* No default value */
410 static const ber_tlv_tag_t asn_DEF_InitiatingMessage_tags_1[] = {
411 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
413 static const asn_TYPE_tag2member_t asn_MAP_InitiatingMessage_tag2el_1[] = {
414 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */
415 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */
416 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */
418 asn_SEQUENCE_specifics_t asn_SPC_InitiatingMessage_specs_1 = {
419 sizeof(struct InitiatingMessage),
420 offsetof(struct InitiatingMessage, _asn_ctx),
421 asn_MAP_InitiatingMessage_tag2el_1,
422 3, /* Count of tags in the map */
423 0, 0, 0, /* Optional elements (not needed) */
424 -1, /* First extension addition */
426 asn_TYPE_descriptor_t asn_DEF_InitiatingMessage = {
430 asn_DEF_InitiatingMessage_tags_1,
431 sizeof(asn_DEF_InitiatingMessage_tags_1)
432 /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
433 asn_DEF_InitiatingMessage_tags_1, /* Same as above */
434 sizeof(asn_DEF_InitiatingMessage_tags_1)
435 /sizeof(asn_DEF_InitiatingMessage_tags_1[0]), /* 1 */
436 { 0, 0, SEQUENCE_constraint },
437 asn_MBR_InitiatingMessage_1,
438 3, /* Elements count */
439 &asn_SPC_InitiatingMessage_specs_1 /* Additional specs */