Reorganize directories and switch libaries to using asn1c
[it/test.git] / simulators / e2sim / src / ASN1 / generated / E2AP-PDU-Descriptions.hpp
1 /*****************************************************************************
2 # Copyright 2019 AT&T Intellectual Property                                  *
3 #                                                                            *
4 # Licensed under the Apache License, Version 2.0 (the "License");            *
5 # you may not use this file except in compliance with the License.           *
6 # You may obtain a copy of the License at                                    *
7 #                                                                            *
8 #      http://www.apache.org/licenses/LICENSE-2.0                            *
9 #                                                                            *
10 # Unless required by applicable law or agreed to in writing, software        *
11 # distributed under the License is distributed on an "AS IS" BASIS,          *
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
13 # See the License for the specific language governing permissions and        *
14 # limitations under the License.                                             *
15 #                                                                            *
16 ******************************************************************************/
17
18 #pragma once
19
20 #include "asn/asn.hpp"
21 static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)");
22
23 #include "X2AP-CommonDataTypes.hpp"
24 #include "X2AP-PDU-Contents.hpp"
25 #include "X2AP-Constants.hpp"
26 #include "E2AP-PDU-Contents.hpp"
27 #include "E2AP-Constants.hpp"
28
29 /*
30 E2AP-ELEMENTARY-PROCEDURE ::= CLASS {
31         &InitiatingMessage                              ,
32         &SuccessfulOutcome                                      OPTIONAL,
33         &UnsuccessfulOutcome                                OPTIONAL,
34         &procedureCode                  ProcedureCode   UNIQUE,
35         &criticality                    Criticality     DEFAULT ignore
36 }
37 WITH SYNTAX {
38         INITIATING MESSAGE              &InitiatingMessage
39         [SUCCESSFUL OUTCOME             &SuccessfulOutcome]
40         [UNSUCCESSFUL OUTCOME   &UnsuccessfulOutcome]
41         PROCEDURE CODE                  &procedureCode
42         [CRITICALITY                    &criticality]
43 }
44 */
45
46 struct E2AP_ELEMENTARY_PROCEDURE
47 {
48         struct procedureCode_t : ProcedureCode
49         {
50                 static constexpr const char* name() {return "procedureCode_t";}
51                 using parent_t = ProcedureCode;
52
53         };
54         struct criticality_t : Criticality
55         {
56                 static constexpr const char* name() {return "criticality_t";}
57                 using parent_t = Criticality;
58
59         };
60
61 };
62 /*
63 E2AP-ELEMENTARY-PROCEDURES E2AP-ELEMENTARY-PROCEDURE ::= {
64     E2AP-ELEMENTARY-PROCEDURES-CLASS-1                  |
65     E2AP-ELEMENTARY-PROCEDURES-CLASS-2,
66     ...
67 }
68 */
69
70 struct E2AP_ELEMENTARY_PROCEDURES
71 {
72         struct InitiatingMessage_t : asn::typefield<true>
73         {
74                 ~InitiatingMessage_t()  {clear();}
75                 size_t get_index() const {return type;}
76                 RICsubscriptionRequest& select_id_ricSubscription() { return set<RICsubscriptionRequest>(1); }
77                 RICsubscriptionRequest const* get_id_ricSubscription() const { return get<RICsubscriptionRequest>(1); }
78                 RICsubscriptionDeleteRequest& select_id_ricSubscriptionDelete() { return set<RICsubscriptionDeleteRequest>(2); }
79                 RICsubscriptionDeleteRequest const* get_id_ricSubscriptionDelete() const { return get<RICsubscriptionDeleteRequest>(2); }
80                 RICserviceUpdate& select_id_ricServiceUpdate() { return set<RICserviceUpdate>(3); }
81                 RICserviceUpdate const* get_id_ricServiceUpdate() const { return get<RICserviceUpdate>(3); }
82                 RICcontrolRequest& select_id_ricControl() { return set<RICcontrolRequest>(4); }
83                 RICcontrolRequest const* get_id_ricControl() const { return get<RICcontrolRequest>(4); }
84                 X2SetupRequest& select_id_x2Setup() { return set<X2SetupRequest>(5); }
85                 X2SetupRequest const* get_id_x2Setup() const { return get<X2SetupRequest>(5); }
86                 ENDCX2SetupRequest& select_id_endcX2Setup() { return set<ENDCX2SetupRequest>(6); }
87                 ENDCX2SetupRequest const* get_id_endcX2Setup() const { return get<ENDCX2SetupRequest>(6); }
88                 ResourceStatusRequest& select_id_resourceStatusReportingInitiation() { return set<ResourceStatusRequest>(7); }
89                 ResourceStatusRequest const* get_id_resourceStatusReportingInitiation() const { return get<ResourceStatusRequest>(7); }
90                 ENBConfigurationUpdate& select_id_eNBConfigurationUpdate() { return set<ENBConfigurationUpdate>(8); }
91                 ENBConfigurationUpdate const* get_id_eNBConfigurationUpdate() const { return get<ENBConfigurationUpdate>(8); }
92                 ENDCConfigurationUpdate& select_id_endcConfigurationUpdate() { return set<ENDCConfigurationUpdate>(9); }
93                 ENDCConfigurationUpdate const* get_id_endcConfigurationUpdate() const { return get<ENDCConfigurationUpdate>(9); }
94                 ResetRequest& select_id_reset() { return set<ResetRequest>(10); }
95                 ResetRequest const* get_id_reset() const { return get<ResetRequest>(10); }
96                 RICindication& select_id_ricIndication() { return set<RICindication>(11); }
97                 RICindication const* get_id_ricIndication() const { return get<RICindication>(11); }
98                 RICserviceQuery& select_id_ricServiceQuery() { return set<RICserviceQuery>(12); }
99                 RICserviceQuery const* get_id_ricServiceQuery() const { return get<RICserviceQuery>(12); }
100                 LoadInformation& select_id_loadIndication() { return set<LoadInformation>(13); }
101                 LoadInformation const* get_id_loadIndication() const { return get<LoadInformation>(13); }
102                 GNBStatusIndication& select_id_gNBStatusIndication() { return set<GNBStatusIndication>(14); }
103                 GNBStatusIndication const* get_id_gNBStatusIndication() const { return get<GNBStatusIndication>(14); }
104                 ResourceStatusUpdate& select_id_resourceStatusReporting() { return set<ResourceStatusUpdate>(15); }
105                 ResourceStatusUpdate const* get_id_resourceStatusReporting() const { return get<ResourceStatusUpdate>(15); }
106                 ErrorIndication& select_id_errorIndication() { return set<ErrorIndication>(16); }
107                 ErrorIndication const* get_id_errorIndication() const { return get<ErrorIndication>(16); }
108                 bool is_unknown() const { return type == 17; }
109                 void clear()
110                 {
111                         switch(type)
112                         {
113                         case 1: var.destroy<RICsubscriptionRequest>(); break;
114                         case 2: var.destroy<RICsubscriptionDeleteRequest>(); break;
115                         case 3: var.destroy<RICserviceUpdate>(); break;
116                         case 4: var.destroy<RICcontrolRequest>(); break;
117                         case 5: var.destroy<X2SetupRequest>(); break;
118                         case 6: var.destroy<ENDCX2SetupRequest>(); break;
119                         case 7: var.destroy<ResourceStatusRequest>(); break;
120                         case 8: var.destroy<ENBConfigurationUpdate>(); break;
121                         case 9: var.destroy<ENDCConfigurationUpdate>(); break;
122                         case 10: var.destroy<ResetRequest>(); break;
123                         case 11: var.destroy<RICindication>(); break;
124                         case 12: var.destroy<RICserviceQuery>(); break;
125                         case 13: var.destroy<LoadInformation>(); break;
126                         case 14: var.destroy<GNBStatusIndication>(); break;
127                         case 15: var.destroy<ResourceStatusUpdate>(); break;
128                         case 16: var.destroy<ErrorIndication>(); break;
129                         }
130                         type = 0; ref_nested().clear();
131                 }
132                 template<typename V> static inline void enumerate(V& v)
133                 {
134                         v.template operator()<RICsubscriptionRequest>(1);
135                         v.template operator()<RICsubscriptionDeleteRequest>(2);
136                         v.template operator()<RICserviceUpdate>(3);
137                         v.template operator()<RICcontrolRequest>(4);
138                         v.template operator()<X2SetupRequest>(5);
139                         v.template operator()<ENDCX2SetupRequest>(6);
140                         v.template operator()<ResourceStatusRequest>(7);
141                         v.template operator()<ENBConfigurationUpdate>(8);
142                         v.template operator()<ENDCConfigurationUpdate>(9);
143                         v.template operator()<ResetRequest>(10);
144                         v.template operator()<RICindication>(11);
145                         v.template operator()<RICserviceQuery>(12);
146                         v.template operator()<LoadInformation>(13);
147                         v.template operator()<GNBStatusIndication>(14);
148                         v.template operator()<ResourceStatusUpdate>(15);
149                         v.template operator()<ErrorIndication>(16);
150
151                 }
152                 protected:
153                 template<typename V> bool decode(size_t index, V& v)
154                 {
155                         clear();
156                         switch(index)
157                         {
158                         case 1: v(select_id_ricSubscription()); return true;
159                         case 2: v(select_id_ricSubscriptionDelete()); return true;
160                         case 3: v(select_id_ricServiceUpdate()); return true;
161                         case 4: v(select_id_ricControl()); return true;
162                         case 5: v(select_id_x2Setup()); return true;
163                         case 6: v(select_id_endcX2Setup()); return true;
164                         case 7: v(select_id_resourceStatusReportingInitiation()); return true;
165                         case 8: v(select_id_eNBConfigurationUpdate()); return true;
166                         case 9: v(select_id_endcConfigurationUpdate()); return true;
167                         case 10: v(select_id_reset()); return true;
168                         case 11: v(select_id_ricIndication()); return true;
169                         case 12: v(select_id_ricServiceQuery()); return true;
170                         case 13: v(select_id_loadIndication()); return true;
171                         case 14: v(select_id_gNBStatusIndication()); return true;
172                         case 15: v(select_id_resourceStatusReporting()); return true;
173                         case 16: v(select_id_errorIndication()); return true;
174                         case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true;
175                         }
176                         return false;
177
178                 }
179                 template<typename V> bool encode(size_t index, V& v) const
180                 {
181                         if(index != type) return false;
182                         switch(type)
183                         {
184                         case 1: v(var.as<RICsubscriptionRequest>()); return true;
185                         case 2: v(var.as<RICsubscriptionDeleteRequest>()); return true;
186                         case 3: v(var.as<RICserviceUpdate>()); return true;
187                         case 4: v(var.as<RICcontrolRequest>()); return true;
188                         case 5: v(var.as<X2SetupRequest>()); return true;
189                         case 6: v(var.as<ENDCX2SetupRequest>()); return true;
190                         case 7: v(var.as<ResourceStatusRequest>()); return true;
191                         case 8: v(var.as<ENBConfigurationUpdate>()); return true;
192                         case 9: v(var.as<ENDCConfigurationUpdate>()); return true;
193                         case 10: v(var.as<ResetRequest>()); return true;
194                         case 11: v(var.as<RICindication>()); return true;
195                         case 12: v(var.as<RICserviceQuery>()); return true;
196                         case 13: v(var.as<LoadInformation>()); return true;
197                         case 14: v(var.as<GNBStatusIndication>()); return true;
198                         case 15: v(var.as<ResourceStatusUpdate>()); return true;
199                         case 16: v(var.as<ErrorIndication>()); return true;
200                         }
201                         return false;
202
203                 }
204                 private:
205                 template<class T> T& set(size_t index) {if(type != index) {clear(); type = index; return var.build<T>();} return var.as<T>();}
206                 template<class T> T const* get(size_t index) const {if(type == index) {return &var.as<T>();} return nullptr;}
207                 union union_type
208                 {
209                         char dummy1[sizeof(ENBConfigurationUpdate)];
210                         char dummy2[sizeof(ENDCConfigurationUpdate)];
211                         char dummy3[sizeof(ENDCX2SetupRequest)];
212                         char dummy4[sizeof(ErrorIndication)];
213                         char dummy5[sizeof(GNBStatusIndication)];
214                         char dummy6[sizeof(LoadInformation)];
215                         char dummy7[sizeof(RICcontrolRequest)];
216                         char dummy8[sizeof(RICindication)];
217                         char dummy9[sizeof(RICserviceQuery)];
218                         char dummy10[sizeof(RICserviceUpdate)];
219                         char dummy11[sizeof(RICsubscriptionDeleteRequest)];
220                         char dummy12[sizeof(RICsubscriptionRequest)];
221                         char dummy13[sizeof(ResetRequest)];
222                         char dummy14[sizeof(ResourceStatusRequest)];
223                         char dummy15[sizeof(ResourceStatusUpdate)];
224                         char dummy16[sizeof(X2SetupRequest)];
225
226                 };
227                 asn::variant<sizeof(union_type)> var;
228                 size_t type {0};
229
230         };
231         struct SuccessfulOutcome_t : asn::typefield<true>
232         {
233                 ~SuccessfulOutcome_t()  {clear();}
234                 size_t get_index() const {return type;}
235                 RICsubscriptionResponse& select_id_ricSubscription() { return set<RICsubscriptionResponse>(1); }
236                 RICsubscriptionResponse const* get_id_ricSubscription() const { return get<RICsubscriptionResponse>(1); }
237                 RICsubscriptionDeleteResponse& select_id_ricSubscriptionDelete() { return set<RICsubscriptionDeleteResponse>(2); }
238                 RICsubscriptionDeleteResponse const* get_id_ricSubscriptionDelete() const { return get<RICsubscriptionDeleteResponse>(2); }
239                 RICserviceUpdateAcknowledge& select_id_ricServiceUpdate() { return set<RICserviceUpdateAcknowledge>(3); }
240                 RICserviceUpdateAcknowledge const* get_id_ricServiceUpdate() const { return get<RICserviceUpdateAcknowledge>(3); }
241                 RICcontrolAcknowledge& select_id_ricControl() { return set<RICcontrolAcknowledge>(4); }
242                 RICcontrolAcknowledge const* get_id_ricControl() const { return get<RICcontrolAcknowledge>(4); }
243                 X2SetupResponse& select_id_x2Setup() { return set<X2SetupResponse>(5); }
244                 X2SetupResponse const* get_id_x2Setup() const { return get<X2SetupResponse>(5); }
245                 ENDCX2SetupResponse& select_id_endcX2Setup() { return set<ENDCX2SetupResponse>(6); }
246                 ENDCX2SetupResponse const* get_id_endcX2Setup() const { return get<ENDCX2SetupResponse>(6); }
247                 ResourceStatusResponse& select_id_resourceStatusReportingInitiation() { return set<ResourceStatusResponse>(7); }
248                 ResourceStatusResponse const* get_id_resourceStatusReportingInitiation() const { return get<ResourceStatusResponse>(7); }
249                 ENBConfigurationUpdateAcknowledge& select_id_eNBConfigurationUpdate() { return set<ENBConfigurationUpdateAcknowledge>(8); }
250                 ENBConfigurationUpdateAcknowledge const* get_id_eNBConfigurationUpdate() const { return get<ENBConfigurationUpdateAcknowledge>(8); }
251                 ENDCConfigurationUpdateAcknowledge& select_id_endcConfigurationUpdate() { return set<ENDCConfigurationUpdateAcknowledge>(9); }
252                 ENDCConfigurationUpdateAcknowledge const* get_id_endcConfigurationUpdate() const { return get<ENDCConfigurationUpdateAcknowledge>(9); }
253                 ResetResponse& select_id_reset() { return set<ResetResponse>(10); }
254                 ResetResponse const* get_id_reset() const { return get<ResetResponse>(10); }
255                 bool is_unknown() const { return type == 17; }
256                 void clear()
257                 {
258                         switch(type)
259                         {
260                         case 1: var.destroy<RICsubscriptionResponse>(); break;
261                         case 2: var.destroy<RICsubscriptionDeleteResponse>(); break;
262                         case 3: var.destroy<RICserviceUpdateAcknowledge>(); break;
263                         case 4: var.destroy<RICcontrolAcknowledge>(); break;
264                         case 5: var.destroy<X2SetupResponse>(); break;
265                         case 6: var.destroy<ENDCX2SetupResponse>(); break;
266                         case 7: var.destroy<ResourceStatusResponse>(); break;
267                         case 8: var.destroy<ENBConfigurationUpdateAcknowledge>(); break;
268                         case 9: var.destroy<ENDCConfigurationUpdateAcknowledge>(); break;
269                         case 10: var.destroy<ResetResponse>(); break;
270                         }
271                         type = 0; ref_nested().clear();
272                 }
273                 template<typename V> static inline void enumerate(V& v)
274                 {
275                         v.template operator()<RICsubscriptionResponse>(1);
276                         v.template operator()<RICsubscriptionDeleteResponse>(2);
277                         v.template operator()<RICserviceUpdateAcknowledge>(3);
278                         v.template operator()<RICcontrolAcknowledge>(4);
279                         v.template operator()<X2SetupResponse>(5);
280                         v.template operator()<ENDCX2SetupResponse>(6);
281                         v.template operator()<ResourceStatusResponse>(7);
282                         v.template operator()<ENBConfigurationUpdateAcknowledge>(8);
283                         v.template operator()<ENDCConfigurationUpdateAcknowledge>(9);
284                         v.template operator()<ResetResponse>(10);
285
286                 }
287                 protected:
288                 template<typename V> bool decode(size_t index, V& v)
289                 {
290                         clear();
291                         switch(index)
292                         {
293                         case 1: v(select_id_ricSubscription()); return true;
294                         case 2: v(select_id_ricSubscriptionDelete()); return true;
295                         case 3: v(select_id_ricServiceUpdate()); return true;
296                         case 4: v(select_id_ricControl()); return true;
297                         case 5: v(select_id_x2Setup()); return true;
298                         case 6: v(select_id_endcX2Setup()); return true;
299                         case 7: v(select_id_resourceStatusReportingInitiation()); return true;
300                         case 8: v(select_id_eNBConfigurationUpdate()); return true;
301                         case 9: v(select_id_endcConfigurationUpdate()); return true;
302                         case 10: v(select_id_reset()); return true;
303                         case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true;
304                         }
305                         return false;
306
307                 }
308                 template<typename V> bool encode(size_t index, V& v) const
309                 {
310                         if(index != type) return false;
311                         switch(type)
312                         {
313                         case 1: v(var.as<RICsubscriptionResponse>()); return true;
314                         case 2: v(var.as<RICsubscriptionDeleteResponse>()); return true;
315                         case 3: v(var.as<RICserviceUpdateAcknowledge>()); return true;
316                         case 4: v(var.as<RICcontrolAcknowledge>()); return true;
317                         case 5: v(var.as<X2SetupResponse>()); return true;
318                         case 6: v(var.as<ENDCX2SetupResponse>()); return true;
319                         case 7: v(var.as<ResourceStatusResponse>()); return true;
320                         case 8: v(var.as<ENBConfigurationUpdateAcknowledge>()); return true;
321                         case 9: v(var.as<ENDCConfigurationUpdateAcknowledge>()); return true;
322                         case 10: v(var.as<ResetResponse>()); return true;
323                         }
324                         return false;
325
326                 }
327                 private:
328                 template<class T> T& set(size_t index) {if(type != index) {clear(); type = index; return var.build<T>();} return var.as<T>();}
329                 template<class T> T const* get(size_t index) const {if(type == index) {return &var.as<T>();} return nullptr;}
330                 union union_type
331                 {
332                         char dummy1[sizeof(ENBConfigurationUpdateAcknowledge)];
333                         char dummy2[sizeof(ENDCConfigurationUpdateAcknowledge)];
334                         char dummy3[sizeof(ENDCX2SetupResponse)];
335                         char dummy4[sizeof(RICcontrolAcknowledge)];
336                         char dummy5[sizeof(RICserviceUpdateAcknowledge)];
337                         char dummy6[sizeof(RICsubscriptionDeleteResponse)];
338                         char dummy7[sizeof(RICsubscriptionResponse)];
339                         char dummy8[sizeof(ResetResponse)];
340                         char dummy9[sizeof(ResourceStatusResponse)];
341                         char dummy10[sizeof(X2SetupResponse)];
342
343                 };
344                 asn::variant<sizeof(union_type)> var;
345                 size_t type {0};
346
347         };
348         struct UnsuccessfulOutcome_t : asn::typefield<true>
349         {
350                 ~UnsuccessfulOutcome_t()        {clear();}
351                 size_t get_index() const {return type;}
352                 RICsubscriptionFailure& select_id_ricSubscription() { return set<RICsubscriptionFailure>(1); }
353                 RICsubscriptionFailure const* get_id_ricSubscription() const { return get<RICsubscriptionFailure>(1); }
354                 RICsubscriptionDeleteFailure& select_id_ricSubscriptionDelete() { return set<RICsubscriptionDeleteFailure>(2); }
355                 RICsubscriptionDeleteFailure const* get_id_ricSubscriptionDelete() const { return get<RICsubscriptionDeleteFailure>(2); }
356                 RICserviceUpdateFailure& select_id_ricServiceUpdate() { return set<RICserviceUpdateFailure>(3); }
357                 RICserviceUpdateFailure const* get_id_ricServiceUpdate() const { return get<RICserviceUpdateFailure>(3); }
358                 RICcontrolFailure& select_id_ricControl() { return set<RICcontrolFailure>(4); }
359                 RICcontrolFailure const* get_id_ricControl() const { return get<RICcontrolFailure>(4); }
360                 X2SetupFailure& select_id_x2Setup() { return set<X2SetupFailure>(5); }
361                 X2SetupFailure const* get_id_x2Setup() const { return get<X2SetupFailure>(5); }
362                 ENDCX2SetupFailure& select_id_endcX2Setup() { return set<ENDCX2SetupFailure>(6); }
363                 ENDCX2SetupFailure const* get_id_endcX2Setup() const { return get<ENDCX2SetupFailure>(6); }
364                 ResourceStatusFailure& select_id_resourceStatusReportingInitiation() { return set<ResourceStatusFailure>(7); }
365                 ResourceStatusFailure const* get_id_resourceStatusReportingInitiation() const { return get<ResourceStatusFailure>(7); }
366                 ENBConfigurationUpdateFailure& select_id_eNBConfigurationUpdate() { return set<ENBConfigurationUpdateFailure>(8); }
367                 ENBConfigurationUpdateFailure const* get_id_eNBConfigurationUpdate() const { return get<ENBConfigurationUpdateFailure>(8); }
368                 ENDCConfigurationUpdateFailure& select_id_endcConfigurationUpdate() { return set<ENDCConfigurationUpdateFailure>(9); }
369                 ENDCConfigurationUpdateFailure const* get_id_endcConfigurationUpdate() const { return get<ENDCConfigurationUpdateFailure>(9); }
370                 bool is_unknown() const { return type == 17; }
371                 void clear()
372                 {
373                         switch(type)
374                         {
375                         case 1: var.destroy<RICsubscriptionFailure>(); break;
376                         case 2: var.destroy<RICsubscriptionDeleteFailure>(); break;
377                         case 3: var.destroy<RICserviceUpdateFailure>(); break;
378                         case 4: var.destroy<RICcontrolFailure>(); break;
379                         case 5: var.destroy<X2SetupFailure>(); break;
380                         case 6: var.destroy<ENDCX2SetupFailure>(); break;
381                         case 7: var.destroy<ResourceStatusFailure>(); break;
382                         case 8: var.destroy<ENBConfigurationUpdateFailure>(); break;
383                         case 9: var.destroy<ENDCConfigurationUpdateFailure>(); break;
384                         }
385                         type = 0; ref_nested().clear();
386                 }
387                 template<typename V> static inline void enumerate(V& v)
388                 {
389                         v.template operator()<RICsubscriptionFailure>(1);
390                         v.template operator()<RICsubscriptionDeleteFailure>(2);
391                         v.template operator()<RICserviceUpdateFailure>(3);
392                         v.template operator()<RICcontrolFailure>(4);
393                         v.template operator()<X2SetupFailure>(5);
394                         v.template operator()<ENDCX2SetupFailure>(6);
395                         v.template operator()<ResourceStatusFailure>(7);
396                         v.template operator()<ENBConfigurationUpdateFailure>(8);
397                         v.template operator()<ENDCConfigurationUpdateFailure>(9);
398
399                 }
400                 protected:
401                 template<typename V> bool decode(size_t index, V& v)
402                 {
403                         clear();
404                         switch(index)
405                         {
406                         case 1: v(select_id_ricSubscription()); return true;
407                         case 2: v(select_id_ricSubscriptionDelete()); return true;
408                         case 3: v(select_id_ricServiceUpdate()); return true;
409                         case 4: v(select_id_ricControl()); return true;
410                         case 5: v(select_id_x2Setup()); return true;
411                         case 6: v(select_id_endcX2Setup()); return true;
412                         case 7: v(select_id_resourceStatusReportingInitiation()); return true;
413                         case 8: v(select_id_eNBConfigurationUpdate()); return true;
414                         case 9: v(select_id_endcConfigurationUpdate()); return true;
415                         case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true;
416                         }
417                         return false;
418
419                 }
420                 template<typename V> bool encode(size_t index, V& v) const
421                 {
422                         if(index != type) return false;
423                         switch(type)
424                         {
425                         case 1: v(var.as<RICsubscriptionFailure>()); return true;
426                         case 2: v(var.as<RICsubscriptionDeleteFailure>()); return true;
427                         case 3: v(var.as<RICserviceUpdateFailure>()); return true;
428                         case 4: v(var.as<RICcontrolFailure>()); return true;
429                         case 5: v(var.as<X2SetupFailure>()); return true;
430                         case 6: v(var.as<ENDCX2SetupFailure>()); return true;
431                         case 7: v(var.as<ResourceStatusFailure>()); return true;
432                         case 8: v(var.as<ENBConfigurationUpdateFailure>()); return true;
433                         case 9: v(var.as<ENDCConfigurationUpdateFailure>()); return true;
434                         }
435                         return false;
436
437                 }
438                 private:
439                 template<class T> T& set(size_t index) {if(type != index) {clear(); type = index; return var.build<T>();} return var.as<T>();}
440                 template<class T> T const* get(size_t index) const {if(type == index) {return &var.as<T>();} return nullptr;}
441                 union union_type
442                 {
443                         char dummy1[sizeof(ENBConfigurationUpdateFailure)];
444                         char dummy2[sizeof(ENDCConfigurationUpdateFailure)];
445                         char dummy3[sizeof(ENDCX2SetupFailure)];
446                         char dummy4[sizeof(RICcontrolFailure)];
447                         char dummy5[sizeof(RICserviceUpdateFailure)];
448                         char dummy6[sizeof(RICsubscriptionDeleteFailure)];
449                         char dummy7[sizeof(RICsubscriptionFailure)];
450                         char dummy8[sizeof(ResourceStatusFailure)];
451                         char dummy9[sizeof(X2SetupFailure)];
452
453                 };
454                 asn::variant<sizeof(union_type)> var;
455                 size_t type {0};
456
457         };
458         struct procedureCode_t : asn::fixedtypefield<E2AP_ELEMENTARY_PROCEDURE::procedureCode_t, true>
459         {
460                 size_t get_index() const {return type;}
461                 bool is_unknown() const { return type == 17; }
462                 void clear() {type = 0;}
463                 void select_id_ricSubscription() { set(id_ricSubscription); type=1;}
464                 void select_id_ricSubscriptionDelete() { set(id_ricSubscriptionDelete); type=2;}
465                 void select_id_ricServiceUpdate() { set(id_ricServiceUpdate); type=3;}
466                 void select_id_ricControl() { set(id_ricControl); type=4;}
467                 void select_id_x2Setup() { set(id_x2Setup); type=5;}
468                 void select_id_endcX2Setup() { set(id_endcX2Setup); type=6;}
469                 void select_id_resourceStatusReportingInitiation() { set(id_resourceStatusReportingInitiation); type=7;}
470                 void select_id_eNBConfigurationUpdate() { set(id_eNBConfigurationUpdate); type=8;}
471                 void select_id_endcConfigurationUpdate() { set(id_endcConfigurationUpdate); type=9;}
472                 void select_id_reset() { set(id_reset); type=10;}
473                 void select_id_ricIndication() { set(id_ricIndication); type=11;}
474                 void select_id_ricServiceQuery() { set(id_ricServiceQuery); type=12;}
475                 void select_id_loadIndication() { set(id_loadIndication); type=13;}
476                 void select_id_gNBStatusIndication() { set(id_gNBStatusIndication); type=14;}
477                 void select_id_resourceStatusReporting() { set(id_resourceStatusReporting); type=15;}
478                 void select_id_errorIndication() { set(id_errorIndication); type=16;}
479                 E2AP_ELEMENTARY_PROCEDURE::procedureCode_t const& ref_value() const {return ref_nested();}
480                 template<typename V>  bool decode(V& v)
481                 {
482                         clear();
483                         if(!v(ref_nested())) return false;
484                         if(equal(id_ricSubscription)) { type = 1; return true; }
485                         else if(equal(id_ricSubscriptionDelete)) { type = 2; return true; }
486                         else if(equal(id_ricServiceUpdate)) { type = 3; return true; }
487                         else if(equal(id_ricControl)) { type = 4; return true; }
488                         else if(equal(id_x2Setup)) { type = 5; return true; }
489                         else if(equal(id_endcX2Setup)) { type = 6; return true; }
490                         else if(equal(id_resourceStatusReportingInitiation)) { type = 7; return true; }
491                         else if(equal(id_eNBConfigurationUpdate)) { type = 8; return true; }
492                         else if(equal(id_endcConfigurationUpdate)) { type = 9; return true; }
493                         else if(equal(id_reset)) { type = 10; return true; }
494                         else if(equal(id_ricIndication)) { type = 11; return true; }
495                         else if(equal(id_ricServiceQuery)) { type = 12; return true; }
496                         else if(equal(id_loadIndication)) { type = 13; return true; }
497                         else if(equal(id_gNBStatusIndication)) { type = 14; return true; }
498                         else if(equal(id_resourceStatusReporting)) { type = 15; return true; }
499                         else if(equal(id_errorIndication)) { type = 16; return true; }
500                         else { type = 17; return true;}
501                         return false;
502
503                 }
504                 template<typename V> bool encode(V& v) const
505                 {
506                         return v(ref_nested());
507
508                 }
509                 protected:
510                 template<typename V>  bool decode(size_t index, V& v)
511                 {
512                         clear();
513                         switch(index)
514                         {
515                         case 1: type = 1; if(v(ref_nested())) { return equal(id_ricSubscription);} return false;
516                         case 2: type = 2; if(v(ref_nested())) { return equal(id_ricSubscriptionDelete);} return false;
517                         case 3: type = 3; if(v(ref_nested())) { return equal(id_ricServiceUpdate);} return false;
518                         case 4: type = 4; if(v(ref_nested())) { return equal(id_ricControl);} return false;
519                         case 5: type = 5; if(v(ref_nested())) { return equal(id_x2Setup);} return false;
520                         case 6: type = 6; if(v(ref_nested())) { return equal(id_endcX2Setup);} return false;
521                         case 7: type = 7; if(v(ref_nested())) { return equal(id_resourceStatusReportingInitiation);} return false;
522                         case 8: type = 8; if(v(ref_nested())) { return equal(id_eNBConfigurationUpdate);} return false;
523                         case 9: type = 9; if(v(ref_nested())) { return equal(id_endcConfigurationUpdate);} return false;
524                         case 10: type = 10; if(v(ref_nested())) { return equal(id_reset);} return false;
525                         case 11: type = 11; if(v(ref_nested())) { return equal(id_ricIndication);} return false;
526                         case 12: type = 12; if(v(ref_nested())) { return equal(id_ricServiceQuery);} return false;
527                         case 13: type = 13; if(v(ref_nested())) { return equal(id_loadIndication);} return false;
528                         case 14: type = 14; if(v(ref_nested())) { return equal(id_gNBStatusIndication);} return false;
529                         case 15: type = 15; if(v(ref_nested())) { return equal(id_resourceStatusReporting);} return false;
530                         case 16: type = 16; if(v(ref_nested())) { return equal(id_errorIndication);} return false;
531                         case 17: type = 17; return v(ref_nested());
532                         ref_nested().clear();
533                         }
534                         return false;
535
536                 }
537                 template<typename V> bool encode(size_t index, V& v) const
538                 {
539                         if(index != type) {return false;} return v(ref_nested());
540
541                 }
542                 private:
543                 size_t type {0};
544
545         };
546         struct criticality_t : asn::fixedtypefield<E2AP_ELEMENTARY_PROCEDURE::criticality_t, true>
547         {
548                 size_t get_index() const {return type;}
549                 bool is_unknown() const { return type == 17; }
550                 void clear() {type = 0;}
551                 void select_id_ricSubscription() { set(reject); type=1;}
552                 void select_id_ricSubscriptionDelete() { set(reject); type=2;}
553                 void select_id_ricServiceUpdate() { set(reject); type=3;}
554                 void select_id_ricControl() { set(reject); type=4;}
555                 void select_id_x2Setup() { set(reject); type=5;}
556                 void select_id_endcX2Setup() { set(reject); type=6;}
557                 void select_id_resourceStatusReportingInitiation() { set(reject); type=7;}
558                 void select_id_eNBConfigurationUpdate() { set(reject); type=8;}
559                 void select_id_endcConfigurationUpdate() { set(reject); type=9;}
560                 void select_id_reset() { set(reject); type=10;}
561                 void select_id_ricIndication() { set(ignore); type=11;}
562                 void select_id_ricServiceQuery() { set(ignore); type=12;}
563                 void select_id_loadIndication() { set(ignore); type=13;}
564                 void select_id_gNBStatusIndication() { set(ignore); type=14;}
565                 void select_id_resourceStatusReporting() { set(ignore); type=15;}
566                 void select_id_errorIndication() { set(ignore); type=16;}
567                 E2AP_ELEMENTARY_PROCEDURE::criticality_t const& ref_value() const {return ref_nested();}
568                 template<typename V>  bool decode(V& v)
569                 {
570                         clear();
571                         if(!v(ref_nested())) return false;
572                         if(equal(reject)) { type = 1; return true; }
573                         else if(equal(reject)) { type = 2; return true; }
574                         else if(equal(reject)) { type = 3; return true; }
575                         else if(equal(reject)) { type = 4; return true; }
576                         else if(equal(reject)) { type = 5; return true; }
577                         else if(equal(reject)) { type = 6; return true; }
578                         else if(equal(reject)) { type = 7; return true; }
579                         else if(equal(reject)) { type = 8; return true; }
580                         else if(equal(reject)) { type = 9; return true; }
581                         else if(equal(reject)) { type = 10; return true; }
582                         else if(equal(ignore)) { type = 11; return true; }
583                         else if(equal(ignore)) { type = 12; return true; }
584                         else if(equal(ignore)) { type = 13; return true; }
585                         else if(equal(ignore)) { type = 14; return true; }
586                         else if(equal(ignore)) { type = 15; return true; }
587                         else if(equal(ignore)) { type = 16; return true; }
588                         else { type = 17; return true;}
589                         return false;
590
591                 }
592                 template<typename V> bool encode(V& v) const
593                 {
594                         return v(ref_nested());
595
596                 }
597                 protected:
598                 template<typename V>  bool decode(size_t index, V& v)
599                 {
600                         clear();
601                         switch(index)
602                         {
603                         case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false;
604                         case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false;
605                         case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false;
606                         case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false;
607                         case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false;
608                         case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false;
609                         case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false;
610                         case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false;
611                         case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false;
612                         case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false;
613                         case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false;
614                         case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false;
615                         case 13: type = 13; if(v(ref_nested())) { return equal(ignore);} return false;
616                         case 14: type = 14; if(v(ref_nested())) { return equal(ignore);} return false;
617                         case 15: type = 15; if(v(ref_nested())) { return equal(ignore);} return false;
618                         case 16: type = 16; if(v(ref_nested())) { return equal(ignore);} return false;
619                         case 17: type = 17; return v(ref_nested());
620                         ref_nested().clear();
621                         }
622                         return false;
623
624                 }
625                 template<typename V> bool encode(size_t index, V& v) const
626                 {
627                         if(index != type) {return false;} return v(ref_nested());
628
629                 }
630                 private:
631                 size_t type {0};
632
633         };
634
635 };
636 /*
637 InitiatingMessage ::= SEQUENCE {
638         procedureCode           E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}),
639         criticality                     E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
640         value                           E2AP-ELEMENTARY-PROCEDURE.&InitiatingMessage({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode})
641 }
642 */
643
644 struct InitiatingMessage : asn::sequence<3, 0, false, 0>
645 {
646         static constexpr const char* name() {return "InitiatingMessage";}
647         using parent_t = asn::sequence<3, 0, false, 0>;
648         struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t
649         {
650                 static constexpr const char* name() {return "procedureCode_t";}
651                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t;
652                 template<typename V>  bool decode(V& v, InitiatingMessage const& c)
653                 {
654                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v);
655                 };
656                 template<typename V>  bool encode(V& v, InitiatingMessage const& c) const
657                 {
658                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v);
659                 };
660         };
661         procedureCode_t& ref_procedureCode() {return procedureCode;}
662         procedureCode_t const& ref_procedureCode() const {return procedureCode;}
663         struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t
664         {
665                 static constexpr const char* name() {return "criticality_t";}
666                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t;
667                 template<typename V>  bool decode(V& v, InitiatingMessage const& c)
668                 {
669                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v);
670                 };
671                 template<typename V>  bool encode(V& v, InitiatingMessage const& c) const
672                 {
673                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v);
674                 };
675         };
676         criticality_t& ref_criticality() {return criticality;}
677         criticality_t const& ref_criticality() const {return criticality;}
678         struct value_t : E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t
679         {
680                 static constexpr const char* name() {return "value_t";}
681                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t;
682                 template<typename V>  bool decode(V& v, InitiatingMessage const& c)
683                 {
684                         return E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::decode(c.procedureCode.get_index(), v);
685                 };
686                 template<typename V>  bool encode(V& v, InitiatingMessage const& c) const
687                 {
688                         return E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::encode(c.procedureCode.get_index(), v);
689                 };
690         };
691         value_t& ref_value() {return value;}
692         value_t const& ref_value() const {return value;}
693         template<typename V> void decode(V& v)
694         {
695                 v(procedureCode);
696                 v(criticality);
697                 v(value);
698
699         };
700         template<typename V> void encode(V& v) const
701         {
702                 v(procedureCode);
703                 v(criticality);
704                 v(value);
705
706         };
707         void clear()
708         {
709                 procedureCode.clear();
710                 criticality.clear();
711                 value.clear();
712
713         };
714         private:
715         procedureCode_t procedureCode;
716         criticality_t   criticality;
717         value_t value;
718
719 };
720 /*
721 SuccessfulOutcome ::= SEQUENCE {
722         procedureCode           E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}),
723         criticality                     E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
724         value                           E2AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode})
725 }
726 */
727
728 struct SuccessfulOutcome : asn::sequence<3, 0, false, 0>
729 {
730         static constexpr const char* name() {return "SuccessfulOutcome";}
731         using parent_t = asn::sequence<3, 0, false, 0>;
732         struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t
733         {
734                 static constexpr const char* name() {return "procedureCode_t";}
735                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t;
736                 template<typename V>  bool decode(V& v, SuccessfulOutcome const& c)
737                 {
738                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v);
739                 };
740                 template<typename V>  bool encode(V& v, SuccessfulOutcome const& c) const
741                 {
742                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v);
743                 };
744         };
745         procedureCode_t& ref_procedureCode() {return procedureCode;}
746         procedureCode_t const& ref_procedureCode() const {return procedureCode;}
747         struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t
748         {
749                 static constexpr const char* name() {return "criticality_t";}
750                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t;
751                 template<typename V>  bool decode(V& v, SuccessfulOutcome const& c)
752                 {
753                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v);
754                 };
755                 template<typename V>  bool encode(V& v, SuccessfulOutcome const& c) const
756                 {
757                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v);
758                 };
759         };
760         criticality_t& ref_criticality() {return criticality;}
761         criticality_t const& ref_criticality() const {return criticality;}
762         struct value_t : E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t
763         {
764                 static constexpr const char* name() {return "value_t";}
765                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t;
766                 template<typename V>  bool decode(V& v, SuccessfulOutcome const& c)
767                 {
768                         return E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::decode(c.procedureCode.get_index(), v);
769                 };
770                 template<typename V>  bool encode(V& v, SuccessfulOutcome const& c) const
771                 {
772                         return E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::encode(c.procedureCode.get_index(), v);
773                 };
774         };
775         value_t& ref_value() {return value;}
776         value_t const& ref_value() const {return value;}
777         template<typename V> void decode(V& v)
778         {
779                 v(procedureCode);
780                 v(criticality);
781                 v(value);
782
783         };
784         template<typename V> void encode(V& v) const
785         {
786                 v(procedureCode);
787                 v(criticality);
788                 v(value);
789
790         };
791         void clear()
792         {
793                 procedureCode.clear();
794                 criticality.clear();
795                 value.clear();
796
797         };
798         private:
799         procedureCode_t procedureCode;
800         criticality_t   criticality;
801         value_t value;
802
803 };
804 /*
805 UnsuccessfulOutcome ::= SEQUENCE {
806         procedureCode           E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}),
807         criticality                     E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
808         value                           E2AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode})
809 }
810 */
811
812 struct UnsuccessfulOutcome : asn::sequence<3, 0, false, 0>
813 {
814         static constexpr const char* name() {return "UnsuccessfulOutcome";}
815         using parent_t = asn::sequence<3, 0, false, 0>;
816         struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t
817         {
818                 static constexpr const char* name() {return "procedureCode_t";}
819                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t;
820                 template<typename V>  bool decode(V& v, UnsuccessfulOutcome const& c)
821                 {
822                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v);
823                 };
824                 template<typename V>  bool encode(V& v, UnsuccessfulOutcome const& c) const
825                 {
826                         return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v);
827                 };
828         };
829         procedureCode_t& ref_procedureCode() {return procedureCode;}
830         procedureCode_t const& ref_procedureCode() const {return procedureCode;}
831         struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t
832         {
833                 static constexpr const char* name() {return "criticality_t";}
834                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t;
835                 template<typename V>  bool decode(V& v, UnsuccessfulOutcome const& c)
836                 {
837                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v);
838                 };
839                 template<typename V>  bool encode(V& v, UnsuccessfulOutcome const& c) const
840                 {
841                         return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v);
842                 };
843         };
844         criticality_t& ref_criticality() {return criticality;}
845         criticality_t const& ref_criticality() const {return criticality;}
846         struct value_t : E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t
847         {
848                 static constexpr const char* name() {return "value_t";}
849                 using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t;
850                 template<typename V>  bool decode(V& v, UnsuccessfulOutcome const& c)
851                 {
852                         return E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::decode(c.procedureCode.get_index(), v);
853                 };
854                 template<typename V>  bool encode(V& v, UnsuccessfulOutcome const& c) const
855                 {
856                         return E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::encode(c.procedureCode.get_index(), v);
857                 };
858         };
859         value_t& ref_value() {return value;}
860         value_t const& ref_value() const {return value;}
861         template<typename V> void decode(V& v)
862         {
863                 v(procedureCode);
864                 v(criticality);
865                 v(value);
866
867         };
868         template<typename V> void encode(V& v) const
869         {
870                 v(procedureCode);
871                 v(criticality);
872                 v(value);
873
874         };
875         void clear()
876         {
877                 procedureCode.clear();
878                 criticality.clear();
879                 value.clear();
880
881         };
882         private:
883         procedureCode_t procedureCode;
884         criticality_t   criticality;
885         value_t value;
886
887 };
888 /*
889 E2AP-PDU ::= CHOICE {
890         initiatingMessage       InitiatingMessage,
891         successfulOutcome       SuccessfulOutcome,
892         unsuccessfulOutcome     UnsuccessfulOutcome,
893         ...
894 }
895 */
896
897 struct E2AP_PDU : asn::choice<3, 0, true>
898 {
899         static constexpr const char* name() {return "E2AP-PDU";}
900         using parent_t = asn::choice<3, 0, true>;
901         index_type get_index() const {return index;}
902         bool is_unknown() const {return index == 4;}
903         void set_unknown() { set_index(4);  }
904         ~E2AP_PDU() {clear();}
905         struct initiatingMessage_t : InitiatingMessage
906         {
907                 static constexpr const char* name() {return "initiatingMessage_t";}
908                 using parent_t = InitiatingMessage;
909
910         };
911         struct successfulOutcome_t : SuccessfulOutcome
912         {
913                 static constexpr const char* name() {return "successfulOutcome_t";}
914                 using parent_t = SuccessfulOutcome;
915
916         };
917         struct unsuccessfulOutcome_t : UnsuccessfulOutcome
918         {
919                 static constexpr const char* name() {return "unsuccessfulOutcome_t";}
920                 using parent_t = UnsuccessfulOutcome;
921
922         };
923         void clear()
924         {
925                 switch(get_index())
926                 {
927                 case 1: var.destroy<initiatingMessage_t>(); break;
928                 case 2: var.destroy<successfulOutcome_t>(); break;
929                 case 3: var.destroy<unsuccessfulOutcome_t>(); break;
930                 }
931                 index = 0;
932                 base::clear();
933         }
934         template<typename V> bool decode(size_t idx, V& v)
935         {
936                 clear();
937                 switch(idx)
938                 {
939                 case 1: set_index(1); return v(var.build<initiatingMessage_t>());
940                 case 2: set_index(2); return v(var.build<successfulOutcome_t>());
941                 case 3: set_index(3); return v(var.build<unsuccessfulOutcome_t>());
942                 }
943                 return false;
944
945         }
946         template<typename V> bool encode(V& v) const
947         {
948                 switch(get_index())
949                 {
950                 case 1: return v(var.as<initiatingMessage_t>());
951                 case 2: return v(var.as<successfulOutcome_t>());
952                 case 3: return v(var.as<unsuccessfulOutcome_t>());
953                 }
954                 return false;
955         }
956         template<typename V> static inline void enumerate(V& v)
957         {
958                 v.template operator()<initiatingMessage_t>(1);
959                 v.template operator()<successfulOutcome_t>(2);
960                 v.template operator()<unsuccessfulOutcome_t>(3);
961
962         }
963         initiatingMessage_t& select_initiatingMessage() { if(get_index() != 1) { clear(); set_index(1); return var.build<initiatingMessage_t>();} return var.as<initiatingMessage_t>();}
964         initiatingMessage_t const* get_initiatingMessage() const { if(get_index() == 1) { return &var.as<initiatingMessage_t>();} return nullptr; }
965         successfulOutcome_t& select_successfulOutcome() { if(get_index() != 2) { clear(); set_index(2); return var.build<successfulOutcome_t>();} return var.as<successfulOutcome_t>();}
966         successfulOutcome_t const* get_successfulOutcome() const { if(get_index() == 2) { return &var.as<successfulOutcome_t>();} return nullptr; }
967         unsuccessfulOutcome_t& select_unsuccessfulOutcome() { if(get_index() != 3) { clear(); set_index(3); return var.build<unsuccessfulOutcome_t>();} return var.as<unsuccessfulOutcome_t>();}
968         unsuccessfulOutcome_t const* get_unsuccessfulOutcome() const { if(get_index() == 3) { return &var.as<unsuccessfulOutcome_t>();} return nullptr; }
969         private:
970         void set_index(index_type i) {index = i; base::set();}
971         union union_type
972         {
973                 char dummy1[sizeof(initiatingMessage_t)];
974                 char dummy2[sizeof(successfulOutcome_t)];
975                 char dummy3[sizeof(unsuccessfulOutcome_t)];
976
977         };
978         asn::variant<sizeof(union_type)>        var;
979         index_type      index {0};
980 };