1 /*****************************************************************************
2 # Copyright 2019 AT&T Intellectual Property *
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 *
8 # http://www.apache.org/licenses/LICENSE-2.0 *
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. *
16 ******************************************************************************/
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)");
23 #include "X2AP-CommonDataTypes.hpp"
26 X2AP-PRIVATE-IES ::= CLASS {
28 &criticality Criticality,
34 CRITICALITY &criticality
40 struct X2AP_PRIVATE_IES
42 struct id_t : PrivateIE_ID
44 static constexpr const char* name() {return "id_t";}
45 using parent_t = PrivateIE_ID;
48 struct criticality_t : Criticality
50 static constexpr const char* name() {return "criticality_t";}
51 using parent_t = Criticality;
54 struct presence_t : Presence
56 static constexpr const char* name() {return "presence_t";}
57 using parent_t = Presence;
63 PrivateIE-Field {X2AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
64 id X2AP-PRIVATE-IES.&id ({IEsSetParam}),
65 criticality X2AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
66 value X2AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
70 template<typename IEsSetParam>
71 struct PrivateIE_Field : asn::sequence<3, 0, false, 0>
73 static constexpr const char* name() {return "PrivateIE-Field";}
74 using parent_t = asn::sequence<3, 0, false, 0>;
75 struct id_t : IEsSetParam::id_t
77 static constexpr const char* name() {return "id_t";}
78 using parent_t = typename IEsSetParam::id_t;
79 template<typename V> bool decode(V& v, PrivateIE_Field const& c)
81 return IEsSetParam::id_t::decode(v);
83 template<typename V> bool encode(V& v, PrivateIE_Field const& c) const
85 return IEsSetParam::id_t::encode(v);
88 id_t& ref_id() {return id;}
89 id_t const& ref_id() const {return id;}
90 struct criticality_t : IEsSetParam::criticality_t
92 static constexpr const char* name() {return "criticality_t";}
93 using parent_t = typename IEsSetParam::criticality_t;
94 template<typename V> bool decode(V& v, PrivateIE_Field const& c)
96 return IEsSetParam::criticality_t::decode(c.id.get_index(), v);
98 template<typename V> bool encode(V& v, PrivateIE_Field const& c) const
100 return IEsSetParam::criticality_t::encode(c.id.get_index(), v);
103 criticality_t& ref_criticality() {return criticality;}
104 criticality_t const& ref_criticality() const {return criticality;}
105 struct value_t : IEsSetParam::Value_t
107 static constexpr const char* name() {return "value_t";}
108 using parent_t = typename IEsSetParam::Value_t;
109 template<typename V> bool decode(V& v, PrivateIE_Field const& c)
111 return IEsSetParam::Value_t::decode(c.id.get_index(), v);
113 template<typename V> bool encode(V& v, PrivateIE_Field const& c) const
115 return IEsSetParam::Value_t::encode(c.id.get_index(), v);
118 value_t& ref_value() {return value;}
119 value_t const& ref_value() const {return value;}
120 template<typename V> void decode(V& v)
127 template<typename V> void encode(V& v) const
143 criticality_t criticality;
148 PrivateIE-Container {X2AP-PRIVATE-IES : IEsSetParam} ::=
149 SEQUENCE (SIZE (1..maxPrivateIEs)) OF
150 PrivateIE-Field {{IEsSetParam}}
153 template<typename IEsSetParam>
154 struct PrivateIE_Container_elm : PrivateIE_Field<IEsSetParam>
156 static constexpr const char* name() {return "PrivateIE_Container_elm";}
157 using parent_t = PrivateIE_Field<IEsSetParam>;
160 template<typename IEsSetParam>
161 struct PrivateIE_Container : asn::sequenceof<PrivateIE_Container_elm <IEsSetParam> >
163 static constexpr const char* name() {return "PrivateIE-Container";}
164 using parent_t = asn::sequenceof<PrivateIE_Container_elm <IEsSetParam> >;
165 using constraint_t = asn::constraints<false,asn::span<1, maxPrivateIEs >>;
169 X2AP-PROTOCOL-EXTENSION ::= CLASS {
170 &id ProtocolIE-ID UNIQUE,
171 &criticality Criticality,
177 CRITICALITY &criticality
183 struct X2AP_PROTOCOL_EXTENSION
185 struct id_t : ProtocolIE_ID
187 static constexpr const char* name() {return "id_t";}
188 using parent_t = ProtocolIE_ID;
191 struct criticality_t : Criticality
193 static constexpr const char* name() {return "criticality_t";}
194 using parent_t = Criticality;
197 struct presence_t : Presence
199 static constexpr const char* name() {return "presence_t";}
200 using parent_t = Presence;
206 ProtocolExtensionField {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
207 id X2AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
208 criticality X2AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
209 extensionValue X2AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
213 template<typename ExtensionSetParam>
214 struct ProtocolExtensionField : asn::sequence<3, 0, false, 0>
216 static constexpr const char* name() {return "ProtocolExtensionField";}
217 using parent_t = asn::sequence<3, 0, false, 0>;
218 struct id_t : ExtensionSetParam::id_t
220 static constexpr const char* name() {return "id_t";}
221 using parent_t = typename ExtensionSetParam::id_t;
222 template<typename V> bool decode(V& v, ProtocolExtensionField const& c)
224 return ExtensionSetParam::id_t::decode(v);
226 template<typename V> bool encode(V& v, ProtocolExtensionField const& c) const
228 return ExtensionSetParam::id_t::encode(v);
231 id_t& ref_id() {return id;}
232 id_t const& ref_id() const {return id;}
233 struct criticality_t : ExtensionSetParam::criticality_t
235 static constexpr const char* name() {return "criticality_t";}
236 using parent_t = typename ExtensionSetParam::criticality_t;
237 template<typename V> bool decode(V& v, ProtocolExtensionField const& c)
239 return ExtensionSetParam::criticality_t::decode(c.id.get_index(), v);
241 template<typename V> bool encode(V& v, ProtocolExtensionField const& c) const
243 return ExtensionSetParam::criticality_t::encode(c.id.get_index(), v);
246 criticality_t& ref_criticality() {return criticality;}
247 criticality_t const& ref_criticality() const {return criticality;}
248 struct extensionValue_t : ExtensionSetParam::Extension_t
250 static constexpr const char* name() {return "extensionValue_t";}
251 using parent_t = typename ExtensionSetParam::Extension_t;
252 template<typename V> bool decode(V& v, ProtocolExtensionField const& c)
254 return ExtensionSetParam::Extension_t::decode(c.id.get_index(), v);
256 template<typename V> bool encode(V& v, ProtocolExtensionField const& c) const
258 return ExtensionSetParam::Extension_t::encode(c.id.get_index(), v);
261 extensionValue_t& ref_extensionValue() {return extensionValue;}
262 extensionValue_t const& ref_extensionValue() const {return extensionValue;}
263 template<typename V> void decode(V& v)
270 template<typename V> void encode(V& v) const
281 extensionValue.clear();
286 criticality_t criticality;
287 extensionValue_t extensionValue;
291 ProtocolExtensionContainer {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
292 SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
293 ProtocolExtensionField {{ExtensionSetParam}}
296 template<typename ExtensionSetParam>
297 struct ProtocolExtensionContainer_elm : ProtocolExtensionField<ExtensionSetParam>
299 static constexpr const char* name() {return "ProtocolExtensionContainer_elm";}
300 using parent_t = ProtocolExtensionField<ExtensionSetParam>;
303 template<typename ExtensionSetParam>
304 struct ProtocolExtensionContainer : asn::sequenceof<ProtocolExtensionContainer_elm <ExtensionSetParam> >
306 static constexpr const char* name() {return "ProtocolExtensionContainer";}
307 using parent_t = asn::sequenceof<ProtocolExtensionContainer_elm <ExtensionSetParam> >;
308 using constraint_t = asn::constraints<false,asn::span<1, maxProtocolExtensions >>;
312 X2AP-PROTOCOL-IES ::= CLASS {
313 &id ProtocolIE-ID UNIQUE,
314 &criticality Criticality,
320 CRITICALITY &criticality
326 struct X2AP_PROTOCOL_IES
328 struct id_t : ProtocolIE_ID
330 static constexpr const char* name() {return "id_t";}
331 using parent_t = ProtocolIE_ID;
334 struct criticality_t : Criticality
336 static constexpr const char* name() {return "criticality_t";}
337 using parent_t = Criticality;
340 struct presence_t : Presence
342 static constexpr const char* name() {return "presence_t";}
343 using parent_t = Presence;
349 ProtocolIE-Field {X2AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
350 id X2AP-PROTOCOL-IES.&id ({IEsSetParam}),
351 criticality X2AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
352 value X2AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
356 template<typename IEsSetParam>
357 struct ProtocolIE_Field : asn::sequence<3, 0, false, 0>
359 static constexpr const char* name() {return "ProtocolIE-Field";}
360 using parent_t = asn::sequence<3, 0, false, 0>;
361 struct id_t : IEsSetParam::id_t
363 static constexpr const char* name() {return "id_t";}
364 using parent_t = typename IEsSetParam::id_t;
365 template<typename V> bool decode(V& v, ProtocolIE_Field const& c)
367 return IEsSetParam::id_t::decode(v);
369 template<typename V> bool encode(V& v, ProtocolIE_Field const& c) const
371 return IEsSetParam::id_t::encode(v);
374 id_t& ref_id() {return id;}
375 id_t const& ref_id() const {return id;}
376 struct criticality_t : IEsSetParam::criticality_t
378 static constexpr const char* name() {return "criticality_t";}
379 using parent_t = typename IEsSetParam::criticality_t;
380 template<typename V> bool decode(V& v, ProtocolIE_Field const& c)
382 return IEsSetParam::criticality_t::decode(c.id.get_index(), v);
384 template<typename V> bool encode(V& v, ProtocolIE_Field const& c) const
386 return IEsSetParam::criticality_t::encode(c.id.get_index(), v);
389 criticality_t& ref_criticality() {return criticality;}
390 criticality_t const& ref_criticality() const {return criticality;}
391 struct value_t : IEsSetParam::Value_t
393 static constexpr const char* name() {return "value_t";}
394 using parent_t = typename IEsSetParam::Value_t;
395 template<typename V> bool decode(V& v, ProtocolIE_Field const& c)
397 return IEsSetParam::Value_t::decode(c.id.get_index(), v);
399 template<typename V> bool encode(V& v, ProtocolIE_Field const& c) const
401 return IEsSetParam::Value_t::encode(c.id.get_index(), v);
404 value_t& ref_value() {return value;}
405 value_t const& ref_value() const {return value;}
406 template<typename V> void decode(V& v)
413 template<typename V> void encode(V& v) const
429 criticality_t criticality;
434 ProtocolIE-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::=
435 SEQUENCE (SIZE (0..maxProtocolIEs)) OF
436 ProtocolIE-Field {{IEsSetParam}}
439 template<typename IEsSetParam>
440 struct ProtocolIE_Container_elm : ProtocolIE_Field<IEsSetParam>
442 static constexpr const char* name() {return "ProtocolIE_Container_elm";}
443 using parent_t = ProtocolIE_Field<IEsSetParam>;
446 template<typename IEsSetParam>
447 struct ProtocolIE_Container : asn::sequenceof<ProtocolIE_Container_elm <IEsSetParam> >
449 static constexpr const char* name() {return "ProtocolIE-Container";}
450 using parent_t = asn::sequenceof<ProtocolIE_Container_elm <IEsSetParam> >;
451 using constraint_t = asn::constraints<false,asn::span<0, maxProtocolIEs >>;
455 ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES : IEsSetParam} ::=
456 SEQUENCE (SIZE (lowerBound..upperBound)) OF
457 ProtocolIE-Container {{IEsSetParam}}
460 template<int64_t lowerBound, int64_t upperBound, typename IEsSetParam>
461 struct ProtocolIE_ContainerList_elm : ProtocolIE_Container<IEsSetParam>
463 static constexpr const char* name() {return "ProtocolIE_ContainerList_elm";}
464 using parent_t = ProtocolIE_Container<IEsSetParam>;
467 template<int64_t lowerBound, int64_t upperBound, typename IEsSetParam>
468 struct ProtocolIE_ContainerList : asn::sequenceof<ProtocolIE_ContainerList_elm <lowerBound, upperBound, IEsSetParam> >
470 static constexpr const char* name() {return "ProtocolIE-ContainerList";}
471 using parent_t = asn::sequenceof<ProtocolIE_ContainerList_elm <lowerBound, upperBound, IEsSetParam> >;
472 using constraint_t = asn::constraints<false,asn::span< lowerBound , upperBound >>;
476 X2AP-PROTOCOL-IES-PAIR ::= CLASS {
477 &id ProtocolIE-ID UNIQUE,
478 &firstCriticality Criticality,
480 &secondCriticality Criticality,
486 FIRST CRITICALITY &firstCriticality
487 FIRST TYPE &FirstValue
488 SECOND CRITICALITY &secondCriticality
489 SECOND TYPE &SecondValue
494 struct X2AP_PROTOCOL_IES_PAIR
496 struct id_t : ProtocolIE_ID
498 static constexpr const char* name() {return "id_t";}
499 using parent_t = ProtocolIE_ID;
502 struct firstCriticality_t : Criticality
504 static constexpr const char* name() {return "firstCriticality_t";}
505 using parent_t = Criticality;
508 struct secondCriticality_t : Criticality
510 static constexpr const char* name() {return "secondCriticality_t";}
511 using parent_t = Criticality;
514 struct presence_t : Presence
516 static constexpr const char* name() {return "presence_t";}
517 using parent_t = Presence;
523 ProtocolIE-FieldPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
524 id X2AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
525 firstCriticality X2AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
526 firstValue X2AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
527 secondCriticality X2AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
528 secondValue X2AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
532 template<typename IEsSetParam>
533 struct ProtocolIE_FieldPair : asn::sequence<5, 0, false, 0>
535 static constexpr const char* name() {return "ProtocolIE-FieldPair";}
536 using parent_t = asn::sequence<5, 0, false, 0>;
537 struct id_t : IEsSetParam::id_t
539 static constexpr const char* name() {return "id_t";}
540 using parent_t = typename IEsSetParam::id_t;
541 template<typename V> bool decode(V& v, ProtocolIE_FieldPair const& c)
543 return IEsSetParam::id_t::decode(v);
545 template<typename V> bool encode(V& v, ProtocolIE_FieldPair const& c) const
547 return IEsSetParam::id_t::encode(v);
550 id_t& ref_id() {return id;}
551 id_t const& ref_id() const {return id;}
552 struct firstCriticality_t : IEsSetParam::firstCriticality_t
554 static constexpr const char* name() {return "firstCriticality_t";}
555 using parent_t = typename IEsSetParam::firstCriticality_t;
556 template<typename V> bool decode(V& v, ProtocolIE_FieldPair const& c)
558 return IEsSetParam::firstCriticality_t::decode(c.id.get_index(), v);
560 template<typename V> bool encode(V& v, ProtocolIE_FieldPair const& c) const
562 return IEsSetParam::firstCriticality_t::encode(c.id.get_index(), v);
565 firstCriticality_t& ref_firstCriticality() {return firstCriticality;}
566 firstCriticality_t const& ref_firstCriticality() const {return firstCriticality;}
567 struct firstValue_t : IEsSetParam::FirstValue_t
569 static constexpr const char* name() {return "firstValue_t";}
570 using parent_t = typename IEsSetParam::FirstValue_t;
571 template<typename V> bool decode(V& v, ProtocolIE_FieldPair const& c)
573 return IEsSetParam::FirstValue_t::decode(c.id.get_index(), v);
575 template<typename V> bool encode(V& v, ProtocolIE_FieldPair const& c) const
577 return IEsSetParam::FirstValue_t::encode(c.id.get_index(), v);
580 firstValue_t& ref_firstValue() {return firstValue;}
581 firstValue_t const& ref_firstValue() const {return firstValue;}
582 struct secondCriticality_t : IEsSetParam::secondCriticality_t
584 static constexpr const char* name() {return "secondCriticality_t";}
585 using parent_t = typename IEsSetParam::secondCriticality_t;
586 template<typename V> bool decode(V& v, ProtocolIE_FieldPair const& c)
588 return IEsSetParam::secondCriticality_t::decode(c.id.get_index(), v);
590 template<typename V> bool encode(V& v, ProtocolIE_FieldPair const& c) const
592 return IEsSetParam::secondCriticality_t::encode(c.id.get_index(), v);
595 secondCriticality_t& ref_secondCriticality() {return secondCriticality;}
596 secondCriticality_t const& ref_secondCriticality() const {return secondCriticality;}
597 struct secondValue_t : IEsSetParam::SecondValue_t
599 static constexpr const char* name() {return "secondValue_t";}
600 using parent_t = typename IEsSetParam::SecondValue_t;
601 template<typename V> bool decode(V& v, ProtocolIE_FieldPair const& c)
603 return IEsSetParam::SecondValue_t::decode(c.id.get_index(), v);
605 template<typename V> bool encode(V& v, ProtocolIE_FieldPair const& c) const
607 return IEsSetParam::SecondValue_t::encode(c.id.get_index(), v);
610 secondValue_t& ref_secondValue() {return secondValue;}
611 secondValue_t const& ref_secondValue() const {return secondValue;}
612 template<typename V> void decode(V& v)
617 v(secondCriticality);
621 template<typename V> void encode(V& v) const
626 v(secondCriticality);
633 firstCriticality.clear();
635 secondCriticality.clear();
641 firstCriticality_t firstCriticality;
642 firstValue_t firstValue;
643 secondCriticality_t secondCriticality;
644 secondValue_t secondValue;
648 ProtocolIE-ContainerPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
649 SEQUENCE (SIZE (0..maxProtocolIEs)) OF
650 ProtocolIE-FieldPair {{IEsSetParam}}
653 template<typename IEsSetParam>
654 struct ProtocolIE_ContainerPair_elm : ProtocolIE_FieldPair<IEsSetParam>
656 static constexpr const char* name() {return "ProtocolIE_ContainerPair_elm";}
657 using parent_t = ProtocolIE_FieldPair<IEsSetParam>;
660 template<typename IEsSetParam>
661 struct ProtocolIE_ContainerPair : asn::sequenceof<ProtocolIE_ContainerPair_elm <IEsSetParam> >
663 static constexpr const char* name() {return "ProtocolIE-ContainerPair";}
664 using parent_t = asn::sequenceof<ProtocolIE_ContainerPair_elm <IEsSetParam> >;
665 using constraint_t = asn::constraints<false,asn::span<0, maxProtocolIEs >>;
669 ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
670 SEQUENCE (SIZE (lowerBound..upperBound)) OF
671 ProtocolIE-ContainerPair {{IEsSetParam}}
674 template<int64_t lowerBound, int64_t upperBound, typename IEsSetParam>
675 struct ProtocolIE_ContainerPairList_elm : ProtocolIE_ContainerPair<IEsSetParam>
677 static constexpr const char* name() {return "ProtocolIE_ContainerPairList_elm";}
678 using parent_t = ProtocolIE_ContainerPair<IEsSetParam>;
681 template<int64_t lowerBound, int64_t upperBound, typename IEsSetParam>
682 struct ProtocolIE_ContainerPairList : asn::sequenceof<ProtocolIE_ContainerPairList_elm <lowerBound, upperBound, IEsSetParam> >
684 static constexpr const char* name() {return "ProtocolIE-ContainerPairList";}
685 using parent_t = asn::sequenceof<ProtocolIE_ContainerPairList_elm <lowerBound, upperBound, IEsSetParam> >;
686 using constraint_t = asn::constraints<false,asn::span< lowerBound , upperBound >>;
690 ProtocolIE-Single-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::=
691 ProtocolIE-Field {{IEsSetParam}}
694 template<typename IEsSetParam>
695 struct ProtocolIE_Single_Container : ProtocolIE_Field<IEsSetParam>
697 static constexpr const char* name() {return "ProtocolIE-Single-Container";}
698 using parent_t = ProtocolIE_Field<IEsSetParam>;