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