From c5fa07bcd8cbd614bcd813cac698385b789bcfcb Mon Sep 17 00:00:00 2001 From: xt800d Date: Tue, 13 Aug 2019 16:51:10 -0400 Subject: [PATCH] Add initial codes Change-Id: Ia32d18dd863fbe7f4cb8d3da28f7e2979fa77986 Signed-off-by: xt800d --- .gitreview | 5 + LICENSES.txt | 34 + README.md | 11 + ons_2019_demo/a1_med/a1_med_http_server/a1med.py | 137 + ons_2019_demo/a1_med/a1_med_http_server/delay.json | 1 + ons_2019_demo/a1_med/a1_med_http_server/delay.txt | 1 + .../dockerized_version/Dockerfile | 9 + .../a1_med_http_server/dockerized_version/a1med.py | 70 + .../dockerized_version/build_docker_image | 3 + .../dockerized_version/delay.json | 1 + .../dockerized_version/load.json | 1 + .../dockerized_version/metrics.json | 5 + .../dockerized_version/run_container | 3 + .../dockerized_version/run_server | 7 + .../dockerized_version/tests/getdelay | 2 + .../dockerized_version/tests/getload | 2 + .../dockerized_version/tests/getmetrics | 2 + .../dockerized_version/tests/putdelay | 5 + .../dockerized_version/tests/putload | 5 + ons_2019_demo/a1_med/a1_med_http_server/load.json | 1 + ons_2019_demo/a1_med/a1_med_http_server/load.txt | 1 + .../a1_med/a1_med_http_server/metrics.json | 1 + ons_2019_demo/a1_med/a1_med_http_server/nohup.out | 182 + ons_2019_demo/a1_med/a1_med_http_server/run_server | 8 + .../a1_med/a1_med_http_server/tests/getdelay | 2 + .../a1_med/a1_med_http_server/tests/getload | 2 + .../a1_med/a1_med_http_server/tests/getmetrics | 2 + .../a1_med/a1_med_http_server/tests/putdelay | 5 + .../a1_med/a1_med_http_server/tests/putload | 5 + .../a1_med/a1_med_http_server/unused/delay.json | 1 + .../a1_med/a1_med_http_server/unused/load.json | 1 + ons_2019_demo/a1_med/build_and_run_dummy_a1_med.sh | 31 + ons_2019_demo/a1_med/dummy_a1_med.c | 126 + ons_2019_demo/a1_med/dummy_a1_rmr_wrapper.h | 121 + ons_2019_demo/dashboard/docker-compose.yml | 30 + ons_2019_demo/dashboard/docker-compose_v3.yml | 30 + ons_2019_demo/global_rmr_routes.rt | 46 + ons_2019_demo/load_consumer/Dockerfile | 51 + ons_2019_demo/load_consumer/build | 5 + ons_2019_demo/load_consumer/dummy_rcvr.c | 75 + ons_2019_demo/load_gen/Dockerfile | 51 + ons_2019_demo/load_gen/build | 6 + ons_2019_demo/load_gen/load_gen.c | 170 + .../pendulum_scripts/1_start_serial_listener.sh | 5 + .../pendulum_scripts/2_start_web_portal.sh | 23 + ons_2019_demo/pendulum_scripts/3_start_ric.sh | 54 + .../kill_scripts/kill_ric_and_dashboard.sh | 6 + .../kill_scripts/kill_serial_listener.sh | 1 + .../pendulum_xapp/build_and_run_pendulum_xapp.sh | 11 + ons_2019_demo/pendulum_xapp/pendulum_xapp.c | 143 + ons_2019_demo/segway_scripts/1_start_web_portal.sh | 23 + ons_2019_demo/segway_scripts/2_start_ric.sh | 54 + .../kill_scripts/kill_ric_and_dashboard.sh | 6 + .../kill_scripts/kill_serial_listener.sh | 1 + ric_robot_suite/.gitignore | 15 + ric_robot_suite/README-nanobot | 77 + ric_robot_suite/README.md | 125 + ric_robot_suite/build.sh | 38 + .../doc/resources/appmgr/appmgr_interface.html | 912 + ric_robot_suite/doc/resources/browser_setup.html | 912 + ric_robot_suite/doc/resources/dr_interface.html | 912 + .../doc/resources/e2mgr/e2mgr_interface.html | 912 + .../doc/resources/global_properties.html | 912 + ric_robot_suite/doc/resources/json_templater.html | 912 + ric_robot_suite/doc/resources/mr_interface.html | 912 + ric_robot_suite/doc/resources/ssh/files.html | 912 + ric_robot_suite/doc/resources/ssh/processes.html | 912 + ric_robot_suite/docgen.py | 42 + ric_robot_suite/docker/nanobot/Dockerfile | 74 + ric_robot_suite/docker/nanobot/container-tag.yaml | 2 + ric_robot_suite/docker/ric-robot/Dockerfile | 94 + ric_robot_suite/docker/ric-robot/authorization | 1 + .../docker/ric-robot/container-tag.yaml | 2 + ric_robot_suite/docker/ric-robot/demo.sh | 87 + ric_robot_suite/docker/ric-robot/ete.sh | 56 + ric_robot_suite/docker/ric-robot/lighttpd.conf | 73 + .../config/integration_robot_properties.py | 25 + ric_robot_suite/eteshare/config/vm_properties.py | 31 + ric_robot_suite/eteshare/health/index.php | 42 + ric_robot_suite/eteshare/nodeb/setup/index.php | 52 + .../eteshare/ric/v1/xapps/DemoXapp1/101/index.php | 45 + .../eteshare/ric/v1/xapps/DemoXapp1/index.php | 45 + ric_robot_suite/eteshare/ric/v1/xapps/index.php | 58 + ric_robot_suite/helm/README.md | 32 + ric_robot_suite/helm/nanobot/.helmignore | 22 + ric_robot_suite/helm/nanobot/Chart.yaml | 5 + ric_robot_suite/helm/nanobot/README | 32 + .../configmap-src/bin/svcacct-to-kubeconfig.sh | 45 + .../properties/global_properties.robot | 41 + .../nanobot/configmap-src/testsuites/ete.robot | 33 + .../configmap-src/testsuites/health-check.robot | 20 + .../configmap-src/testsuites/ricdeployment.robot | 48 + .../nanobot/templates/configmap-robot-bin.yaml | 23 + .../templates/configmap-robot-properties.yaml | 23 + .../templates/configmap-robot-testsuites.yaml | 23 + .../helm/nanobot/templates/job-ric-robot-run.yaml | 220 + ric_robot_suite/helm/nanobot/values.yaml | 97 + ric_robot_suite/helm/ric-robot/Chart.yaml | 22 + ric_robot_suite/helm/ric-robot/demo-k8s.sh | 91 + ric_robot_suite/helm/ric-robot/ete-k8s.e2sim.sh | 172 + ric_robot_suite/helm/ric-robot/ete-k8s.sh | 65 + .../config/integration_robot_properties.py | 33 + .../config/eteshare/config/vm_properties.py | 49 + .../helm/ric-robot/templates/_helpers.tpl | 49 + .../helm/ric-robot/templates/configmap.yaml | 26 + .../helm/ric-robot/templates/deployment.yaml | 82 + .../helm/ric-robot/templates/service.yaml | 38 + ric_robot_suite/helm/ric-robot/values.yaml | 85 + ric_robot_suite/helm/robot_install.sh | 76 + ric_robot_suite/html/index.html | 13 + ric_robot_suite/red.xml | 32 + ric_robot_suite/ric-python-utils/LICENSE.txt | 20 + ric_robot_suite/ric-python-utils/README.TXT | 26 + .../ric-python-utils/ricutils/E2SimUtils.py | 58 + .../ric-python-utils/ricutils/KubernetesEntity.py | 84 + ric_robot_suite/ric-python-utils/setup.cfg | 5 + ric_robot_suite/ric-python-utils/setup.py | 26 + ric_robot_suite/ric-python-utils/tox.ini | 11 + ric_robot_suite/robot/assets/keys/README.md | 20 + .../assets/templates/appmgr_create_xapp.template | 3 + .../assets/templates/e2mgr_setup_nodeb.template | 5 + .../robot/assets/templates/mr_publish.template | 5 + .../robot/assets/templates/web/index.html.template | 7 + .../robot/resources/appmgr/appmgr_interface.robot | 76 + .../robot/resources/appmgr/swagger.json | 509 + .../robot/resources/browser_setup.robot | 49 + .../resources/dashboard/dashboard_interface.robot | 100 + ric_robot_suite/robot/resources/dr_interface.robot | 23 + .../robot/resources/e2mgr/e2mgr_interface.robot | 99 + .../robot/resources/e2sim/e2sim_tools.robot | 33 + .../robot/resources/e2term/placeholder_for_files | 0 .../robot/resources/global_properties.robot | 15 + .../robot/resources/json_templater.robot | 21 + ric_robot_suite/robot/resources/mr_interface.robot | 57 + .../robot/resources/ric/placeholder_for_files | 0 .../robot/resources/rnib/placeholder_for_files | 0 .../robot/resources/rtmgr/rtmgr_interface.robot | 32 + ric_robot_suite/robot/resources/ssh/files.robot | 50 + .../robot/resources/ssh/processes.robot | 74 + .../robot/resources/xapps/place_holder_for_files | 0 ric_robot_suite/robot/testsuites/ete.robot | 59 + .../robot/testsuites/health-check.robot | 20 + .../robot/testsuites/ricdeployment.robot | 50 + .../robot/testsuites/update_ric_page.robot | 28 + ric_robot_suite/runTags.sh | 124 + ric_robot_suite/setup.sh | 175 + ric_robot_suite/version.properties | 14 + simulators/e2sim/.gitignore | 9 + simulators/e2sim/CMakeLists.txt | 71 + simulators/e2sim/README.md | 78 + simulators/e2sim/build_and_run_e2agent | 32 + simulators/e2sim/build_docker | 22 + simulators/e2sim/build_e2sim | 151 + simulators/e2sim/docker/Dockerfile | 47 + simulators/e2sim/docker/old/DockerFile_old | 53 + simulators/e2sim/docker/old/Dockerfile | 42 + simulators/e2sim/docker/old/Dockerfile_base | 60 + simulators/e2sim/docker/old/configure_rmr | 27 + simulators/e2sim/docker/old/empty.rt | 5 + simulators/e2sim/docker/old/install_asn1c | 29 + simulators/e2sim/docker/old/install_rmr | 32 + simulators/e2sim/docker/old/local.rt | 9 + simulators/e2sim/helm/README.md | 22 + simulators/e2sim/helm/e2sim/Chart.yaml | 22 + simulators/e2sim/helm/e2sim/templates/_helpers.tpl | 49 + .../helm/e2sim/templates/bin/_e2sim-run.sh.tpl | 54 + .../helm/e2sim/templates/configmap-e2sim-bin.yaml | 8 + .../e2sim/helm/e2sim/templates/deployment.yaml | 79 + simulators/e2sim/helm/e2sim/values.yaml | 48 + simulators/e2sim/helm/e2sim_install.sh | 79 + simulators/e2sim/src/ASN1/asn/asn.hpp | 27 + simulators/e2sim/src/ASN1/asn/ber/codec.hpp | 931 + simulators/e2sim/src/ASN1/asn/ber/common.hpp | 51 + simulators/e2sim/src/ASN1/asn/ber/context.hpp | 118 + simulators/e2sim/src/ASN1/asn/ber/length.hpp | 103 + simulators/e2sim/src/ASN1/asn/ber/opentype.hpp | 73 + simulators/e2sim/src/ASN1/asn/ber/tag.hpp | 163 + simulators/e2sim/src/ASN1/asn/ber/tools.hpp | 68 + simulators/e2sim/src/ASN1/asn/ber/visitor.hpp | 177 + simulators/e2sim/src/ASN1/asn/buffer.hpp | 689 + .../e2sim/src/ASN1/asn/chunked_allocator.hpp | 84 + simulators/e2sim/src/ASN1/asn/constraints.hpp | 140 + simulators/e2sim/src/ASN1/asn/elements.hpp | 565 + simulators/e2sim/src/ASN1/asn/error_context.hpp | 267 + simulators/e2sim/src/ASN1/asn/identifier.hpp | 97 + .../e2sim/src/ASN1/asn/per/binary_integer.hpp | 168 + simulators/e2sim/src/ASN1/asn/per/bstring.hpp | 279 + simulators/e2sim/src/ASN1/asn/per/choice.hpp | 136 + simulators/e2sim/src/ASN1/asn/per/codec.hpp | 325 + simulators/e2sim/src/ASN1/asn/per/common.hpp | 58 + simulators/e2sim/src/ASN1/asn/per/context.hpp | 154 + simulators/e2sim/src/ASN1/asn/per/enumerated.hpp | 79 + simulators/e2sim/src/ASN1/asn/per/integer.hpp | 154 + simulators/e2sim/src/ASN1/asn/per/length.hpp | 238 + simulators/e2sim/src/ASN1/asn/per/oid.hpp | 68 + simulators/e2sim/src/ASN1/asn/per/ostring.hpp | 209 + simulators/e2sim/src/ASN1/asn/per/sequence.hpp | 568 + simulators/e2sim/src/ASN1/asn/per/sequence_of.hpp | 156 + simulators/e2sim/src/ASN1/asn/per/visitor.hpp | 141 + simulators/e2sim/src/ASN1/asn/per/whole_number.hpp | 147 + simulators/e2sim/src/ASN1/asn/printer.hpp | 338 + simulators/e2sim/src/ASN1/asn/type_defs.h | 34 + simulators/e2sim/src/ASN1/asn/utility.hpp | 88 + simulators/e2sim/src/ASN1/asn/value_traits.hpp | 187 + simulators/e2sim/src/ASN1/asn/variant.hpp | 146 + simulators/e2sim/src/ASN1/asn/version.hpp | 27 + .../e2sim/src/ASN1/generated/E2AP-Constants.hpp | 244 + simulators/e2sim/src/ASN1/generated/E2AP-IEs.hpp | 568 + .../e2sim/src/ASN1/generated/E2AP-PDU-Contents.hpp | 5512 ++ .../src/ASN1/generated/E2AP-PDU-Descriptions.hpp | 980 + .../src/ASN1/generated/X2AP-CommonDataTypes.hpp | 188 + .../e2sim/src/ASN1/generated/X2AP-Constants.hpp | 2054 + .../e2sim/src/ASN1/generated/X2AP-Containers.hpp | 700 + simulators/e2sim/src/ASN1/generated/X2AP-IEs.hpp | 35962 ++++++++++ .../e2sim/src/ASN1/generated/X2AP-PDU-Contents.hpp | 68476 +++++++++++++++++++ .../src/ASN1/generated/X2AP-PDU-Descriptions.hpp | 1537 + simulators/e2sim/src/ASN1/lib/asn_e2ap.cpp | 982 + simulators/e2sim/src/ASN1/lib/asn_e2ap.hpp | 85 + simulators/e2sim/src/ASN1/lib/asn_e2ap_wrapper.hpp | 85 + simulators/e2sim/src/ASN1/lib/asn_x2ap.cpp | 428 + simulators/e2sim/src/ASN1/lib/asn_x2ap.hpp | 72 + simulators/e2sim/src/ASN1/lib/asn_x2ap_wrapper.hpp | 78 + simulators/e2sim/src/ASN1/lib/e2ap_config.hpp | 160 + simulators/e2sim/src/E2AP/e2ap_asn_codec.cpp | 59 + simulators/e2sim/src/E2AP/e2ap_asn_codec.hpp | 34 + simulators/e2sim/src/E2AP/e2ap_message_handler.cpp | 240 + simulators/e2sim/src/E2AP/e2ap_message_handler.hpp | 37 + simulators/e2sim/src/ONS2019/Pendulum_asn_codec.c | 180 + simulators/e2sim/src/ONS2019/Pendulum_asn_codec.h | 46 + .../e2sim/src/ONS2019/Serial/adruino_serial.c | 98 + .../e2sim/src/ONS2019/Serial/adruino_serial.h | 40 + .../e2sim/src/ONS2019/Serial/arduino-serial-lib.c | 170 + .../e2sim/src/ONS2019/Serial/arduino-serial-lib.h | 39 + simulators/e2sim/src/ONS2019/demo_setup.txt | 14 + simulators/e2sim/src/ONS2019/pendulum.asn1 | 12 + simulators/e2sim/src/SCTP/e2sim_sctp.c | 173 + simulators/e2sim/src/SCTP/e2sim_sctp.cpp | 229 + simulators/e2sim/src/SCTP/e2sim_sctp.h | 39 + simulators/e2sim/src/SCTP/e2sim_sctp.hpp | 39 + .../MESSAGES/XML/sample_endc_x2_setup_failure.xml | 21 + .../MESSAGES/XML/sample_endc_x2_setup_request.xml | 67 + .../MESSAGES/XML/sample_endc_x2_setup_response.xml | 36 + .../X2AP/MESSAGES/XML/sample_x2_setup_failure.xml | 21 + .../X2AP/MESSAGES/XML/sample_x2_setup_request.xml | 57 + .../X2AP/MESSAGES/XML/sample_x2_setup_response.xml | 69 + simulators/e2sim/src/X2AP/x2ap_asn_codec.c | 64 + simulators/e2sim/src/X2AP/x2ap_asn_codec.cpp | 59 + simulators/e2sim/src/X2AP/x2ap_asn_codec.h | 30 + simulators/e2sim/src/X2AP/x2ap_asn_codec.hpp | 34 + simulators/e2sim/src/X2AP/x2ap_generate_messages.c | 113 + simulators/e2sim/src/X2AP/x2ap_generate_messages.h | 31 + simulators/e2sim/src/X2AP/x2ap_message_handler.c | 139 + simulators/e2sim/src/X2AP/x2ap_message_handler.cpp | 128 + simulators/e2sim/src/X2AP/x2ap_message_handler.h | 30 + simulators/e2sim/src/X2AP/x2ap_message_handler.hpp | 35 + simulators/e2sim/src/e2agent.cpp | 74 + simulators/e2sim/src/e2sim.c | 241 + simulators/e2sim/src/e2sim_closedloop.c | 263 + simulators/e2sim/src/e2sim_defs.cpp | 107 + simulators/e2sim/src/e2sim_defs.h | 53 + simulators/e2sim/src/e2sim_serial.c | 56 + simulators/e2sim/src/e2sim_test_client.c | 378 + simulators/e2sim/src/e2termination_test.cpp | 223 + simulators/e2sim/src/rmr_interface/README | 13 + simulators/e2sim/src/rmr_interface/rmr_install.sh | 28 + .../tests/receiver/build_and_run_recvr.sh | 30 + .../src/rmr_interface/tests/receiver/rmr_rcvr.c | 163 + .../tests/sender/build_and_run_sender.sh | 29 + .../src/rmr_interface/tests/sender/rmr_sender.c | 96 + .../src/rmr_interface/tests/sender/rmr_wrapper.h | 142 + simulators/e2sim/src/x2agent.cpp | 41 + simulators/e2sim/src/x2termination_test.cpp | 119 + simulators/e2sim/tools/build_helper.bash | 92 + simulators/ns3_plugins/test.txt | 1 + simulators/workload_generator/Makefile | 34 + simulators/workload_generator/PDU/pdu1.per | 1 + simulators/workload_generator/PDU/pdu2.per | 1 + simulators/workload_generator/README.md | 102 + simulators/workload_generator/back2back_test.sh | 27 + .../workload_generator/report/xAPP_counters.csv | 101 + simulators/workload_generator/run.sh | 29 + simulators/workload_generator/seed.rt | 20 + simulators/workload_generator/src/ric_generator.c | 127 + simulators/workload_generator/src/ric_receiver.c | 114 + simulators/workload_generator/src/ric_wg.h | 36 + simulators/workload_generator/test.srt | 20 + test_scripts/e2adapter/e2adapter.conf | 7 + test_scripts/e2adapter/e2adapter.conf.default | 17 + test_scripts/e2adapter/run_e2adapter_interactive | 6 + test_scripts/e2adapter/start_e2adapter | 6 + test_scripts/e2adapter/stop_e2adapter | 3 + test_scripts/endc_x2_setup/exec_e2agent | 1 + test_scripts/endc_x2_setup/exec_e2mgr | 1 + test_scripts/endc_x2_setup/exec_e2term | 1 + test_scripts/endc_x2_setup/query_rnib | 11 + test_scripts/endc_x2_setup/run_e2agent | 1 + test_scripts/endc_x2_setup/run_gNBsim | 4 + test_scripts/endc_x2_setup/show_log_e2mgr | 7 + test_scripts/endc_x2_setup/show_log_e2term | 7 + test_scripts/endc_x2_setup/test_endc_x2setup | 7 + test_scripts/one_click_ric/test.txt | 1 + .../test-subscription-helmchart-1.0.3/.helmignore | 22 + .../test-subscription-helmchart-1.0.3/Chart.yaml | 5 + .../test-subscription-helmchart-1.0.3/exec_xapp | 2 + .../test-subscription-helmchart-1.0.3/log_xapp | 1 + .../test-subscription-helmchart-1.0.3/restart_xapp | 2 + .../send_subsciption | 3 + .../start_subscription | 1 + .../test-subscription-helmchart-1.0.3/start_xapp | 7 + .../test-subscription-helmchart-1.0.3/stop_xapp | 3 + .../templates/NOTES.txt | 21 + .../templates/_helpers.tpl | 32 + .../templates/configmap.yaml | 28 + .../templates/deployment.yaml | 106 + .../templates/imagePullSecret.yaml | 3 + .../templates/ingress.yaml | 40 + .../templates/secrets.yaml | 7 + .../templates/service.yaml | 28 + .../templates/tests/test-connection.yaml | 18 + .../test-subscription-helmchart-1.0.3/values.yaml | 82 + test_scripts/x2_setup/exec_e2agent | 1 + test_scripts/x2_setup/exec_e2mgr | 1 + test_scripts/x2_setup/exec_e2term | 1 + test_scripts/x2_setup/show_log_e2mgr | 6 + test_scripts/x2_setup/show_log_e2term | 3 + test_scripts/x2_setup/test.txt | 1 + test_scripts/xapp_deploy_undeploy/deploy_xapp | 1 + test_scripts/xapp_deploy_undeploy/list_xapp | 1 + test_scripts/xapp_deploy_undeploy/test.txt | 1 + test_scripts/xapp_deploy_undeploy/undeploy_xapp | 1 + 330 files changed, 146195 insertions(+) create mode 100644 .gitreview create mode 100644 LICENSES.txt create mode 100644 README.md create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/a1med.py create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/delay.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/delay.txt create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/Dockerfile create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/a1med.py create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/build_docker_image create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/delay.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/load.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/metrics.json create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_container create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_server create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getdelay create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getload create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getmetrics create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putdelay create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putload create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/load.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/load.txt create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/metrics.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/nohup.out create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/run_server create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/tests/getdelay create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/tests/getload create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/tests/getmetrics create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/tests/putdelay create mode 100755 ons_2019_demo/a1_med/a1_med_http_server/tests/putload create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/unused/delay.json create mode 100644 ons_2019_demo/a1_med/a1_med_http_server/unused/load.json create mode 100644 ons_2019_demo/a1_med/build_and_run_dummy_a1_med.sh create mode 100644 ons_2019_demo/a1_med/dummy_a1_med.c create mode 100644 ons_2019_demo/a1_med/dummy_a1_rmr_wrapper.h create mode 100644 ons_2019_demo/dashboard/docker-compose.yml create mode 100644 ons_2019_demo/dashboard/docker-compose_v3.yml create mode 100644 ons_2019_demo/global_rmr_routes.rt create mode 100644 ons_2019_demo/load_consumer/Dockerfile create mode 100755 ons_2019_demo/load_consumer/build create mode 100644 ons_2019_demo/load_consumer/dummy_rcvr.c create mode 100644 ons_2019_demo/load_gen/Dockerfile create mode 100755 ons_2019_demo/load_gen/build create mode 100644 ons_2019_demo/load_gen/load_gen.c create mode 100755 ons_2019_demo/pendulum_scripts/1_start_serial_listener.sh create mode 100755 ons_2019_demo/pendulum_scripts/2_start_web_portal.sh create mode 100755 ons_2019_demo/pendulum_scripts/3_start_ric.sh create mode 100755 ons_2019_demo/pendulum_scripts/kill_scripts/kill_ric_and_dashboard.sh create mode 100755 ons_2019_demo/pendulum_scripts/kill_scripts/kill_serial_listener.sh create mode 100755 ons_2019_demo/pendulum_xapp/build_and_run_pendulum_xapp.sh create mode 100644 ons_2019_demo/pendulum_xapp/pendulum_xapp.c create mode 100755 ons_2019_demo/segway_scripts/1_start_web_portal.sh create mode 100755 ons_2019_demo/segway_scripts/2_start_ric.sh create mode 100755 ons_2019_demo/segway_scripts/kill_scripts/kill_ric_and_dashboard.sh create mode 100755 ons_2019_demo/segway_scripts/kill_scripts/kill_serial_listener.sh create mode 100644 ric_robot_suite/.gitignore create mode 100644 ric_robot_suite/README-nanobot create mode 100644 ric_robot_suite/README.md create mode 100755 ric_robot_suite/build.sh create mode 100644 ric_robot_suite/doc/resources/appmgr/appmgr_interface.html create mode 100644 ric_robot_suite/doc/resources/browser_setup.html create mode 100644 ric_robot_suite/doc/resources/dr_interface.html create mode 100644 ric_robot_suite/doc/resources/e2mgr/e2mgr_interface.html create mode 100644 ric_robot_suite/doc/resources/global_properties.html create mode 100644 ric_robot_suite/doc/resources/json_templater.html create mode 100644 ric_robot_suite/doc/resources/mr_interface.html create mode 100644 ric_robot_suite/doc/resources/ssh/files.html create mode 100644 ric_robot_suite/doc/resources/ssh/processes.html create mode 100644 ric_robot_suite/docgen.py create mode 100644 ric_robot_suite/docker/nanobot/Dockerfile create mode 100644 ric_robot_suite/docker/nanobot/container-tag.yaml create mode 100644 ric_robot_suite/docker/ric-robot/Dockerfile create mode 100644 ric_robot_suite/docker/ric-robot/authorization create mode 100644 ric_robot_suite/docker/ric-robot/container-tag.yaml create mode 100755 ric_robot_suite/docker/ric-robot/demo.sh create mode 100755 ric_robot_suite/docker/ric-robot/ete.sh create mode 100644 ric_robot_suite/docker/ric-robot/lighttpd.conf create mode 100644 ric_robot_suite/eteshare/config/integration_robot_properties.py create mode 100644 ric_robot_suite/eteshare/config/vm_properties.py create mode 100755 ric_robot_suite/eteshare/health/index.php create mode 100755 ric_robot_suite/eteshare/nodeb/setup/index.php create mode 100755 ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/101/index.php create mode 100755 ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/index.php create mode 100755 ric_robot_suite/eteshare/ric/v1/xapps/index.php create mode 100644 ric_robot_suite/helm/README.md create mode 100644 ric_robot_suite/helm/nanobot/.helmignore create mode 100644 ric_robot_suite/helm/nanobot/Chart.yaml create mode 100644 ric_robot_suite/helm/nanobot/README create mode 100755 ric_robot_suite/helm/nanobot/configmap-src/bin/svcacct-to-kubeconfig.sh create mode 100644 ric_robot_suite/helm/nanobot/configmap-src/properties/global_properties.robot create mode 100644 ric_robot_suite/helm/nanobot/configmap-src/testsuites/ete.robot create mode 100644 ric_robot_suite/helm/nanobot/configmap-src/testsuites/health-check.robot create mode 100644 ric_robot_suite/helm/nanobot/configmap-src/testsuites/ricdeployment.robot create mode 100644 ric_robot_suite/helm/nanobot/templates/configmap-robot-bin.yaml create mode 100644 ric_robot_suite/helm/nanobot/templates/configmap-robot-properties.yaml create mode 100644 ric_robot_suite/helm/nanobot/templates/configmap-robot-testsuites.yaml create mode 100644 ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml create mode 100644 ric_robot_suite/helm/nanobot/values.yaml create mode 100644 ric_robot_suite/helm/ric-robot/Chart.yaml create mode 100755 ric_robot_suite/helm/ric-robot/demo-k8s.sh create mode 100755 ric_robot_suite/helm/ric-robot/ete-k8s.e2sim.sh create mode 100755 ric_robot_suite/helm/ric-robot/ete-k8s.sh create mode 100644 ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/integration_robot_properties.py create mode 100644 ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/vm_properties.py create mode 100644 ric_robot_suite/helm/ric-robot/templates/_helpers.tpl create mode 100644 ric_robot_suite/helm/ric-robot/templates/configmap.yaml create mode 100644 ric_robot_suite/helm/ric-robot/templates/deployment.yaml create mode 100644 ric_robot_suite/helm/ric-robot/templates/service.yaml create mode 100755 ric_robot_suite/helm/ric-robot/values.yaml create mode 100755 ric_robot_suite/helm/robot_install.sh create mode 100644 ric_robot_suite/html/index.html create mode 100644 ric_robot_suite/red.xml create mode 100644 ric_robot_suite/ric-python-utils/LICENSE.txt create mode 100644 ric_robot_suite/ric-python-utils/README.TXT create mode 100644 ric_robot_suite/ric-python-utils/ricutils/E2SimUtils.py create mode 100644 ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py create mode 100644 ric_robot_suite/ric-python-utils/setup.cfg create mode 100644 ric_robot_suite/ric-python-utils/setup.py create mode 100644 ric_robot_suite/ric-python-utils/tox.ini create mode 100644 ric_robot_suite/robot/assets/keys/README.md create mode 100644 ric_robot_suite/robot/assets/templates/appmgr_create_xapp.template create mode 100644 ric_robot_suite/robot/assets/templates/e2mgr_setup_nodeb.template create mode 100644 ric_robot_suite/robot/assets/templates/mr_publish.template create mode 100644 ric_robot_suite/robot/assets/templates/web/index.html.template create mode 100644 ric_robot_suite/robot/resources/appmgr/appmgr_interface.robot create mode 100644 ric_robot_suite/robot/resources/appmgr/swagger.json create mode 100644 ric_robot_suite/robot/resources/browser_setup.robot create mode 100644 ric_robot_suite/robot/resources/dashboard/dashboard_interface.robot create mode 100644 ric_robot_suite/robot/resources/dr_interface.robot create mode 100644 ric_robot_suite/robot/resources/e2mgr/e2mgr_interface.robot create mode 100644 ric_robot_suite/robot/resources/e2sim/e2sim_tools.robot create mode 100644 ric_robot_suite/robot/resources/e2term/placeholder_for_files create mode 100644 ric_robot_suite/robot/resources/global_properties.robot create mode 100644 ric_robot_suite/robot/resources/json_templater.robot create mode 100644 ric_robot_suite/robot/resources/mr_interface.robot create mode 100644 ric_robot_suite/robot/resources/ric/placeholder_for_files create mode 100644 ric_robot_suite/robot/resources/rnib/placeholder_for_files create mode 100644 ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot create mode 100644 ric_robot_suite/robot/resources/ssh/files.robot create mode 100644 ric_robot_suite/robot/resources/ssh/processes.robot create mode 100644 ric_robot_suite/robot/resources/xapps/place_holder_for_files create mode 100644 ric_robot_suite/robot/testsuites/ete.robot create mode 100644 ric_robot_suite/robot/testsuites/health-check.robot create mode 100644 ric_robot_suite/robot/testsuites/ricdeployment.robot create mode 100644 ric_robot_suite/robot/testsuites/update_ric_page.robot create mode 100755 ric_robot_suite/runTags.sh create mode 100755 ric_robot_suite/setup.sh create mode 100644 ric_robot_suite/version.properties create mode 100644 simulators/e2sim/.gitignore create mode 100644 simulators/e2sim/CMakeLists.txt create mode 100644 simulators/e2sim/README.md create mode 100755 simulators/e2sim/build_and_run_e2agent create mode 100755 simulators/e2sim/build_docker create mode 100755 simulators/e2sim/build_e2sim create mode 100644 simulators/e2sim/docker/Dockerfile create mode 100644 simulators/e2sim/docker/old/DockerFile_old create mode 100644 simulators/e2sim/docker/old/Dockerfile create mode 100644 simulators/e2sim/docker/old/Dockerfile_base create mode 100755 simulators/e2sim/docker/old/configure_rmr create mode 100644 simulators/e2sim/docker/old/empty.rt create mode 100755 simulators/e2sim/docker/old/install_asn1c create mode 100755 simulators/e2sim/docker/old/install_rmr create mode 100644 simulators/e2sim/docker/old/local.rt create mode 100644 simulators/e2sim/helm/README.md create mode 100644 simulators/e2sim/helm/e2sim/Chart.yaml create mode 100644 simulators/e2sim/helm/e2sim/templates/_helpers.tpl create mode 100755 simulators/e2sim/helm/e2sim/templates/bin/_e2sim-run.sh.tpl create mode 100644 simulators/e2sim/helm/e2sim/templates/configmap-e2sim-bin.yaml create mode 100644 simulators/e2sim/helm/e2sim/templates/deployment.yaml create mode 100755 simulators/e2sim/helm/e2sim/values.yaml create mode 100755 simulators/e2sim/helm/e2sim_install.sh create mode 100755 simulators/e2sim/src/ASN1/asn/asn.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/codec.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/common.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/context.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/length.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/opentype.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/tag.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/tools.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/ber/visitor.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/buffer.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/chunked_allocator.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/constraints.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/elements.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/error_context.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/identifier.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/binary_integer.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/bstring.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/choice.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/codec.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/common.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/context.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/enumerated.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/integer.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/length.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/oid.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/ostring.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/sequence.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/sequence_of.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/visitor.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/per/whole_number.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/printer.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/type_defs.h create mode 100755 simulators/e2sim/src/ASN1/asn/utility.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/value_traits.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/variant.hpp create mode 100755 simulators/e2sim/src/ASN1/asn/version.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/E2AP-Constants.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/E2AP-IEs.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/E2AP-PDU-Contents.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/E2AP-PDU-Descriptions.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-CommonDataTypes.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-Constants.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-Containers.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-IEs.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-PDU-Contents.hpp create mode 100644 simulators/e2sim/src/ASN1/generated/X2AP-PDU-Descriptions.hpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_e2ap.cpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_e2ap.hpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_e2ap_wrapper.hpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_x2ap.cpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_x2ap.hpp create mode 100644 simulators/e2sim/src/ASN1/lib/asn_x2ap_wrapper.hpp create mode 100644 simulators/e2sim/src/ASN1/lib/e2ap_config.hpp create mode 100644 simulators/e2sim/src/E2AP/e2ap_asn_codec.cpp create mode 100644 simulators/e2sim/src/E2AP/e2ap_asn_codec.hpp create mode 100644 simulators/e2sim/src/E2AP/e2ap_message_handler.cpp create mode 100644 simulators/e2sim/src/E2AP/e2ap_message_handler.hpp create mode 100644 simulators/e2sim/src/ONS2019/Pendulum_asn_codec.c create mode 100644 simulators/e2sim/src/ONS2019/Pendulum_asn_codec.h create mode 100644 simulators/e2sim/src/ONS2019/Serial/adruino_serial.c create mode 100644 simulators/e2sim/src/ONS2019/Serial/adruino_serial.h create mode 100644 simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.c create mode 100644 simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.h create mode 100644 simulators/e2sim/src/ONS2019/demo_setup.txt create mode 100644 simulators/e2sim/src/ONS2019/pendulum.asn1 create mode 100644 simulators/e2sim/src/SCTP/e2sim_sctp.c create mode 100644 simulators/e2sim/src/SCTP/e2sim_sctp.cpp create mode 100644 simulators/e2sim/src/SCTP/e2sim_sctp.h create mode 100644 simulators/e2sim/src/SCTP/e2sim_sctp.hpp create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_failure.xml create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_request.xml create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_response.xml create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_failure.xml create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_request.xml create mode 100644 simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_response.xml create mode 100644 simulators/e2sim/src/X2AP/x2ap_asn_codec.c create mode 100644 simulators/e2sim/src/X2AP/x2ap_asn_codec.cpp create mode 100644 simulators/e2sim/src/X2AP/x2ap_asn_codec.h create mode 100644 simulators/e2sim/src/X2AP/x2ap_asn_codec.hpp create mode 100644 simulators/e2sim/src/X2AP/x2ap_generate_messages.c create mode 100644 simulators/e2sim/src/X2AP/x2ap_generate_messages.h create mode 100644 simulators/e2sim/src/X2AP/x2ap_message_handler.c create mode 100644 simulators/e2sim/src/X2AP/x2ap_message_handler.cpp create mode 100644 simulators/e2sim/src/X2AP/x2ap_message_handler.h create mode 100644 simulators/e2sim/src/X2AP/x2ap_message_handler.hpp create mode 100644 simulators/e2sim/src/e2agent.cpp create mode 100644 simulators/e2sim/src/e2sim.c create mode 100644 simulators/e2sim/src/e2sim_closedloop.c create mode 100644 simulators/e2sim/src/e2sim_defs.cpp create mode 100644 simulators/e2sim/src/e2sim_defs.h create mode 100644 simulators/e2sim/src/e2sim_serial.c create mode 100644 simulators/e2sim/src/e2sim_test_client.c create mode 100644 simulators/e2sim/src/e2termination_test.cpp create mode 100644 simulators/e2sim/src/rmr_interface/README create mode 100644 simulators/e2sim/src/rmr_interface/rmr_install.sh create mode 100755 simulators/e2sim/src/rmr_interface/tests/receiver/build_and_run_recvr.sh create mode 100644 simulators/e2sim/src/rmr_interface/tests/receiver/rmr_rcvr.c create mode 100755 simulators/e2sim/src/rmr_interface/tests/sender/build_and_run_sender.sh create mode 100644 simulators/e2sim/src/rmr_interface/tests/sender/rmr_sender.c create mode 100644 simulators/e2sim/src/rmr_interface/tests/sender/rmr_wrapper.h create mode 100644 simulators/e2sim/src/x2agent.cpp create mode 100644 simulators/e2sim/src/x2termination_test.cpp create mode 100644 simulators/e2sim/tools/build_helper.bash create mode 100644 simulators/ns3_plugins/test.txt create mode 100644 simulators/workload_generator/Makefile create mode 100644 simulators/workload_generator/PDU/pdu1.per create mode 100644 simulators/workload_generator/PDU/pdu2.per create mode 100644 simulators/workload_generator/README.md create mode 100755 simulators/workload_generator/back2back_test.sh create mode 100644 simulators/workload_generator/report/xAPP_counters.csv create mode 100755 simulators/workload_generator/run.sh create mode 100644 simulators/workload_generator/seed.rt create mode 100644 simulators/workload_generator/src/ric_generator.c create mode 100644 simulators/workload_generator/src/ric_receiver.c create mode 100644 simulators/workload_generator/src/ric_wg.h create mode 100644 simulators/workload_generator/test.srt create mode 100644 test_scripts/e2adapter/e2adapter.conf create mode 100644 test_scripts/e2adapter/e2adapter.conf.default create mode 100644 test_scripts/e2adapter/run_e2adapter_interactive create mode 100644 test_scripts/e2adapter/start_e2adapter create mode 100644 test_scripts/e2adapter/stop_e2adapter create mode 100644 test_scripts/endc_x2_setup/exec_e2agent create mode 100644 test_scripts/endc_x2_setup/exec_e2mgr create mode 100644 test_scripts/endc_x2_setup/exec_e2term create mode 100755 test_scripts/endc_x2_setup/query_rnib create mode 100644 test_scripts/endc_x2_setup/run_e2agent create mode 100644 test_scripts/endc_x2_setup/run_gNBsim create mode 100755 test_scripts/endc_x2_setup/show_log_e2mgr create mode 100755 test_scripts/endc_x2_setup/show_log_e2term create mode 100755 test_scripts/endc_x2_setup/test_endc_x2setup create mode 100644 test_scripts/one_click_ric/test.txt create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/.helmignore create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/Chart.yaml create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/exec_xapp create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/log_xapp create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/restart_xapp create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/send_subsciption create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/start_subscription create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/start_xapp create mode 100644 test_scripts/subscription/test-subscription-helmchart-1.0.3/stop_xapp create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/NOTES.txt create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/_helpers.tpl create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/configmap.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/deployment.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/imagePullSecret.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/ingress.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/secrets.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/service.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/tests/test-connection.yaml create mode 100755 test_scripts/subscription/test-subscription-helmchart-1.0.3/values.yaml create mode 100644 test_scripts/x2_setup/exec_e2agent create mode 100644 test_scripts/x2_setup/exec_e2mgr create mode 100644 test_scripts/x2_setup/exec_e2term create mode 100755 test_scripts/x2_setup/show_log_e2mgr create mode 100755 test_scripts/x2_setup/show_log_e2term create mode 100644 test_scripts/x2_setup/test.txt create mode 100644 test_scripts/xapp_deploy_undeploy/deploy_xapp create mode 100644 test_scripts/xapp_deploy_undeploy/list_xapp create mode 100644 test_scripts/xapp_deploy_undeploy/test.txt create mode 100644 test_scripts/xapp_deploy_undeploy/undeploy_xapp diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..1b8a42e --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=gerrit.o-ran-sc.org +port=29418 +project=it/test +defaultbranch=master diff --git a/LICENSES.txt b/LICENSES.txt new file mode 100644 index 0000000..7863b1e --- /dev/null +++ b/LICENSES.txt @@ -0,0 +1,34 @@ +LICENSES.txt + + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the "Software License"); +you may not use this software except in compliance with the Software +License. You may obtain a copy of the Software License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the Software License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the Software License for the specific language governing permissions +and limitations under the Software License. + + + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the +"Documentation License"); you may not use this documentation except in +compliance with the Documentation License. You may obtain a copy of the +Documentation License at + +https://creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +distributed under the Documentation License is distributed on an "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the Documentation License for the specific language governing +permissions and limitations under the Documentation License. + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a2ded4 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# RIC end-to-end (E2E) deployment and testing +1. Clone the it_dep and it_test folders on your VM +2. Install kubernetes using the script in it_dep_kubernetes/setup-1node-k8s.sh +3. Install the RIC using the script in it_dep_ricplt/ric_install.sh +4. Copy robot_install.sh from it_test_ric_robot_suite_helm_ into it_dep_ricplt/ +5. cd into it_dep_ricplt and run robot_install.sh. It will create a softlink to the it_test_ric_robot_suite helm director and do the helm install of rig-robot from it_dep_ricplt +6. The command “kubectl -n ricplatform get pods” will show the additional pod for ric-robot. +7. cd into it_test_ric_robot_suite_helm_ric-robot and run ./ete.sh health to verify that the RIC is ready and deployed. + + + diff --git a/ons_2019_demo/a1_med/a1_med_http_server/a1med.py b/ons_2019_demo/a1_med/a1_med_http_server/a1med.py new file mode 100755 index 0000000..74b11a5 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/a1med.py @@ -0,0 +1,137 @@ +#!flask/bin/python +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from flask import Flask, jsonify, request +from datetime import timedelta +from flask import make_response, request, current_app +from flask_cors import CORS, cross_origin +from functools import update_wrapper +import json + +def crossdomain(origin=None, methods=None, headers=None, max_age=21600, + attach_to_all=True, automatic_options=True): + """Decorator function that allows crossdomain requests. + Courtesy of + https://blog.skyred.fi/articles/better-crossdomain-snippet-for-flask.html + """ + if methods is not None: + methods = ', '.join(sorted(x.upper() for x in methods)) + if headers is not None and not isinstance(headers, list): + headers = ', '.join(x.upper() for x in headers) + if not isinstance(origin, list): + origin = ', '.join(origin) + if isinstance(max_age, timedelta): + max_age = max_age.total_seconds() + + def get_methods(): + """ Determines which methods are allowed + """ + if methods is not None: + return methods + + options_resp = current_app.make_default_options_response() + return options_resp.headers['allow'] + + def decorator(f): + """The decorator function + """ + def wrapped_function(*args, **kwargs): + """Caries out the actual cross domain code + """ + if automatic_options and request.method == 'OPTIONS': + resp = current_app.make_default_options_response() + else: + resp = make_response(f(*args, **kwargs)) + if not attach_to_all and request.method != 'OPTIONS': + return resp + + h = resp.headers + h['Access-Control-Allow-Origin'] = origin + h['Access-Control-Allow-Methods'] = get_methods() + h['Access-Control-Max-Age'] = str(max_age) + h['Access-Control-Allow-Credentials'] = 'true' + h['Access-Control-Allow-Headers'] = \ + "Origin, X-Requested-With, Content-Type, Accept, Authorization" + if headers is not None: + h['Access-Control-Allow-Headers'] = headers + return resp + + f.provide_automatic_options = False + return update_wrapper(wrapped_function, f) + return decorator + +app = Flask(__name__) +cors = CORS(app) + +@app.route('/a1ric/metrics', methods=['GET']) +def get_metrics(): + with open('metrics.json') as json_file: + metrics = json.load(json_file) + return jsonify(metrics) + +@app.route('/a1ric/delay', methods=['GET']) +def get_delay(): + with open('delay.json') as json_file: + delay = json.load(json_file) + return jsonify(delay) + +@app.route('/a1ric/load', methods=['GET']) +def get_load(): + with open('load.json') as json_file: + load = json.load(json_file) + return jsonify(load) + +@app.route('/a1ric/delay', methods=['PUT']) +def write_delay_file(): + if not request.json or not 'delay' in request.json: + abort(400) + delay = { + 'delay': request.json['delay'], + } + delay_json = json.dumps(delay) + f = open("delay.json","w") + f.write(delay_json) + + f = open("delay.txt","w") + print (request.json['delay']) + f.write(str(request.json['delay'])) + + return jsonify(delay), 201 + +@app.route('/a1ric/load', methods=['PUT']) +def write_load_file(): + if not request.json or not 'load' in request.json: + abort(400) + load = { + 'load': request.json['load'], + } + load_json = json.dumps(load) + f = open("load.json","w") + f.write(load_json) + + f = open("load.txt","w") + print (request.json['load']) + #f.write(str(request.json['load']*80000)) + f.write(str(request.json['load']*(8/1000))) + + return jsonify(load), 201 + +if __name__ == '__main__': + app.run(debug=True, host='0.0.0.0', port=10080) + #app.run(debug=True, host='0.0.0.0', port=3000) diff --git a/ons_2019_demo/a1_med/a1_med_http_server/delay.json b/ons_2019_demo/a1_med/a1_med_http_server/delay.json new file mode 100644 index 0000000..6d20400 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/delay.json @@ -0,0 +1 @@ +{"delay": 146655} \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/delay.txt b/ons_2019_demo/a1_med/a1_med_http_server/delay.txt new file mode 100644 index 0000000..22c0945 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/delay.txt @@ -0,0 +1 @@ +146655 \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/Dockerfile b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/Dockerfile new file mode 100644 index 0000000..ba292d4 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:16.04 + +RUN apt-get update && apt-get install -y \ + python-pip \ + virtualenv + +COPY . /a1_server + +CMD /a1_server/run_server diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/a1med.py b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/a1med.py new file mode 100755 index 0000000..4b3fca5 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/a1med.py @@ -0,0 +1,70 @@ +#!flask/bin/python +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from flask import Flask, jsonify, request +import json + +app = Flask(__name__) + + + +@app.route('/a1ric/metrics', methods=['GET']) +def get_metrics(): + with open('metrics.json') as json_file: + metrics = json.load(json_file) + return jsonify(metrics) + +@app.route('/a1ric/delay', methods=['GET']) +def get_delay(): + with open('delay.json') as json_file: + delay = json.load(json_file) + return jsonify(delay) + +@app.route('/a1ric/load', methods=['GET']) +def get_load(): + with open('load.json') as json_file: + load = json.load(json_file) + return jsonify(load) + +@app.route('/a1ric/delay', methods=['PUT']) +def write_delay_file(): + if not request.json or not 'delay' in request.json: + abort(400) + delay = { + 'delay': request.json['delay'], + } + delay_json = json.dumps(delay) + f = open("delay.json","w") + f.write(delay_json) + return jsonify(delay), 201 + +@app.route('/a1ric/load', methods=['PUT']) +def write_load_file(): + if not request.json or not 'load' in request.json: + abort(400) + load = { + 'load': request.json['load'], + } + load_json = json.dumps(load) + f = open("load.json","w") + f.write(load_json) + return jsonify(load), 201 + +if __name__ == '__main__': + app.run(debug=True, host='0.0.0.0', port=10080) diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/build_docker_image b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/build_docker_image new file mode 100755 index 0000000..1a1ea26 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/build_docker_image @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build -t a1-med:0.0.1 . diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/delay.json b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/delay.json new file mode 100644 index 0000000..3f0465a --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/delay.json @@ -0,0 +1 @@ +{"delay": 150} diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/load.json b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/load.json new file mode 100644 index 0000000..8759a65 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/load.json @@ -0,0 +1 @@ +{"load": 130} diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/metrics.json b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/metrics.json new file mode 100644 index 0000000..5d7a572 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/metrics.json @@ -0,0 +1,5 @@ +{ + "latency": 10, + "load": 100, + "time": 123 +} diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_container b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_container new file mode 100755 index 0000000..3c7c0a6 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_container @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run -d -p 10080:10080 --name a1-med -v /a1_server/delay.json:$1 -v /a1_server/load.json:$2 -v /a1_server/metrics.json:$3 a1-med:0.0.1 diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_server b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_server new file mode 100755 index 0000000..04ee38a --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/run_server @@ -0,0 +1,7 @@ +#!/bin/bash + +virtualenv flask + +flask/bin/pip install flask + +./a1med.py diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getdelay b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getdelay new file mode 100755 index 0000000..815a1df --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getdelay @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/delay diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getload b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getload new file mode 100755 index 0000000..150c7ba --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getload @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/load diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getmetrics b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getmetrics new file mode 100755 index 0000000..5566401 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/getmetrics @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/metrics diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putdelay b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putdelay new file mode 100755 index 0000000..0e47be8 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putdelay @@ -0,0 +1,5 @@ +#!/bin/bash +curl --header "Content-Type: application/json" \ + --request PUT \ + --data '{"delay": 150}' \ + http://localhost:10080/a1ric/delay diff --git a/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putload b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putload new file mode 100755 index 0000000..d06f248 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/dockerized_version/tests/putload @@ -0,0 +1,5 @@ +#!/bin/bash +curl --header "Content-Type: application/json" \ + --request PUT \ + --data '{"load": 130}' \ + http://localhost:10080/a1ric/load diff --git a/ons_2019_demo/a1_med/a1_med_http_server/load.json b/ons_2019_demo/a1_med/a1_med_http_server/load.json new file mode 100644 index 0000000..2828afc --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/load.json @@ -0,0 +1 @@ +{"load": 93251172} \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/load.txt b/ons_2019_demo/a1_med/a1_med_http_server/load.txt new file mode 100644 index 0000000..f0e294b --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/load.txt @@ -0,0 +1 @@ +746009.376 \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/metrics.json b/ons_2019_demo/a1_med/a1_med_http_server/metrics.json new file mode 100644 index 0000000..78618bb --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/metrics.json @@ -0,0 +1 @@ +{"latency":7, "ricload":12329, "load":114, "time":1554072669} \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/nohup.out b/ons_2019_demo/a1_med/a1_med_http_server/nohup.out new file mode 100644 index 0000000..fc3bc97 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/nohup.out @@ -0,0 +1,182 @@ +Using base prefix '/usr' +New python executable in /home/demo/felix/old/a1mediator/flask/bin/python3 +Not overwriting existing python script /home/demo/felix/old/a1mediator/flask/bin/python (you must use /home/demo/felix/old/a1mediator/flask/bin/python3) +Installing setuptools, pip, wheel... +done. +Requirement already satisfied: flask in ./flask/lib/python3.5/site-packages (1.0.2) +Requirement already satisfied: Jinja2>=2.10 in ./flask/lib/python3.5/site-packages (from flask) (2.10) +Requirement already satisfied: click>=5.1 in ./flask/lib/python3.5/site-packages (from flask) (7.0) +Requirement already satisfied: itsdangerous>=0.24 in ./flask/lib/python3.5/site-packages (from flask) (1.1.0) +Requirement already satisfied: Werkzeug>=0.14 in ./flask/lib/python3.5/site-packages (from flask) (0.15.1) +Requirement already satisfied: MarkupSafe>=0.23 in ./flask/lib/python3.5/site-packages (from Jinja2>=2.10->flask) (1.1.1) +Requirement already satisfied: flask_cors in ./flask/lib/python3.5/site-packages (3.0.7) +Requirement already satisfied: Six in ./flask/lib/python3.5/site-packages (from flask_cors) (1.12.0) +Requirement already satisfied: Flask>=0.9 in ./flask/lib/python3.5/site-packages (from flask_cors) (1.0.2) +Requirement already satisfied: Jinja2>=2.10 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (2.10) +Requirement already satisfied: Werkzeug>=0.14 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (0.15.1) +Requirement already satisfied: click>=5.1 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (7.0) +Requirement already satisfied: itsdangerous>=0.24 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (1.1.0) +Requirement already satisfied: MarkupSafe>=0.23 in ./flask/lib/python3.5/site-packages (from Jinja2>=2.10->Flask>=0.9->flask_cors) (1.1.1) + * Serving Flask app "a1med" (lazy loading) + * Environment: production + WARNING: Do not use the development server in a production environment. + Use a production WSGI server instead. + * Debug mode: on + * Running on http://0.0.0.0:10080/ (Press CTRL+C to quit) + * Restarting with stat + * Debugger is active! + * Debugger PIN: 339-081-054 +135.197.228.156 - - [23/Mar/2019 19:40:35] "GET / HTTP/1.1" 404 - +135.197.228.156 - - [23/Mar/2019 19:40:48] "GET /a1ric/latency HTTP/1.1" 404 - +135.197.228.156 - - [23/Mar/2019 19:40:51] "GET /a1ric/latency HTTP/1.1" 404 - +135.197.228.156 - - [23/Mar/2019 19:41:01] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 19:41:06] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 19:57:30] "OPTIONS /a1ric/delay HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:57:30] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:57:30] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:58:11] "OPTIONS /a1ric/delay HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:58:11] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:58:11] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:23] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:23] "OPTIONS /a1ric/delay HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:23] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:25] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:25] "OPTIONS /a1ric/delay HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 19:59:25] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:05:10] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:05:10] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:05:10] "OPTIONS /a1ric/delay HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:08:27] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:08:29] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:12:21] "OPTIONS /a1ric/metrics HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:12:21] "OPTIONS /a1ric/load HTTP/1.1" 405 - +135.197.228.156 - - [23/Mar/2019 20:12:21] "OPTIONS /a1ric/delay HTTP/1.1" 405 - + * Detected change in '/home/demo/felix/old/a1mediator/a1med.py', reloading + * Restarting with stat + * Debugger is active! + * Debugger PIN: 339-081-054 +Using base prefix '/usr' +New python executable in /home/demo/felix/old/a1mediator/flask/bin/python3 +Not overwriting existing python script /home/demo/felix/old/a1mediator/flask/bin/python (you must use /home/demo/felix/old/a1mediator/flask/bin/python3) +Installing setuptools, pip, wheel... +done. +Requirement already satisfied: flask in ./flask/lib/python3.5/site-packages (1.0.2) +Requirement already satisfied: Werkzeug>=0.14 in ./flask/lib/python3.5/site-packages (from flask) (0.15.1) +Requirement already satisfied: Jinja2>=2.10 in ./flask/lib/python3.5/site-packages (from flask) (2.10) +Requirement already satisfied: click>=5.1 in ./flask/lib/python3.5/site-packages (from flask) (7.0) +Requirement already satisfied: itsdangerous>=0.24 in ./flask/lib/python3.5/site-packages (from flask) (1.1.0) +Requirement already satisfied: MarkupSafe>=0.23 in ./flask/lib/python3.5/site-packages (from Jinja2>=2.10->flask) (1.1.1) +Requirement already satisfied: flask_cors in ./flask/lib/python3.5/site-packages (3.0.7) +Requirement already satisfied: Six in ./flask/lib/python3.5/site-packages (from flask_cors) (1.12.0) +Requirement already satisfied: Flask>=0.9 in ./flask/lib/python3.5/site-packages (from flask_cors) (1.0.2) +Requirement already satisfied: click>=5.1 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (7.0) +Requirement already satisfied: Werkzeug>=0.14 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (0.15.1) +Requirement already satisfied: Jinja2>=2.10 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (2.10) +Requirement already satisfied: itsdangerous>=0.24 in ./flask/lib/python3.5/site-packages (from Flask>=0.9->flask_cors) (1.1.0) +Requirement already satisfied: MarkupSafe>=0.23 in ./flask/lib/python3.5/site-packages (from Jinja2>=2.10->Flask>=0.9->flask_cors) (1.1.1) + * Serving Flask app "a1med" (lazy loading) + * Environment: production + WARNING: Do not use the development server in a production environment. + Use a production WSGI server instead. + * Debug mode: on + * Running on http://0.0.0.0:10080/ (Press CTRL+C to quit) + * Restarting with stat + * Debugger is active! + * Debugger PIN: 339-081-054 +135.197.228.156 - - [23/Mar/2019 20:19:49] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:19:49] "GET /favicon.ico HTTP/1.1" 404 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:17] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:29] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:33] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:33] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:33] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:40] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:40] "PUT /a1ric/delay HTTP/1.1" 201 - +135.197.228.156 - - [23/Mar/2019 20:20:42] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:43] "PUT /a1ric/load HTTP/1.1" 201 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:20:53] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:02] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:02] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:03] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:04] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:05] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:06] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:07] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:08] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:08] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:09] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:10] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:11] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:12] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:13] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:21:30] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:25] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:31] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:33] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:33] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:33] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:22:36] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:39] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "OPTIONS /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "OPTIONS /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "GET /a1ric/delay HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "GET /a1ric/load HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:24:57] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:25:58] "OPTIONS /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:25:58] "GET /a1ric/metrics HTTP/1.1" 200 - +135.197.228.156 - - [23/Mar/2019 20:25:59] "GET /a1ric/metrics HTTP/1.1" 200 - +135.207.230.61 - - [23/Mar/2019 21:36:09] "GET / HTTP/1.1" 404 - +135.207.230.61 - - [23/Mar/2019 21:36:09] "GET /favicon.ico HTTP/1.1" 404 - +135.207.230.61 - - [23/Mar/2019 21:36:15] "GET /a1ric/load HTTP/1.1" 200 - +135.207.230.61 - - [23/Mar/2019 21:36:15] "GET /favicon.ico HTTP/1.1" 404 - +135.207.230.61 - - [23/Mar/2019 21:36:24] "GET /a1ric/load HTTP/1.1" 200 - +135.207.230.69 - - [24/Mar/2019 11:58:53] "GET / HTTP/1.1" 404 - +135.207.230.69 - - [24/Mar/2019 11:59:07] "GET /a1ric/metrics HTTP/1.1" 200 - +135.207.230.69 - - [24/Mar/2019 11:59:07] "GET /favicon.ico HTTP/1.1" 404 - +135.207.230.69 - - [24/Mar/2019 11:59:26] "GET / HTTP/1.1" 404 - +135.207.230.69 - - [24/Mar/2019 11:59:32] "GET / HTTP/1.1" 404 - +135.207.230.69 - - [24/Mar/2019 11:59:33] "GET /favicon.ico HTTP/1.1" 404 - +135.207.230.69 - - [24/Mar/2019 12:02:50] "GET /a1ric/metrics HTTP/1.1" 200 - +135.207.230.69 - - [24/Mar/2019 12:02:53] "GET /a1ric/metrics HTTP/1.1" 200 - +./run_server: line 8: 31643 Killed ./a1med.py diff --git a/ons_2019_demo/a1_med/a1_med_http_server/run_server b/ons_2019_demo/a1_med/a1_med_http_server/run_server new file mode 100755 index 0000000..3cf55e2 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/run_server @@ -0,0 +1,8 @@ +#!/bin/bash + +virtualenv flask + +flask/bin/pip install flask +flask/bin/pip install flask_cors + +./a1med.py diff --git a/ons_2019_demo/a1_med/a1_med_http_server/tests/getdelay b/ons_2019_demo/a1_med/a1_med_http_server/tests/getdelay new file mode 100755 index 0000000..815a1df --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/tests/getdelay @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/delay diff --git a/ons_2019_demo/a1_med/a1_med_http_server/tests/getload b/ons_2019_demo/a1_med/a1_med_http_server/tests/getload new file mode 100755 index 0000000..150c7ba --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/tests/getload @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/load diff --git a/ons_2019_demo/a1_med/a1_med_http_server/tests/getmetrics b/ons_2019_demo/a1_med/a1_med_http_server/tests/getmetrics new file mode 100755 index 0000000..5566401 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/tests/getmetrics @@ -0,0 +1,2 @@ +#!/bin/bash +curl http://localhost:10080/a1ric/metrics diff --git a/ons_2019_demo/a1_med/a1_med_http_server/tests/putdelay b/ons_2019_demo/a1_med/a1_med_http_server/tests/putdelay new file mode 100755 index 0000000..0e47be8 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/tests/putdelay @@ -0,0 +1,5 @@ +#!/bin/bash +curl --header "Content-Type: application/json" \ + --request PUT \ + --data '{"delay": 150}' \ + http://localhost:10080/a1ric/delay diff --git a/ons_2019_demo/a1_med/a1_med_http_server/tests/putload b/ons_2019_demo/a1_med/a1_med_http_server/tests/putload new file mode 100755 index 0000000..d06f248 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/tests/putload @@ -0,0 +1,5 @@ +#!/bin/bash +curl --header "Content-Type: application/json" \ + --request PUT \ + --data '{"load": 130}' \ + http://localhost:10080/a1ric/load diff --git a/ons_2019_demo/a1_med/a1_med_http_server/unused/delay.json b/ons_2019_demo/a1_med/a1_med_http_server/unused/delay.json new file mode 100644 index 0000000..d8bd0f4 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/unused/delay.json @@ -0,0 +1 @@ +{"delay": 1145} \ No newline at end of file diff --git a/ons_2019_demo/a1_med/a1_med_http_server/unused/load.json b/ons_2019_demo/a1_med/a1_med_http_server/unused/load.json new file mode 100644 index 0000000..ea6d824 --- /dev/null +++ b/ons_2019_demo/a1_med/a1_med_http_server/unused/load.json @@ -0,0 +1 @@ +{"load": 1} \ No newline at end of file diff --git a/ons_2019_demo/a1_med/build_and_run_dummy_a1_med.sh b/ons_2019_demo/a1_med/build_and_run_dummy_a1_med.sh new file mode 100644 index 0000000..900657d --- /dev/null +++ b/ons_2019_demo/a1_med/build_and_run_dummy_a1_med.sh @@ -0,0 +1,31 @@ +#!/bin/bash -eu +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc dummy_a1_med.c -g -o dummy_a1_med -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm + +export DUMMY_SENDER_RMR_RCV_PORT=38086 +export DEMO_SENDER_PTO=1 # poll timeout listening for replies +export DEMO_MAX_PAYLOAD_BYTES=240 # max_size of payload +export DELAY_FILE_PATH="./a1_med_http_server/delay.txt" # max_size of payload +export METRICS_FILE_PATH="./a1_med_http_server/metrics.json" # max_size of payload + +./dummy_a1_med; diff --git a/ons_2019_demo/a1_med/dummy_a1_med.c b/ons_2019_demo/a1_med/dummy_a1_med.c new file mode 100644 index 0000000..3e5f7cb --- /dev/null +++ b/ons_2019_demo/a1_med/dummy_a1_med.c @@ -0,0 +1,126 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// :vim ts=4 sw=4 noet: + +/* + Mnemonic: rmr_sender2.c + Abstract: Very simple test sender that polls and deals with responses + in between sends (from a single process). + + Date: 18 February 2018 + Author: E. Scott Daniels + + Modified: 18 Mar 2019 - changes to support demo +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "dummy_a1_rmr_wrapper.h" + + +void usage( char* argv0 ) { + fprintf( stderr, "usage: %s [mtype-max]\n", argv0 ); + fprintf( stderr, "Sender will send messages with rotating msg types from 0 through mtype-max (if supplied)\n" ); + fprintf( stderr, "if not supplied, only mtype 0 is sent\n" ); + fprintf( stderr, "The default listen port for return messages is 43086; this can be changed by setting DUMMY_SENDER_RMR_RCV_PORT in the environment.\n" ); + fprintf( stderr, "The sender will send forever unless DEMO_SENDER_MAX is set in the environment which causes termination after max messages.\n" ); + fprintf( stderr, "The sender will poll for received messages after each send. The amount of time waited is controlled with DEMO_SENDER_PTO (ms) in the env. Use 0 for non-blocking poll.\n" ); +} + +void send_delay_message(struct rmr_context *rmr_c, char* delay_file_path){ + FILE *fp; + char delay[255]; + + fp = fopen(delay_file_path, "r"); + fscanf(fp, "%s", delay); + int mtype = 100; + rmr_pure_send(rmr_c, mtype, delay); + fprintf( stderr, "Sent delay insert message of type:%d (delay insert) to pendulum control xApp, with content:%s\n",mtype,delay); + fclose(fp); +} + +void send_and_rec_metrics(struct rmr_context *rmr_c, char* metrics_file_path){ + int mtype=102; + char* message="--give metrics--"; + rmr_pure_send(rmr_c, mtype, message ); + printf("Sent message of type:%d to E2 terminator with content:%s\n",mtype,message); + int got_metrics=0; + while (got_metrics == 0){ + if(rmr_poll_for_message(rmr_c) == 1) { + if(rmr_c->rbuf->mtype == 103) + got_metrics=1; + } + } + printf("Recieved metrics from E2 terminator with content:%s\n",rmr_c->rbuf->payload); + + FILE *fp; + fp = fopen(metrics_file_path, "w+"); + fprintf(fp,"%s",rmr_c->rbuf->payload); + fclose(fp); + +} +int main( int argc, char** argv ) { + struct rmr_context *rmr_c; //obtain our enhanced rmr_context + char* lport = "43086"; // default listen port + char* delay_file_path =""; + char* metrics_file_path =""; + if( (eparm = getenv( "DUMMY_SENDER_RMR_RCV_PORT" )) != NULL ) { + lport = strdup( eparm ); + } + + if( (eparm = getenv( "DELAY_FILE_PATH" )) != NULL ) { + delay_file_path = eparm ; + } + + if( (eparm = getenv( "METRICS_FILE_PATH" )) != NULL ) { + metrics_file_path = eparm ; + } + + rmr_c = rmr_init_wrapper(lport); + + while( ! rmr_ready( rmr_c->mrc ) ) { + fprintf( stderr, " waiting for RMr to indicate ready\n" ); + sleep( 1 ); + } + fprintf( stderr, "[OK] initialisation complete\n" ); + fprintf( stderr, "======================================\n[OK] A1 mediator is up and running!\n==================================\n" ); + + while( 1 ) { + sleep (2); + + send_delay_message(rmr_c, delay_file_path); + + send_and_rec_metrics(rmr_c, metrics_file_path); + fprintf( stderr, "-------------------------------------------\n"); + } + + + + fprintf( stderr, "[INFO] sender is terminating\n"); + rmr_close_wrapper(rmr_c); + + return 0; +} diff --git a/ons_2019_demo/a1_med/dummy_a1_rmr_wrapper.h b/ons_2019_demo/a1_med/dummy_a1_rmr_wrapper.h new file mode 100644 index 0000000..999342c --- /dev/null +++ b/ons_2019_demo/a1_med/dummy_a1_rmr_wrapper.h @@ -0,0 +1,121 @@ +int epoll_to = 1;// global default epoll timout -- 1ms +char* eparm; // generic env pointer + +struct rmr_context { + void* mrc; + int rcv_fd; // pollable fd + struct epoll_event epe; // event definition for event to listen to + struct epoll_event events[10]; // wait on 10 possible events + int ep_fd; + int max_payload_size; // ++SCOTT + rmr_mbuf_t* sbuf; // send buffer + rmr_mbuf_t* rbuf; // received buffer +}; + + +struct rmr_context * rmr_init_wrapper(char* lport){ + + struct rmr_context *rmr_c = malloc(sizeof (struct rmr_context)); + fprintf( stderr, "[INFO] glistening for replies on %s\n", lport ); + + + rmr_c->mrc = rmr_init(lport, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // setup RMr and get a context (rmr_c.mrc) + rmr_c->ep_fd=-1; + + //polling related initializations + rmr_c->rcv_fd = rmr_get_rcvfd( rmr_c->mrc );// get the fd to poll for messages received + if( rmr_c->rcv_fd < 0 ) { + fprintf( stderr, "[FAIL] unable to set up polling fd\n" ); + exit( 1 ); + } + + if( (rmr_c->ep_fd = epoll_create1( 0 )) < 0 ) { + fprintf( stderr, "[FAIL] unable to create epoll fd: %d\n", errno ); + exit( 1 ); + } + rmr_c->epe.events = EPOLLIN; + rmr_c->epe.data.fd = rmr_c->rcv_fd; + + if( epoll_ctl( rmr_c->ep_fd, EPOLL_CTL_ADD, rmr_c->rcv_fd, &rmr_c->epe ) != 0 ) { + fprintf( stderr, "[FAIL] epoll_ctl status not 0 : %s\n", strerror( errno ) ); + exit( 1 ); + } + //end of polling related initializations + + //++SCOTT------ next lines until !!SCOTT + rmr_c->max_payload_size = 240; //default + if( (eparm = getenv( "DEMO_MAX_PAYLOAD_BYTES" )) != NULL ) { + rmr_c->max_payload_size = atoi(eparm); // override with env + } + //!!SCOTT + + //~~SCOTT next line + rmr_c->sbuf = rmr_alloc_msg( rmr_c->mrc, rmr_c->max_payload_size ); // allocate largest payload to send + rmr_c->rbuf = NULL; + + return rmr_c; +} + +void rmr_pure_send (struct rmr_context *rmr_c, int mtype, char* message) { + //--SCOTT int max_payload_size = 240; //default + //--SCOTT if( (eparm = getenv( "DEMO_MAX_PAYLOAD_BYTES" )) != NULL ) { + //--SCOTT max_payload_size = atoi(eparm); + //--SCOTT } + + //~~SCOTT next line + snprintf( rmr_c->sbuf->payload, rmr_c->max_payload_size, "%s", message); // simple send message -- replace with real content + + rmr_c->sbuf->mtype = mtype; // fill in message meta data + rmr_c->sbuf->len = strlen( rmr_c->sbuf->payload ) + 1; // actual length of payload (count the nil end of string) + rmr_c->sbuf->state = 0; + rmr_send_msg( rmr_c->mrc, rmr_c->sbuf ); +// //retry send for a few times before giving up +// long natter = 0; // natter on for errors only once in a while +// if( (rmr_c->sbuf = rmr_send_msg( rmr_c->mrc, rmr_c->sbuf )) != NULL ) {// unlikely, but might get a null pointer back if NNG really is buggered +// if( rmr_c->sbuf->state != RMR_OK ) { +// if( errno == EAGAIN ) { +// while( rmr_c->sbuf->state != RMR_OK && errno == EAGAIN ) {// NNG likes to refuse sends, just keep trying on eagain +// rmr_send_msg( rmr_c->mrc, rmr_c->sbuf ); +// } +// } else {// most likely connection refused, don't natter on +// if( time( NULL ) > natter ) { +// fprintf( stderr, "[WARN] send failed, pausing (%s)\n", strerror( errno ) ); +// natter = time( NULL ) + 2; +// } +// sleep( 1 ); +// } +// } +// } else { +// if( time( NULL ) > natter ) { +// fprintf( stderr, "[WARN] send failed, pausing (%s)\n", strerror( errno ) ); +// natter = time( NULL ) + 2; +// } +// sleep( 1 ); +// } +} + +int rmr_poll_for_message (struct rmr_context *rmr_c) { + //start polling the channel to read the acknowledgment + //~~SCOTT next line + int nready; + int i; + int return_type =0; + + nready = epoll_wait( rmr_c->ep_fd, rmr_c->events, 10, epoll_to ); // wait up to epoll_to ms for a response + for( i = 0; i < nready && i < 10; i++ ) { // loop through to find what is ready + if( rmr_c->events[i].data.fd == rmr_c->rcv_fd ) { // RMr has something + errno = 0; + rmr_c->rbuf = rmr_rcv_msg( rmr_c->mrc, rmr_c->rbuf ); // something ready; this should not block + if( rmr_c->rbuf ) { + //fprintf( stderr, " acknowledgment received:%s\n",rmr_c->rbuf->payload); + return_type = 1; //the message has been acknowledged + } + } + } + return return_type; +} +void rmr_close_wrapper (struct rmr_context *rmr_c){ + + rmr_close( rmr_c->mrc ); + free(rmr_c); +} diff --git a/ons_2019_demo/dashboard/docker-compose.yml b/ons_2019_demo/dashboard/docker-compose.yml new file mode 100644 index 0000000..2804e45 --- /dev/null +++ b/ons_2019_demo/dashboard/docker-compose.yml @@ -0,0 +1,30 @@ +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version: '2' + +services: + + ric-dashboard: + image: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/ric-dash-app-be:1.0.2-SNAPSHOT + ports: + - 9080:8080 + + ric-jsonserver: + image: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/ric/json-server:latest + ports: + - 3000:3000 diff --git a/ons_2019_demo/dashboard/docker-compose_v3.yml b/ons_2019_demo/dashboard/docker-compose_v3.yml new file mode 100644 index 0000000..993ba86 --- /dev/null +++ b/ons_2019_demo/dashboard/docker-compose_v3.yml @@ -0,0 +1,30 @@ +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version: '2' + +services: + + ric-dashboard: + image: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/ric-dash-app-be:1.0.3-SNAPSHOT + ports: + - 9080:8080 + + ric-jsonserver: + image: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/ric/json-server:1.0.3-SNAPSHOT + ports: + - 3000:3000 diff --git a/ons_2019_demo/global_rmr_routes.rt b/ons_2019_demo/global_rmr_routes.rt new file mode 100644 index 0000000..9c8d6a7 --- /dev/null +++ b/ons_2019_demo/global_rmr_routes.rt @@ -0,0 +1,46 @@ +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +newrt|start +#pendulum_xapp RMR port is 5560 +#RIC_PENDULUM_XAPP_ANGLE_MESSAGE is 0 +#RIC_PENDULUM_XAPP_ANGLE_RESPONSE is 33 for the rts type for the pendulum control ack. Not sure this is good practice +#RIC_E2_TERMINATION_METRIC_REQUEST = 102 +#RIC_PENDULUM_XAPP_CONFIG_REQUEST = 100 (delay) +#RIC_LOAD_GENERATOR_CONFIG_REQUEST = 101 +#RIC_E2_TERMINATION_METRIC_REQUEST = 102 +#RIC_E2_TERMINATION_METRIC_RESPONSE = 103 +#RIC_E2_TERMINATION_LOAD = 104 +#RIC_LOAD_CONSUMER = 105 +rte|0|localhost:5560 +rte|100|localhost:5560 +rte|102|localhost:48886 +rte|103|localhost:38086 +rte|104|localhost:48886 +rte|105|localhost:19289 +rte|33|localhost:48886 +# this is needed so that receiver acks can be sent via rmr_rts_msg() calls +#rte|99|localhost:48886 +newrt|end + + +# This is infact a global route file that every container is referring to +# 38086 - a1_med +# 19289 - load_consumer, hardcoded +# - load_gen, not needed +# 5560 - pendulum_xapp +# 48886 - e2term diff --git a/ons_2019_demo/load_consumer/Dockerfile b/ons_2019_demo/load_consumer/Dockerfile new file mode 100644 index 0000000..2ca8440 --- /dev/null +++ b/ons_2019_demo/load_consumer/Dockerfile @@ -0,0 +1,51 @@ +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# sudo docker build -t load_consumer . +# sudo docker run --rm -it load_consumer + +FROM ubuntu:16.04 + +# Install necessary packages +RUN apt-get update +RUN apt-get update && apt-get install -y gcc git make bash vim cmake g++ ksh +RUN apt-get install -y iputils-ping + +# Install rmr in /usr/local +WORKDIR /home +RUN git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr +RUN date; ls -al /usr/local/lib +RUN cd rmr; git checkout 6735f136906ce2; mkdir .build; cd .build; cmake ..; make install + +# COPY code +RUN mkdir /home/load_consumer +COPY ./ /home/load_consumer +WORKDIR /home/load_consumer + +# Configure the receiver +RUN mkdir /usr/local/route +ENV C_INCLUDE_PATH=/usr/local/include +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + +# local.rt should be in the /usr/local/route directory mounted from the outside world. +# example for command line: -v /demo/test/route:/usr/local/route +ENV RMR_SEED_RT=/usr/local/route/local.rt +# export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt + +RUN gcc dummy_rcvr.c -g -o dummy_rcvr -L /usr/local/lib -lrmr_nng -lnng -lpthread -lm + +CMD ./dummy_rcvr diff --git a/ons_2019_demo/load_consumer/build b/ons_2019_demo/load_consumer/build new file mode 100755 index 0000000..743768c --- /dev/null +++ b/ons_2019_demo/load_consumer/build @@ -0,0 +1,5 @@ +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc dummy_rcvr.c -g -o dummy_rcvr -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm +./dummy_rcvr diff --git a/ons_2019_demo/load_consumer/dummy_rcvr.c b/ons_2019_demo/load_consumer/dummy_rcvr.c new file mode 100644 index 0000000..fb5484b --- /dev/null +++ b/ons_2019_demo/load_consumer/dummy_rcvr.c @@ -0,0 +1,75 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// :vim ts=4 sw=4 noet: +/* + Mnemonic: dummy_rcvr.c + Abstract: RMr receiver that discards everything. + + Define these environment variables to have some control: + RMR_SEED_RT -- path to the static routing table + RMR_RTG_SVC -- host:port of the route table generator + + Date: 24 March 2019 + Author: E. Scott Daniels + + Mods: +*/ + +#include +#include +#include +#include +#include + +#include + +int main( int argc, char** argv ) { + void* mrc; // msg router context + rmr_mbuf_t* msg = NULL; // message received + int i; + char* listen_port; + int count = 0; + + if( (listen_port = getenv( "DUMMY_RCVR_PORT" )) == NULL ) { + listen_port = "19289"; + } + + mrc = rmr_init( listen_port, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // start your engines! + if( mrc == NULL ) { + fprintf( stderr, " ABORT: unable to initialise RMr\n" ); + exit( 1 ); + } + + while( ! rmr_ready( mrc ) ) { + fprintf( stderr, " waiting for RMr to show ready\n" ); + sleep( 1 ); + } + fprintf( stderr, " RMr now shows ready\n" ); + + fprintf( stderr, " listening on %s build=%s @ %s\n", listen_port, __DATE__, __TIME__ ); + + while( 1 ) { + msg = rmr_rcv_msg( mrc, msg ); // block until one arrives + count++; + //if( count % 1000 == 0 ) { + fprintf( stderr, "receiver received: %d\n", count ); + //} + } +} diff --git a/ons_2019_demo/load_gen/Dockerfile b/ons_2019_demo/load_gen/Dockerfile new file mode 100644 index 0000000..f88686b --- /dev/null +++ b/ons_2019_demo/load_gen/Dockerfile @@ -0,0 +1,51 @@ +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# sudo docker build -t load_gen . +# sudo docker run --rm -it load_gen + +FROM ubuntu:16.04 + +# Install necessary packages +RUN apt-get update +RUN apt-get update && apt-get install -y gcc git make bash vim cmake g++ ksh +RUN apt-get install -y iputils-ping + +# Install rmr in /usr/local +WORKDIR /home +RUN git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr +RUN date; ls -al /usr/local/lib +RUN cd rmr; git checkout 6735f136906ce2; mkdir .build; cd .build; cmake ..; make install + +# COPY code +RUN mkdir /home/load_gen +COPY ./ /home/load_gen +WORKDIR /home/load_gen + +# Configure the receiver +RUN mkdir /usr/local/route +ENV C_INCLUDE_PATH=/usr/local/include +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib + +# local.rt should be in the /usr/local/route directory mounted from the outside world. +# example for command line: -v /demo/test/route:/usr/local/route +ENV RMR_SEED_RT=/usr/local/route/local.rt +# export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt + +RUN gcc load_gen.c -g -o load_gen -L /usr/local/lib -lrmr_nng -lnng -lpthread -lm + +CMD ./load_gen diff --git a/ons_2019_demo/load_gen/build b/ons_2019_demo/load_gen/build new file mode 100755 index 0000000..707ba6d --- /dev/null +++ b/ons_2019_demo/load_gen/build @@ -0,0 +1,6 @@ +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc load_gen.c -g -o load_gen -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm +./load_gen ../a1_med/a1_med_http_server/load.txt + diff --git a/ons_2019_demo/load_gen/load_gen.c b/ons_2019_demo/load_gen/load_gen.c new file mode 100644 index 0000000..f356c41 --- /dev/null +++ b/ons_2019_demo/load_gen/load_gen.c @@ -0,0 +1,170 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// :vim ts=4 sw=4 noet: + +/* + Mnemonic: load_gen.c + Abstract: Very simple load generator. Reads the message rate from a + file (argv[1]) which is expected to be between 0 and 100000. + Messages are sent with a fixed mtype of 104. + + Date: 24 March 2019 + Author: E. Scott Daniels +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* + Rewinds, reads and converts the value in the file to the number of microseconds (usleep units) + that the caller should sleep between messages. If the effective mps is 0, then we block here + until the rate goes up. We'll check 1/sec if blocked. +*/ +int mps = 1; // msg/sec rate from file (sloppy, but global helps prevent time calls) +static inline int read_delay( int fd ) { + char rbuf[128]; // read buffer + int n; // bytes read + int mus = 0; // mu sec delay + double v; + + if( fd < 0 ) { + return 0; + } + + do { + lseek( fd, 0, SEEK_SET ); + if( (n = read( fd, rbuf, sizeof( rbuf ) )) >0 ) { + mps = atoi( rbuf ); + v = 1.0 / ((double) mps / 1000000.0); // msg/microsec + + mus = (int) v; + } + + if( mus <= 0 ) { + //fprintf( stderr, " sending blocked\n" ); + sleep( 1 ); + } + } while( mus <= 0 ); + + return mus; +} + +int main( int argc, char** argv ) { + int delay_fd; // file des of the delay file + int rcv_fd; // pollable fd + void* mrc; //msg router context + struct epoll_event events[10]; // wait on 10 possible events + struct epoll_event epe; // event definition for event to listen to + int ep_fd = -1; + int nready; + int i; + int mtype = 104; // we loop through several message types + rmr_mbuf_t* sbuf; // send buffer + rmr_mbuf_t* rbuf; // received buffer + int epoll_to = 1; // epoll timout -- 0 don't call + char wbuf[2048]; + char* lport = "12036"; // default listen port + int delay = 2000000; // microsecond delay between messages; default to very slow + int next_read = 0; // counter for next read of delay + char* eparm; + char* rate_file = "rate_file"; + + + if( (eparm = getenv( "DEMO_LOAD_GEN_PORT" )) != NULL ) { + lport = strdup( eparm ); + } + + mrc = rmr_init( lport, 1400, RMRFL_NONE ); + rcv_fd = rmr_get_rcvfd( mrc ); + if( rcv_fd < 0 ) { + fprintf( stderr, "[FAIL] unable to set up polling fd\n" ); + exit( 1 ); + } + + if( argc > 1 ) { + rate_file = argv[1]; + } + + if( (delay_fd = open( rate_file, O_RDONLY )) < 0 ) { + fprintf( stderr, "abort: unable to open delay file: %s: %d\n", rate_file, errno ); + exit( 1 ); + } + + if( (ep_fd = epoll_create1( 0 )) < 0 ) { + fprintf( stderr, "[FAIL] unable to create epoll fd: %d\n", errno ); + exit( 1 ); + } + epe.events = EPOLLIN; + epe.data.fd = rcv_fd; + + if( epoll_ctl( ep_fd, EPOLL_CTL_ADD, rcv_fd, &epe ) != 0 ) { + fprintf( stderr, "[FAIL] epoll_ctl status not 0 : %s\n", strerror( errno ) ); + exit( 1 ); + } + + sbuf = rmr_alloc_msg( mrc, 256 ); + rbuf = NULL; + + while( ! rmr_ready( mrc ) ) { + fprintf( stderr, "waiting for RMr to show ready\n" ); + sleep( 1 ); + } + fprintf( stderr, " rmr shows ready\n" ); + + + mps = 1; + while( 1 ) { + if( next_read <= 0 ) { + delay = read_delay( delay_fd ); + next_read = mps; + //fprintf( stderr, " next_read=%d delay=%d\n", next_read, delay ); + } + + snprintf( sbuf->payload, 200, "msg from load generator %d\n", next_read ); + + sbuf->mtype = mtype; + sbuf->len = strlen( sbuf->payload ); + sbuf->state = 0; + sbuf = rmr_send_msg( mrc, sbuf ); // we send, we dont care about success or failure, but on failure, have a break + if( sbuf->state != RMR_OK ) { + sleep( 1 ); + next_read = 0; // mostly for testing + } + + nready = epoll_wait( ep_fd, events, 10, 0 ); // we shouldn't have anything, but prevent queue full issues + for( i = 0; i < nready && i < 10; i++ ) { // loop through to find what is ready + if( events[i].data.fd == rcv_fd ) { // RMr has something + errno = 0; + rbuf = rmr_rcv_msg( mrc, rbuf ); + } + } + + next_read--; + usleep( delay ); + } +} diff --git a/ons_2019_demo/pendulum_scripts/1_start_serial_listener.sh b/ons_2019_demo/pendulum_scripts/1_start_serial_listener.sh new file mode 100755 index 0000000..e123834 --- /dev/null +++ b/ons_2019_demo/pendulum_scripts/1_start_serial_listener.sh @@ -0,0 +1,5 @@ +E2SIM_DIR=$HOME/test/simulators/e2sim +echo "Initialize conduit file to zero.." +echo "\$0#" > $E2SIM_DIR/arduino_delay.txt +cd $E2SIM_DIR && ./build/serial_listener & +sleep 5 diff --git a/ons_2019_demo/pendulum_scripts/2_start_web_portal.sh b/ons_2019_demo/pendulum_scripts/2_start_web_portal.sh new file mode 100755 index 0000000..61f5288 --- /dev/null +++ b/ons_2019_demo/pendulum_scripts/2_start_web_portal.sh @@ -0,0 +1,23 @@ + +E2SIM_DIR=$HOME/test/simulators/e2sim +ONS_DIR=$HOME/test/ons_2019_demo + +echo "Initializing display variables.." + echo 0 > $ONS_DIR/a1_med/a1_med_http_server/delay.txt + echo 0 > $ONS_DIR/a1_med/a1_med_http_server/load.txt + echo "{\"latency\":0, \"ricload\":0, \"load\":0, \"time\":0}" > $ONS_DIR/a1_med/a1_med_http_server/metrics.json + + #7. a1 med http server + cd $HOME/test/ons_2019_demo/a1_med/a1_med_http_server && ./a1med.py & + sleep 5 + + #6. dash_board + # cd $HOME/test/ons_2019_demo/dashboard && docker-compose -f docker-compose_v3.yml up & + + cd $HOME/test/ons_2019_demo/dashboard && docker-compose -f docker-compose.yml up & + + + sleep 5 + + + diff --git a/ons_2019_demo/pendulum_scripts/3_start_ric.sh b/ons_2019_demo/pendulum_scripts/3_start_ric.sh new file mode 100755 index 0000000..87ceaa3 --- /dev/null +++ b/ons_2019_demo/pendulum_scripts/3_start_ric.sh @@ -0,0 +1,54 @@ +#!/bin/bash +#Bring up all components for ONS demo +clear + +echo "Starting up all components for ONS 2019 Pendulum-control Demo" + +E2SIM_DIR=$HOME/test/simulators/e2sim +ONS_DIR=$HOME/test/ons_2019_demo + +#clean variables + + +function main() +{ + #Kill all running process + #pkill -f start_demo + pkill -f e2sim + pkill -f pendulum_xapp + + #1. e2agent + cd $E2SIM_DIR && ./build/e2sim_closedloop & + + #2. pendulum xapp + cd $HOME/test/ons_2019_demo/pendulum_xapp/ && bash build_and_run_pendulum_xapp.sh & + sleep 2 + + #3. e2 termination + cd $HOME/test/simulators/e2sim && bash run_e2_term & + sleep 2 + + # #4. load consumer + cd $HOME/test/ons_2019_demo/load_consumer && bash build & + sleep 2 + + + # #5. load_gen + cd $HOME/test/ons_2019_demo/load_gen && bash build & + + #7. a1 med http server +# cd $HOME/test/ons_2019_demo/a1_med/a1_med_http_server && ./a1med.py & +# sleep 3 + + #6. dash_board +# cd $HOME/test/ons_2019_demo/dashboard && docker-compose up & +# sleep 5 + + + #8. a1 med + cd $HOME/test/ons_2019_demo/a1_med && bash build_and_run_dummy_a1_med.sh + +} + +main "$@" +echo "DEMO IS NOW UP AND RUNNING!!!!" diff --git a/ons_2019_demo/pendulum_scripts/kill_scripts/kill_ric_and_dashboard.sh b/ons_2019_demo/pendulum_scripts/kill_scripts/kill_ric_and_dashboard.sh new file mode 100755 index 0000000..b6afa98 --- /dev/null +++ b/ons_2019_demo/pendulum_scripts/kill_scripts/kill_ric_and_dashboard.sh @@ -0,0 +1,6 @@ +pkill -f pendulum_xapp +pkill -f e2sim #kills both agent and term +pkill -f dummy #kills a1 med C code and load consumer +pkill -f load_gen +pkill -f a1med #kills a1 mediator http server +docker kill $(docker ps -q) #kills dashboard diff --git a/ons_2019_demo/pendulum_scripts/kill_scripts/kill_serial_listener.sh b/ons_2019_demo/pendulum_scripts/kill_scripts/kill_serial_listener.sh new file mode 100755 index 0000000..712fb6d --- /dev/null +++ b/ons_2019_demo/pendulum_scripts/kill_scripts/kill_serial_listener.sh @@ -0,0 +1 @@ +pkill -f serial_listener diff --git a/ons_2019_demo/pendulum_xapp/build_and_run_pendulum_xapp.sh b/ons_2019_demo/pendulum_xapp/build_and_run_pendulum_xapp.sh new file mode 100755 index 0000000..f49dc54 --- /dev/null +++ b/ons_2019_demo/pendulum_xapp/build_and_run_pendulum_xapp.sh @@ -0,0 +1,11 @@ +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc pendulum_xapp.c -g -o pendulum_xapp -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm + +export PENDULUM_XAPP_RMR_RCV_PORT=5560 +export DEMO_SENDER_PTO=1 # poll timeout listening for replies + +export PRINT_FREQ=1000 #frequency at which test stats will be printed + +RMR_RCV_ACK=1 ./pendulum_xapp $PRINT_FREQ; # receiver that will ack every sender message diff --git a/ons_2019_demo/pendulum_xapp/pendulum_xapp.c b/ons_2019_demo/pendulum_xapp/pendulum_xapp.c new file mode 100644 index 0000000..c55b86d --- /dev/null +++ b/ons_2019_demo/pendulum_xapp/pendulum_xapp.c @@ -0,0 +1,143 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// :vim ts=4 sw=4 noet: +/* +Mnemonic: rmr_rcvr2.c +Abstract: Very simple test listener built on RMr libraries. It does nothing +but return the message it recevied back to the sender. + +Define these environment variables to have some control: +RMR_SEED_RT -- path to the static routing table +RMR_RTG_SVC -- host:port of the route table generator + +One command line parm is accepted: stats frequency. This is a number, n, +which causes stats to be generated after every n messages. If set to 0 +each message is written when received and no stats (msg rate) is generated. + +Date: 11 February 2018 +Author: E. Scott Daniels + +Mods: 18 Mar 2019 -- simplified for demo base. + */ + +#include +#include +#include +#include +#include + +#include +#include + +long current_timestamp_in_us(){ + struct timeval currentTime; + gettimeofday(¤tTime, NULL); + return currentTime.tv_sec * (int)1e6 + currentTime.tv_usec; +} + +long delay=0; //sent from the a1 med in milliseconds +void handle_pendulum_angle_message(void* mrc,rmr_mbuf_t* msg){ + fprintf(stderr, "Sleeping for %ld microseconds", delay); + // usleep(delay/20000.0); //sleep for us + usleep(delay/20); //ms + int max_rt=2; + fprintf( stderr, "Received message from E2 termination of type:%d (pendulum control), with content:%s\n",msg->mtype,msg->payload); + msg->len = snprintf( msg->payload, 1024, "$%d#\n",(int)delay/20000); + msg->mtype=33; + msg = rmr_rts_msg( mrc, msg ); // this is a retur to sender; preferred + if( (msg = rmr_rts_msg( mrc, msg )) != NULL ) { + max_rt = 2;//should be small to prevent rmr issues + while( max_rt > 0 && msg->state != RMR_OK && errno == EAGAIN ) { // just keep trying + max_rt--; + rmr_rts_msg( mrc, msg ); + //rmr_send_msg (mrc, msg); + } + } +} + + +//void handle_pendulum_angle_message(){ +// int mtype=33; +// char* message="Reply hello back to Arduino!"; +// rmr_pure_send(rmr_c, mtype, message ); +// printf("Sent message of type:%d to E2 terminator with content:%s\n",mtype,message); +//} + +void handle_delay_insertion_message(void* mrc,rmr_mbuf_t* msg){ + fprintf( stderr, "Received message from A1 mediator of type:%d (delay insert), with content:%s\n",msg->mtype,msg->payload); + delay = atol(msg->payload);//payload is being sent in microseconds +} + + + +int main( int argc, char** argv ) { + void* mrc; // msg router context + rmr_mbuf_t* msg = NULL; // message received + char* listen_port; + int stat_freq = 20000; // write stats after reciving this many messages + + + if( (listen_port = getenv( "PENDULUM_XAPP_RMR_RCV_PORT" )) == NULL ) { + listen_port = "4560"; + } + + if( argc > 1 ) { + stat_freq = atoi( argv[1] ); + } + fprintf( stderr, " stats will be reported every %d messages\n", stat_freq ); + + mrc = rmr_init( listen_port, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // start your engines! + if( mrc == NULL ) { + fprintf( stderr, " ABORT: unable to initialise RMr\n" ); + exit( 1 ); + } + + while( ! rmr_ready( mrc ) ) { + fprintf( stderr, " waiting for RMr to show ready\n" ); + sleep( 1 ); + } + fprintf( stderr, " RMr now shows ready\n" ); + + fprintf( stderr, " listening on %s\n", listen_port); + + fprintf( stderr, "======================================\n Pendulum Control xApp Running\n======================================\n"); + long received_angle_message_time =0; + while( 1 ) { + msg = rmr_rcv_msg( mrc, msg ); // block until one arrives + if( msg == NULL ) { + continue; // shouldn't happen, but don't crash if we get nothing + } + if( msg->mtype < 0 || msg->state != RMR_OK ) { + fprintf( stderr, "[WRN] bad msg: state=%d errno=%d\n", msg->state, errno ); + continue; // just loop to receive another + } + + switch (msg->mtype){ + case 0: + received_angle_message_time = current_timestamp_in_us(); + handle_pendulum_angle_message(mrc,msg); + fprintf(stderr, "Time taken to reply to E2 term:%ld micro seconds \n",current_timestamp_in_us()-received_angle_message_time); + break; + case 100: handle_delay_insertion_message(mrc,msg); + break; + default: fprintf( stdout, "[WRN] bad msg: =%d\n", msg->mtype); + } + } +} diff --git a/ons_2019_demo/segway_scripts/1_start_web_portal.sh b/ons_2019_demo/segway_scripts/1_start_web_portal.sh new file mode 100755 index 0000000..61f5288 --- /dev/null +++ b/ons_2019_demo/segway_scripts/1_start_web_portal.sh @@ -0,0 +1,23 @@ + +E2SIM_DIR=$HOME/test/simulators/e2sim +ONS_DIR=$HOME/test/ons_2019_demo + +echo "Initializing display variables.." + echo 0 > $ONS_DIR/a1_med/a1_med_http_server/delay.txt + echo 0 > $ONS_DIR/a1_med/a1_med_http_server/load.txt + echo "{\"latency\":0, \"ricload\":0, \"load\":0, \"time\":0}" > $ONS_DIR/a1_med/a1_med_http_server/metrics.json + + #7. a1 med http server + cd $HOME/test/ons_2019_demo/a1_med/a1_med_http_server && ./a1med.py & + sleep 5 + + #6. dash_board + # cd $HOME/test/ons_2019_demo/dashboard && docker-compose -f docker-compose_v3.yml up & + + cd $HOME/test/ons_2019_demo/dashboard && docker-compose -f docker-compose.yml up & + + + sleep 5 + + + diff --git a/ons_2019_demo/segway_scripts/2_start_ric.sh b/ons_2019_demo/segway_scripts/2_start_ric.sh new file mode 100755 index 0000000..a7de023 --- /dev/null +++ b/ons_2019_demo/segway_scripts/2_start_ric.sh @@ -0,0 +1,54 @@ +#!/bin/bash +#Bring up all components for ONS demo +clear + +echo "Starting up all components for ONS 2019 Pendulum-control Demo" + +E2SIM_DIR=$HOME/test/simulators/e2sim +ONS_DIR=$HOME/test/ons_2019_demo + +#clean variables + + +function main() +{ + #Kill all running process + #pkill -f start_demo + pkill -f e2sim + pkill -f pendulum_xapp + + #1. e2agent + cd $E2SIM_DIR && ./build/e2sim & + + #2. pendulum xapp + cd $HOME/test/ons_2019_demo/pendulum_xapp/ && bash build_and_run_pendulum_xapp.sh & + sleep 2 + + #3. e2 termination + cd $HOME/test/simulators/e2sim && bash run_e2_term & + sleep 2 + + # #4. load consumer + cd $HOME/test/ons_2019_demo/load_consumer && bash build & + sleep 2 + + + # #5. load_gen + cd $HOME/test/ons_2019_demo/load_gen && bash build & + + #7. a1 med http server +# cd $HOME/test/ons_2019_demo/a1_med/a1_med_http_server && ./a1med.py & +# sleep 3 + + #6. dash_board +# cd $HOME/test/ons_2019_demo/dashboard && docker-compose up & +# sleep 5 + + + #8. a1 med + cd $HOME/test/ons_2019_demo/a1_med && bash build_and_run_dummy_a1_med.sh + +} + +main "$@" +echo "DEMO IS NOW UP AND RUNNING!!!!" diff --git a/ons_2019_demo/segway_scripts/kill_scripts/kill_ric_and_dashboard.sh b/ons_2019_demo/segway_scripts/kill_scripts/kill_ric_and_dashboard.sh new file mode 100755 index 0000000..b6afa98 --- /dev/null +++ b/ons_2019_demo/segway_scripts/kill_scripts/kill_ric_and_dashboard.sh @@ -0,0 +1,6 @@ +pkill -f pendulum_xapp +pkill -f e2sim #kills both agent and term +pkill -f dummy #kills a1 med C code and load consumer +pkill -f load_gen +pkill -f a1med #kills a1 mediator http server +docker kill $(docker ps -q) #kills dashboard diff --git a/ons_2019_demo/segway_scripts/kill_scripts/kill_serial_listener.sh b/ons_2019_demo/segway_scripts/kill_scripts/kill_serial_listener.sh new file mode 100755 index 0000000..712fb6d --- /dev/null +++ b/ons_2019_demo/segway_scripts/kill_scripts/kill_serial_listener.sh @@ -0,0 +1 @@ +pkill -f serial_listener diff --git a/ric_robot_suite/.gitignore b/ric_robot_suite/.gitignore new file mode 100644 index 0000000..46508ec --- /dev/null +++ b/ric_robot_suite/.gitignore @@ -0,0 +1,15 @@ +/log.html +/output.xml +/report.html +/selenium-screenshot-*.png +*.pyc +/libspecs/ +/geckodriver.log +/robot/library/ +/build +/eteshare/logs +/.idea +/*.exe +/*.log +/*.zip +/*.out diff --git a/ric_robot_suite/README-nanobot b/ric_robot_suite/README-nanobot new file mode 100644 index 0000000..526d2b8 --- /dev/null +++ b/ric_robot_suite/README-nanobot @@ -0,0 +1,77 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +In addition to the default robot framework container, this tree +includes a minimal robot framework container called "nanobot" and +intented for automated testing or resource-limited environments while +supporting all testsuites implemented by the larger container. The +nanobot container lacks the xvfb-based browser and lighttpd/PHP +dashboard. + +To build the container, first check the following ENV values at the +top of docker/nanobot/Dockerfile to ensure they reflect the RIC +platform deployment environment: + +... +ENV RICPLT_NAMESPACE=ricplatform +ENV RICPLT_RELEASE_NAME=ric-full +ENV RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term" +... + +Then, in the test/ric_robot_suite directory, build the container: + +$ docker build -f docker/nanobot/Dockerfile -t nanobot:v0.1 . + +To run the container: + +$ docker run --name nanobot -d nanobot:latest + +By default, once started the container simply sleeps forever. + +The container does not include any testsuites; either copy your tests +into a running container, or mount a directory of tests when starting +the container. For example: + +$ docker run -v /opt/robot/testsuites:/robot/testsuites --name nanobot -d nanobot:latest + +Once started, the container will simply sleep forever. To run a test +in the container, first copy a K8S credential file to +/kubernetes-admin-conf in the container: + +$ docker cp ${KUBECONFIG} nanobot:/kubernetes-admin-conf + +... then run the test: + +$ docker exec nanobot robot /robot/testsuites/ricdeployment.robot +============================================================================== +Ricdeployment :: Tests for the existence and functionality of RIC components +============================================================================== +Deployments .ricplatform/ric-full-appmgr is available +ricplatform/ric-full-rtmgr is available +ricplatform/ric-full-dbaas is available +ricplatform/ric-full-e2mgr is available +ricplatform/ric-full-e2term is available +Deployments | PASS | +------------------------------------------------------------------------------ +Ricdeployment :: Tests for the existence and functionality of RIC ... | PASS | +1 critical test, 1 passed, 0 failed +1 test total, 1 passed, 0 failed +============================================================================== +Output: /output.xml +Log: /log.html +Report: /report.html + +A Helm chart for the container can be found in helm/nanobot. See +helm/nanobot/README for more information on the chart. \ No newline at end of file diff --git a/ric_robot_suite/README.md b/ric_robot_suite/README.md new file mode 100644 index 0000000..14dd35b --- /dev/null +++ b/ric_robot_suite/README.md @@ -0,0 +1,125 @@ +# Getting Started +## Prerequisites +Clone the repo + +### build container +./build.sh will create ./build directory, generate documentation using robot.libdoc, copy doc and robot files and build the docker conatiner. +See build.sh for how to run the docker (you will need to edit and copy vm_properties.py and integration_robot_properties.py to your eteshare mount point) + +## Development Environment Setup +### Python Installation +You should install 2.7.12: [https://www.python.org/downloads/release/python-2712](https://www.python.org/downloads/release/python-2712) + + +### Pip Install +Install pip with the get-pip.py file from [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py) +once downloaded run + +``` +python get-pip.py +``` +let it install. + +From the desktop, right click the Computer icon. +Choose Properties from the context menu. +Click the Advanced system settings link. +Click Environment Variables. In the section System Variables, click New. +In the New System Variable window, set the name as 'HTTPS\_PROXY' then specify the value of the HTTPS_PROXY environment variable as your proxy. +Click OK. +Close all remaining windows by clicking OK. + + +### Robot Install +Reopen Command prompt window, and run below code to install robot. + +``` +pip install robotframework +``` + + +### IDE Install +Most further documents will use the RED environment for Robot. +[https://github.com/nokia/RED/releases/download/0.7.0/RED\_0.7.0.20160914115048-win32.win32.x86_64.zip](https://github.com/nokia/RED/releases/download/0.7.0/RED\_0.7.0.20160914115048-win32.win32.x86_64.zip) + +Once you install that IDE you probably will want to have a python editor to edit python files better. +Go to Help > Eclipse Marketplace and search for PyDev and click install on PyDev for Eclipse 5.2.0 + +Once you install that IDE you will need EGit to check in git code. +Go to Help > Eclipse Marketplace and search for Egit git team provider and click install on EGit Git Team Provider 4.5.0 + +Once you install that IDE you will probably want a json editor to edit json better. +Go to Help > Eclipse Marketplace and search for Json Tools and click install on Json Tools 1.1.0 + +### Project Setup +Note: You do not need to run these commands every time, only on a library update or initial checkout. + +``` +./setup.sh +``` + +Note that this script will download the chromedriver for the current OS. The default is linux64 which will download the appropriate chromedriver to /usr/local/bin so that it will be in the execution PATH. + +Windows and Mac hosts will download into the current working directory. Windows and MAC users will need to ensure that the driver is +in the execution PATH. + + +## Robot Project Structure +### Overview +ProjectName - robot + +``` +`-- robot + |-- assets - put anything you need as input like json files, cert keys, heat templates + | |-- templates - put any json templates in here, you can include subfolders for each component + |-- doc - docgen.py will put html documentation of the custom keywords here + | |-- resources libdoc of the custom keywords under robot/resources + |-- library - pip will install Python libraries here + | |-- eteutils - pip will install locally-developed Python libraries here + |-- resources - put any robot resource files aka libraries we write in here + | |-- aai + | `-- vid + `-- testsuites - put any robot test suites we write in here +`-- library + |-- python - put locally-developed Python libraries here, to be copied into eteutilsxo +``` + +### Tag Strucutre +Robot uses tags to separate out test cases to run. below are the tags we use + +* health - use this for test cases that perform a health check of the environment +* ete - use this for the test cases that are performing an end to end test +# xapptests - use this for test cases that apply to Xapp Mager +* e2mgrtests - use this for test case that apply to the E2 Mgr + +## Branching Structure +### Overview +Repository Name: it/test/ric_robot_suite + +Branching strategy: +``` +`-- ric_robot_suite + |-- master - the main branch and always the latest deployable code. Send a pull to here from feature and Dan or Jerry will approve. + |-- feature-[XXXXXX] - when you want to make changes you make them here, when you are satisfied send pull request to master +``` + +## Executing ETE Testcases +### Overview +Two scripts have been provided in the root of the ete-testsuite project to enable test execution + +* runTags.sh - This shell uses Robot [Tags] to drive which tests are executed and is designed for automated testing. +* oneTest.sh - This shell is designed for unit testing of individual .robot files. It accepts a single argument identifying the .robot file in robot/testsuites to execute. + +#### runTags.sh +For further information on using Robot [Tags], see [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#configuring-execution] and [http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#simple-patterns] + +When executing tests via tags, all of the robot files in the project are scanned for tests cases with the specified tags. + +There are 3 flavors of runTags.sh +* runTags.sh with no arguments. This defaults to the default tag or runTags.sh -i health +* runTags.sh with a single include tag. In this case the -i or --include may be omitted. So runTags.sh ete is the same as runTags.sh -i ete +* runTags.sh with multiple tags. In this case, tags must be accompanied by a -i/--include or -e/--exclude to properly identify the disposition of the tagged testcase. + +``` +runTags.sh -i health -i ete -e e2mgrtests +``` + diff --git a/ric_robot_suite/build.sh b/ric_robot_suite/build.sh new file mode 100755 index 0000000..c6923dd --- /dev/null +++ b/ric_robot_suite/build.sh @@ -0,0 +1,38 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +# +# To RUN the container localy in a docker environment use the docker run command AFTER the following steps +# PWD is current directory path +# copy vm_properties.py and integration_robot_properties.py into ./eteshare/config +# mkdir ./eteshare/logs +# +# ./demo.sh init_robot to set web page login(test)/password +# robot test results will be on http://127.0.0.1:88/logs/ +# +#RUNPATH= is a full path to a directory where you have placed your environment specific files that +# should be mounted into the containers /share/config (e.g., vm_properties.py integration_robot_properties.py) +# + +# generate doc +# python 2.7 needed +# pip install robotframework for docgen.py to work + +docker build -t ric/testsuite -f docker/ric-robot/Dockerfile . +#docker run -d --name ric-robot -p 88:88 -v $RUNPATH/eteshare:/share ric/testsuite:latest lighttpd -D -f /etc/lighttpd/lighttpd.conf diff --git a/ric_robot_suite/doc/resources/appmgr/appmgr_interface.html b/ric_robot_suite/doc/resources/appmgr/appmgr_interface.html new file mode 100644 index 0000000..ee7afa7 --- /dev/null +++ b/ric_robot_suite/doc/resources/appmgr/appmgr_interface.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/browser_setup.html b/ric_robot_suite/doc/resources/browser_setup.html new file mode 100644 index 0000000..9969507 --- /dev/null +++ b/ric_robot_suite/doc/resources/browser_setup.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/dr_interface.html b/ric_robot_suite/doc/resources/dr_interface.html new file mode 100644 index 0000000..c4a5866 --- /dev/null +++ b/ric_robot_suite/doc/resources/dr_interface.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/e2mgr/e2mgr_interface.html b/ric_robot_suite/doc/resources/e2mgr/e2mgr_interface.html new file mode 100644 index 0000000..dd2e087 --- /dev/null +++ b/ric_robot_suite/doc/resources/e2mgr/e2mgr_interface.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/global_properties.html b/ric_robot_suite/doc/resources/global_properties.html new file mode 100644 index 0000000..0634ad3 --- /dev/null +++ b/ric_robot_suite/doc/resources/global_properties.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/json_templater.html b/ric_robot_suite/doc/resources/json_templater.html new file mode 100644 index 0000000..75ca822 --- /dev/null +++ b/ric_robot_suite/doc/resources/json_templater.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/mr_interface.html b/ric_robot_suite/doc/resources/mr_interface.html new file mode 100644 index 0000000..aa8b303 --- /dev/null +++ b/ric_robot_suite/doc/resources/mr_interface.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/ssh/files.html b/ric_robot_suite/doc/resources/ssh/files.html new file mode 100644 index 0000000..9a712bf --- /dev/null +++ b/ric_robot_suite/doc/resources/ssh/files.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/doc/resources/ssh/processes.html b/ric_robot_suite/doc/resources/ssh/processes.html new file mode 100644 index 0000000..734cadd --- /dev/null +++ b/ric_robot_suite/doc/resources/ssh/processes.html @@ -0,0 +1,912 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening library documentation failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 8 or newer is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/ric_robot_suite/docgen.py b/ric_robot_suite/docgen.py new file mode 100644 index 0000000..2e26043 --- /dev/null +++ b/ric_robot_suite/docgen.py @@ -0,0 +1,42 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +import os +import shutil +from robot.libdoc import libdoc + +dirpath = os.getcwd() +in_path = os.path.join(dirpath,"robot/resources") +out_path =os.path.join(dirpath,"eteshare/doc/resources") + + +print in_path +print out_path +exit +#shutil.rmtree(out_path, ignore_errors=True) +for root, dirs, files in os.walk(in_path): + for file in files: + splitext = os.path.splitext(file) + if splitext[1] == '.robot': + rel_path = os.path.relpath(root, in_path) + in_file = os.path.join(root, file) + out_dir = os.path.normpath(os.path.join(out_path, rel_path)) + out_file = os.path.join(out_dir, splitext[0] + '.html') + + if not os.path.exists(out_dir): + os.makedirs(out_dir) + libdoc(in_file, out_file, docformat='ROBOT') diff --git a/ric_robot_suite/docker/nanobot/Dockerfile b/ric_robot_suite/docker/nanobot/Dockerfile new file mode 100644 index 0000000..1bf7757 --- /dev/null +++ b/ric_robot_suite/docker/nanobot/Dockerfile @@ -0,0 +1,74 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +FROM python:3-alpine + +MAINTAINER "RIC" + +LABEL name="Docker image for the RIC Robot Testing Framework" + +ENV ROBOT_HOME="/robot" +ENV ROBOT_OPTIONS="-T -d /robot/log --console verbose -C off -P /robot/lib/python" +ENV KUBECONFIG="/robot/etc/kubernetes-admin-conf" +ENV PYTHONPATH="/robot/lib/python" +ENV RICPLT_NAMESPACE=ricplatform +ENV RICPLT_RELEASE_NAME=ric-full +ENV RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term" + +RUN mkdir -p /robot/lib/python + +# ONAP eteutils +# we only need a few things from this so we won't install +# the whole thing. +# we could do this in a builder image but that seems execssive. +RUN apk update && apk add git +WORKDIR /tmp/ +RUN git clone -b 3.0.1-ONAP https://gerrit.onap.org/r/testsuite/python-testing-utils.git +RUN cp /tmp/python-testing-utils/eteutils/StringTemplater.py /robot/lib/python +RUN cp /tmp/python-testing-utils/eteutils/UUID.py /robot/lib/python +RUN rm -rf /tmp/python-testing-utils +RUN apk del --purge git + +COPY ric-python-utils/ricutils/*.py /robot/lib/python/ + +# +# for the nanobot container, we only need a subset of the various support +# files/libraries, so we pick and choose what to copy.. +RUN mkdir /robot/resources +COPY robot/resources/json_templater.robot /robot/resources +COPY robot/resources/appmgr /robot/resources/appmgr +COPY robot/resources/e2mgr /robot/resources/e2mgr +COPY robot/resources/e2sim /robot/resources/e2sim +COPY robot/resources/e2term /robot/resources/e2term +COPY robot/resources/ric /robot/resources/ric +COPY robot/resources/rnib /robot/resources/rnib +COPY robot/resources/rtmgr /robot/resources/rtmgr +COPY robot/resources/xapps /robot/resources/xapps +# this will actually be overlaid by the helm chart, but +# it's good to have the placeholder. +COPY robot/resources/global_properties.robot /robot/resources + +RUN mkdir -p /robot/assets/templates +COPY robot/assets/templates/e2mgr_setup_nodeb.template /robot/assets/templates +COPY robot/assets/templates/appmgr_create_xapp.template /robot/assets/templates + +RUN pip install UUID +RUN pip install kubernetes +RUN pip install redis +RUN pip install robotframework +RUN pip install robotframework-requests + +RUN python -m compileall /robot/lib/python + +CMD ["sleep", "9125d"] diff --git a/ric_robot_suite/docker/nanobot/container-tag.yaml b/ric_robot_suite/docker/nanobot/container-tag.yaml new file mode 100644 index 0000000..079c0dc --- /dev/null +++ b/ric_robot_suite/docker/nanobot/container-tag.yaml @@ -0,0 +1,2 @@ +--- +tag: 0.0.1 diff --git a/ric_robot_suite/docker/ric-robot/Dockerfile b/ric_robot_suite/docker/ric-robot/Dockerfile new file mode 100644 index 0000000..387c9d7 --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/Dockerfile @@ -0,0 +1,94 @@ +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM ubuntu +## Be careful of Windows newlines + +MAINTAINER "RIC" + +LABEL name="Docker image for the RIC Robot Testing Framework" +LABEL usage="docker run -e ROBOT_TEST= -ti ric-robot" + + +ENV TZ=America/New_York +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +ENV BUILDTIME=true + +# Install Python, Pip, Robot framework, chromium, lighttpd web server +RUN apt-get update \ + && apt-get install \ + --no-install-recommends \ + --assume-yes \ + chromium-browser \ + chromium-chromedriver \ + dnsutils \ + git \ + gcc \ + libffi-dev \ + libssl-dev \ + lighttpd \ + make \ + net-tools \ + php \ + php-cgi \ + python2.7 \ + python-dev \ + python-setuptools \ + python-wheel \ + python-pip \ + python-redis \ + unzip \ + vim \ + x11-utils \ + x11-xserver-utils \ + xvfb \ + xxd + + +RUN pip install robotframework==3.0.4 \ + && python --version + +# Copy the robot code + +COPY robot /var/opt/RIC/robot +COPY red.xml /var/opt/RIC +COPY ric-python-utils /var/opt/RIC +COPY runTags.sh /var/opt/RIC +COPY setup.sh /var/opt/RIC +COPY version.properties /var/opt/RIC +COPY README.md /var/opt/RIC +COPY docker/ric-robot/lighttpd.conf /etc/lighttpd/lighttpd.conf +COPY docker/ric-robot/authorization /etc/lighttpd/authorization + +RUN chmod 777 /var/opt/RIC/setup.sh \ + && chmod 777 /var/opt/RIC/runTags.sh \ + && chmod 600 /var/opt/RIC/robot/assets/keys/* + +RUN cd /var/opt/RIC \ + && ./setup.sh \ + && apt-get autoremove --assume-yes \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean + +RUN mkdir /root/.kube + +CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] + + + diff --git a/ric_robot_suite/docker/ric-robot/authorization b/ric_robot_suite/docker/ric-robot/authorization new file mode 100644 index 0000000..b254e65 --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/authorization @@ -0,0 +1 @@ +test:test diff --git a/ric_robot_suite/docker/ric-robot/container-tag.yaml b/ric_robot_suite/docker/ric-robot/container-tag.yaml new file mode 100644 index 0000000..05ace5a --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/container-tag.yaml @@ -0,0 +1,2 @@ +--- +tag: 0.2.0 diff --git a/ric_robot_suite/docker/ric-robot/demo.sh b/ric_robot_suite/docker/ric-robot/demo.sh new file mode 100755 index 0000000..93e4ebf --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/demo.sh @@ -0,0 +1,87 @@ +# Copyright © 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +function usage +{ + echo "Usage: demo.sh []" + echo " " + echo " demo.sh init_robot" + echo " - Execute both initialize of robot login/password etc" + echo " " +} + + +# +# For docker container environment +# +# Run the testsuite for the passed tag. Valid tags are health +# Please clean up logs when you are done... +# Note: Do not run multiple concurrent demo.sh/ete.sh as the --display is not parameterized and tests will collide +# +if [ "$1" == "" ] ; then + echo "Usage: demo.sh [ init_robot ]" + exit +fi + +## +## if more than 1 tag is supplied, the must be provided with -i or -e +## +while [ $# -gt 0 ] +do + key="$1" + echo "KEY:" + echo $key + + case $key in + init_robot) + TAG="UpdateWebPage" + read -s -p "WEB Site Password for user 'test': " WEB_PASSWORD + if [ "$WEB_PASSWORD" = "" ]; then + echo "" + echo "WEB Password is required for user 'test'" + exit + fi + VARIABLES="$VARIABLES -v WEB_PASSWORD:$WEB_PASSWORD" + shift + if [ $# -eq 2 ];then + VARIABLES="$VARIABLES -v HOSTS_PREFIX:$1" + fi + shift + ;; + *) + usage + exit + esac +done + +set -x + +POD=ric-robot + +TAGS="-i $TAG" + + +ETEHOME=/var/opt/RIC +#export GLOBAL_BUILD_NUMBER=$(docker exec -it ${POD} bash -c "ls -1q /share/logs/ | wc -l ") +GLOBAL_BUILD_NUMBER=$(docker exec -it ${POD} bash -c "ls -1q /share/logs/ | wc -l") +GLOBAL_BUILD_NUMBER=$(echo "$GLOBAL_BUILD_NUMBER" | tr -d '\r') +OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_demo_$TAG +DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py" +VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$" + +docker exec -it ${POD} ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM diff --git a/ric_robot_suite/docker/ric-robot/ete.sh b/ric_robot_suite/docker/ric-robot/ete.sh new file mode 100755 index 0000000..f1debf5 --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/ete.sh @@ -0,0 +1,56 @@ +# Copyright © 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +function usage +{ + echo "Usage: ete.sh []" + echo " " + echo " ete.sh health " + echo " - Execute RIC health tests for each component" + echo " ete.sh etetests" + echo " - Execute RIC ete tests " + echo " ete.sh appmgr" + echo " - Execute RIC appmgr tests " + echo " " +} + + +# +# Run the testsuite for the passed tag. Valid tags are health +# Please clean up logs when you are done... +# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide +# +if [ "$1" == "" ] ; then + echo "Usage: ete.sh [ health | etetests | xapptests]" + exit +fi + +set -x + + +POD=ric-robot + +TAGS="-i $1" + +ETEHOME=/var/opt/RIC +export GLOBAL_BUILD_NUMBER=$(docker exec -it ${POD} bash -c "ls -1q /share/logs/ | wc -l") +GLOBAL_BUILD_NUMBER=$(echo $GLOBAL_BUILD_NUMBER | tr -d '\r') +OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$1 +DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py" +VARIABLES="-v GLOBAL_BUILD_NUMBER:$$" + +docker exec -it ${POD} ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM diff --git a/ric_robot_suite/docker/ric-robot/lighttpd.conf b/ric_robot_suite/docker/ric-robot/lighttpd.conf new file mode 100644 index 0000000..7df28b6 --- /dev/null +++ b/ric_robot_suite/docker/ric-robot/lighttpd.conf @@ -0,0 +1,73 @@ +server.document-root = "/var/opt/RIC/html/" + +server.port = 88 + +server.username = "www-data" +server.groupname = "www-data" + +dir-listing.activate = "disable" + +alias.url = ( "/ric/" => "/share/ric/" ) +$HTTP["url"] =~ "^/ric/" { + dir-listing.activate = "enable" +} + +alias.url += ( "/nodeb/" => "/share/nodeb/" ) +$HTTP["url"] =~ "^/nodeb/" { + dir-listing.activate = "enable" +} + +alias.url += ( "/health" => "/share/health" ) +$HTTP["url"] =~ "^/health" { + dir-listing.activate = "enable" +} + +alias.url += ( "/doc/" => "/var/opt/RIC/doc/" ) +$HTTP["url"] =~ "^/doc/" { + dir-listing.activate = "enable" +} + +alias.url += ( "/logs/" => "/share/logs/" ) + +$HTTP["url"] =~ "^/logs/" { + dir-listing.activate = "enable" +} + +mimetype.assign = ( + ".log" => "text/plain", + ".txt" => "text/plain", + ".png" => "image/png", + ".html" => "text/html", + ".xml" => "text/xml" +) + +static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc", ".cgi" ) +index-file.names = ( "index.html","index.php" ) + +server.modules += ( "mod_auth" ) +server.modules += ( "mod_alias" ) +server.modules += ( "mod_compress" ) +server.modules += ( "mod_fastcgi" ) +server.modules += ( "mod_access" ) +server.modules += ( "mod_accesslog" ) + +auth.debug = 2 +auth.backend = "plain" +auth.backend.plain.userfile = "/etc/lighttpd/authorization" +auth.require = ( "/" => +( +"method" => "basic", +"realm" => "Password protected area", +"require" => "valid-user" +) +) + +fastcgi.server = ( ".php" => (( +"bin-path" => "/usr/bin/php-cgi", +"socket" => "/tmp/php.socket" +))) + +cgi.assign = ( ".php" => "/usr/bin/php" ) + +compress.cache-dir = "/var/cache/lighttpd/compress/" +compress.filetype = ("application/x-javascript", "text/css", "text/html", "text/plain") diff --git a/ric_robot_suite/eteshare/config/integration_robot_properties.py b/ric_robot_suite/eteshare/config/integration_robot_properties.py new file mode 100644 index 0000000..284a98a --- /dev/null +++ b/ric_robot_suite/eteshare/config/integration_robot_properties.py @@ -0,0 +1,25 @@ +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# APPMGR +# http:88 is for testing only +GLOBAL_APPMGR_SERVER_PROTOCOL="http" +GLOBAL_APPMGR_SERVER_PORT="88" +# E2MGR +# http:88 is for testing only +GLOBAL_E2MGR_SERVER_PROTOCOL="http" +GLOBAL_E2MGR_SERVER_PORT="88" +#global selenium info +GLOBAL_PROXY_WARNING_TITLE="" +GLOBAL_PROXY_WARNING_CONTINUE_XPATH="" diff --git a/ric_robot_suite/eteshare/config/vm_properties.py b/ric_robot_suite/eteshare/config/vm_properties.py new file mode 100644 index 0000000..609efa5 --- /dev/null +++ b/ric_robot_suite/eteshare/config/vm_properties.py @@ -0,0 +1,31 @@ +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# File generated from /opt/config +# +GLOBAL_INJECTED_APPMGR_IP_ADDR = "127.0.0.1" +GLOBAL_INJECTED_APPMGR_USER= "test" +GLOBAL_INJECTED_APPMGR_PASSWORD= "test" +GLOBAL_INJECTED_E2MGR_IP_ADDR = "127.0.0.1" +GLOBAL_INJECTED_E2MGR_USER= "test" +GLOBAL_INJECTED_E2MGR_PASSWORD= "test" + +GLOBAL_INJECTED_PROPERTIES = { + "GLOBAL_INJECTED_APPMGR_IP_ADDR" : "127.0.0.1", + "GLOBAL_INJECTED_APPMGR_USER" : "test", + "GLOBAL_INJECTED_APPMGR_PASSWORD" : "test", + "GLOBAL_INJECTED_E2MGR_IP_ADDR" : "127.0.0.1", + "GLOBAL_INJECTED_E2MGR_USER" : "test", + "GLOBAL_INJECTED_E2MGR_PASSWORD" : "test", +} diff --git a/ric_robot_suite/eteshare/health/index.php b/ric_robot_suite/eteshare/health/index.php new file mode 100755 index 0000000..203aa3b --- /dev/null +++ b/ric_robot_suite/eteshare/health/index.php @@ -0,0 +1,42 @@ + 'ok' ] ; + echo json_encode( $data ); +} + +function handle_error() { + echo "Method not found"; +} + +?> diff --git a/ric_robot_suite/eteshare/nodeb/setup/index.php b/ric_robot_suite/eteshare/nodeb/setup/index.php new file mode 100755 index 0000000..7bc87ef --- /dev/null +++ b/ric_robot_suite/eteshare/nodeb/setup/index.php @@ -0,0 +1,52 @@ + 'nodeB1', 'ranPort' => '879', 'ranIp' => '10.0.0.3' ]; + echo json_encode( $data ); +} +function do_something_with_post() { + $data = [ 'ranName' => 'nodeB1', 'ranPort' => '879', 'ranIp' => '10.0.0.3' ]; + echo json_encode( $data ); +} + +function handle_error() { + echo "Method not found"; +} + +?> diff --git a/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/101/index.php b/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/101/index.php new file mode 100755 index 0000000..ad8e7e3 --- /dev/null +++ b/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/101/index.php @@ -0,0 +1,45 @@ + 'DemoXapp1', 'status' => 'started', 'version' => '1.2.3', + 'instances' => [ 'name' => 'DemoXapp1', 'id' => 101, 'status' => 'started' , + 'ip' => '192.168.0.1', 'port' => 23300 , 'txMessages' => [ 'ControlIndication' ], + 'rxMessages' => [ 'LoadIndication' ] ] ]; + echo json_encode( $data ); +} + +function handle_error() { + echo "Method not found"; +} + +?> diff --git a/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/index.php b/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/index.php new file mode 100755 index 0000000..ad8e7e3 --- /dev/null +++ b/ric_robot_suite/eteshare/ric/v1/xapps/DemoXapp1/index.php @@ -0,0 +1,45 @@ + 'DemoXapp1', 'status' => 'started', 'version' => '1.2.3', + 'instances' => [ 'name' => 'DemoXapp1', 'id' => 101, 'status' => 'started' , + 'ip' => '192.168.0.1', 'port' => 23300 , 'txMessages' => [ 'ControlIndication' ], + 'rxMessages' => [ 'LoadIndication' ] ] ]; + echo json_encode( $data ); +} + +function handle_error() { + echo "Method not found"; +} + +?> diff --git a/ric_robot_suite/eteshare/ric/v1/xapps/index.php b/ric_robot_suite/eteshare/ric/v1/xapps/index.php new file mode 100755 index 0000000..0d48a4b --- /dev/null +++ b/ric_robot_suite/eteshare/ric/v1/xapps/index.php @@ -0,0 +1,58 @@ + 'xapp-dummy', 'status' => 'started', 'version' => '1.2.3', + 'instances' => [ 'name' => 'xapp-dummy', 'id' => 1234, 'status' => 'started' , + 'ip' => '192.168.0.1', 'port' => 23300 , 'txMessages' => [ 'ControlIndication' ], + 'rxMessages' => [ 'LoadIndication' ] ] ]; + echo json_encode( $data ); +} +function do_something_with_post() { + $data = [ 'name' => 'xapp-dummy', 'status' => 'started', 'version' => '1.2.3', + 'instances' => [ 'name' => 'xapp-dummy', 'id' => 1234, 'status' => 'started' , + 'ip' => '192.168.0.1', 'port' => 23300 , 'txMessages' => [ 'ControlIndication' ], + 'rxMessages' => [ 'LoadIndication' ] ] ]; + echo json_encode( $data ); +} + +function handle_error() { + echo "Method not found"; +} + +?> diff --git a/ric_robot_suite/helm/README.md b/ric_robot_suite/helm/README.md new file mode 100644 index 0000000..0a9787c --- /dev/null +++ b/ric_robot_suite/helm/README.md @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +# +# the test repo needs to be on the same parent path as the dep repo +# simply run robot_install.sh with an optional override file from this directory +# +# replace the dashboard ip and port in values.yaml or set the values in the override file +# from the r1-kong-platform-kong-proxy +# dashboardExternalIp: REPLACE_WITH_EXTERNAL_K8_IP_OF_DASHBOARD +# dashboardExternalPort: REPLACE_WITH_NODEPORT_OF_DASHBOARD +# +# ./robot_install.sh /root/dep/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE +# +# remember to run the init_robot tag to complete robot setup +# cd ric-robot +# ./demo-k8s.sh ricplt init_robot diff --git a/ric_robot_suite/helm/nanobot/.helmignore b/ric_robot_suite/helm/nanobot/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/ric_robot_suite/helm/nanobot/Chart.yaml b/ric_robot_suite/helm/nanobot/Chart.yaml new file mode 100644 index 0000000..e5ad450 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A minimal container for running RIC robot testsuites +name: nanobot +version: 0.1.0 diff --git a/ric_robot_suite/helm/nanobot/README b/ric_robot_suite/helm/nanobot/README new file mode 100644 index 0000000..693fced --- /dev/null +++ b/ric_robot_suite/helm/nanobot/README @@ -0,0 +1,32 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +This directory contains a Helm chart for the minimal robot container +and Kubernetes job. + +The job mounts its testsuites directory as a configmap, built from +files in nanobot/configmap-src/testsuites. Template expansion is +performed on files in that directory. + +To install the chart, edit values.yaml to reflect your environment +and desired tests and run + +$ helm install --namespace nanobot + +The namespace selected will be where the job's service account is +created and the job runs. It may but need not be the same as the RIC +platform or xapp namespace. + + diff --git a/ric_robot_suite/helm/nanobot/configmap-src/bin/svcacct-to-kubeconfig.sh b/ric_robot_suite/helm/nanobot/configmap-src/bin/svcacct-to-kubeconfig.sh new file mode 100755 index 0000000..a4edce0 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/bin/svcacct-to-kubeconfig.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# generate a kubconfig (at ${KUBECONFIG} file from the automatically-mounted +# service account token. +# ENVIRONMENT: +# SVCACCT_NAME: the name of the service account user. default "default" +# CLUSTER_NAME: the name of the kubernetes cluster. default "kubernetes" +# KUBECONFIG: where the generated file will be deposited. +SVCACCT_TOKEN=`cat /var/run/secrets/kubernetes.io/serviceaccount/token` +CLUSTER_CA=`base64 /var/run/secrets/kubernetes.io/serviceaccount/ca.crt|tr -d '\n'` + +cat >${KUBECONFIG} <<__EOF__ +ApiVersion: v1 +kind: Config +users: +- name: ${SVCACCT_NAME:-default} + user: + token: ${SVCACCT_TOKEN} +clusters: +- cluster: + certificate-authority-data: ${CLUSTER_CA} + server: https://${K8S_API_HOST:-kubernetes.default.svc.cluster.local}/ + name: ${CLUSTER_NAME:-kubernetes} +contexts: +- context: + cluster: ${CLUSTER_NAME:-kubernetes} + user: ${SVCACCT_NAME:-default} + name: svcs-acct-context +current-context: svcs-acct-context +__EOF__ diff --git a/ric_robot_suite/helm/nanobot/configmap-src/properties/global_properties.robot b/ric_robot_suite/helm/nanobot/configmap-src/properties/global_properties.robot new file mode 100644 index 0000000..a2e6239 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/properties/global_properties.robot @@ -0,0 +1,41 @@ +{{- $ns := default "ricplt" .Values.ric.platform.namespace }} +{{- $release := default "r0" .Values.ric.platform.releaseName }} +{{- $domain := default "cluster.local" .Values.ric.cluster.domain }} +{{- $hostPrefix := printf "service-%s" $ns }} +{{- $hostSuffix := printf "%s.svc.%s" $ns $domain }} +{{- $appmgrHost := printf "%s-appmgr-http.%s" $hostPrefix $hostSuffix }} +{{- $e2mgrHost := printf "%s-e2mgr-http.%s" $hostPrefix $hostSuffix }} +{{- $rtmgrHost := printf "%s-rtmgr-rmr.%s" $hostPrefix $hostSuffix }} +{{- $dbaasHost := printf "%s-dbaas-tcp.%s" $hostPrefix $hostSuffix }} +{{- $a1MediatorHost := printf "%s-a1mediator-http.%s" $hostPrefix $hostSuffix }} + +*** Settings *** +Documentation store all properties that can change or are used in multiple places here +... format is all caps with underscores between words and prepended with GLOBAL +... make sure you prepend them with GLOBAL so that other files can easily see it is from this file. + + +*** Variables *** +${GLOBAL_APPLICATION_ID} {{- printf "nanobot-%s" $release | indent 4}} +${GLOBAL_BUILD_NUMBER} {{- default "0" .Values.ric.platform.build | indent 4 }} +# +${GLOBAL_APPMGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.appmgr.protocol | indent 4 }} +${GLOBAL_INJECTED_APPMGR_IP_ADDR} {{- default $appmgrHost .Values.ric.platform.components.appmgr.address | indent 4 }} +${GLOBAL_APPMGR_SERVER_PORT} {{- default "8080" .Values.ric.platform.components.appmgr.port | indent 4 }} +${GLOBAL_INJECTED_APPMGR_USER} {{- .Values.ric.platform.components.appmgr.user | indent 4 }} +${GLOBAL_INJECTED_APPMGR_PASSWORD} {{- .Values.ric.platform.components.appmgr.password | indent 4 }} +# +${GLOBAL_E2MGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.e2mgr.protocol | indent 4 }} +${GLOBAL_INJECTED_E2MGR_IP_ADDR} {{- default $e2mgrHost .Values.ric.platform.components.e2mgr.address | indent 4 }} +${GLOBAL_E2MGR_SERVER_PORT} {{- default "3800" .Values.ric.platform.components.e2mgr.port | indent 4 }} +${GLOBAL_INJECTED_E2MGR_USER} {{- .Values.ric.platform.components.e2mgr.user | indent 4 }} +${GLOBAL_INJECTED_E2MGR_PASSWORD} {{- .Values.ric.platform.components.e2mgr.password | indent 4 }} +# +${GLOBAL_RTMGR_SERVER_PROTOCOL} {{- default "http" .Values.ric.platform.components.rtmgr.protocol | indent 4 }} +${GLOBAL_INJECTED_RTMGR_IP_ADDR} {{- default $rtmgrHost .Values.ric.platform.components.rtmgr.address | indent 4 }} +${GLOBAL_RTMGR_SERVER_PORT} {{- default "5656" .Values.ric.platform.components.rtmgr.port | indent 4 }} +${GLOBAL_INJECTED_RTMGR_USER} {{- .Values.ric.platform.components.rtmgr.user | indent 4 }} +${GLOBAL_INJECTED_RTMGR_PASSWORD} {{- .Values.ric.platform.components.rtmgr.password | indent 4 }} +# +${GLOBAL_INJECTED_DBAAS_IP_ADDR} {{- default $dbaasHost .Values.ric.platform.components.dbaas.address | indent 4 }} +${GLOBAL_DBAAS_SERVER_PORT} {{- default "6379" .Values.ric.platform.components.dbaas.port | indent 4 }} diff --git a/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ete.robot b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ete.robot new file mode 100644 index 0000000..adf459a --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ete.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Executes the End To End Test cases +... +Library Collections +#Library HTTPUtils +Resource ../resources/appmgr/appmgr_interface.robot +Resource ../resources/e2mgr/e2mgr_interface.robot + +*** Variables *** +${TEST_XAPPNAME} DemoXapp1 +${TEST_XAPPID} 101 +${TEST_NODE_B_NAME} nodeB1 +${TEST_NODE_B_IP} 10.0.0.3 +${TEST_NODE_B_PORT} 879 + + +*** Test Cases *** +Get All Xapps + [Tags] etetests xapptests + Run AppMgr Get All Request +Create Xapp + [Tags] etetests xapptests + Run Create Xapp ${TEST_XAPPNAME} ${TEST_XAPPID} +Get Xapp By Name + [Tags] etetests xapptests + Run AppMgr Get By XappName ${TEST_XAPPNAME} +Get Xapp By Name and Id + [Tags] etetests xapptests + Run AppMgr Get By XappName and XappId ${TEST_XAPPNAME} ${TEST_XAPPID} +Setup RAN Via E2 Mgr + [Tags] etetests e2mgrtests + Run E2Mgr Setup NodeB ${TEST_NODE_B_NAME} ${TEST_NODE_B_IP} ${TEST_NODE_B_PORT} + diff --git a/ric_robot_suite/helm/nanobot/configmap-src/testsuites/health-check.robot b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/health-check.robot new file mode 100644 index 0000000..a8faacf --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/health-check.robot @@ -0,0 +1,20 @@ +*** Settings *** +Documentation Testing RIC components are available via calls. +... +... Testing RIC components are available via calls. +Test Timeout 10 second +Resource ../resources/appmgr/appmgr_interface.robot +Resource ../resources/e2mgr/e2mgr_interface.robot +Resource ../resources/rtmgr/rtmgr_interface.robot + +*** Test Cases *** +Basic AppMgr Health Check + [Tags] health + Run AppMgr Health Check +Basic E2Mgr Health Check + [Tags] health + Run E2Mgr Health Check +Basic RtMgr Health Check + [Tags] health + Run RtMgr Health Check + diff --git a/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ricdeployment.robot b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ricdeployment.robot new file mode 100644 index 0000000..9b96dec --- /dev/null +++ b/ric_robot_suite/helm/nanobot/configmap-src/testsuites/ricdeployment.robot @@ -0,0 +1,48 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +Documentation Tests for the existence and functionality of RIC components + +Library KubernetesEntity ${NAMESPACE} +Library Collections +Library String + +# Resource ../resources/appmgr/appmgr_interface.robot +# Resource ../resources/e2mgr/e2mgr_interface.robot + +*** Variables *** +${NAMESPACE} %{RICPLT_NAMESPACE} +${PFX} %{RICPLT_RELEASE_NAME} + +*** Test Cases *** +Deployments + [Tags] etetests k8stests + @{Components} = Split String %{RICPLT_COMPONENTS} + :FOR ${Component} IN @{Components} + \ Log Retrieving Deployment for ${Component} + \ ${deploy} = Deployment ${PFX}-${Component} + \ ${status} = Most Recent Availability Condition @{deploy.status.conditions} + \ Should Be Equal As Strings ${status} True ignore_case=True msg=${Component} is not available + +*** Keywords *** +Most Recent Availability Condition + # this makes the probably-unsafe assumption that the conditions are ordered + # temporally. + [Arguments] @{Conditions} + ${status} = Set Variable 'False' + :FOR ${Condition} IN @{Conditions} + \ ${status} = Set Variable If '${Condition.type}' == 'Available' ${Condition.status} ${status} + [Return] ${status} diff --git a/ric_robot_suite/helm/nanobot/templates/configmap-robot-bin.yaml b/ric_robot_suite/helm/nanobot/templates/configmap-robot-bin.yaml new file mode 100644 index 0000000..a6c4490 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/templates/configmap-robot-bin.yaml @@ -0,0 +1,23 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: robot-bin + namespace: {{ .Release.Namespace }} +data: + {{ (.Files.Glob "configmap-src/bin/*").AsConfig | nindent 2 }} diff --git a/ric_robot_suite/helm/nanobot/templates/configmap-robot-properties.yaml b/ric_robot_suite/helm/nanobot/templates/configmap-robot-properties.yaml new file mode 100644 index 0000000..176ba76 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/templates/configmap-robot-properties.yaml @@ -0,0 +1,23 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: robot-properties + namespace: {{ .Release.Namespace }} +data: + {{ (tpl (.Files.Glob "configmap-src/properties/*.robot").AsConfig . ) | nindent 2 }} diff --git a/ric_robot_suite/helm/nanobot/templates/configmap-robot-testsuites.yaml b/ric_robot_suite/helm/nanobot/templates/configmap-robot-testsuites.yaml new file mode 100644 index 0000000..5c2eeaa --- /dev/null +++ b/ric_robot_suite/helm/nanobot/templates/configmap-robot-testsuites.yaml @@ -0,0 +1,23 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: robot-testsuites + namespace: {{ .Release.Namespace }} +data: + {{ (tpl (.Files.Glob "configmap-src/testsuites/*.robot").AsConfig . ) | nindent 2 }} diff --git a/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml b/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml new file mode 100644 index 0000000..b1be7c7 --- /dev/null +++ b/ric_robot_suite/helm/nanobot/templates/job-ric-robot-run.yaml @@ -0,0 +1,220 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +{{- $platformNamespace := default .Release.Namespace .Values.ric.platform.namespace }} +{{- $xappNamespace := default $platformNamespace .Values.ric.xapp.namespace }} +{{- $releaseName := default "ric-full" .Values.ric.platform.releaseName }} +{{- $jobName := printf "%s-%s" .Release.Name $releaseName }} +{{- $acctName := randAlpha 6 | lower | printf "%s-%s" $jobName }} +{{- $serviceAccountName := default $acctName .Values.ric.robot.job.serviceAccount.name }} +{{- if .Values.ric.robot.job.serviceAccount.create }} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ $serviceAccountName }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: {{ $serviceAccountName }}-{{ $releaseName }}-ricplatform-access + namespace: {{ $platformNamespace }} +rules: +- apiGroups: [""] + resources: ["pods", "services"] + verbs: ["get", "list"] +- apiGroups: ["apps"] + resources: ["daemonsets", "replicasets", "statefulsets"] + verbs: ["get", "list"] +- apiGroups: ["extensions"] + resources: ["daemonsets", "replicasets"] + verbs: ["get", "list"] +- apiGroups: ["apps"] + resources: ["deployments"] + verbs: ["get", "list", "patch"] +- apiGroups: ["extensions"] + resources: ["deployments"] + verbs: ["get", "list", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ $serviceAccountName }}-{{ $releaseName }}-ricplatform-access + namespace: {{ $platformNamespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ $serviceAccountName }}-{{ $releaseName }}-ricplatform-access +subjects: + - kind: ServiceAccount + name: {{ $serviceAccountName }} + namespace: {{ .Release.Namespace }} +{{- if ne $xappNamespace $platformNamespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: {{ $serviceAccountName }}-{{ $releaseName }}-xapp-access + namespace: {{ $xappNamespace }} +rules: +- apiGroups: [""] + resources: ["pods", "services"] + verbs: ["get", "list"] +- apiGroups: ["apps"] + resources: ["deployments", "daemonsets", "replicasets", "statefulsets"] + verbs: ["get", "list"] +- apiGroups: ["extensions"] + resources: ["deployments", "daemonsets", "replicasets"] + verbs: ["get", "list"] +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ $serviceAccountName }}-{{ $releaseName }}-xapp-access + namespace: {{ $xappNamespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ $serviceAccountName }}-{{ $releaseName }}-xapp-access +subjects: + - kind: ServiceAccount + name: {{ $serviceAccountName }} + namespace: {{ .Release.Namespace }} +{{- end }} +{{- end }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $jobName }}-ric-robot-run + namespace: {{ .Release.Namespace }} +spec: + template: + spec: + serviceAccountName: {{ $serviceAccountName }} + restartPolicy: Never + initContainers: + - name: {{ $jobName }}-generate-robot-kubeconfig + {{ with .Values.images.ric.robot.job.init }} + image: {{ if .repository }}{{- .repository -}} / {{- end -}}{{- .name -}}{{- if .tag -}} : {{- .tag -}} {{- end }} + imagePullPolicy: {{ default "IfNotPresent" .pullPolicy }} + {{- end }} + env: + - name: SVCACCT_NAME + value: {{ $serviceAccountName }} + - name: CLUSTER_NAME + value: {{ default "kubernetes" .Values.ric.cluster.name }} + - name: KUBECONFIG + value: /robot/etc/ric-robot-kubeconfig.conf + - name: K8S_API_HOST + value: "kubernetes.default.svc.{{ default "cluster.local" .Values.ric.cluster.domain }}" + command: ["/robot/bin/svcacct-to-kubeconfig.sh"] + volumeMounts: + - name: robot-etc + mountPath: /robot/etc + readOnly: false + - name: robot-log + mountPath: /robot/log + readOnly: false + - name: robot-bin + mountPath: /robot/bin + readOnly: true + {{- $secrets := dict }} + {{- range $index, $container := .Values.images.ric.robot.job }} + {{- if index $container "repositoryCred" }} + {{- $_ := set $secrets $container.repositoryCred (dict "name" $container.repositoryCred) }} + {{- end }} + {{- end }} + {{- if keys $secrets }} + imagePullSecrets: + {{- values $secrets | toYaml |nindent 8 }} + {{- end }} + containers: + - name: {{ $jobName }}-ric-robot + {{ with .Values.images.ric.robot.job.run -}} + image: {{ if .repository }}{{- .repository -}} / {{- end -}}{{- .name -}}{{- if .tag -}} : {{- .tag -}} {{- end }} + imagePullPolicy: {{ default "IfNotPresent" .pullPolicy }} + {{- end }} + env: + - name: RICPLT_NAMESPACE + value: {{ $platformNamespace }} + - name: RICPLT_RELEASE_NAME + value: {{ $releaseName }} + - name: RICPLT_COMPONENTS + value: {{ keys .Values.ric.platform.components | join " " }} + - name: RICXAPP_NAMESPACE + value: {{ $xappNamespace }} + - name: KUBECONFIG + value: /robot/etc/ric-robot-kubeconfig.conf + command: ["robot"] + args: + - "-T" + {{- if not .Values.ric.robot.job.failOnTestFail }} + - "--NoStatusRC" + {{- end }} + - "-d" + - "/robot/log" + - "--console" + - "verbose" + - "-C" + - "off" + {{- if .Values.ric.robot.tags }} + {{- range .Values.ric.robot.tags }} + - "-i" + - "{{.}}" + {{- end }} + {{- end }} + {{- if .Values.ric.robot.testsuites }} + {{- range .Values.ric.robot.testsuites }} + - "/robot/testsuites/{{.}}.robot" + {{- end }} + {{- else }} + - "/robot/testsuites" + {{- end }} + volumeMounts: + - name: robot-testsuites + mountPath: /robot/testsuites + readOnly: true + - name: robot-etc + mountPath: /robot/etc + readOnly: true + - name: robot-log + mountPath: /robot/log + readOnly: false + - name: robot-properties + mountPath: /robot/resources/global_properties.robot + subPath: global_properties.robot + readOnly: true + volumes: + - name: robot-etc + emptyDir: {} + - name: robot-log + hostPath: + path: {{ default "/opt/ric/robot/log" .Values.ric.robot.log }} + type: DirectoryOrCreate + - name: robot-bin + configMap: + name: robot-bin + defaultMode: 0755 + - name: robot-testsuites + configMap: + name: robot-testsuites + defaultMode: 0644 + - name: robot-properties + configMap: + name: robot-properties + defaultMode: 0644 diff --git a/ric_robot_suite/helm/nanobot/values.yaml b/ric_robot_suite/helm/nanobot/values.yaml new file mode 100644 index 0000000..256f17c --- /dev/null +++ b/ric_robot_suite/helm/nanobot/values.yaml @@ -0,0 +1,97 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +images: + ric: + robot: + job: + init: + name: alpine + # tag: latest + run: + repository: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001 + name: test/nanobot + tag: latest + # note: the helm chart does not create repository credential secrets. + # If your repository requires authentication, create a docker-registry + # secret with + # + # kubectl create secret docker-registry --namespace ... + # + # and fill in secret-name below. Only one secret should be created per + # registry. The chart will take care of producing a unique list of + # imagePullSecrets. + repositoryCred: azure-secret +ric: + cluster: + # The kubernetes cluster name. To find this, do: + # $ grep cluster: ${KUBECONFIG} + name: kubernetes + # the DNS domain for k8s services, typically "cluster.local" + domain: cluster.local + platform: + # RIC installation details. The values + # for these can typically be found in + # the ricplt/ric_env.sh file from the ric + # platform source tree + namespace: ricplt + releaseName: r0 + components: + appmgr: + user: test + password: test + rtmgr: + user: test + password: test + dbaas: + port: "6379" + e2mgr: + user: test + password: test + e2term: + xapp: + namespace: ricxapp + robot: + # + # host filesystem path where robot + # output will be stored + log: /opt/ric/robot/log + # + # Active testsuites can be chosen by + # tag, testuite names, or both. leaving + # either unspecified will cause all to run. + testsuites: + # - ricdeployment + # - healthcheck + tags: + # - etetests + # - k8stests + # + job: + # set this to a true value to cause + # the job to fail (and, typically, be resubmitted) + # when tests fail + failOnTestFail: false + serviceAccount: + # by default, the job will create + # a temporary serviceaccount and + # role to allow it to access the + # xapp and platform namespaces. + # to use an existing serviceaccount, + # set this to false... + create: true + # ... and specify the serviceaccount here: + # name: nanobot + \ No newline at end of file diff --git a/ric_robot_suite/helm/ric-robot/Chart.yaml b/ric_robot_suite/helm/ric-robot/Chart.yaml new file mode 100644 index 0000000..580b041 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/Chart.yaml @@ -0,0 +1,22 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ric-robot +version: 0.1.0 diff --git a/ric_robot_suite/helm/ric-robot/demo-k8s.sh b/ric_robot_suite/helm/ric-robot/demo-k8s.sh new file mode 100755 index 0000000..ae3ae62 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/demo-k8s.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +function usage +{ + echo "Usage: demo.sh namespace []" + echo " " + echo " demo.sh init_robot" + echo " - Initialize robot after all RIC VMs have started" +} + + + +# Set the defaults + +echo "Number of parameters:" +echo $# + +if [ $# -lt 2 ];then + usage + exit +fi + +NAMESPACE=$1 +POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) + +shift + +## +## if more than 1 tag is supplied, the must be provided with -i or -e +## +while [ $# -gt 0 ] +do + key="$1" + echo "KEY:" + echo $key + + case $key in + init_robot) + TAG="UpdateWebPage" + read -s -p "WEB Site Password for user 'test': " WEB_PASSWORD + if [ "$WEB_PASSWORD" = "" ]; then + echo "" + echo "WEB Password is required for user 'test'" + exit + fi + VARIABLES="$VARIABLES -v WEB_PASSWORD:$WEB_PASSWORD" + shift + if [ $# -eq 2 ];then + VARIABLES="$VARIABLES -v HOSTS_PREFIX:$1" + fi + # copy the .kube/config into the robot container + kubectl -n $NAMESPACE cp /root/.kube/config $POD:/root/.kube/config + shift + ;; + *) + usage + exit + esac +done + +set -x + + +ETEHOME=/var/opt/RIC + +export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l") +OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_demo_$key +DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py" + +kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} -i ${TAG} --display $DISPLAY_NUM 2> ${TAG}.out + diff --git a/ric_robot_suite/helm/ric-robot/ete-k8s.e2sim.sh b/ric_robot_suite/helm/ric-robot/ete-k8s.e2sim.sh new file mode 100755 index 0000000..4f947fb --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/ete-k8s.e2sim.sh @@ -0,0 +1,172 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +# +# Run the testsuite for the passed tag. Valid tags are health +# Please clean up logs when you are done... +# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide +# +if [ "$1" == "" ] || [ "$2" == "" ]; then + echo "Usage: ete-k8s.sh [input variable]" + echo " [input variable] is added to runTags with "-v" prepended" + echo " example : TEST_NODE_B_IP:10.240.0.217 " + echo " example : \"TEST_NODE_B_IP:10.240.0.217 -v TEST_NODE_B_PORT:34622 -v TEST_NODE_B_NAME:BBBB654321\"" + echo " note: TEST_NODE_B_NAME is 4 upper case letters and then 6 numbers in Dashboard validation " + echo " " + echo " " + echo " health " + echo " etetests " + echo " e2setup " + echo " x2setup " + echo " e2setup_dash " + echo " x2setup_dash " + exit +fi + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +#/root/test/ric_robot_suite/helm +# extract the base to find root to dep + +BASE=${DIR%/test*} + +BASEDIR50=$BASE/dep/ric-platform/50-RIC-Platform/ +OVERRIDEYAML=$BASE/dep/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE + +echo "Using etc/ric.conf from $BASEDIR50" + +source $BASEDIR50/etc/ric.conf + + +if [ -z "$RICPLT_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICPLT_RELEASE_NAME +fi + + + +# first parameter: number of expected running pods +# second parameter: namespace (all-namespaces means all namespaces) +# third parameter: [optional] keyword +wait_for_pods_running () { + NS="$2" + CMD="kubectl get pods --all-namespaces " + if [ "$NS" != "all-namespaces" ]; then + CMD="kubectl get pods -n $2 " + fi + KEYWORD="Running" + if [ "$#" == "3" ]; then + KEYWORD="${3}.*Running" + fi + + CMD2="$CMD | grep \"$KEYWORD\" | wc -l" + NUMPODS=$(eval "$CMD2") + echo "waiting for $NUMPODS/$1 pods running in namespace [$NS] with keyword [$KEYWORD]" + while [ $NUMPODS -lt $1 ]; do + sleep 5 + NUMPODS=$(eval "$CMD2") + echo "> waiting for $NUMPODS/$1 pods running in namespace [$NS] with keyword [$KEYWORD]" + done +} + +wait_for_pods_terminated() { + NS="$2" + CMD="kubectl get pods --all-namespaces " + if [ "$NS" != "all-namespaces" ]; then + CMD="kubectl get pods -n $2 " + fi + KEYWORD="Running" + if [ "$#" == "3" ]; then + KEYWORD="${3}" + fi + + CMD2="$CMD | grep \"$KEYWORD\" | wc -l" + NUMPODS=$(eval "$CMD2") + echo "waiting for $NUMPODS/$1 pods terminated (gone) in namespace [$NS] with keyword [$KEYWORD]" + while [ $NUMPODS -gt $1 ]; do + sleep 5 + NUMPODS=$(eval "$CMD2") + echo "> waiting for $NUMPODS/$1 pods terminated (gone) in namespace [$NS] with keyword [$KEYWORD]" + done +} + + +if [ "$3" != "" ] ; then + VARIABLES="-v $3" +fi + +set -x + +export NAMESPACE="$1" + +POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) + +TAG="$2" +TAGS="-i $2" + + +# if $2 is e2setup or x2setup then helm delete/helm install +shift +while [ $# -gt 0 ] +do + key="$1" + echo "KEY:" + echo $key + case $key in + e2setup|e2setup_dash|x2setup|x2setup_dash) + #/root/dep/ric-platform/50-RIC-Platform/bin/harry-uninstall + helm delete ${RELEASE_NAME}-e2term --purge + helm delete ${RELEASE_NAME}-e2mgr --purge + helm delete ${RELEASE_NAME}-e2sim --purge + wait_for_pods_terminated 0 $NAMESPACE e2sim + wait_for_pods_terminated 0 $NAMESPACE e2term + wait_for_pods_terminated 0 $NAMESPACE e2mgr + helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-e2term" $BASEDIR50/helm/e2term + helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-e2mgr" $BASEDIR50/helm/e2mgr + cd /root/test/simulators/e2sim/helm + ./e2sim_install.sh + wait_for_pods_running 1 $NAMESPACE e2term + wait_for_pods_running 1 $NAMESPACE e2mgr + wait_for_pods_running 1 $NAMESPACE e2sim + E2SIMIP=$(kubectl -n ricplt get pod -o=wide | grep e2sim | sed 's/\s\s*/ /g' | cut -d ' ' -f6) + echo $E2SIMIP + VARIABLES="$VARIABLES -v TEST_NODE_B_IP:$E2SIMIP" + shift + ;; + *) + shift + ;; + esac +done + + +ETEHOME=/var/opt/RIC +export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l") +OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$TAG +DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py" +#VARIABLEFILES="-V /tmp/vm_properties.py -V /share/config/integration_robot_properties.py" +VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$" + + + +kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM diff --git a/ric_robot_suite/helm/ric-robot/ete-k8s.sh b/ric_robot_suite/helm/ric-robot/ete-k8s.sh new file mode 100755 index 0000000..c80d38b --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/ete-k8s.sh @@ -0,0 +1,65 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +# +# Run the testsuite for the passed tag. Valid tags are health +# Please clean up logs when you are done... +# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide +# +if [ "$1" == "" ] || [ "$2" == "" ]; then + echo "Usage: ete-k8s.sh [input variable]" + echo " : health etetests e2mgrtests" + echo " [input variable] is added to runTags with "-v" prepended" + echo " example : TEST_NODE_B_IP:10.240.0.217 " + echo " example : \"TEST_NODE_B_IP:10.240.0.217 -v TEST_NODE_B_PORT:34622 -v TEST_NODE_B_NAME:AAAA123456\"" + echo " note: TEST_NODE_B_NAME is 4 upper case letters and then 6 numbers in Dashboard validation " + echo " " + echo " " + echo " health " + echo " etetests " + echo " e2setup " + echo " x2setup " + echo " e2setup_dash " + echo " x2setup_dash " + exit +fi + + +if [ "$3" != "" ] ; then + VARIABLES="-v $3" +fi + +set -x + +export NAMESPACE="$1" + +POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) + + +TAGS="-i $2" + +ETEHOME=/var/opt/RIC +export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l") +OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$2 +DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90)) + +VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py" +VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$" + +kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM diff --git a/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/integration_robot_properties.py b/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/integration_robot_properties.py new file mode 100644 index 0000000..42a9287 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/integration_robot_properties.py @@ -0,0 +1,33 @@ +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# APPMGR +# http:88 is for testing only +GLOBAL_APPMGR_SERVER_PROTOCOL="http" +GLOBAL_APPMGR_SERVER_PORT="8080" +#GLOBAL_APPMGR_SERVER_PORT="80" +# E2MGR +# http:88 is for testing only +GLOBAL_E2MGR_SERVER_PROTOCOL="http" +GLOBAL_E2MGR_SERVER_PORT="3800" +#GLOBAL_E2MGR_SERVER_PORT="80" +# RTMGR +GLOBAL_RTMGR_SERVER_PROTOCOL="http" +GLOBAL_RTMGR_SERVER_PORT="5656" +# DASHBOARD +GLOBAL_DASH_SERVER_PROTOCOL="http" +GLOBAL_DASH_SERVER_PORT="{{ .Values.config.dashboardExternalPort }}" +#global selenium info +GLOBAL_PROXY_WARNING_TITLE="" +GLOBAL_PROXY_WARNING_CONTINUE_XPATH="" diff --git a/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/vm_properties.py b/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/vm_properties.py new file mode 100644 index 0000000..a011b85 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/resources/config/eteshare/config/vm_properties.py @@ -0,0 +1,49 @@ +# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# File generated from /opt/config +# + + +GLOBAL_INJECTED_APPMGR_IP_ADDR = "service-{{ .Release.Namespace }}-appmgr-http.{{ .Release.Namespace }}" +GLOBAL_INJECTED_APPMGR_USER = "test" +GLOBAL_INJECTED_APPMGR_PASSWORD = "test" + +GLOBAL_INJECTED_DASH_IP_ADDR = "{{ .Values.config.dashboardExternalIp }}" +GLOBAL_INJECTED_DASH_USER = "test" +GLOBAL_INJECTED_DASH_PASSWORD = "test" + +GLOBAL_INJECTED_E2MGR_IP_ADDR = "service-{{ .Release.Namespace }}-e2mgr-http.{{ .Release.Namespace }}" +GLOBAL_INJECTED_E2MGR_USER = "test" +GLOBAL_INJECTED_E2MGR_PASSWORD = "test" + +GLOBAL_INJECTED_RTMGR_IP_ADDR = "service-{{ .Release.Namespace }}-rtmgr-http.{{ .Release.Namespace }}" +GLOBAL_INJECTED_RTMGR_USER = "test" +GLOBAL_INJECTED_RTMGR_PASSWORD = "test" + +GLOBAL_INJECTED_PROPERTIES = { + "GLOBAL_INJECTED_APPMGR_IP_ADDR" : "service-{{ .Release.Namespace }}-appmgr-http.{{ .Release.Namespace }}", + "GLOBAL_INJECTED_APPMGR_USER" : "test", + "GLOBAL_INJECTED_APPMGR_PASSWORD" : "test", + "GLOBAL_INJECTED_DASH_IP_ADDR" : "{{ .Values.config.dashboardExternalIp }}", + "GLOBAL_INJECTED_DASH_USER" : "test", + "GLOBAL_INJECTED_DASH_PASSWORD" : "test", + "GLOBAL_INJECTED_E2MGR_IP_ADDR" : "service-{{ .Release.Namespace }}-e2mgr-http.{{ .Release.Namespace }}", + "GLOBAL_INJECTED_E2MGR_USER" : "test", + "GLOBAL_INJECTED_E2MGR_PASSWORD" : "test", + "GLOBAL_INJECTED_RTMGR_IP_ADDR" : "service-{{ .Release.Namespace }}-rtmgr-http.{{ .Release.Namespace }}", + "GLOBAL_INJECTED_RTMGR_USER" : "test", + "GLOBAL_INJECTED_RTMGR_PASSWORD" : "test" +} + diff --git a/ric_robot_suite/helm/ric-robot/templates/_helpers.tpl b/ric_robot_suite/helm/ric-robot/templates/_helpers.tpl new file mode 100644 index 0000000..44f7e85 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/templates/_helpers.tpl @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ric-robot.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ric-robot.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ric-robot.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/ric_robot_suite/helm/ric-robot/templates/configmap.yaml b/ric_robot_suite/helm/ric-robot/templates/configmap.yaml new file mode 100644 index 0000000..7726510 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/templates/configmap.yaml @@ -0,0 +1,26 @@ +# Copyright (c) 2019 AT&T Intellectual Property +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "ric-robot.fullname" . }}-eteshare-configmap + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ric-robot.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/eteshare/config/*").AsConfig . | indent 2 }} diff --git a/ric_robot_suite/helm/ric-robot/templates/deployment.yaml b/ric_robot_suite/helm/ric-robot/templates/deployment.yaml new file mode 100644 index 0000000..6dea20e --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/templates/deployment.yaml @@ -0,0 +1,82 @@ +# Copyright © 2019 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "ric-robot.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "ric-robot.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + spec: + containers: + - name: {{ include "ric-robot.name" . }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: RICPLT_NAMESPACE + value: {{ .Release.Namespace }} + - name: RICPLT_RELEASE_NAME + value: {{ .Values.Release.HelmReleaseName }} + - name: RICPLT_COMPONENTS + value: {{ keys .Values.ric.platform.components | join " " }} + ports: + - containerPort: {{ .Values.service.port }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.port }} + initialDelaySeconds: 5 + periodSeconds: 30 + readinessProbe: + tcpSocket: + port: {{ .Values.service.port }} + initialDelaySeconds: 5 + periodSeconds: 30 + volumeMounts: + - name: dshm + mountPath: /dev/shm + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: robot-eteshare + mountPath: /share/config + - name: robot-logs + mountPath: /share/logs + resources: + volumes: + - name: dshm + emptyDir: + medium: Memory + - name: localtime + hostPath: + path: /etc/localtime + - name: robot-eteshare + configMap: + name: {{ include "ric-robot.fullname" . }}-eteshare-configmap + defaultMode: 0755 + - name: robot-logs + emptyDir: {} + imagePullSecrets: + - name: {{ .Values.image.repositoryCred }} + diff --git a/ric_robot_suite/helm/ric-robot/templates/service.yaml b/ric_robot_suite/helm/ric-robot/templates/service.yaml new file mode 100644 index 0000000..53c4807 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/templates/service.yaml @@ -0,0 +1,38 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ric-robot.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "ric-robot.name" . }} + helm.sh/chart: {{ include "ric-robot.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + nodePort: {{ .Values.service.nodePort }} + targetPort: {{ .Values.service.port }} + name: robot + protocol: TCP + selector: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + diff --git a/ric_robot_suite/helm/ric-robot/values.yaml b/ric_robot_suite/helm/ric-robot/values.yaml new file mode 100755 index 0000000..3c41fd5 --- /dev/null +++ b/ric_robot_suite/helm/ric-robot/values.yaml @@ -0,0 +1,85 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +# Default values for ric-robot . +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001 + repositoryCred: docker-reg-cred + # for local testing + #repository: ric/testsuite + name: test/ric-robot + tag: 0.2.0-latest + pullPolicy: IfNotPresent + +nameOverride: "" +fullnameOverride: "" + +config: + dashboardExternalIp: REPLACE_WITH_EXTERNAL_K8_IP_OF_DASHBOARD + dashboardExternalPort: REPLACE_WITH_NODEPORT_OF_DASHBOARD +service: + port: 88 + type: NodePort + nodePort: 30209 + +ingress: + enabled: false + annotations: {} + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +### ricdeployment.robot environment variable +ric: + platform: + # RIC installation details. The values + # for these can typically be found in + # the ricplt/ric_env.sh file from the ric + # platform source tree + components: + appmgr: + rtmgr: + dbaas: + e2mgr: + e2term: diff --git a/ric_robot_suite/helm/robot_install.sh b/ric_robot_suite/helm/robot_install.sh new file mode 100755 index 0000000..92b7b93 --- /dev/null +++ b/ric_robot_suite/helm/robot_install.sh @@ -0,0 +1,76 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +OVERRIDEYAML=$1 + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +#/root/test/ric_robot_suite/helm +# extract the base to find root to dep + +BASE=${DIR%/test*} + +# /data/ORAN-OSC/it/dep/ric-platform/50-RIC-Platform/bin/install +BASEDIR50=$BASE/dep/ric-platform/50-RIC-Platform/ +BASEDIR_COMMON_TEMPLATE=$BASE/dep/ric-common/Common-Template/helm/ric-common + +echo "Using etc/ric.conf from $BASEDIR50" + +source $BASEDIR50/etc/ric.conf + + +if [ -z "$RICPLT_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICPLT_RELEASE_NAME +fi + +# Namespace configuration +if [ -z "$RICPLT_NAMESPACE" ];then + PLT_NAMESPACE=$plt_namespace +else + PLT_NAMESPACE=$RICPLT_NAMESPACE +fi + +RICPLT_COMPONENTS="ric-robot" + +echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]" +echo "Platform Namespace: $PLT_NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + +COMMON_CHART_VERSION=$(cat $BASEDIR_COMMON_TEMPLATE/Chart.yaml | grep version | awk '{print $2}') + +helm package -d /tmp $BASEDIR_COMMON_TEMPLATE + + +for component in $RICPLT_COMPONENTS; do + echo "Preparing chart for comonent $component" + mkdir -p $DIR/$component/charts/ + cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/$component/charts/ + if [ -z $OVERRIDEYAML ]; then + echo "helm install --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component" + helm install --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component + else + echo "helm install -f $OVERRIDEYAML --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component" + helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component + fi +done + diff --git a/ric_robot_suite/html/index.html b/ric_robot_suite/html/index.html new file mode 100644 index 0000000..0e4e459 --- /dev/null +++ b/ric_robot_suite/html/index.html @@ -0,0 +1,13 @@ + + RIC Robot Framework Information + + + +Outline of Robot Framework Directory +

+logs
+doc
+XappMgr Simulator
+E2Mgr Simulator
+ + diff --git a/ric_robot_suite/red.xml b/ric_robot_suite/red.xml new file mode 100644 index 0000000..fde3fe2 --- /dev/null +++ b/ric_robot_suite/red.xml @@ -0,0 +1,32 @@ + + + 1.0 + PROJECT + + + + + + + + + + + + + + + + + + + + + + + true + 1024 + true + true + false + diff --git a/ric_robot_suite/ric-python-utils/LICENSE.txt b/ric_robot_suite/ric-python-utils/LICENSE.txt new file mode 100644 index 0000000..48a2fda --- /dev/null +++ b/ric_robot_suite/ric-python-utils/LICENSE.txt @@ -0,0 +1,20 @@ +LICENSE.TXT file can be appended as follows: +/* + * ============LICENSE_START========================================== + * =================================================================== + * Copyright © 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + * + */ diff --git a/ric_robot_suite/ric-python-utils/README.TXT b/ric_robot_suite/ric-python-utils/README.TXT new file mode 100644 index 0000000..64994d9 --- /dev/null +++ b/ric_robot_suite/ric-python-utils/README.TXT @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +RIC Python ETE Utils +======================= + + + +Scripts written to be used during ete testing + +to install locally run 'pip install -e .' in the root diff --git a/ric_robot_suite/ric-python-utils/ricutils/E2SimUtils.py b/ric_robot_suite/ric-python-utils/ricutils/E2SimUtils.py new file mode 100644 index 0000000..d5f3fa1 --- /dev/null +++ b/ric_robot_suite/ric-python-utils/ricutils/E2SimUtils.py @@ -0,0 +1,58 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from redis import Redis +import string +import random + +class E2SimUtils(object): + def __init__(self, dbaas, port=int(6379)): + + self._db = Redis(host=dbaas, port=port) + + def sdlKey(self, namespace, val): + return "{%s},%s" % (namespace, val) + + def sdlKeyNamespace(self, k): + return k.split(",")[0][1:-1] + + def sdlKeyVal(self, k): + return k.split(",")[1] + + def e2RANKey(self, val): + return self.sdlKey("e2Manager", "RAN:" + val) + + def e2RANKeyVal(self, k): + return self.sdlKeyVal(k).split(':')[-1] + + def gNodeB(self, ranName="*"): + # return one or (by default) all e2 records + gnbs={} + for k in self._db.keys(self.e2RANKey(ranName)): + gnbs[self.e2RANKeyVal(k.decode('utf-8'))]=self._db.get(k) + return gnbs + + def gNodeBDelete(self, ranName="*"): + # delete one or (by default) all e2 records + # returns the deleted records to avoid + # buyer's remorse. + gnbs = self.gNodeB(ranName) + for k in gnbs: + self._db.delete(self.e2RANKey(k)) + return gnbs + + def randomRANName(self, prefix=""): + prefix = prefix + ''.join(random.choice(string.ascii_uppercase) for _ in range(4-(min(4, len(prefix))))) + return prefix[0:4].upper() + ''.join(random.choice(string.digits) for _ in range(6)) diff --git a/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py b/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py new file mode 100644 index 0000000..7b2535a --- /dev/null +++ b/ric_robot_suite/ric-python-utils/ricutils/KubernetesEntity.py @@ -0,0 +1,84 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from kubernetes import client, config +import string +import random +import time + +# This library provides a massively-simplified interface to the kubernetes +# API library to reduce bloat in robot tests. + +class KubernetesEntity(object): + def __init__(self, namespace): + self._ns = namespace + self._annotationGensym = ''.join(random.choice(string.ascii_letters) for _ in range(16)) + + # FIXME: this needs to be configurable. + config.load_kube_config() + + self._k8sApp = client.AppsV1Api() + self._k8sCore = client.CoreV1Api() + self._k8sEV1B1 = client.ExtensionsV1beta1Api() + + def Deployment(self, name): + # this will throw kubernetes.client.rest.ApiException if + # the deployment doesn't exist. we'll let robot cope with + # that. + + # calling code will most likely want to check that + # deploy.status.replicas == deploy.status.available_replicas + return self._k8sApp.read_namespaced_deployment(namespace=self._ns, + name=name) + + def Service(self, name): + # as above, we'll rely on this to throw if the svc dne. + + # not much to check directly here. calling code will want + # to hit svc.spec.cluster_ip:r.spec.ports[0..n] with some + # sort of health-check request + return self._k8sCore.read_namespaced_service(namespace=self._ns, + name=name) + + def Pod(self, name): + return self._k8sCore.read_namespaced_pod(namespace=self._ns, + name=name) + + def Redeploy(self, name, wait=True, timeout=30): + # restart an existing deployment by doing a nonsense update + # to its spec. + body = {'spec': + {'template': + {'metadata': + {'annotations': + { self._annotationGensym: str(time.time()) }}}}} + + r = self._k8sEV1B1.patch_namespaced_deployment(namespace=self._ns, + name=name, + body=body) + if wait: + r = self.WaitForDeployment(name, timeout) + return r + + def WaitForDeployment(self, name, timeout=30): + # block until a deployment is available + while timeout > 0: + dep = self.Deployment(name) + if dep and dep.status.conditions[-1].type == 'Available': + return True + time.sleep(1) + timeout -= 1 + raise TimeoutError('Kubernetes timeout waiting for ' + name + ' to become available') + diff --git a/ric_robot_suite/ric-python-utils/setup.cfg b/ric_robot_suite/ric-python-utils/setup.cfg new file mode 100644 index 0000000..d645be7 --- /dev/null +++ b/ric_robot_suite/ric-python-utils/setup.cfg @@ -0,0 +1,5 @@ +[bdist_wheel] +# This flag says that the code is written to work on both Python 2 and Python +# 3. If at all possible, it is good practice to do this. If you cannot, you +# will need to generate wheels for each Python version that you support. +universal=0 diff --git a/ric_robot_suite/ric-python-utils/setup.py b/ric_robot_suite/ric-python-utils/setup.py new file mode 100644 index 0000000..2cfd608 --- /dev/null +++ b/ric_robot_suite/ric-python-utils/setup.py @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ +from setuptools import setup + +setup( + name='python-oran-osc-ric-utils', # This is the name of your PyPI-package. + version='0.1', # Update the version number for new releases + description='Scripts written to be used during ete testing', # Info about script + install_requires=['robotframework'], # what we need + packages=['ricutils'], # The name of your scipts package + package_dir={'ricutils': 'ricutils' } # The location of your scipts package +) diff --git a/ric_robot_suite/ric-python-utils/tox.ini b/ric_robot_suite/ric-python-utils/tox.ini new file mode 100644 index 0000000..7c1819d --- /dev/null +++ b/ric_robot_suite/ric-python-utils/tox.ini @@ -0,0 +1,11 @@ +# Tox (https://tox.readthedocs.io/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py27 + +[testenv] +commands = {envpython} setup.py test +deps = diff --git a/ric_robot_suite/robot/assets/keys/README.md b/ric_robot_suite/robot/assets/keys/README.md new file mode 100644 index 0000000..3bcdab9 --- /dev/null +++ b/ric_robot_suite/robot/assets/keys/README.md @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +ric_dev.pvt is a copy of onap private key +#TODO: replace with RIC ete testing key diff --git a/ric_robot_suite/robot/assets/templates/appmgr_create_xapp.template b/ric_robot_suite/robot/assets/templates/appmgr_create_xapp.template new file mode 100644 index 0000000..c06ca7a --- /dev/null +++ b/ric_robot_suite/robot/assets/templates/appmgr_create_xapp.template @@ -0,0 +1,3 @@ +{ + "xAppName": "${xapp_name}" +} diff --git a/ric_robot_suite/robot/assets/templates/e2mgr_setup_nodeb.template b/ric_robot_suite/robot/assets/templates/e2mgr_setup_nodeb.template new file mode 100644 index 0000000..fec3eb8 --- /dev/null +++ b/ric_robot_suite/robot/assets/templates/e2mgr_setup_nodeb.template @@ -0,0 +1,5 @@ +{ +"ranIp": "${ran_ip}", +"ranPort": ${ran_port}, +"ranName":"${ran_name}" +} diff --git a/ric_robot_suite/robot/assets/templates/mr_publish.template b/ric_robot_suite/robot/assets/templates/mr_publish.template new file mode 100644 index 0000000..acb1032 --- /dev/null +++ b/ric_robot_suite/robot/assets/templates/mr_publish.template @@ -0,0 +1,5 @@ +{ + "test": "success", + "timestamp": "${timestamp}" +} + diff --git a/ric_robot_suite/robot/assets/templates/web/index.html.template b/ric_robot_suite/robot/assets/templates/web/index.html.template new file mode 100644 index 0000000..06d940f --- /dev/null +++ b/ric_robot_suite/robot/assets/templates/web/index.html.template @@ -0,0 +1,7 @@ + + Quicklinks To Running Instances + + + +#TODO: Fill in useful data for RIC + diff --git a/ric_robot_suite/robot/resources/appmgr/appmgr_interface.robot b/ric_robot_suite/robot/resources/appmgr/appmgr_interface.robot new file mode 100644 index 0000000..a215eb1 --- /dev/null +++ b/ric_robot_suite/robot/resources/appmgr/appmgr_interface.robot @@ -0,0 +1,76 @@ +*** Settings *** +Documentation The main interface for interacting with RIC Applications Manager (AppMgr) . It handles low level stuff like managing the http request library and AppMgr required fields +Library RequestsLibrary +Library UUID + +Resource ../global_properties.robot +Resource ../json_templater.robot + +*** Variables *** +${APPMGR_BASE_PATH} /ric/v1/xapps/ +${APPMGR_ENDPOINT} ${GLOBAL_APPMGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_APPMGR_IP_ADDR}:${GLOBAL_APPMGR_SERVER_PORT} +${APPMGR_CREATE_XAPP_TEMPLATE} robot/assets/templates/appmgr_create_xapp.template + + +*** Keywords *** +Run AppMgr Health Check + [Documentation] Runs AppMgr Health check + Run Keyword Run AppMgr Get All Request + +Run AppMgr Get All Request + [Documentation] Runs AppMgr Get List of Xapps Request + ${resp}= Run Keyword Run AppMgr Get Request ${APPMGR_BASE_PATH} + Should Be Equal As Strings ${resp.status_code} 200 + +Run AppMgr Get By XappName and XappId + [documentation] Get Xapp data by XappName and XappId + [Arguments] ${xapp_name} ${xapp_id} + ${data_path}= Set Variable ${APPMGR_BASE_PATH}${xapp_name}/${xapp_id} + ${resp}= Run Keyword Run AppMgr Get Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + +Run AppMgr Get By XappName + [documentation] Get List of Xapp data by XappName + [Arguments] ${xapp_name} + ${data_path}= Set Variable ${APPMGR_BASE_PATH}${xapp_name} + ${resp}= Run Keyword Run AppMgr Get Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + +Run Create Xapp + [documentation] Create Xapp + [Arguments] ${xapp_name} ${xapp_id} + ${data_path}= Set Variable ${APPMGR_BASE_PATH} + ${dict}= Create Dictionary xapp_name=${xapp_name} xapp_id=${xapp_id} + ${data}= Fill JSON Template File ${APPMGR_CREATE_XAPP_TEMPLATE} ${dict} + ${auth}= Create List ${GLOBAL_INJECTED_APPMGR_USER} ${GLOBAL_INJECTED_APPMGR_PASSWORD} + ${session}= Create Session appmgr ${APPMGR_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request appmgr ${data_path} data=${data} headers=${headers} + Log Received response from AppMgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + + +Run AppMgr Get Request + [Documentation] Runs AppMgr Get request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_APPMGR_USER} ${GLOBAL_INJECTED_APPMGR_PASSWORD} + ${session}= Create Session appmgr ${APPMGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request appmgr ${data_path} headers=${headers} + Log Received response from AppMgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run AppMgr Delete Request + [documentation] Delete Xapp data by XappId + [Arguments] ${xapp_id} + ${data_path}= Set Variable ${APPMGR_BASE_PATH}/${xapp_id} + ${auth}= Create List ${GLOBAL_INJECTED_APPMGR_USER} ${GLOBAL_INJECTED_APPMGR_PASSWORD} + ${session}= Create Session appmgr ${APPMGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Delete Request appmgr ${data_path} headers=${headers} + Log Received response from AppMgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/ric_robot_suite/robot/resources/appmgr/swagger.json b/ric_robot_suite/robot/resources/appmgr/swagger.json new file mode 100644 index 0000000..3f6f1a0 --- /dev/null +++ b/ric_robot_suite/robot/resources/appmgr/swagger.json @@ -0,0 +1,509 @@ +{ + "swagger": "2.0", + "info": { + "description": "This is a draft API for RIC xapp-manager", + "version": "0.0.6", + "title": "RIC xapp-manager" + }, + "host": "hostname", + "basePath": "/ric/v1/xapps", + "schemes": [ + "https", + "http" + ], + "paths": { + "/ric/v1/xapps": { + "post": { + "description": "Deploy a xapp", + "operationId": "deployXapp", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "body", + "in": "body", + "description": "xApp information", + "schema": { + "type": "object", + "required": [ + "xAppName" + ], + "properties": { + "xAppName": { + "type":"string", + "description":"Name of the xApp", + "example": "xapp-dummy" + } + } + } + } + ], + "responses": { + "201": { + "description": "xApp successfully created", + "schema": { + "$ref": "#/definitions/Xapp" + } + }, + "400": { + "description": "Invalid input" + }, + "500": { + "description": "Internal error" + } + } + }, + "get": { + "description": "Returns the status of all xapps", + "operationId": "getAllXapps", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful query of xApps", + "schema": { + "$ref": "#/definitions/AllXapps" + } + }, + "500": { + "description": "Internal error" + } + } + } + }, + "/ric/v1/xapps/{xAppName}": { + "get": { + "description": "Returns the status of a given xapp", + "operationId": "getXappByName", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "xAppName", + "in": "path", + "description": "Name of xApp", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/Xapp" + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Xapp not found" + }, + "500": { + "description": "Internal error" + } + } + }, + "delete": { + "summary": "Undeploy an existing xapp", + "description": "", + "operationId": "undeployXapp", + "parameters": [ + { + "name": "xAppName", + "in": "path", + "description": "Xapp to be undeployed", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "Successful deletion of xApp" + }, + "400": { + "description": "Invalid xApp name supplied" + }, + "500": { + "description": "Internal error" + } + } + } + }, + "/ric/v1/xapps/{xAppName}/instances/{xAppInstanceName}": { + "get": { + "description": "Returns the status of a given xapp", + "operationId": "getXappInstanceByName", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "xAppName", + "in": "path", + "description": "Name of xApp", + "required": true, + "type": "string" + }, + { + "name": "xAppInstanceName", + "in": "path", + "description": "Name of xApp instance to get information", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/XappInstance" + } + }, + "400": { + "description": "Invalid name supplied" + }, + "404": { + "description": "Xapp not found" + }, + "500": { + "description": "Internal error" + } + } + } + }, + "/ric/v1/subscriptions": { + "post": { + "description": "Subscribe event", + "operationId": "addSubscription", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "New subscription", + "required": true, + "schema": { + "$ref": "#/definitions/subscriptionRequest" + } + } + ], + "responses": { + "200": { + "description": "Subscription successful", + "schema": { + "$ref": "#/definitions/subscription" + } + }, + "400": { + "description": "Invalid input" + } + } + }, + "get": { + "description": "Returns all subscriptions", + "operationId": "getSubscriptions", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful query of subscriptions", + "schema": { + "$ref": "#/definitions/allSubscriptions" + } + } + } + } + }, + "/ric/v1/subscriptions/{subscriptionId}": { + "get": { + "description": "Returns the information of subscription", + "operationId": "getSubscriptionById", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "subscriptionId", + "in": "path", + "description": "ID of subscription", + "required": true, + "type": "integer" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/subscription" + } + }, + "400": { + "description": "Invalid ID supplied" + }, + "404": { + "description": "Subscription not found" + } + } + }, + "put": { + "description": "Subscribe event", + "operationId": "modifySubscription", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "subscriptionId", + "in": "path", + "description": "ID of subscription", + "required": true, + "type": "integer" + }, + { + "in": "body", + "name": "body", + "description": "New subscription", + "required": true, + "schema": { + "$ref": "#/definitions/subscriptionRequest" + } + } + ], + "responses": { + "200": { + "description": "Subscription successful", + "schema": { + "$ref": "#/definitions/subscription" + } + }, + "400": { + "description": "Invalid input" + } + } + }, + "delete": { + "summary": "Unsubscribe event", + "description": "", + "operationId": "deleteSubscription", + "parameters": [ + { + "name": "subscriptionId", + "in": "path", + "description": "ID of subscription", + "required": true, + "type": "integer" + } + ], + "responses": { + "204": { + "description": "Successful deletion of subscription" + }, + "400": { + "description": "Invalid subscription supplied" + } + } + } + } + }, + "definitions": { + "AllXapps": { + "type": "array", + "items": { + "$ref": "#/definitions/Xapp" + } + }, + "Xapp": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "example": "xapp-dummy" + }, + "status": { + "type": "string", + "description": "xapp status in the RIC", + "enum": [ + "unknown", + "deployed", + "deleted", + "superseded", + "failed", + "deleting" + ] + }, + "version": { + "type": "string", + "example": "1.2.3" + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/definitions/XappInstance" + } + } + } + }, + "XappInstance": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "example": "xapp-dummy-6cd577d9-4v255" + }, + "status": { + "type": "string", + "description": "xapp instance status", + "enum": [ + "pending", + "running", + "succeeded", + "failed", + "unknown", + "completed", + "crashLoopBackOff" + ] + }, + "ip": { + "type": "string", + "example": "192.168.0.1" + }, + "port": { + "type": "integer", + "example": 32300 + }, + "txMessages" : { + "type": "array", + "items": { + "type" : "string", + "example" : "ControlIndication" + } + }, + "rxMessages" : { + "type": "array", + "items": { + "type" : "string", + "example" : "LoadIndication" + } + } + } + }, + "subscriptionRequest": { + "type": "object", + "required": [ + "targetUrl", + "eventType", + "maxRetry", + "retryTimer" + ], + "properties": { + "targetUrl": { + "type": "string", + "example": "http://localhost:11111/apps/webhook/" + }, + "eventType": { + "type": "string", + "description": "Event which is subscribed", + "enum": [ + "created", + "deleted", + "all" + ] + }, + "maxRetry": { + "type": "integer", + "description": "Maximum number of retries", + "example": 11 + }, + "retryTimer": { + "type": "integer", + "description": "Time in seconds to wait before next retry", + "example": 22 + } + } + }, + "allSubscriptions": { + "type": "array", + "items": { + "$ref": "#/definitions/subscription" + } + }, + "subscription": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "1ILBltYYzEGzWRrVPZKmuUmhwcc" + }, + "targetUrl": { + "type": "string", + "example": "http://localhost:11111/apps/webhook/" + }, + "eventType": { + "type": "string", + "description": "Event which is subscribed", + "enum": [ + "created", + "deleted", + "all" + ] + }, + "maxRetry": { + "type": "integer", + "description": "Maximum number of retries", + "example": 11 + }, + "retryTimer": { + "type": "integer", + "description": "Time in seconds to wait before next retry", + "example": 22 + } + } + }, + "subscriptionNotification": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "1ILBltYYzEGzWRrVPZKmuUmhwcc" + }, + "version": { + "type": "integer", + "example": 2 + }, + "eventType": { + "type": "string", + "description": "Event to be notified", + "enum": [ + "created", + "deleted" + ] + }, + "xApps": { + "$ref": "#/definitions/AllXapps" + } + } + } + } +} diff --git a/ric_robot_suite/robot/resources/browser_setup.robot b/ric_robot_suite/robot/resources/browser_setup.robot new file mode 100644 index 0000000..5d34d3d --- /dev/null +++ b/ric_robot_suite/robot/resources/browser_setup.robot @@ -0,0 +1,49 @@ +*** Settings *** +Documentation The main interface for interacting with VID. It handles low level stuff like managing the selenium request library and VID required steps +Library Collections +Library OSUtils +Library OperatingSystem +Library ExtendedSelenium2Library +Resource global_properties.robot + +*** Variables *** +${HEADLESS} True + +*** Keywords *** +Setup Browser + [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER} + Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox + Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome + Log Running with ${GLOBAL_SELENIUM_BROWSER} + + +Setup Browser Firefox + ${caps}= Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys + Set To Dictionary ${caps} marionette= + Set To Dictionary ${caps} elementScrollBehavior 1 + # TODO + # Figure out how to run FF headless without Xvfb + ${wd}= Create WebDriver Firefox capabilities=${caps} + Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${caps} + + Setup Browser Chrome + ${os}= Get Normalized Os + Log Normalized OS=${os} + ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys + Call Method ${chrome options} add_argument no-sandbox + Run Keyword If ${HEADLESS}==True Call Method ${chrome options} add_argument headless + ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver + Set To Dictionary ${dc} elementScrollBehavior 1 + Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc} + Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc} + +Handle Proxy Warning + [Documentation] Handle Intermediate Warnings from Proxies + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_TITLE} + Return From Keyword if '${status}' != 'PASS' + ${status} ${data}= Run Keyword And Ignore Error Variable Should Exist \${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} + Return From Keyword if '${status}' != 'PASS' + Return From Keyword if "${GLOBAL_PROXY_WARNING_TITLE}" == '' + Return From Keyword if "${GLOBAL_PROXY_WARNING_CONTINUE_XPATH}" == '' + ${test} ${value}= Run keyword and ignore error Title Should Be ${GLOBAL_PROXY_WARNING_TITLE} + Run keyword If '${test}' == 'PASS' Click Element xpath=${GLOBAL_PROXY_WARNING_CONTINUE_XPATH} \ No newline at end of file diff --git a/ric_robot_suite/robot/resources/dashboard/dashboard_interface.robot b/ric_robot_suite/robot/resources/dashboard/dashboard_interface.robot new file mode 100644 index 0000000..5b98cbd --- /dev/null +++ b/ric_robot_suite/robot/resources/dashboard/dashboard_interface.robot @@ -0,0 +1,100 @@ +*** Settings *** +Documentation The main interface for interacting with RIC E2 Manager (Dashboard) . It handles low level stuff like managing the http request library and E2Mgr required fields +Library RequestsLibrary +Library UUID + +Resource ../global_properties.robot +Resource ../json_templater.robot + +*** Variables *** +${DASH_E2MGR_BASE_PATH} /e2mgr/v1/nodeb #/nodeb /nodeb/setup +${DASH_E2MGR_BASE_VERSION} /e2mgr/v1 +${DASH_ENDPOINT} ${GLOBAL_DASH_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DASH_IP_ADDR}:${GLOBAL_DASH_SERVER_PORT} +${E2MGR_SETUP_NODEB_TEMPLATE} robot/assets/templates/e2mgr_setup_nodeb.template + + +*** Keywords *** +Run Dashboard Health Check + [Documentation] Runs Dashboard Health check + # need to confirm Dashboard Health Check URL + ${data_path}= Set Variable /v1/health + ${resp}= Run Keyword Run Dashboard Get Request ${data_path} + +Dashboard Check NodeB Status + [Documentation] Check NodeB Status + [Arguments] ${ran_name} + ${resp}= Run Keyword Run Dashboard Get NodeB Request ${ran_name} + Should Be Equal As Strings ${resp.json()['connectionStatus']} CONNECTED + +Run Dashboard Get NodeB Request + [Documentation] Runs Dashboard Get NodeB Request + [Arguments] ${ran_name} + ${data_path}= Set Variable ${DASH_E2MGR_BASE_PATH}/${ran_name} + ${resp}= Run Keyword Run Dashboard Get Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run Dashboard Get All NodeBs Request + [Documentation] Runs Dashboard Get All NodeBs Request + ${data_path}= Set Variable ${DASH_E2MGR_BASE_VERSION}/nodeb-ids + ${resp}= Run Keyword Run Dashboard Get Request ${data_path} + +Run Dashboard Setup NodeB X2 + [documentation] Setup X2 NodeB via E2 Manager + [Arguments] ${ran_name} ${ran_ip} ${ran_port} + ${data_path}= Set Variable ${DASH_E2MGR_BASE_PATH}/x2-setup + ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port} + ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict} + ${auth}= Create List ${GLOBAL_INJECTED_DASH_USER} ${GLOBAL_INJECTED_DASH_PASSWORD} + ${session}= Create Session e2mgr ${DASH_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers} + Log Received response from Dashboard ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run Dashboard Setup NodeB Endc + [documentation] Setup Endc NodeB via E2 Manager + [Arguments] ${ran_name} ${ran_ip} ${ran_port} + ${data_path}= Set Variable ${DASH_E2MGR_BASE_PATH}/endc-setup + ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port} + ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict} + ${auth}= Create List ${GLOBAL_INJECTED_DASH_USER} ${GLOBAL_INJECTED_DASH_PASSWORD} + ${session}= Create Session e2mgr ${DASH_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers} + Log Received response from Dashboard ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run Dashboard Delete NodeB + [documentation] Delete NodeB via E2 Manager + [Arguments] ${ran_name} + ${data_path}= Set Variable ${DASH_E2MGR_BASE_PATH}/${ran_name} + ${resp}= Run Dashboard Delete Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + + +Run Dashboard Get Request + [Documentation] Runs Dashboard Get Request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_DASH_USER} ${GLOBAL_INJECTED_DASH_PASSWORD} + ${session}= Create Session e2mgr ${DASH_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request e2mgr ${data_path} headers=${headers} + Log Received response from Dashboard ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run Dashboard Delete Request + [Documentation] Runs Dashboard Delete Request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_DASH_USER} ${GLOBAL_INJECTED_DASH_PASSWORD} + ${session}= Create Session e2mgr ${DASH_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Delete Request e2mgr ${data_path} headers=${headers} + Log Received response from Dashboard ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} diff --git a/ric_robot_suite/robot/resources/dr_interface.robot b/ric_robot_suite/robot/resources/dr_interface.robot new file mode 100644 index 0000000..b368ce9 --- /dev/null +++ b/ric_robot_suite/robot/resources/dr_interface.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation The main interface for interacting with Data-Router. +Library RequestsLibrary + +Resource global_properties.robot + +*** Variables *** +${DR_HEALTH_CHECK_PATH} /internal/fetchProv +${DR_ENDPOINT} ${GLOBAL_DMAAP_DR_NODE_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DMAAP_DR_NODE_IP_ADDR}:${GLOBAL_DMAAP_DR_NODE_SERVER_PORT} + + +*** Keywords *** +Run DR Health Check + [Documentation] Runs DR Health check + ${resp}= Run DR Get Request ${DR_HEALTH_CHECK_PATH} + Should Be Equal As Strings ${resp.status_code} 204 + +Run DR Get Request + [Documentation] Runs DR Get request + [Arguments] ${data_path} + ${session}= Create Session session ${DR_ENDPOINT} + ${resp}= Get Request session ${data_path} + [Return] ${resp} diff --git a/ric_robot_suite/robot/resources/e2mgr/e2mgr_interface.robot b/ric_robot_suite/robot/resources/e2mgr/e2mgr_interface.robot new file mode 100644 index 0000000..abb4a2c --- /dev/null +++ b/ric_robot_suite/robot/resources/e2mgr/e2mgr_interface.robot @@ -0,0 +1,99 @@ +*** Settings *** +Documentation The main interface for interacting with RIC E2 Manager (E2Mgr) . It handles low level stuff like managing the http request library and E2Mgr required fields +Library RequestsLibrary +Library UUID + +Resource ../global_properties.robot +Resource ../json_templater.robot + +*** Variables *** +${E2MGR_BASE_PATH} /v1/nodeb #/nodeb /nodeb/setup +${E2MGR_BASE_VERSION} /v1 +${E2MGR_ENDPOINT} ${GLOBAL_E2MGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_E2MGR_IP_ADDR}:${GLOBAL_E2MGR_SERVER_PORT} +${E2MGR_SETUP_NODEB_TEMPLATE} robot/assets/templates/e2mgr_setup_nodeb.template + + +*** Keywords *** +Run E2Mgr Health Check + [Documentation] Runs E2Mgr Health check + ${data_path}= Set Variable /v1/health + ${resp}= Run Keyword Run E2Mgr Get Request ${data_path} + +Check NodeB Status + [Documentation] Check NodeB Status + [Arguments] ${ran_name} + ${resp}= Run Keyword Run E2Mgr Get NodeB Request ${ran_name} + Should Be Equal As Strings ${resp.json()['connectionStatus']} CONNECTED + +Run E2Mgr Get NodeB Request + [Documentation] Runs E2Mgr Get NodeB Request + [Arguments] ${ran_name} + ${data_path}= Set Variable ${E2MGR_BASE_PATH}/${ran_name} + ${resp}= Run Keyword Run E2Mgr Get Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run E2Mgr Get All NodeBs Request + [Documentation] Runs E2Mgr Get All NodeBs Request + ${data_path}= Set Variable ${E2MGR_BASE_VERSION}/nodeb-ids + ${resp}= Run Keyword Run E2Mgr Get Request ${data_path} + +Run E2Mgr Setup NodeB X2 + [documentation] Setup X2 NodeB via E2 Manager + [Arguments] ${ran_name} ${ran_ip} ${ran_port} + ${data_path}= Set Variable ${E2MGR_BASE_PATH}/x2-setup + ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port} + ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict} + ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD} + ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers} + Log Received response from E2Mgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run E2Mgr Setup NodeB Endc + [documentation] Setup Endc NodeB via E2 Manager + [Arguments] ${ran_name} ${ran_ip} ${ran_port} + ${data_path}= Set Variable ${E2MGR_BASE_PATH}/endc-setup + ${dict}= Create Dictionary ran_name=${ran_name} ran_ip=${ran_ip} ran_port=${ran_port} + ${data}= Fill JSON Template File ${E2MGR_SETUP_NODEB_TEMPLATE} ${dict} + ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD} + ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Post Request e2mgr ${data_path} data=${data} headers=${headers} + Log Received response from E2Mgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run E2Mgr Delete NodeB + [documentation] Delete NodeB via E2 Manager + [Arguments] ${ran_name} + ${data_path}= Set Variable ${E2MGR_BASE_PATH}/${ran_name} + ${resp}= Run E2Mgr Delete Request ${data_path} + Should Be Equal As Strings ${resp.status_code} 200 + + +Run E2Mgr Get Request + [Documentation] Runs E2Mgr Get Request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD} + ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request e2mgr ${data_path} headers=${headers} + Log Received response from E2Mgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} + +Run E2Mgr Delete Request + [Documentation] Runs E2Mgr Delete Request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_E2MGR_USER} ${GLOBAL_INJECTED_E2MGR_PASSWORD} + ${session}= Create Session e2mgr ${E2MGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Delete Request e2mgr ${data_path} headers=${headers} + Log Received response from E2Mgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} diff --git a/ric_robot_suite/robot/resources/e2sim/e2sim_tools.robot b/ric_robot_suite/robot/resources/e2sim/e2sim_tools.robot new file mode 100644 index 0000000..ecfad8e --- /dev/null +++ b/ric_robot_suite/robot/resources/e2sim/e2sim_tools.robot @@ -0,0 +1,33 @@ +*** Settings *** +Documentation Routines for managing interactions with the E2 Simulator + +Resource ../global_properties.robot + +Library KubernetesEntity ${NAMESPACE} +Library E2SimUtils ${DBHOST} ${DBPORT} + + +*** Variables *** +${DBHOST} ${GLOBAL_INJECTED_DBAAS_IP_ADDR} +${DBPORT} ${GLOBAL_DBAAS_SERVER_PORT} +${NAMESPACE} %{RICPLT_NAMESPACE} +${PFX} %{RICPLT_RELEASE_NAME} + +*** Keywords *** +Generate RAN Name + [Documentation] Generate a new RAN name suitable for use with E2 + [Arguments] ${ran_name_prefix}=${EMPTY} + ${resp} = randomRANName ${ran_name_prefix} + [Return] ${resp} + +Delete RAN Database Entry + [Documentation] Delete the RNIB record for a specific RAN Name + [Arguments] ${ran_name} + ${gnbs} = gNodeBDelete ${ran_name} + Dictionary Should Contain Key ${gnbs} ${ran_name} + +Restart E2 Simulator + [Documentation] Restart all E2Sim pods + [Arguments] ${deployment}=${PFX}-e2sim + ${resp} = Redeploy ${deployment} + [Return] ${resp} diff --git a/ric_robot_suite/robot/resources/e2term/placeholder_for_files b/ric_robot_suite/robot/resources/e2term/placeholder_for_files new file mode 100644 index 0000000..e69de29 diff --git a/ric_robot_suite/robot/resources/global_properties.robot b/ric_robot_suite/robot/resources/global_properties.robot new file mode 100644 index 0000000..ca89e42 --- /dev/null +++ b/ric_robot_suite/robot/resources/global_properties.robot @@ -0,0 +1,15 @@ +*** Settings *** +Documentation store all properties that can change or are used in multiple places here +... format is all caps with underscores between words and prepended with GLOBAL +... make sure you prepend them with GLOBAL so that other files can easily see it is from this file. + + +*** Variables *** +${GLOBAL_APPLICATION_ID} ric-robot +${GLOBAL_SELENIUM_BROWSER} chrome +${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary +${GLOBAL_SELENIUM_DELAY} 0 +${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5 +${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15 +${GLOBAL_BUILD_NUMBER} 0 +${GLOBAL_RIC_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/ric_dev.pvt diff --git a/ric_robot_suite/robot/resources/json_templater.robot b/ric_robot_suite/robot/resources/json_templater.robot new file mode 100644 index 0000000..6a5ca17 --- /dev/null +++ b/ric_robot_suite/robot/resources/json_templater.robot @@ -0,0 +1,21 @@ +*** Settings *** +Documentation This resource is filling out json string templates and returning the json back +Library RequestsLibrary +Library StringTemplater +Library OperatingSystem +Resource global_properties.robot + +*** Keywords *** +Fill JSON Template + [Documentation] Runs substitution on template to return a filled in json + [Arguments] ${json} ${arguments} + ${returned_string}= Template String ${json} ${arguments} + ${returned_json}= To Json ${returned_string} + [Return] ${returned_json} + +Fill JSON Template File + [Documentation] Runs substitution on template to return a filled in json + [Arguments] ${json_file} ${arguments} + ${json}= OperatingSystem.Get File ${json_file} + ${returned_json}= Fill JSON Template ${json} ${arguments} + [Return] ${returned_json} \ No newline at end of file diff --git a/ric_robot_suite/robot/resources/mr_interface.robot b/ric_robot_suite/robot/resources/mr_interface.robot new file mode 100644 index 0000000..95b0b7e --- /dev/null +++ b/ric_robot_suite/robot/resources/mr_interface.robot @@ -0,0 +1,57 @@ +*** Settings *** +Documentation The main interface for interacting with Message router. It handles low level stuff like managing the http request library and message router required fields +Library RequestsLibrary +Library UUID + +Resource global_properties.robot + +*** Variables *** +${MR_HEALTH_CHECK_PATH} /topics +${MR_PUB_HEALTH_CHECK_PATH} /events/TEST_TOPIC +${MR_SUB_HEALTH_CHECK_PATH} /events/TEST_TOPIC/g1/c4?timeout=5000 +${MR_ENDPOINT} ${GLOBAL_MR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_MR_IP_ADDR}:${GLOBAL_MR_SERVER_PORT} +${MR_PUBLISH_TEMPLATE} robot/assets/templates/mr_publish.template + + +*** Keywords *** +Run MR Health Check + [Documentation] Runs MR Health check + ${resp}= Run MR Get Request ${MR_HEALTH_CHECK_PATH} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.json()} topics + +Run MR PubSub Health Check + [Documentation] Runs MR PubSub Health check + ${resp}= Run MR Get Request ${MR_SUB_HEALTH_CHECK_PATH} + # topic may not be created which is a 400 error + ${resp}= Run MR Post Request ${MR_PUB_HEALTH_CHECK_PATH} + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.json()} serverTimeMs Failed to Write Data + ${resp}= Run MR Get Request ${MR_SUB_HEALTH_CHECK_PATH} + # ${resp} is an array + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain ${resp.json()[0]} timestamp Failed to Read Data + +Run MR Get Request + [Documentation] Runs MR Get request + [Arguments] ${data_path} + ${session}= Create Session mr ${MR_ENDPOINT} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${resp}= Get Request mr ${data_path} headers=${headers} + Log Received response from message router ${resp.text} + [Return] ${resp} + +Run MR Post Request + [Documentation] Runs MR Post request + [Arguments] ${data_path} + ${session}= Create Session mr ${MR_ENDPOINT} + ${timestamp}= Get Current Date + ${dict}= Create Dictionary timestamp=${timestamp} + ${data}= Fill JSON Template File ${MR_PUBLISH_TEMPLATE} ${dict} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} + ${resp}= Post Request mr ${data_path} data=${data} headers=${headers} + Log Received response from message router ${resp.text} + [Return] ${resp} + diff --git a/ric_robot_suite/robot/resources/ric/placeholder_for_files b/ric_robot_suite/robot/resources/ric/placeholder_for_files new file mode 100644 index 0000000..e69de29 diff --git a/ric_robot_suite/robot/resources/rnib/placeholder_for_files b/ric_robot_suite/robot/resources/rnib/placeholder_for_files new file mode 100644 index 0000000..e69de29 diff --git a/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot b/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot new file mode 100644 index 0000000..544a23e --- /dev/null +++ b/ric_robot_suite/robot/resources/rtmgr/rtmgr_interface.robot @@ -0,0 +1,32 @@ +*** Settings *** +Documentation The main interface for interacting with Routing Manager (RtMgr) . It handles low level stuff like managing the http request library and RtMgr required fields + +Library RequestsLibrary +Library UUID + +Resource ../global_properties.robot +Resource ../json_templater.robot + +*** Variables *** +${RTMGR_BASE_PATH} /v1 +${RTMGR_ENDPOINT} ${GLOBAL_RTMGR_SERVER_PROTOCOL}://${GLOBAL_INJECTED_RTMGR_IP_ADDR}:${GLOBAL_RTMGR_SERVER_PORT} + + +*** Keywords *** +Run RtMgr Health Check + [Documentation] Runs RtMgr Health check + ${data_path}= Set Variable ${RTMGR_BASE_PATH}/health + ${resp}= Run Keyword Run RtMgr Get Request ${data_path} + + +Run RtMgr Get Request + [Documentation] Runs RtMgr Get request + [Arguments] ${data_path} + ${auth}= Create List ${GLOBAL_INJECTED_RTMGR_USER} ${GLOBAL_INJECTED_RTMGR_PASSWORD} + ${session}= Create Session rtmgr ${RTMGR_ENDPOINT} auth=${auth} + ${uuid}= Generate UUID + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request rtmgr ${data_path} headers=${headers} + Log Received response from RtMgr ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp} diff --git a/ric_robot_suite/robot/resources/ssh/files.robot b/ric_robot_suite/robot/resources/ssh/files.robot new file mode 100644 index 0000000..fcfffbb --- /dev/null +++ b/ric_robot_suite/robot/resources/ssh/files.robot @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Some handy Keywords for accessing log files over SSH. Assumptions are that logs will belong to users other than the currently logged in user and that sudo will be required +Library OperatingSystem +Library SSHLibrary +Library HttpLibrary.HTTP +Library String +Library Collections + +*** Variables *** + +*** Keywords *** +Open Connection And Log In + [Documentation] Open a connection using the passed user and SSH key. Connection alias will be the host name by default. + [Arguments] ${HOST} ${user} ${pvt} ${password}= ${alias}=${HOST} ${timeout}=120s + Open Connection ${HOST} alias=${alias} timeout=${timeout} + Login With Public Key ${user} ${pvt} password=${password} delay=0.5 seconds + +Grep Local File + [Documentation] Grep the passed file name and return all of the lines that match the passed pattern using the current connection + [Arguments] ${pattern} ${fullpath} + ${output}= Execute Command grep ${pattern} ${fullpath} + [Return] ${output} + + Grep File on Host + [Documentation] Grep the passed file name and return all of the lines that match the passed pattern using passed connection alias/host + [Arguments] ${host} ${pattern} ${fullpath} + Switch Connection ${host} + ${output}= Grep Local File ${pattern} ${fullpath} + @{lines}= Split To Lines ${output} + [Return] @{lines} + +Grep File on Hosts + [Documentation] Grep the passed file name and return all of the lines that match the passed pattern using passed list of connections + [Arguments] ${HOSTS} ${pattern} ${fullpath} + &{map}= Create Dictionary + :FOR ${HOST} IN @{HOSTS} + \ Log ${HOST} + \ @{lines}= Grep File on Host ${HOST} ${pattern} ${fullpath} + \ &{map}= Create Dictionary ${HOST}=@{lines} &{map} + [Return] &{map} + +Tail File on Host Until + [Documentation] Tail log file into grep which returns file lines containing the grep pattern. Will timeout after timeout= if expected pattern not received. + [Arguments] ${host} ${pattern} ${fullpath} ${expected} ${timeout}=60 ${options}=-c -0 + Switch Connection ${host} + ${tailcommand}= Catenate tail ${options} -f ${fullpath} | grep --color=never ${pattern} + Write ${tailcommand} + ${stdout}= Read Until Regexp ${expected} + @{lines}= Split To Lines ${stdout} + [Return] @{lines} diff --git a/ric_robot_suite/robot/resources/ssh/processes.robot b/ric_robot_suite/robot/resources/ssh/processes.robot new file mode 100644 index 0000000..98440ac --- /dev/null +++ b/ric_robot_suite/robot/resources/ssh/processes.robot @@ -0,0 +1,74 @@ +*** Settings *** +Documentation Some handy Keywords for accessing log files over SSH. Assumptions are that logs will belong to users other than the currently logged in user and that sudo will be required +Library OperatingSystem +Library SSHLibrary 60 seconds +Library HttpLibrary.HTTP +Library String +Library Collections + +*** Variables *** + +*** Keywords *** + +Get Processes + [Documentation] Returns all of the processes on the currently connected host + ${output}= Execute Command ps -ef + ${map}= Create Process Map ${output} + [Return] ${map} + +Grep Processes + [Documentation] Return the list of processes matching the passed regex + [Arguments] ${pattern} + ${output}= Execute Command ps -ef|grep "${pattern}"|grep -v grep + ${map}= Create Process Map ${output} + [Return] ${map} + +Create Process Map + [Documentation] Extract process pids and process names from ps -ef output + [Arguments] ${input} + @{lines}= Split To Lines ${input} + ${map}= Create Dictionary + :FOR ${line} IN @{lines} + \ @{parts}= Split String ${line} max_split=7 + \ ${pid}= Catenate ${parts[1]} + \ ${name}= Catenate ${parts[7]} + \ Set To Dictionary ${map} ${pid}=${name} + [Return] ${map} + + +Wait for Process on Host + [Documentation] Wait for the passed process name (regular expression) to be running on the passed host + [Arguments] ${process_name} ${host} ${timeout}=1200s + ${map}= Wait Until Keyword Succeeds ${timeout} 10 sec Is Process On Host ${process_name} ${host} + [Return] ${map} + + +Pkill Process on Host + [Documentation] Kill the named process(es). Process name must match exactly + [Arguments] ${process_name} ${host} ${timeout}=600s + Switch Connection ${host} + ${output}= Execute Command pkill -9 -e -f ${process_name} + [Return] ${output} + +Is Process on Host + [Documentation] Look for the passed process name (regex) to be running on the passed host. Process name can include regex. + [Arguments] ${process_name} ${host} + Switch Connection ${host} + ${pass} ${map}= Run Keyword and Ignore Error Grep Processes ${process_name} + @{pids}= Get Dictionary Keys ${map} + ${foundpid}= Catenate "" + :FOR ${pid} IN @{pids} + \ ${process_cmd}= Get From Dictionary ${map} ${pid} + \ ${status} ${value}= Run Keyword And Ignore Error Should Match Regexp ${process_cmd} ${process_name} + \ Run Keyword If '${status}' == 'PASS' Set Test Variable ${foundpid} ${pid} + Should Not Be Equal ${foundpid} "" + [Return] ${map}[${foundpid}] + + +Get Process List on Host + [Documentation] Gets the list of all processes on the passed host + [Arguments] ${host} + Switch Connection ${host} + ${map}= Get Processes + [Return] ${map} + diff --git a/ric_robot_suite/robot/resources/xapps/place_holder_for_files b/ric_robot_suite/robot/resources/xapps/place_holder_for_files new file mode 100644 index 0000000..e69de29 diff --git a/ric_robot_suite/robot/testsuites/ete.robot b/ric_robot_suite/robot/testsuites/ete.robot new file mode 100644 index 0000000..8b51a8d --- /dev/null +++ b/ric_robot_suite/robot/testsuites/ete.robot @@ -0,0 +1,59 @@ +*** Settings *** +Documentation Executes the End To End Test cases +... +Library Collections +Library OperatingSystem +Resource ../resources/appmgr/appmgr_interface.robot +Resource ../resources/e2mgr/e2mgr_interface.robot +Resource ../resources/dashboard/dashboard_interface.robot + +*** Variables *** +${TEST_XAPPNAME} DemoXapp1 +${TEST_XAPPID} 101 +${TEST_NODE_B_NAME} AAAA456789 +${TEST_NODE_B_IP} 10.0.0.3 +${TEST_NODE_B_PORT} 36422 + + +*** Test Cases *** +Get All Xapps + [Tags] etetests xapptests ci_tests + Run AppMgr Get All Request +Create Xapp + [Tags] etetests xapptests ci_tests + Run Create Xapp ${TEST_XAPPNAME} ${TEST_XAPPID} +Get Xapp By Name + [Tags] etetests xapptests + Run AppMgr Get By XappName ${TEST_XAPPNAME} +Get Xapp By Name and Id + [Tags] etetests xapptests + Run AppMgr Get By XappName and XappId ${TEST_XAPPNAME} ${TEST_XAPPID} +Setup RAN Via E2Mgr X2 + [Tags] x2setup + Run E2Mgr Setup NodeB X2 ${TEST_NODE_B_NAME} ${TEST_NODE_B_IP} ${TEST_NODE_B_PORT} + Wait Until Keyword Succeeds 20s 5s Check NodeB Status ${TEST_NODE_B_NAME} +Setup RAN Via E2Mgr Endc + [Tags] e2setup + Run E2Mgr Setup NodeB Endc ${TEST_NODE_B_NAME} ${TEST_NODE_B_IP} ${TEST_NODE_B_PORT} + Wait Until Keyword Succeeds 20s 5s Check NodeB Status ${TEST_NODE_B_NAME} +Get NodeB via E2Mgr + [Tags] e2setup x2setup + Run E2Mgr Get NodeB Request ${TEST_NODE_B_NAME} +Get All NodeBs Via E2Mgr + [Tags] e2mgrtest etetests e2setup x2setup ci_tests + Run E2Mgr Get All NodeBs Request +Setup RAN Via Dashboard Endc + [Tags] e2setup_dash + Run Dashboard Setup NodeB Endc ${TEST_NODE_B_NAME} ${TEST_NODE_B_IP} ${TEST_NODE_B_PORT} + Wait Until Keyword Succeeds 20s 5s Dashboard Check NodeB Status ${TEST_NODE_B_NAME} +Setup RAN Via Dashboard X2 + [Tags] x2setup_dash + Run Dashboard Setup NodeB X2 ${TEST_NODE_B_NAME} ${TEST_NODE_B_IP} ${TEST_NODE_B_PORT} + Wait Until Keyword Succeeds 20s 5s Dashboard Check NodeB Status ${TEST_NODE_B_NAME} +Get NodeB via Dashboard + [Tags] e2setup_dash x2setup_dash + Run Dashboard Get NodeB Request ${TEST_NODE_B_NAME} +Get All NodeBs via Dashboard + [Tags] e2setup_dash x2setup_dash ci_tests + Run Dashboard Get All NodeBs Request + diff --git a/ric_robot_suite/robot/testsuites/health-check.robot b/ric_robot_suite/robot/testsuites/health-check.robot new file mode 100644 index 0000000..7284355 --- /dev/null +++ b/ric_robot_suite/robot/testsuites/health-check.robot @@ -0,0 +1,20 @@ +*** Settings *** +Documentation Testing RIC components are available via calls. +... +... Testing RIC components are available via calls. +Test Timeout 10 second +Resource ../resources/appmgr/appmgr_interface.robot +Resource ../resources/e2mgr/e2mgr_interface.robot +Resource ../resources/rtmgr/rtmgr_interface.robot + +*** Test Cases *** +Basic AppMgr Health Check + [Tags] health + Run AppMgr Health Check +Basic E2Mgr Health Check + [Tags] health + Run E2Mgr Health Check +#Basic RtMgr Health Check +# [Tags] health +# Run RtMgr Health Check + diff --git a/ric_robot_suite/robot/testsuites/ricdeployment.robot b/ric_robot_suite/robot/testsuites/ricdeployment.robot new file mode 100644 index 0000000..b50320b --- /dev/null +++ b/ric_robot_suite/robot/testsuites/ricdeployment.robot @@ -0,0 +1,50 @@ +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +Documentation Tests for the existence and functionality of RIC components + +Library KubernetesEntity ${NAMESPACE} +Library Collections +Library String + +# Resource ../resources/appmgr/appmgr_interface.robot +# Resource ../resources/e2mgr/e2mgr_interface.robot + +*** Variables *** +${NAMESPACE} %{RICPLT_NAMESPACE} +${PFX} %{RICPLT_RELEASE_NAME} + +*** Test Cases *** +Deployments + [Tags] etetests k8stests ci_tests + @{Components} = Split String %{RICPLT_COMPONENTS} + :FOR ${Component} IN @{Components} + \ Log Retrieving Deployment for ${Component} + #\ ${deploy} = Deployment ${PFX}-${Component} + # new helm deployment naming 6/2019 + \ ${deploy} = Deployment deployment-${PFX}-${Component} + \ ${status} = Most Recent Availability Condition @{deploy.status.conditions} + \ Should Be Equal As Strings ${status} True ignore_case=True msg=${Component} is not available + +*** Keywords *** +Most Recent Availability Condition + # this makes the probably-unsafe assumption that the conditions are ordered + # temporally. + [Arguments] @{Conditions} + ${status} = Set Variable 'False' + :FOR ${Condition} IN @{Conditions} + \ ${status} = Set Variable If '${Condition.type}' == 'Available' ${Condition.status} ${status} + [Return] ${status} diff --git a/ric_robot_suite/robot/testsuites/update_ric_page.robot b/ric_robot_suite/robot/testsuites/update_ric_page.robot new file mode 100644 index 0000000..a2efd1c --- /dev/null +++ b/ric_robot_suite/robot/testsuites/update_ric_page.robot @@ -0,0 +1,28 @@ +*** Settings *** +Documentation Initializes RIC Test Web Page and Password + +Library Collections +Library OperatingSystem +Library StringTemplater + + +Test Timeout 5 minutes + +*** Variables *** +${URLS_HTML_TEMPLATE} robot/assets/templates/web/index.html.template + +${HOSTS_PREFIX} vm +${WEB_USER} test +${WEB_PASSWORD} + +${URLS_HTML} html/index.html +${CREDENTIALS_FILE} /etc/lighttpd/authorization +#${CREDENTIALS_FILE} authorization + +*** Test Cases *** +Update RIC Page + [Tags] UpdateWebPage + Run Keyword If '${WEB_PASSWORD}' == '' Fail "WEB Password must not be empty" + Run Keyword If '${WEB_PASSWORD}' != '' Create File ${CREDENTIALS_FILE} ${WEB_USER}:${WEB_PASSWORD} + +*** Keywords *** diff --git a/ric_robot_suite/runTags.sh b/ric_robot_suite/runTags.sh new file mode 100755 index 0000000..f870507 --- /dev/null +++ b/ric_robot_suite/runTags.sh @@ -0,0 +1,124 @@ +#!/bin/bash + +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + + + +# Set the defaults +DEFAULT_LOG_LEVEL="TRACE" # Available levels: TRACE, DEBUG, INFO (default), WARN, NONE (no logging) +DEFAULT_RES="1280x1024x24" +DEFAULT_DISPLAY=":99" +DEFAULT_ROBOT_TEST="-i health" +INSTALL_NAME="RIC" +DEFAULT_OUTPUT_FOLDER=./ + +# To mitigate the chromedriver hanging issue +export DBUS_SESSION_BUS_ADDRESS=/dev/null + +# Use default if none specified as env var +LOG_LEVEL=${LOG_LEVEL:-$DEFAULT_LOG_LEVEL} +RES=${RES:-$DEFAULT_RES} +DISPLAY=${DISPLAY:-$DEFAULT_DISPLAY} + +# OUTPUT_FOLDER env variable will be overridden by -d command line argument. +OUTPUT_FOLDER=${OUTPUT_FOLDER:-$DEFAULT_OUTPUT_FOLDER} + +VARIABLEFILES= +LISTENERS= +VARIABLES="--removekeywords name:keystone_interface.*" + +## Single argument, it is an include tag +if [ $# -eq 1 ]; then + ROBOT_TAGS="-i $1" +fi + +## +## if more than 1 tag is supplied, the must be provided with -i or -e +## +while [ $# -gt 1 ] +do + key="$1" + + case $key in + -i|--include) + ROBOT_TAGS="${ROBOT_TAGS} -i $2" + shift + ;; + -e|--exclude) + ROBOT_TAGS="${ROBOT_TAGS} -e $2" + shift + ;; + -d|--outputdir) + OUTPUT_FOLDER=$2 + shift + ;; + --display) + DISPLAY=:$2 + shift + ;; + --listener) + LISTENERS="${LISTENER} --listener $2 " + shift + ;; + -V) + VARIABLEFILES="${VARIABLEFILES} -V $2 " + shift + ;; + -v) + VARIABLES="${VARIABLES} -v $2 " + shift + ;; + esac + shift +done + +if [ "${ROBOT_TAGS}" = "" ];then + ROBOT_TAGS=$DEFAULT_ROBOT_TEST +fi + +# Start Xvfb +echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}" +Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR & +XVFBPID=$! +# Get pid of this spawned process to make sure we kill the correct process later + +export DISPLAY=${DISPLAY} + +# Execute tests +echo -e "Executing robot tests at log level ${LOG_LEVEL}" + +ROBOT_LIBS=./robot/library:./robot/library/ricutils:./robot/library/eteutils:./robot/library/heatbridge + +cd /var/opt/${INSTALL_NAME} +python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} ${LISTENERS} -P ${ROBOT_LIBS} ${ROBOT_TAGS} /var/opt/${INSTALL_NAME}/robot/testsuites/ +RET_CODE=$? + +# Stop Xvfb we started earlier +# select it from list of possible Xvfb pids running because +# a) there may be multiple Xvfbs running and +# b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be) +PIDS=$(pgrep Xvfb) +for P in $PIDS +do + if [ $P == $XVFBPID ];then + kill -9 $P + fi +done + +exit $RET_CODE diff --git a/ric_robot_suite/setup.sh b/ric_robot_suite/setup.sh new file mode 100755 index 0000000..57201cc --- /dev/null +++ b/ric_robot_suite/setup.sh @@ -0,0 +1,175 @@ +#!/bin/bash + +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + + +# +# setup : script to setup required runtime environment. This script can be run again to update anything +# this should stay in your project directory + + +# save console output in setup_.log file in project directory +timestamp=$(date +"%m%d%Y_%H%M%S") +LOG_FILE=setup_$timestamp.log +exec > >(tee -a ${LOG_FILE} ) +exec 2> >(tee -a ${LOG_FILE} >&2) + + +# get the path +path=$(pwd) +pip install \ +--no-cache-dir \ +--exists-action s \ +--target="$path/robot/library" \ +'selenium<=3.0.0' \ +'requests==2.11.1' \ +'robotframework-selenium2library==1.8.0' \ +'robotframework-databaselibrary==0.8.1' \ +'robotframework-extendedselenium2library==0.9.1' \ +'robotframework-requests==0.5.0' \ +'robotframework-sshlibrary==2.1.2' \ +'robotframework-sudslibrary==0.8' \ +'robotframework-ftplibrary==1.3' \ +'robotframework-rammbock==0.4.0.1' \ +'deepdiff==2.5.1' \ +'dnspython==1.15.0' \ +'robotframework-httplibrary==0.4.2' \ +'robotframework-archivelibrary==0.3.2' \ +'PyYAML==3.12' \ +'kubernetes==9.0.0' \ +'pick==0.6.4' \ +'robotframework-kafkalibrary==0.0.2' + +# dk3239: HACK +# for some reason the parent __init__.py isn't getting installed +# with google-auth. This is a quick fix until I figure out which +# package (hint: it's not "google") owns it. +touch $path/robot/library/google/__init__.py + +# get the git for the eteutils you will need to add a private key to your ssh before this +if [ -d $path/testsuite/eteutils ] +then + # Support LF build location + cd $path/testsuite/eteutils +else + cd ~ + git config --global http.sslVerify false + if [ -d ~/python-testing-utils ] + then + cd python-testing-utils + git pull origin master + else + git clone -b 3.0.1-ONAP https://gerrit.onap.org/r/testsuite/python-testing-utils.git + cd python-testing-utils + fi +fi + +# install python-testing-utils from current directory (.) +pip install \ +--no-cache-dir \ +--upgrade \ +--exists-action s \ +--target="$path/robot/library" . + + +# install the ric project python scripts +# from /var/opt/RIC/ric-python-utils +# to /var/opt/RIC/robot/library/ricutils +if [ -d $path/ric-python-utils ] +then + # Support LF build location + cd $path/ric-python-utils + # install ric-python-utils from current directory (.) + pip install \ + --no-cache-dir \ + --upgrade \ + --exists-action s \ + --target="$path/robot/library" . +fi + +# NOTE: Patch to incude explicit install of paramiko to 2.0.2 to work with sshlibrary 2.1.2 +# This should be removed on new release of paramiko (2.1.2) or sshlibrary +# https://github.com/robotframework/SSHLibrary/issues/157 +pip install \ +--no-cache-dir \ +--target="$path/robot/library" \ +-U 'paramiko==2.0.2' + + +# Go back to execution folder +cd $path + +# if the script is running during the image build skip the rest of it +# as required software is installed already. +if $BUILDTIME +then + # we need to update PATH with APT-GET installed chromium-chromedriver + echo "Adding in-container chromedriver to PATH" + ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver +else + # + # Get the appropriate chromedriver. Default to linux64 + # + CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.43 + CHROMEDRIVER_ZIP=chromedriver_linux64.zip + CHROMEDRIVER_TARGET=chromedriver.zip + + # Handle mac and windows + OS=`uname -s` + case $OS in + MINGW*_NT*) + CHROMEDRIVER_ZIP=chromedriver_win32.zip + ;; + Darwin*) + CHROMEDRIVER_ZIP=chromedriver_mac64.zip + ;; + *) echo "Defaulting to Linux 64" ;; + esac + + if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ] + then + curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET + unzip chromedriver.zip -d /usr/local/bin + else + curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET + unzip $CHROMEDRIVER_TARGET + fi + rm -rf $CHROMEDRIVER_TARGET +fi + +# +# Install kafkacat : https://github.com/edenhill/kafkacat +# +OS=`uname -s` +case $OS in + Darwin) + brew install kafkacat ;; + Linux) + apt-get -y install kafkacat +esac +# +# Install protobuf +# +OS=`uname -s` +case $OS in + Darwin) + brew install protobuf ;; + Linux) + apt-get -y install protobuf-compiler +esac diff --git a/ric_robot_suite/version.properties b/ric_robot_suite/version.properties new file mode 100644 index 0000000..ac51f1f --- /dev/null +++ b/ric_robot_suite/version.properties @@ -0,0 +1,14 @@ +# Versioning variables +# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) +# because they are used in Jenkins, whose plug-in doesn't support + +major=0 +minor=2 +patch=0 + +base_version=${major}.${minor}.${patch} + +# Release must be completed with git revision # in Jenkins +release_version=${base_version} +snapshot_version=${base_version}-SNAPSHOT +tags="latest ${base_version}-STAGING-latest" diff --git a/simulators/e2sim/.gitignore b/simulators/e2sim/.gitignore new file mode 100644 index 0000000..16821e3 --- /dev/null +++ b/simulators/e2sim/.gitignore @@ -0,0 +1,9 @@ +build/ +rmr/ +temp/ +.tags +.tags1 +tools/asn1c +build_and_run_e2sim +test_e2_termination +upload_to_demo_laptop diff --git a/simulators/e2sim/CMakeLists.txt b/simulators/e2sim/CMakeLists.txt new file mode 100644 index 0000000..3349545 --- /dev/null +++ b/simulators/e2sim/CMakeLists.txt @@ -0,0 +1,71 @@ +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +cmake_minimum_required(VERSION 3.5.1) +set(CMAKE_CXX_COMPILER "/usr/bin/g++") +set(CMAKE_CXX_STANDARD 14) + +project(e2sim) + +set (HOME_DIR $ENV{HOME}) + +include_directories("src") +include_directories("src/ASN1/lib") +include_directories("src/SCTP/") +include_directories("src/E2AP") +include_directories("src/X2AP") + +#for ASN1_API +#include_directories("src/ASN1") +#include_directories("src/ASN1/asn") +#include_directories("src/ASN1/generated") +#add_library(ASN1_API +# "src/ASN1/lib/asn_x2ap.cpp" +#) + +link_directories("build") + +#----------------------------------------------- +file(GLOB E2AGENT_SOURCES + "src/e2agent.cpp" + "src/e2sim_defs.cpp" + "src/SCTP/*.cpp" + "src/E2AP/*.cpp" + ) +add_executable(e2agent ${E2AGENT_SOURCES}) + +#for ASN1_API +target_link_libraries(e2agent ASN1_API) + +#----------------------------------------------- +file(GLOB E2TERM_SOURCES + "src/e2termination_test.cpp" + "src/e2sim_defs.cpp" + "src/SCTP/*.cpp" + "src/E2AP/*.cpp" + ) +add_executable(e2term ${E2TERM_SOURCES}) +target_link_libraries(e2term ASN1_API) + +#----------------------------------------------- +file(GLOB X2TERM_SOURCES + "src/x2termination_test.cpp" + "src/e2sim_defs.cpp" + "src/SCTP/*.cpp" + "src/X2AP/*.cpp" + ) +add_executable(x2term ${X2TERM_SOURCES}) +target_link_libraries(x2term ASN1_API) diff --git a/simulators/e2sim/README.md b/simulators/e2sim/README.md new file mode 100644 index 0000000..6c8d10c --- /dev/null +++ b/simulators/e2sim/README.md @@ -0,0 +1,78 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +# INSTALLATION + * Tested environment: Ubuntu 16.04 + * Install dependencies + $ sudo apt-get update + $ sudo apt-get install -y + build-essential + git + cmake + libsctp-dev + lksctp-tools + autoconf + automake + libtool + bison + flex + libboost-all-dev + $ sudo apt-get clean + + ## Build + $ ./build_e2sim + +# SET ENVIRONMENT VARIABLE + Add this line to `~/.bashrc` + $ export E2SIM_DIR= + +# RUN E2SIM + $ cd $E2SIM_DIR/build/ + $ ./e2agent [SERVER IP] [PORT] + + By default, SERVER IP = 127.0.0.1, PORT = 36422 (X2AP Port) + +# DOCKER + Note: The commands in this section must be run from $E2SIM_DIR + + * Build docker image + $ ./build_docker + + ## Run docker container + $ sudo docker run --rm --net host -it e2agent sh -c "./build/e2agent [SERVER IP] [PORT]" + +# SUPPORTED MESSAGE FLOWS (Last updated May 24, 2019) + +- X2 SETUP REQUEST (RIC -> RAN) +- X2 SETUP RESPONSE (RAN -> RIC) + +- ENDC X2 SETUP REQUEST (RIC -> RAN) +- ENDC X2 SETUP RESPONSE (RAN -> RIC) + +- RIC SUBSCRIPTION REQUEST (RIC -> RAN) +- RIC SUBSCRIPTION RESPONSE (RAN -> RIC) +- RIC SUBSCRIPTION FAILURE (RAN -> RIC) + + +# Change logs: + 03/12/2019: currently supports sending and receiving X2 SETUP messages + 05/21/2019: add support for ENDC X2 SETUP + no longer use asn1c + all X2AP and E2AP messages are encapsulated into E2AP-PDU + 05/24/2019: add support for RIC SUBSCRIPTION REQUEST, RESPONSE, and FAILURE diff --git a/simulators/e2sim/build_and_run_e2agent b/simulators/e2sim/build_and_run_e2agent new file mode 100755 index 0000000..1af78d6 --- /dev/null +++ b/simulators/e2sim/build_and_run_e2agent @@ -0,0 +1,32 @@ +#***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +#***************************************************************************** + +# Run a default build and run the e2sim executable + +set -e + +clear + +./build_e2sim --clean + +./build_e2sim + +echo "===================== Running E2 Agent Simulator ========================" + +./build/e2agent diff --git a/simulators/e2sim/build_docker b/simulators/e2sim/build_docker new file mode 100755 index 0000000..b04e565 --- /dev/null +++ b/simulators/e2sim/build_docker @@ -0,0 +1,22 @@ +#!/bin/bash +#/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +#******************************************************************************/ + +set -e +sudo docker build -f docker/Dockerfile -t e2agent . diff --git a/simulators/e2sim/build_e2sim b/simulators/e2sim/build_e2sim new file mode 100755 index 0000000..a24ba14 --- /dev/null +++ b/simulators/e2sim/build_e2sim @@ -0,0 +1,151 @@ +#!/bin/bash +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# build utility for E2 Agent + +set -e + +E2SIM_DIR=$PWD +ASN1_C_DIR=$E2SIM_DIR/build/CMakeFiles/ASN1 + +source $E2SIM_DIR/tools/build_helper.bash + +print_help() +{ + echo " + This program installs E2 Simulator + You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14 + The program is run by default with no option + + Options + --clean + Erase all files to make a rebuild from start + -h + Print this help + " +} + +generate_asn1c_codes() +{ + X2AP_RELEASE="R14" + X2AP_ASN_FILES="x2ap-14.6.0.asn1" + ASN_SOURCE_X2AP=$E2SIM_DIR/src/X2AP/MESSAGES/ASN1/${X2AP_RELEASE}/${X2AP_ASN_FILES} + + ASN_SOURCE_Pendulum=$E2SIM_DIR/src/ONS2019/pendulum.asn1 + + done_flag="$ASN1_C_DIR"/done + + #-ot = older than, -nt = newer than + + if [ "$done_flag" -ot $ASN_SOURCE_X2AP ] ; then + echo_info "Generate C codes for from source file" + #echo_info $ASN_SOURCE + + rm -f "$ASN1_C_DIR"/*.c "$ASN1_C_DIR"/*.h + mkdir -p $ASN1_C_DIR + asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example \ + -fno-include-deps -D $ASN1_C_DIR $ASN_SOURCE_X2AP \ + |& egrep -v "^Copied|^Compiled" | sort -u + + asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example \ + -fno-include-deps -D $ASN1_C_DIR $ASN_SOURCE_Pendulum \ + |& egrep -v "^Copied|^Compiled" | sort -u + + echo_success "ASN1 C codes generated at: $ASN1_C_DIR" + fi + touch $done_flag +} + +install_rmr() +{ + echo_info "Will install rmr library" + /bin/bash rmr_interface/rmr_install.sh +} + +compile_asn_api_lib() +{ + echo_info "Will complie ASN1_API library" + # rm -rf build/libASN1_API.a + # rm -rf build/asn_x2ap.o + # rm -rf build/asn_e2ap.o + + g++ -O3 -std=c++14 -Wall \ + -I./src/ASN1/ -I./src/ASN1/asn/ -I./src/ASN1/generated/ \ + -c src/ASN1/lib/asn_e2ap.cpp \ + -o build/asn_e2ap.o + ar -crv build/libASN1_API.a build/asn_e2ap.o + + g++ -O3 -std=c++14 -Wall \ + -I./src/ASN1/ -I./src/ASN1/asn/ -I./src/ASN1/generated/ \ + -c src/ASN1/lib/asn_x2ap.cpp \ + -o build/asn_x2ap.o + ar -crv build/libASN1_API.a build/asn_x2ap.o +} + +function main() +{ + + case "$1" in + --clean) + echo_info "Will clean all previously producted files under build/" + rm -rf $E2SIM_DIR/build + echo_success "Clean Done" + exit + ;; + + "") + ;; + + --rmr) + install_rmr + exit + ;; + + --lib) + compile_asn_api_lib + exit + ;; + + -h) + print_help + exit 1;; + + *) + echo_error "Unknown option $1" + exit + esac + + BUILD_DIR=$E2SIM_DIR/build + mkdir -p $BUILD_DIR + mkdir -p $BUILD_DIR/log + + # generate_asn1c_codes #X2AP, pendulum + + compile_asn_api_lib + + echo_info "Will build e2sim" + cd $BUILD_DIR + rm -rf CMakeCache.txt + cmake .. + make -j`nproc` + + echo_success "e2sim compiled" + +} + +main "$@" diff --git a/simulators/e2sim/docker/Dockerfile b/simulators/e2sim/docker/Dockerfile new file mode 100644 index 0000000..f1b6b62 --- /dev/null +++ b/simulators/e2sim/docker/Dockerfile @@ -0,0 +1,47 @@ +#/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +#******************************************************************************/ + +FROM ubuntu:16.04 + +# location in the container +ENV E2SIM_DIR /home/e2sim + +# Install necessary packages +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + git \ + cmake \ + libsctp-dev \ + lksctp-tools \ + autoconf \ + automake \ + libtool \ + bison \ + flex \ + libboost-all-dev \ + && apt-get clean + +# Copy E2Sim sources into the container +COPY ./ ${E2SIM_DIR} +WORKDIR ${E2SIM_DIR} + +#------------- Build E2SIM ----------------------- +RUN ./build_e2sim --clean +RUN ./build_e2sim diff --git a/simulators/e2sim/docker/old/DockerFile_old b/simulators/e2sim/docker/old/DockerFile_old new file mode 100644 index 0000000..17aa6bd --- /dev/null +++ b/simulators/e2sim/docker/old/DockerFile_old @@ -0,0 +1,53 @@ +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Docker file to build container for E2 Simulator, for which it can be called +# to run both the E2 Agent and E2 Termination. +# Note: run docker comamnds from root directory of e2sim, e.g., $E2SIM_DIR +# +# build: $ sudo docker build -f docker/Dockerfile -t e2sim . + +FROM ubuntu:16.04 + + +# location in the container +ENV E2SIM_DIR /home/e2sim + +# Install necessary packages +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + git \ + cmake \ + libsctp-dev \ + lksctp-tools \ + autoconf \ + automake \ + libtool \ + bison \ + flex \ + && apt-get clean + +# Install E2Sim +COPY ./ ${E2SIM_DIR} +WORKDIR ${E2SIM_DIR} +RUN ./docker/install_asn1c +RUN ./build_e2sim --clean +RUN ./build_e2sim + +CMD ./build/e2sim diff --git a/simulators/e2sim/docker/old/Dockerfile b/simulators/e2sim/docker/old/Dockerfile new file mode 100644 index 0000000..6cbfbf5 --- /dev/null +++ b/simulators/e2sim/docker/old/Dockerfile @@ -0,0 +1,42 @@ +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM e2sim_base + +# ------------ COPY E2SIM codes ------------------ +COPY ./ ${E2SIM_DIR} +WORKDIR ${E2SIM_DIR} + +# ensure an empty rt is there if none is mounted at spinup +COPY docker/empty.rt /usr/local/route/local.rt + +#------------- Build E2SIM ----------------------- +RUN ./build_e2sim --clean +RUN ./build_e2sim + +#-------------- Configure rmr ------------------------- +ENV RMR_SEED_RT=/usr/local/route/local.rt +#export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt + +ENV RMR_RTG_SVC=localhost:9990 +ENV E2TERM_RMR_RCV_PORT=48886 +ENV DEMO_SENDER_PTO=1 +ENV DEMO_MAX_PAYLOAD_BYTES=240 + +# --------------- Run E2Termination --------------------- +CMD ./build/e2sim diff --git a/simulators/e2sim/docker/old/Dockerfile_base b/simulators/e2sim/docker/old/Dockerfile_base new file mode 100644 index 0000000..7ac932b --- /dev/null +++ b/simulators/e2sim/docker/old/Dockerfile_base @@ -0,0 +1,60 @@ +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Docker file to build container for E2 Simulator, for which it can be called +# to run both the E2 Agent and E2 Termination. +# Note: run docker comamnds from root directory of e2sim, e.g., $E2SIM_DIR +# +# build with 2 steps +# $ sudo docker build -f docker/Dockerfile_base -t e2sim_base . +# $ sudo docker build -f docker/Dockerfile -t e2sim . +# +# run e2 termination +# $ sudo docker run --rm --net host -it e2sim sh -c "./build/e2sim 127.0.0.2" + +FROM ubuntu:16.04 + + +# location in the container +ENV E2SIM_DIR /home/e2sim + +# Install necessary packages +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + git \ + cmake \ + libsctp-dev \ + lksctp-tools \ + autoconf \ + automake \ + libtool \ + bison \ + flex + +# For rmr +RUN apt-get install -y bash vim ksh iputils-ping +RUN apt-get clean + +# Copy E2Sim to the container +COPY ./ ${E2SIM_DIR} +WORKDIR ${E2SIM_DIR} +RUN ./docker/install_asn1c + +#-------------INSTALL rmr ------------------------ +RUN ./docker/install_rmr diff --git a/simulators/e2sim/docker/old/configure_rmr b/simulators/e2sim/docker/old/configure_rmr new file mode 100755 index 0000000..ff0a685 --- /dev/null +++ b/simulators/e2sim/docker/old/configure_rmr @@ -0,0 +1,27 @@ +#!/bin/bash +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +export RMR_SEED_RT=/usr/local/route/local.rt +#export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +export RMR_RTG_SVC=localhost:9990 +#export DUMMY_SENDER_RMR_RCV_PORT=48086 +export E2TERM_RMR_RCV_PORT=48886 +export DEMO_SENDER_PTO=1 +export DEMO_MAX_PAYLOAD_BYTES=240 diff --git a/simulators/e2sim/docker/old/empty.rt b/simulators/e2sim/docker/old/empty.rt new file mode 100644 index 0000000..0063bb9 --- /dev/null +++ b/simulators/e2sim/docker/old/empty.rt @@ -0,0 +1,5 @@ +# an empty route table to put into an image so there is some file there +# if on image start nothing is mounted onto /usr/local/route + +newrt|start +newrt|end diff --git a/simulators/e2sim/docker/old/install_asn1c b/simulators/e2sim/docker/old/install_asn1c new file mode 100755 index 0000000..daf4bfe --- /dev/null +++ b/simulators/e2sim/docker/old/install_asn1c @@ -0,0 +1,29 @@ +#!/bin/bash +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +echo "Will install asn1c" +cd tools +rm -rf asn1c +git clone https://gitlab.eurecom.fr/oai/asn1c.git +cd asn1c +git checkout 0a7524184f16e7093990a31d8d4db487a16e5782 +autoreconf -iv +./configure +make +make install diff --git a/simulators/e2sim/docker/old/install_rmr b/simulators/e2sim/docker/old/install_rmr new file mode 100755 index 0000000..522df48 --- /dev/null +++ b/simulators/e2sim/docker/old/install_rmr @@ -0,0 +1,32 @@ +#!/bin/bash +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# pull rmr to $E2SIM_DIR/ and checkout the 'stable' demo commit, +# then build and install in /usr/local + +echo "Will install rmr" +rm -rf rmr +git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr +date; ls -al /usr/local/lib +cd rmr +git checkout 6735f136906ce2 +mkdir .build +cd .build +cmake .. +make install diff --git a/simulators/e2sim/docker/old/local.rt b/simulators/e2sim/docker/old/local.rt new file mode 100644 index 0000000..84ea983 --- /dev/null +++ b/simulators/e2sim/docker/old/local.rt @@ -0,0 +1,9 @@ +newrt|start +#RMR_RCV_PORT of the receiver is 6560 +rte|0|localhost:6560 + +# this is needed so that receiver acks can be sent via rmr_rts_msg() calls +# here e2 agent is the name of the machine +# is the RMR_RCV_PORT of the sender +rte|89|e2agent:48086 +newrt|end diff --git a/simulators/e2sim/helm/README.md b/simulators/e2sim/helm/README.md new file mode 100644 index 0000000..dfff99a --- /dev/null +++ b/simulators/e2sim/helm/README.md @@ -0,0 +1,22 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +# +# the test repo needs to be on the same parent path as the dep repo +# simply run e2sim_install.sh from this directory +# diff --git a/simulators/e2sim/helm/e2sim/Chart.yaml b/simulators/e2sim/helm/e2sim/Chart.yaml new file mode 100644 index 0000000..f3a950c --- /dev/null +++ b/simulators/e2sim/helm/e2sim/Chart.yaml @@ -0,0 +1,22 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: e2sim +version: 0.1.0 diff --git a/simulators/e2sim/helm/e2sim/templates/_helpers.tpl b/simulators/e2sim/helm/e2sim/templates/_helpers.tpl new file mode 100644 index 0000000..ce3748d --- /dev/null +++ b/simulators/e2sim/helm/e2sim/templates/_helpers.tpl @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "e2sim.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "e2sim.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "e2sim.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/simulators/e2sim/helm/e2sim/templates/bin/_e2sim-run.sh.tpl b/simulators/e2sim/helm/e2sim/templates/bin/_e2sim-run.sh.tpl new file mode 100755 index 0000000..0ee09b6 --- /dev/null +++ b/simulators/e2sim/helm/e2sim/templates/bin/_e2sim-run.sh.tpl @@ -0,0 +1,54 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +#!/bin/sh + +# Launch the e2 simulator on ${E2SIM_BIND_ADDR}:${E2SIM_BIND_PORT} +# If E2SIM_BIND_ADDR is not supplied, picks the address of the interface +# associated with the default route for E2SIM_BIND_AF (either +# "inet" [default] or "inet6"). + +if [ -z "${E2SIM_BIND_ADDR}" ]; then + if [ `echo "x${E2SIM_BIND_AF}x" | tr [A-Z] [a-z]` != "xinet6x" ]; then + AF='inet' + DEFROUTE='0/0' + LO='127.0.0.1' + else + AF='inet6' + DEFROUTE='::0/0' + LO='00:00:00:00:00:00' + fi + if [ -z "${E2SIM_BIND_IF}" ]; then + # bind on the address associated with the default route + E2SIM_BIND_IF=`ip -br -f ${AF} route show ${DEFROUTE}| sed 's/.*dev[\ ]*\([^\ ]*\).*/\1/'` + if [ -z ${E2SIM_BIND_IF} ]; then + # this is kinda bogus, but it's the only real fallback: take the first + # non-loopback interface. + E2SIM_BIND_IF=`ip -f ${AF} -o link list up | grep -v LOOPBACK | head -1 |awk -F: '{print $2}'` + fi + fi + E2SIM_BIND_ADDR=`ip -f ${AF} -o addr show ${E2SIM_BIND_IF:-eth0} scope global | sed -e 's/.*inet[6\ ]*\([^\ ]*\)\/.*/\1/'` +fi + +if [ -z $E2SIM_BIND_ADDR ]; then + # search failed. be nondestructively useless. + echo "No suitable address found, binding on loopback addess ${LO}" + E2SIM_BIND_ADDR=${LO} +else + echo "e2sim starting at ${E2SIM_BIND_ADDR}:${E2SIM_PORT:-36422}" +fi + +${E2SIM:-/home/e2sim/build/e2agent} ${E2SIM_BIND_ADDR} ${E2SIM_PORT:-36422} diff --git a/simulators/e2sim/helm/e2sim/templates/configmap-e2sim-bin.yaml b/simulators/e2sim/helm/e2sim/templates/configmap-e2sim-bin.yaml new file mode 100644 index 0000000..ec30488 --- /dev/null +++ b/simulators/e2sim/helm/e2sim/templates/configmap-e2sim-bin.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: configmap-e2sim-bin + namespace: {{ .Release.Namespace }} +data: + e2sim-run.sh: | + {{- include "e2sim/templates/bin/_e2sim-run.sh.tpl" . | indent 4 }} diff --git a/simulators/e2sim/helm/e2sim/templates/deployment.yaml b/simulators/e2sim/helm/e2sim/templates/deployment.yaml new file mode 100644 index 0000000..294c778 --- /dev/null +++ b/simulators/e2sim/helm/e2sim/templates/deployment.yaml @@ -0,0 +1,79 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "e2sim.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "e2sim.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + spec: + hostNetwork: true + containers: + - name: {{ include "e2sim.name" . }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /e2sim-run.sh + ports: + - containerPort: {{ .Values.service.port }} + env: + - name: E2SIM_NETWORK_TYPE + value: {{ .Values.e2sim.network.type | default "host" }} + - name: E2SIM_PORT + value: {{ .Values.e2sim.network.port | default 36422 |quote}} + - name: E2SIM_BIND_ADDR + value: {{ .Values.e2sim.network.address }} + - name: E2SIM_BIND_IF + value: {{ .Values.e2sim.network.interface }} + - name: E2SIM_BIND_AF + value: {{ .Values.e2sim.network.addressFamily | default "inet" }} + volumeMounts: + - name: dshm + mountPath: /dev/shm + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: e2sim-bin + subPath: e2sim-run.sh + mountPath: /e2sim-run.sh + resources: + volumes: + - name: dshm + emptyDir: + medium: Memory + - name: localtime + hostPath: + path: /etc/localtime + - name: e2sim-bin + configMap: + name: configmap-e2sim-bin + defaultMode: 0755 + imagePullSecrets: + - name: {{ .Values.image.repositoryCred }} + diff --git a/simulators/e2sim/helm/e2sim/values.yaml b/simulators/e2sim/helm/e2sim/values.yaml new file mode 100755 index 0000000..5f5cbca --- /dev/null +++ b/simulators/e2sim/helm/e2sim/values.yaml @@ -0,0 +1,48 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +replicaCount: 1 + +image: + repository: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001 + repositoryCred: docker-reg-cred + # for local testing + #repository: ric/testsuite + name: test/e2sim + tag: latest + pullPolicy: IfNotPresent + +nameOverride: "" +fullnameOverride: "" + +e2sim: + network: + # network implementation type: hostnetworking or DANM + # type: ["host"]|"danm" + # where e2sim should listen for SCTP connections: + # o if "address" is supplied, listen on that IP (v4 or v6) address + # o if "address" is not supplied and "interface" is supplied, listen on the + # first globally-scoped address on that interface of family "addressFamily" + # (default "inet") + # o if neither "address" nor "interface" is supplied, listen on the first + # globally-scoped address of family "addressFamily" (default "inet") on + # the interface associated with the container's default route, if any; if + # the container does not have a default route, the first interface with + # a globally-scoped address will be used. + # address: addr + # interface: ifname + # addressFamily: ["inet"]|"inet6" \ No newline at end of file diff --git a/simulators/e2sim/helm/e2sim_install.sh b/simulators/e2sim/helm/e2sim_install.sh new file mode 100755 index 0000000..745d82b --- /dev/null +++ b/simulators/e2sim/helm/e2sim_install.sh @@ -0,0 +1,79 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +OVERRIDEYAML=$1 + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +#/root/test/ric_robot_suite/helm +# extract the base to find root to dep + +BASE=${DIR%/test*} + +# /data/ORAN-OSC/it/dep/ric-platform/50-RIC-Platform/bin/install +BASEDIR05=$BASE/dep/ric-platform/50-RIC-Platform/ +BASEDIR_COMMON_TEMPLATE=$BASE/dep/ric-common/Common-Template/helm/ric-common + +echo "Using etc/ric.conf from $BASEDIR05" + + +source $BASEDIR05/etc/ric.conf + + +if [ -z "$RICPLT_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICPLT_RELEASE_NAME +fi + +# Namespace configuration +if [ -z "$RICPLT_NAMESPACE" ];then + PLT_NAMESPACE=$plt_namespace +else + PLT_NAMESPACE=$RICPLT_NAMESPACE +fi + + + +RICPLT_COMPONENTS="e2sim" + +echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]" +echo "Platform Namespace: $PLT_NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + +COMMON_CHART_VERSION=$(cat $BASEDIR_COMMON_TEMPLATE/Chart.yaml | grep version | awk '{print $2}') + + +helm package -d /tmp $BASEDIR_COMMON_TEMPLATE + + +for component in $RICPLT_COMPONENTS; do + echo "Preparing chart for comonent $component" + mkdir -p $DIR/$component/charts/ + cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/$component/charts/ + if [ -z $OVERRIDEYAML ]; then + echo "helm install --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component" + helm install --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component + else + echo "helm install -f $OVERRIDEYAML --namespace \"${PLT_NAMESPACE}\" --set \"Release.HelmReleaseName=${RELEASE_NAME}\" --name \"${RELEASE_NAME}-$component\" $DIR/../helm/$component" + helm install -f $OVERRIDEYAML --namespace "${PLT_NAMESPACE}" --set "Release.HelmReleaseName=${RELEASE_NAME}" --name "${RELEASE_NAME}-$component" $DIR/$component + fi +done diff --git a/simulators/e2sim/src/ASN1/asn/asn.hpp b/simulators/e2sim/src/ASN1/asn/asn.hpp new file mode 100755 index 0000000..3affd81 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/asn.hpp @@ -0,0 +1,27 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/version.hpp" +#include "asn/elements.hpp" +#include "asn/constraints.hpp" +#include "asn/variant.hpp" \ No newline at end of file diff --git a/simulators/e2sim/src/ASN1/asn/ber/codec.hpp b/simulators/e2sim/src/ASN1/asn/ber/codec.hpp new file mode 100755 index 0000000..3a42ad5 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/codec.hpp @@ -0,0 +1,931 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/elements.hpp" +#include "asn/ber/common.hpp" +#include "asn/ber/context.hpp" +#include "asn/ber/tag.hpp" +#include "asn/ber/length.hpp" +#include "asn/ber/visitor.hpp" +#include "asn/ber/opentype.hpp" + +namespace asn { +namespace ber { + +/******************************************************************************** +pack (X.690) +*********************************************************************************/ +template +bool pack(IE const& ie, EncoderCtx& ctx) +{ + ctx.refErrorCtx().reset(); + Element::run(ie, ctx); + + if (ctx) + Tools::bit_accessor::padByte(ctx.refBuffer()); + + return static_cast(ctx); +} +/******************************************************************************** +unpack (X.690) +*********************************************************************************/ +template +bool unpack(IE& ie, DecoderCtx& ctx) +{ + Element::run(ie, ctx); + + if (ctx) + Tools::bit_accessor::padByte(ctx.refBuffer()); + + if(ctx && ctx.refBuffer().getBytesLeft()) + { + ctx.ie_name(IE::name()); + ctx.refErrorCtx().lengthErrorBytes(ctx.refBuffer().getBytesLeft(), 0); + } + + return static_cast(ctx); +} + +/*************************************************************************************** +* ElementType +***************************************************************************************/ +template +struct ElementType; + +/*************************************************************************************** +* ExplicitCodec: Codec for elements with EXPLICIT tag +***************************************************************************************/ +template +struct ExplicitCodec +{ + using tag_t = Tag; + static bool inline is_matched(tag_value_t _tag) {return _tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + tag_t::encode(ctx); + u8* len_ptr = buffer.advance(1); //reserve for the length + + Element::run(static_cast(ie), ctx); + + size_t len = buffer.begin() - len_ptr - 1; + if(len > 127) + { + len_ptr[0] = 0x80; //undefinite length form per X.690 8.1.3.6 + uint8_t buff[2] = {0}; // end-of-contents octets (X.690 8.1.5) + buffer.putBytes(buff, sizeof(buff)); + } + else + { + len_ptr[0] = static_cast(len); //one byte form per X.690 8.1.3.4 + } + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + auto & buffer = ctx.refBuffer(); + size_t length = Length::decode(ctx); + + ASN_DECODER_TRACE("EX buffer: %s", static_cast(tag), length, ctx.refBuffer().toString()); + + if(length == indefinite_length) + { + Element::run(static_cast(ie), ctx); + + if(ctx) + { + uint8_t const* data_in = ctx.refBuffer().getBytes(2); + if(data_in && (data_in[0] || data_in[1])) + { + ctx.refErrorCtx().errorWrongEndOfContent(); + } + } + } + else + { + if (buffer.getBytesLeft() < length) + { + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), length); + } + else + { + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + length); + + Element::run(static_cast(ie), ctx); + + buffer.set_end(end); + } + } + + } + } +}; + +/*************************************************************************************** +* BOOLEAN: Encoding the boolean type (X.690 8.2) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + Length::encode(1, ctx); + if(ie.get()) + Tools::put_bytes(0xFF, 1, ctx); + else + Tools::put_bytes(0, 1, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + size_t length = Length::decode(ctx); + if(length != 1) + { + ctx.refErrorCtx().sizeRangeError(length, 1, 1); + } + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + uint8_t value; + Tools::get_bytes(value, 1, ctx); + ie.set(value > 0); + } + } + } +}; +/*************************************************************************************** +* INTEGER: Encoding the integer type (X.690 8.3) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + size_t length = Length::get(ie.get()); + Length::encode(length, ctx); + Tools::put_bytes(ie.get(), length, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + if(tag_t::value() != tag) + { + ctx.refErrorCtx().tagError(static_cast(tag)); + } + else + { + size_t length = Length::decode(ctx); + if(!length || length == indefinite_length) + ctx.refErrorCtx().sizeRangeError(length); + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + typename IE::value_type value; + Tools::get_bytes(value, length, ctx); + ie.set(value); + } + } + } +}; +/*************************************************************************************** +* ENUMERATED: Encoding the enumerated type (X.690 8.4) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + size_t length = Length::get(ie.get()); + Length::encode(length, ctx); + Tools::put_bytes(ie.get(), length, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + size_t length = Length::decode(ctx); + if(!length || length == indefinite_length) + ctx.refErrorCtx().sizeRangeError(length); + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + typename IE::value_type value; + Tools::get_bytes(value, length, ctx); + ie.set(value); + } + } + } +}; +/*************************************************************************************** +* REAL: Encoding the real type (X.690 8.5) +***************************************************************************************/ +//missing... +/*************************************************************************************** +* BIT STRING: Encoding the bitstring type (X.690 8.6) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + using ctag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value() || tag == ctag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + + uint8_t tail = ie.get_bitqty() % 8; + + size_t length = ie.get_buffer().size(); + Length::encode(length + 1, ctx); + + auto & buffer = ctx.refBuffer(); + buffer.putByte((8 - tail) & 0x7F); + + if (tail) + { + buffer.putBytes(ie.get_buffer().data(), length - 1); + u8 last_byte = *(ie.get_buffer().data() + length - 1); + + last_byte <<= 8 - tail; + buffer.putBytes(&last_byte, 1); + } + else + { + buffer.putBytes(ie.get_buffer().data(), length); + } + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ie.clear(); + if(tag_t::value() == tag) + { + size_t length = Length::decode(ctx); + if(!length || length == indefinite_length) + { + ctx.refErrorCtx().sizeRangeError(length); + } + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + uint8_t const* data_in = ctx.refBuffer().getBytes(length); + if(data_in) + { + size_t len_bytes = length - 1; + size_t bitqty = len_bytes << 3; + + if((data_in[0] & 0x80) || (bitqty < data_in[0])) + { + ctx.refErrorCtx().valueRangeError(data_in[0]); + } + else + { + bitqty = bitqty - data_in[0]; + uint8_t* data_out = ctx.refAllocator().alloc_bytes(len_bytes); + if (data_out) + { + memcpy(data_out, &data_in[1], len_bytes); + const u8 shift = bitqty % 8; + if (shift) + { + data_out[len_bytes - 1] >>= 8 - shift; + } + ie.set_buffer(bitqty, data_out); + } + else + { + ctx.refErrorCtx().allocatorNoMem(0, len_bytes); + } + } + } + } + } + else if(ctag_t::value() == tag) + { + //todo: implement the segmented data + ctx.refErrorCtx().errorUnsupported(); + } + else + { + ctx.refErrorCtx().tagError(static_cast(tag)); + } + } +}; +/*************************************************************************************** +* OCTET STRING: Encoding the octetstring type (X.690 8.7) +* Restricted Character string types (X.690 8.23) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + using ctag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value() || tag == ctag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + size_t length = ie.get().size(); + Length::encode(length, ctx); + ctx.refBuffer().putBytes(ie.get().data(), length); + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ie.clear(); + if(tag_t::value() == tag) + { + size_t length = Length::decode(ctx); + if(length == indefinite_length) + { + ctx.refErrorCtx().sizeRangeError(length); + } + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + uint8_t const* data_in = ctx.refBuffer().getBytes(length); + if(data_in) + { + ie.set(length, data_in); + } + } + } + else if(ctag_t::value() == tag) + { + //todo: implement the segmented data + ctx.refErrorCtx().errorUnsupported(); + } + else + { + ctx.refErrorCtx().tagError(static_cast(tag)); + } + } +}; +/*************************************************************************************** +* NULL: Encoding the null type (X.690 8.8) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + Length::encode(0, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + size_t length = Length::decode(ctx); + if(length) + ctx.refErrorCtx().sizeRangeError(length); + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + } + } +}; +/*************************************************************************************** +* SEQUENCE: Encoding the sequence type (X.690 8.9) +* SET: Encoding the set type (X.690 8.11) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + tag_t::encode(ctx); + u8* len_ptr = buffer.advance(1); //reserve for the length + + VisitorEncoderSeq ve(ctx, ie); + ie.encode(ve); + + size_t len = buffer.begin() - len_ptr - 1; + if(len > 127) + { + len_ptr[0] = 0x80; //undefinite length form per X.690 8.1.3.6 + uint8_t buff[2] = {0}; // end-of-contents octets (X.690 8.1.5) + buffer.putBytes(buff, sizeof(buff)); + } + else + len_ptr[0] = static_cast(len); //one byte form per X.690 8.1.3.4 + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) //todo: support arbitrary order of IEs in SET + { + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + VisitorDecoderSeq vd(ctx, ie); + auto & buffer = ctx.refBuffer(); + + size_t length = Length::decode(ctx); + + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + + if(length == indefinite_length) + { + ie.decode(vd); + if(ctx) + { + if(invalid_tag != vd.get_unhandled_tag()) + { + tag_value_t _tag = vd.get_unhandled_tag(); + if(IE::constraint_t::extended) //skip the unknown extension now + { + tag_value_t const* tag_ptr = &_tag; + size_t _length; + do + { + _tag = OpenType::decode(ctx, _length, tag_ptr); + tag_ptr = nullptr; + + } while(ctx && !(_tag == 0 && _length == 0)); + } + else // it should be the end-of-contents octets (8.1.5) + { + uint8_t const* data_in = ctx.refBuffer().getBytes(1); + if(data_in && (_tag || data_in[0])) + { + ctx.refErrorCtx().errorWrongEndOfContent(); + } + } + } + else + { + uint8_t const* data_in = ctx.refBuffer().getBytes(2); + if(data_in && (data_in[0] || data_in[1])) + { + ctx.refErrorCtx().errorWrongEndOfContent(); + } + } + } + } + else + { + if (buffer.getBytesLeft() < length) + { + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), length); + } + else + { + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + length); + ie.decode(vd); + tag_value_t _tag = vd.get_unhandled_tag(); + if(invalid_tag != _tag) + { + if(IE::constraint_t::extended) //skip the unknown extension now + { + tag_value_t const* tag_ptr = &_tag; + size_t _length; + do + { + _tag = OpenType::decode(ctx, _length, tag_ptr); + tag_ptr = nullptr; + + } while(ctx && buffer.getBytesLeft() > 0); + } + else + ctx.refErrorCtx().tagError(static_cast(tag)); // unexpected tag + } + buffer.set_end(end); + } + } + + } + } +}; +/*************************************************************************************** +* SEQUENCE OF: Encoding the sequence-of type (X.690 8.10) +* SET OF: Encoding the set-of type (X.690 8.12) +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t tag) {return tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + tag_t::encode(ctx); + u8* len_ptr = buffer.advance(1); //reserve for the length + + for (auto& elem : ie) + { + Element::run(elem, ctx); + } + + size_t len = buffer.begin() - len_ptr - 1; + if(len > 127) + { + len_ptr[0] = 0x80; //undefinite length form per X.690 8.1.3.6 + uint8_t buff[2] = {0}; // end-of-contents octets (X.690 8.1.5) + buffer.putBytes(buff, sizeof(buff)); + } + else + len_ptr[0] = static_cast(len); //one byte form per X.690 8.1.3.4 + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ie.clear(); + + if(tag_t::value() != tag) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + auto & buffer = ctx.refBuffer(); + + size_t length = Length::decode(ctx); + + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + + if(length == indefinite_length) + { + tag_value_t elm_tag = get_tag(ctx); + + while(ctx && Element::is_matched(elm_tag)) + { + add_element(ie, ctx, &elm_tag); + elm_tag = get_tag(ctx); + } + + if(ctx) + { + uint8_t const* data_in = ctx.refBuffer().getBytes(1); + if(data_in && (elm_tag || data_in[0])) + { + ctx.refErrorCtx().errorWrongEndOfContent(); + } + } + } + else + { + if (buffer.getBytesLeft() < length) + { + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), length); + } + else + { + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + length); + + while(ctx && buffer.getBytesLeft() > 0) + add_element(ie, ctx); + + buffer.set_end(end); + } + } + } + } + +private: + static void inline add_element(IE& ie, DecoderCtx& ctx, tag_value_t const* elm_tag = nullptr) + { + uint8_t* data = ctx.refAllocator().alloc_bytes(sizeof(typename IE::value_type)); + if (data) + { + typename IE::value_type * v = new (data) typename IE::value_type; + v->clear(); + ie.push_back(*v); + Element::run(*v, ctx, elm_tag); + } + else + { + ctx.refErrorCtx().allocatorNoMem(0, sizeof(typename IE::value_type)); + } + } +}; + +/*************************************************************************************** +* CHOICE: Encoding the choice type +***************************************************************************************/ +struct ChoiceVisitorEncoder +{ + ChoiceVisitorEncoder(EncoderCtx& ctx) : m_ctx(ctx) {} + + template + bool operator()(IE const& ie) + { + Element::run(ie, m_ctx); + return static_cast(m_ctx); + } + + EncoderCtx& m_ctx; +}; + +struct ChoiceVisitorDecoder +{ + ChoiceVisitorDecoder(DecoderCtx& ctx, tag_value_t tag) : m_ctx(ctx), m_tag(tag) {} + + template bool operator()(IE& ie) + { + Element::run(ie, m_ctx, &m_tag); + return static_cast(m_ctx); + } + + DecoderCtx& m_ctx; + tag_value_t m_tag; +}; + +template +struct ElementType > +{ + struct Selector + { + Selector(tag_value_t tag) : m_tag(tag) {} + + template void operator()(size_t idx) + { + if(!m_valid && Element::is_matched(m_tag)) + { + m_index = idx; + m_valid = true; + } + } + + size_t get_idx() const {return m_index;} + bool is_valid() const {return m_valid;} + + private: + tag_value_t m_tag; + size_t m_index {0}; + bool m_valid {false}; + }; + + static bool inline is_matched(tag_value_t tag) + { + Selector selector {tag}; + IE::enumerate(selector); + return selector.is_valid(); + } + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ChoiceVisitorEncoder ve(ctx); + + if(ctx && !ie.encode(ve)) + ctx.refErrorCtx().tagError(ie.get_index()); + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ie.clear(); + + Selector selector {tag}; + IE::enumerate(selector); + + if(!selector.is_valid()) + ctx.refErrorCtx().tagError(static_cast(tag)); + else + { + ChoiceVisitorDecoder vd {ctx, tag}; + if(ctx && !ie.decode(selector.get_idx(), vd)) + ctx.refErrorCtx().tagError(ie.get_index()); + } + } +}; + +template +struct ElementType > +{ + static bool inline is_matched(tag_value_t _tag) {return ExplicitCodec::is_matched(_tag);} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ExplicitCodec::run(ie, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ExplicitCodec::run(ie, ctx, tag); + } +}; + +/*************************************************************************************** +* IE_OBJECT_IDENTIFIER: Encoding the object identifier type +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t _tag) {return _tag == tag_t::value();} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + tag_t::encode(ctx); + size_t length = ie.get().size(); + Length::encode(length, ctx); + ctx.refBuffer().putBytes(ie.get().data(), length); + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ie.clear(); + if(tag_t::value() == tag) + { + size_t length = Length::decode(ctx); + if(!length || length == indefinite_length) + { + ctx.refErrorCtx().sizeRangeError(length); + } + else + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), static_cast(tag), length, ctx.refBuffer().toString()); + uint8_t const* data_in = ctx.refBuffer().getBytes(length); + if(data_in) + { + ie.set(length, data_in); + } + } + } + else + { + ctx.refErrorCtx().tagError(static_cast(tag)); + } + } +}; + +/*************************************************************************************** +* T_OBJFIELD_FTV +***************************************************************************************/ +template +struct ElementType > +{ + using tag_t = Tag; + + static bool inline is_matched(tag_value_t _tag) {return _tag == tag_t::value();} +}; + +/*************************************************************************************** +* T_OBJFIELD_TF +***************************************************************************************/ +template +struct ElementType > +{ + struct Selector + { + Selector(tag_value_t tag) : m_tag(tag) {} + + template void operator()(size_t idx) + { + if(Element::is_matched(m_tag)) + { + m_index = idx; + m_valid = true; + } + } + + size_t get_idx() const {return m_index;} + bool is_valid() const {return m_valid;} + + private: + tag_value_t m_tag; + size_t m_index {0}; + bool m_valid {false}; + }; + + static bool inline is_matched(tag_value_t tag) + { + Selector selector(tag); + IE::enumerate(selector); + + return selector.is_valid(); + } +}; + +/*************************************************************************************** +* Identifier +***************************************************************************************/ +template +struct Identifier +{ + static bool inline is_matched(tag_value_t _tag) + { + return ElementType::is_matched(_tag); + } + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ElementType::run(ie, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ElementType::run(ie, ctx, tag); + } +}; + +template +struct Identifier > +{ + static bool inline is_matched(tag_value_t _tag) {return ExplicitCodec::is_matched(_tag);} + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ExplicitCodec::run(ie, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t tag) + { + ExplicitCodec::run(ie, ctx, tag); + } +}; + +/*************************************************************************************** +* COMMON: Element +***************************************************************************************/ +template +struct Element +{ + static bool inline is_matched(tag_value_t _tag) + { + return Identifier::is_matched(_tag); + } + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (ctx) + { + ASN_ENCODER_TRACE("IE buffer: %s", static_cast(IE::ie_type), IE::name(), ctx.refBuffer().toString()); + ctx.ie_name(IE::name()); + Identifier::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx, tag_value_t const* tag_ptr = nullptr) + { + if (ctx) + { + ctx.ie_name(IE::name()); + + tag_value_t tag = tag_ptr ? *tag_ptr : get_tag(ctx); + if(ctx) + Identifier::run(ie, ctx, tag); + } + } +}; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/ber/common.hpp b/simulators/e2sim/src/ASN1/asn/ber/common.hpp new file mode 100755 index 0000000..edd830b --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/common.hpp @@ -0,0 +1,51 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/asn.hpp" +#include "asn/buffer.hpp" +#include "asn/ber/context.hpp" +#include "asn/ber/tools.hpp" + +//#define ASN_DECODER_TRACE_ENABLE +//#define ASN_ENCODER_TRACE_ENABLE + +#ifdef ASN_DECODER_TRACE_ENABLE +#define ASN_DECODER_TRACE(FMT, ...) printf(FMT "\n", __VA_ARGS__) +#else +#define ASN_DECODER_TRACE(...) +#endif + +#ifdef ASN_ENCODER_TRACE_ENABLE +#define ASN_ENCODER_TRACE(FMT, ...) printf(FMT "\n", __VA_ARGS__) +#else +#define ASN_ENCODER_TRACE(...) +#endif + +namespace asn { +namespace ber { + +template struct Element; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/ber/context.hpp b/simulators/e2sim/src/ASN1/asn/ber/context.hpp new file mode 100755 index 0000000..4159f00 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/context.hpp @@ -0,0 +1,118 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/utility.hpp" +#include "asn/buffer.hpp" +#include "asn/error_context.hpp" + +namespace asn { +namespace ber { + +/******************************************************************************** +EncoderCtx +*********************************************************************************/ +class EncoderCtx : boost::noncopyable +{ +public: + typedef buffer buf_type; + + EncoderCtx(u8* data, size_t size) + : m_buffer{ m_errCtx } + { + Reset(data, size); + } + + template + explicit EncoderCtx(u8(&buff)[SIZE]) + : EncoderCtx(buff, SIZE) + { + } + + explicit EncoderCtx() + : EncoderCtx(nullptr, 0) + { + } + + buf_type& refBuffer() { return m_buffer; } + error_context& refErrorCtx() { return m_errCtx; } + explicit operator bool() const { return static_cast(m_errCtx); } + + void Reset(void* data = nullptr, size_t size = 0) + { + m_buffer.reset(static_cast(data), size); + m_errCtx.reset(); + } + + //Name of the being processed IE + void ie_name(const char* name) { m_errCtx.ie_name(name); } + char const* ie_name() const { return m_errCtx.ie_name(); } + +private: + template + friend struct Encode; + + error_context m_errCtx; + buf_type m_buffer; +}; + + +/******************************************************************************** +DecoderCtx +*********************************************************************************/ +class DecoderCtx : boost::noncopyable +{ +public: + typedef buffer buf_type; + typedef allocator alloc_type; + + DecoderCtx(const void* data = nullptr, size_t size = 0, void* alloc_buffer = nullptr, size_t alloc_buffer_size = 0) + : m_buffer{ m_errCtx } + { + reset(data, size, alloc_buffer, alloc_buffer_size); + } + + buf_type& refBuffer() { return m_buffer; } + alloc_type& refAllocator() { return m_allocator; } + error_context& refErrorCtx() { return m_errCtx; } + explicit operator bool() const { return static_cast(m_errCtx); } + + void reset(const void* data = nullptr, size_t size = 0, void* alloc_buffer = nullptr, size_t alloc_buffer_size = 0) + { + m_allocator.reset(alloc_buffer, alloc_buffer_size); + m_buffer.reset(static_cast(data), size); + m_errCtx.reset(); + } + + //Name of the being processed IE + void ie_name(const char* name) { m_errCtx.ie_name(name); } + char const* ie_name() const { return m_errCtx.ie_name(); } + +private: + error_context m_errCtx; + buf_type m_buffer; + alloc_type m_allocator; +}; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/ber/length.hpp b/simulators/e2sim/src/ASN1/asn/ber/length.hpp new file mode 100755 index 0000000..51b387c --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/length.hpp @@ -0,0 +1,103 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { +namespace ber { + +constexpr size_t indefinite_length = std::numeric_limits::max(); + +/*************************************************************************************** +* Length +***************************************************************************************/ +struct Length +{ + static size_t inline get(int64_t value) + { + size_t length = 1; + + if(value != 0) + { + size_t extra_sign_bits = __builtin_clrsbll(value); + length = sizeof(value) - (extra_sign_bits >> 3) ; + } + + return length; + } + + static void inline encode(size_t length, EncoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + if(length <= 0x7F) + { + buffer.putByte(static_cast(length)); + } + else + { + size_t lenlen = get(length); + if(lenlen > 0x7F) + { + ctx.refErrorCtx().sizeRangeError(length, 0, 0x7F); + } + else + { + uint8_t bt = static_cast(lenlen); + bt |= 0x80; + buffer.putByte(bt); + Tools::put_bytes(length, lenlen, ctx); + } + } + + } + + static size_t inline decode(DecoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + size_t length = 0; + + uint8_t const* data = buffer.getBytes(1); + + if(data) + { + if(!(data[0] & 0x80)) + { + length = data[0]; + } + else + { + size_t lenlen = data[0] & 0x7F; + + if(lenlen) + Tools::get_bytes(length, lenlen, ctx); + else + length = indefinite_length; + } + } + + return length; + } +}; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/ber/opentype.hpp b/simulators/e2sim/src/ASN1/asn/ber/opentype.hpp new file mode 100755 index 0000000..0ff9366 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/opentype.hpp @@ -0,0 +1,73 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { +namespace ber { + +/*************************************************************************************** +* OpenType +***************************************************************************************/ +struct OpenType +{ + static tag_value_t decode(DecoderCtx& ctx, size_t& length, tag_value_t const* tag_ptr = nullptr) + { + auto & buffer = ctx.refBuffer(); + tag_value_t tag = tag_ptr ? *tag_ptr : get_tag(ctx); + length = Length::decode(ctx); + + if(!length) + { + //just return + } + else if(length == indefinite_length) + { + tag_value_t _tag; + size_t _length; + do + { + _tag = OpenType::decode(ctx, _length); + + } while(ctx && !(_tag == 0 && _length == 0)); + } + else + { + if (buffer.getBytesLeft() < length) + { + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), length); + } + else + { + size_t _length; + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + length); + decode(ctx, _length); + buffer.set_end(end); + } + } + return tag; + } +}; + +} //namespace ber +} //namespace asn \ No newline at end of file diff --git a/simulators/e2sim/src/ASN1/asn/ber/tag.hpp b/simulators/e2sim/src/ASN1/asn/ber/tag.hpp new file mode 100755 index 0000000..dba9733 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/tag.hpp @@ -0,0 +1,163 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +#define IE_CLASS_SHIFT 6 +#define IE_PC_SHIFT 5 +#define IE_BIG_TAG_FST_OCTET 0b011111 + +namespace asn { +namespace ber { + +constexpr tag_value_t invalid_tag = std::numeric_limits::max(); + +/*************************************************************************************** +* Tag +***************************************************************************************/ +template +struct Tag; + +template +struct Tag > +{ + static constexpr tag_value_t value() + { + tag_value_t v = static_cast(IE::asn_identifier_t::class_type); + v <<= IE_CLASS_SHIFT; + v = constructed ? (v | (1u << IE_PC_SHIFT)) : v; + v |= static_cast(IE::asn_identifier_t::tag_value); + return v; + } + + static void inline encode(EncoderCtx& ctx) + { + ctx.refBuffer().putByte(static_cast(value())); + } +}; + + +template +struct Tag= 31) > > +{ + static constexpr tag_value_t value() + { + static_assert(IE::asn_identifier_t::tag_value > 0, "null tag value"); + + tag_value_t v = static_cast(IE::asn_identifier_t::class_type); + v <<= IE_CLASS_SHIFT; + v = constructed ? (v | (1u << IE_PC_SHIFT)) : v; + v |= IE_BIG_TAG_FST_OCTET; + + size_t leadbits = __builtin_clzll(IE::asn_identifier_t::tag_value); + tag_value_t tv = IE::asn_identifier_t::tag_value << leadbits; + size_t length = sizeof(tag_value_t)*CHAR_BIT - leadbits; + + size_t shift = sizeof(tag_value_t)*CHAR_BIT - 7; + + size_t lb = length % 7; + if(lb) + { + v <<= 8; + v |= 0x80; + v |= static_cast(tv >> (shift + 7 - lb)); + tv <<= lb; + length -= lb; + } + + while(length) + { + v <<= 8; + v |= 0x80; + v |= static_cast(tv >> shift); + tv <<= 7; + length -= 7; + } + v &= ((tag_value_t)-1) & ~((tag_value_t) 0x80); + + return v; + } + + static void inline encode(EncoderCtx& ctx) + { + size_t size = 0; + tag_value_t tv = data(size); + ctx.refBuffer().putBytes(reinterpret_cast(&tv), size); + } + +private: + + static constexpr tag_value_t data(size_t& size) + { + tag_value_t rv = 0; + tag_value_t tv = value(); + size = sizeof(tag_value_t) - (__builtin_clzll(tv) >> 3); + + uint8_t* ptr = reinterpret_cast(&rv); + + size_t shift = (size - 1) * 8; + for(size_t i = 0; i < size; ++i) + { + ptr[i] = static_cast(tv >> shift); + shift -= 8; + } + + return rv; + } +}; + +inline +tag_value_t get_tag(DecoderCtx& ctx) +{ + tag_value_t rv = 0; + auto & buffer = ctx.refBuffer(); + uint8_t const* data = buffer.getBytes(1); + + if (data) + { + rv = data[0]; + if((data[0] & 0x1F) == IE_BIG_TAG_FST_OCTET) + { + size_t limit = sizeof(tag_value_t) - 1; + while((data = buffer.getBytes(1))) + { + if(!limit) + { + ctx.refErrorCtx().sizeRangeError(0); + break; + } + + rv <<= 8; + rv |= data[0]; + --limit; + + if(!(data[0] & 0x80)) + break; + } + } + } + return rv; +} + +} //namespace ber +} //namespace asn + diff --git a/simulators/e2sim/src/ASN1/asn/ber/tools.hpp b/simulators/e2sim/src/ASN1/asn/ber/tools.hpp new file mode 100755 index 0000000..9f9bc9b --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/tools.hpp @@ -0,0 +1,68 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { +namespace ber { + +struct Tools +{ + typedef bit_accessor_cross_byte bit_accessor; + + + template + static void put_bytes(T value, size_t length, EncoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + size_t shift = (length - 1) << 3; + for(size_t i = 0; i < length; ++i) + { + buffer.putByte(static_cast(value >> shift)); + shift -= 8; + } + } + + template + static void get_bytes(T& value, size_t length, DecoderCtx& ctx) + { + auto & buffer = ctx.refBuffer(); + + value = 0; + uint8_t const* data = buffer.getBytes(length); + + if(data) + { + value = data[0]; + for(size_t i = 1; i < length; ++i) + { + value <<= 8; + value |= data[i]; + } + } + } + +}; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/ber/visitor.hpp b/simulators/e2sim/src/ASN1/asn/ber/visitor.hpp new file mode 100755 index 0000000..98c1f05 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/ber/visitor.hpp @@ -0,0 +1,177 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { +namespace ber { + +/*************************************************************************************** +* VisitorEncoder +***************************************************************************************/ +struct VisitorEncoder +{ + VisitorEncoder(EncoderCtx& ctx) : m_ctx(ctx){} + + template bool operator() (ELM const& elm) + { + if(m_ctx) + Element::run(elm, m_ctx); + return static_cast(m_ctx); + } +private: + EncoderCtx& m_ctx; +}; + +/*************************************************************************************** +* VisitorDecoder +***************************************************************************************/ +struct VisitorDecoder +{ + VisitorDecoder(DecoderCtx& ctx, tag_value_t tag) : m_ctx(ctx), m_tag(tag){} + + template bool operator() (ELM& elm) + { + if(m_ctx) + Element::run(elm, m_ctx, &m_tag); + return static_cast(m_ctx); + } + +private: + DecoderCtx& m_ctx; + tag_value_t m_tag; +}; + +/*************************************************************************************** +* VisitorAdapter +***************************************************************************************/ +template +struct VisitorAdapter //default +{ + static void inline run(IE const& ie, EncoderCtx& ctx, Container const& cont) + { + Element::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx, Container const& cont, tag_value_t tag) + { + Element::run(ie, ctx, &tag); + } +}; + +template +struct VisitorAdapter > +{ + static void inline run(IE const& ie, EncoderCtx& ctx, Container const& cont) + { + VisitorEncoder v(ctx); + bool rv = ie.encode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + } + static void inline run(IE& ie, DecoderCtx& ctx, Container const& cont, tag_value_t tag) + { + VisitorDecoder v(ctx, tag); + bool rv = ie.decode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + } +}; + +/*************************************************************************************** +* VisitorEncoderSeq +***************************************************************************************/ +template +struct VisitorEncoderSeq +{ + VisitorEncoderSeq(EncoderCtx& ctx, CONT const& cont) : m_ctx(ctx), m_cont(cont){} + + template void operator() (ELM const& elm) + { + if(ELM::optional) + { + if(elm.is_valid()) + VisitorAdapter::run(elm, m_ctx, m_cont); + } + else + VisitorAdapter::run(elm, m_ctx, m_cont); + } + + EncoderCtx& m_ctx; + CONT const& m_cont; +}; + + +/*************************************************************************************** +* VisitorDecoderSeq +***************************************************************************************/ +template +struct VisitorDecoderSeq +{ + VisitorDecoderSeq(DecoderCtx& ctx, CONT const& cont) : m_ctx(ctx), m_cont(cont){} + + template void operator() (ELM& elm) + { + if(m_ctx) + { + tag_value_t tag; + + if(invalid_tag == m_tag && m_ctx.refBuffer().getBytesLeft()) + { + m_tag = get_tag(m_ctx); + } + tag = m_tag; + + if(m_ctx) + { + if (!Element::is_matched(tag)) + { + if(!ELM::optional) + { + m_ctx.refErrorCtx().tagError(static_cast(tag)); + } + } + else + { + m_tag = invalid_tag; + VisitorAdapter::run(elm, m_ctx, m_cont, tag); + elm.setpresent(true); + } + } + } + } + + tag_value_t get_unhandled_tag() const {return m_tag;} + + DecoderCtx& m_ctx; + tag_value_t m_tag {invalid_tag}; + CONT const& m_cont; +}; + +} //namespace ber +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/buffer.hpp b/simulators/e2sim/src/ASN1/asn/buffer.hpp new file mode 100755 index 0000000..4022b48 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/buffer.hpp @@ -0,0 +1,689 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/error_context.hpp" +#include "value_traits.hpp" + +//#define CODEC_BIT_TRACE_ENABLE +#ifdef CODEC_BIT_TRACE_ENABLE + #define CODEC_BIT_TRACE(FMT, args...) printf("%s[%u]:" FMT "\n", std::strrchr(__FILE__, '/') + 1, __LINE__, ##args) +#else + #define CODEC_BIT_TRACE(...) +#endif + +namespace asn { + +template +struct bit_accessor; + +template +struct bit_accessor_cross_byte; + +template +class buffer +{ +public: + typedef PTR pointer; + + explicit buffer(error_context& err) + : m_errCtx(err) + {} + + void reset(pointer data, u32 size) + { + m_start = data; + m_end = m_start + size; + m_current = m_start; + m_shift = 0; + } + + u32 getOffset() const { return begin() - m_start; } + + u32 getBytesLeft() const { return end() - begin(); } + u32 getBytesUsed() const { return getOffset() + (get_shift() ? 1 : 0); } + + u8 get_shift() const { return m_shift; } + void reset_shift() { m_shift = 0; } + void byte_align() { if (get_shift()) { m_shift = 0; ++m_current; } } + + pointer advance(u32 delta) { pointer p = begin(); m_current += delta; return p; } + + pointer begin() const { return m_current; } + + void set_begin(pointer ptr, u8 bit_shift) + { + if (m_start <= ptr && ptr <= end()) + { + m_current = ptr; + m_shift = bit_shift; + } + } + + pointer end() const { return m_end; } + void set_end(pointer v) { m_end = v; } + + bool checkAlignment(char const* name, u8 const mask = 0xFF) + { + if (0 == (get_shift() & mask)) return true; + m_errCtx.alignmentError(name, get_shift()); + return false; + } + + bool checkBytesLeft(char const* name, u32 const num_bytes) + { + if (getBytesLeft() >= num_bytes) return true; + m_errCtx.lengthErrorBytes(name, getBytesLeft(), num_bytes); + return false; + } + + bool checkBitsLeft(char const* name, u32 const num_bits) + { + if (getBitsLeft() >= num_bits) return true; + m_errCtx.lengthErrorBits(name, getBitsLeft(), num_bits); + return false; + } + + bool checkBytesAndAlignment(char const* name, u32 const num_bytes, u8 const mask = 0xFF) + { + if (getBytesLeft() >= num_bytes) + { + if (0 == (get_shift() & mask)) return true; + m_errCtx.alignmentError(name, get_shift()); + } + else + { + m_errCtx.lengthErrorBytes(name, getBytesLeft(), num_bytes); + } + return false; + } + + pointer getBytes(char const* name, u32 num_bytes) + { + if (checkBytesAndAlignment(name, num_bytes)) + { + return advance(num_bytes); + } + return nullptr; + } + + //NOTE! num_bytes should be set to minimal number of bytes expected + pointer getBytes(char const* name, u32 max_requested, u32& num_bytes) + { + if (checkAlignment(name)) + { + u32 const left = getBytesLeft(); + if (left >= num_bytes) + { + num_bytes = (left > max_requested) ? max_requested : left; + return advance(num_bytes); + } + + m_errCtx.lengthErrorBytes(name, getBytesLeft(), num_bytes); + } + return nullptr; + } + + bool putByte(char const* name, u8 byte) + { + if (checkBytesAndAlignment(name, 1)) + { + begin()[0] = byte; + ++m_current; + return true; + } + return false; + } + + bool putBytes(char const* name, void const* in, u32 num_bytes) + { + if (checkBytesAndAlignment(name, num_bytes)) + { + std::memcpy(begin(), in, num_bytes); + m_current += num_bytes; + return true; + } + return false; + } + + bool checkAlignment(u8 const mask = 0xFF) + { + if (0 == (get_shift() & mask)) return true; + m_errCtx.alignmentError(get_shift()); + return false; + } + + bool checkBytesLeft(u32 const num_bytes) + { + if (getBytesLeft() >= num_bytes) return true; + m_errCtx.lengthErrorBytes(getBytesLeft(), num_bytes); + return false; + } + + bool checkBitsLeft(u32 const num_bits) + { + if (getBitsLeft() >= num_bits) return true; + m_errCtx.lengthErrorBits(getBitsLeft(), num_bits); + return false; + } + + bool checkBytesAndAlignment(u32 const num_bytes, u8 const mask = 0xFF) + { + if (getBytesLeft() >= num_bytes) + { + if (0 == (get_shift() & mask)) return true; + m_errCtx.alignmentError(get_shift()); + } + else + { + m_errCtx.lengthErrorBytes(getBytesLeft(), num_bytes); + } + return false; + } + + pointer getBytes(u32 num_bytes) + { + if (checkBytesAndAlignment(num_bytes)) + { + return advance(num_bytes); + } + return nullptr; + } + + //NOTE! num_bytes should be set to minimal number of bytes expected + pointer getBytes(u32 max_requested, u32& num_bytes) + { + if (checkAlignment()) + { + u32 const left = getBytesLeft(); + if (left >= num_bytes) + { + num_bytes = (left > max_requested) ? max_requested : left; + return advance(num_bytes); + } + + m_errCtx.lengthErrorBytes(getBytesLeft(), num_bytes); + } + return nullptr; + } + + bool putByte(u8 byte) + { + if (checkBytesAndAlignment(1)) + { + begin()[0] = byte; + ++m_current; + return true; + } + return false; + } + + bool putBytes(void const* in, u32 num_bytes) + { + if (num_bytes) + { + if(checkBytesAndAlignment(num_bytes)) + { + std::memcpy(begin(), in, num_bytes); + m_current += num_bytes; + } + else + return false; + } + return true; + } + + char const* toString() const + { + static char sz[64]; + u8 const* p = begin(); + snprintf(sz, sizeof(sz), "%02X %02X %02X %02X [%02X]=%p@%u..%p -%u bits: +%u bytes", p[-4], p[-3], p[-2], p[-1], p[0], p + , getOffset(), end(), get_shift(), getBytesLeft()); + return sz; + } + +private: + template + friend class bit_accessor; + + template + friend struct bit_accessor_cross_byte; + + template + void push_u8(U value) { *m_current++ = static_cast(value); } + template + void put_u8(U value) { m_current[0] = static_cast(value); } + +//khxm68: TODO: won't compile without it. WTF?! +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" + u8 get_u8() const { return m_current[0]; } +#pragma GCC diagnostic pop + u8 extract_u8(u8 value, u8 mask, u8 shift) const + { return (get_u8() & ~(mask << shift)) | ((value & mask) << shift); } + + u16 get_u16() const { return (static_cast(m_current[0]) << 8) | m_current[1]; } + u16 extract_u16(u16 value, u16 mask, u16 shift) const + { return (get_u16() & ~(mask << shift)) | ((value & mask) << shift); } + + u32 get_u24() const { return (static_cast(m_current[0]) << 16) | (static_cast(m_current[1]) << 8) | m_current[2]; } + u32 extract_u24(u32 value, u32 mask, u32 shift) const + { return (get_u24() & ~(mask << shift)) | ((value & mask) << shift); } + + u32 get_u32() const { return (static_cast(m_current[0]) << 24) | (static_cast(m_current[1]) << 16) | (static_cast(m_current[2]) << 8) | m_current[3]; } + u32 extract_u32(u32 value, u32 mask, u32 shift) const + { return (get_u32() & ~(mask << shift)) | ((value & mask) << shift); } + + u32 getBitsLeft() const { return begin() == end() ? 0 : (getBytesLeft()*8 - get_shift()); } + + void bit_advance(u8 num_bits) + { + m_shift += num_bits; + if (get_shift() > 7) + { + reset_shift(); + m_current++; + } + } + + pointer m_current; + pointer m_end; + pointer m_start; + u8 m_shift; + error_context& m_errCtx; +}; + +template //LSB 1..7 bits +struct bit_accessor +{ + static_assert(IE::length::value > 0 && IE::length::value < 8, "something wrong with traits!"); + + static void put(u8 value, buffer& buf) + { + u8 const mask = static_cast((1u << IE::length::value) - 1); + u8 const shift = buf.get_shift(); + u8 const data = buf.extract_u8(value, mask, shift); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%02X(%02X) mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value); + } + + static u8 get(buffer& buf) + { + u8 const mask = static_cast((1u << IE::length::value) - 1); + u8 const shift = buf.get_shift(); + u8 const data = (buf.get_u8() >> shift) & mask; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%02X mask=%02X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value); + return data; + } +}; + +template //LSB 9..15 bits +struct bit_accessor +{ + static_assert(IE::length::value > 8 && IE::length::value < 16, "something wrong with traits!"); + + static void put(u16 value, buffer& buf) + { + u16 const mask = static_cast((1u << IE::length::value) - 1); + u16 const shift = buf.get_shift(); + u16 const data = buf.extract_u16(value, mask, shift); + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%04X(%04X) mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 8); + } + + static u16 get(buffer& buf) + { + u16 const mask = static_cast((1u << IE::length::value) - 1); + u16 const shift = buf.get_shift(); + u16 const data = (buf.get_u16() >> shift) & mask; + buf.m_current += 1; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%04X mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 8); + return data; + } +}; + +template //LSB 17..24 bits +struct bit_accessor +{ + static_assert(IE::length::value > 16 && IE::length::value <= 24, "something wrong with traits!"); + + static void put(u32 value, buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = buf.get_shift(); + u32 const data = buf.extract_u24(value, mask, shift); + + buf.push_u8(data >> 16); + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%06X(%06X) mask=%06X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 16); + } + + static u32 get(buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = buf.get_shift(); + u32 const data = (buf.get_u24() >> shift) & mask; + buf.m_current += 2; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%06X mask=%06X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 16); + return data; + } +}; + +template //LSB 25..31 bits +struct bit_accessor +{ + static_assert(IE::length::value > 24 && IE::length::value < 32, "something wrong with traits!"); + + static void put(u32 value, buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = buf.get_shift(); + u32 const data = buf.extract_u32(value, mask, shift); + + buf.push_u8(data >> 24); + buf.push_u8(data >> 16); + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%08X(%08X) mask=%08X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 24); + } + + static u32 get(buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = buf.get_shift(); + u32 const data = (buf.get_u32() >> shift) & mask; + buf.m_current += 3; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%08X mask=%08X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 24); + return data; + } +}; + + +template //MSB 1..7 bits +struct bit_accessor +{ + static_assert(IE::length::value > 0 && IE::length::value < 8, "something wrong with traits!"); + + static void put(u8 value, buffer& buf) + { + u8 const mask = static_cast((1u << IE::length::value) - 1); + u8 const shift = 8 - buf.get_shift() - IE::length::value; + u8 const data = buf.extract_u8(value, mask, shift); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%02X(%02X) mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value); + } + + static u8 get(buffer& buf) + { + u8 const mask = static_cast((1u << IE::length::value) - 1); + u8 const shift = 8 - buf.get_shift() - IE::length::value; + u8 const data = (buf.get_u8() >> shift) & mask; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%02X mask=%02X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value); + return data; + } +}; + +template //MSB 9..15 bits +struct bit_accessor +{ + static_assert(IE::length::value > 8 && IE::length::value < 16, "something wrong with traits!"); + + static void put(u16 value, buffer& buf) + { + u16 const mask = static_cast((1u << IE::length::value) - 1); + u16 const shift = 16 - buf.get_shift() - IE::length::value; + u16 const data = buf.extract_u16(value, mask, shift); + + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%04X(%04X) mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 8); + } + + static u16 get(buffer& buf) + { + u16 const mask = static_cast((1u << IE::length::value) - 1); + u16 const shift = 16 - buf.get_shift() - IE::length::value; + u16 const data = (buf.get_u16() >> shift) & mask; + buf.m_current += 1; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%04X mask=%04X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 8); + return data; + } +}; + + +template //MSB 17..24 bits +struct bit_accessor +{ + static_assert(IE::length::value > 16 && IE::length::value <= 24, "something wrong with traits!"); + + static void put(u32 value, buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = 24 - buf.get_shift() - IE::length::value; + u32 const data = buf.extract_u24(value, mask, shift); + + buf.push_u8(data >> 16); + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%06X(%06X) mask=%06X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 16); + } + + static u32 get(buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = 24 - buf.get_shift() - IE::length::value; + u32 const data = (buf.get_u24() >> shift) & mask; + buf.m_current += 2; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%06X mask=%06X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 16); + return data; + } +}; + +template //MSB 25..31 bits +struct bit_accessor +{ + static_assert(IE::length::value > 24 && IE::length::value < 32, "something wrong with traits!"); + + static void put(u32 value, buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = 32 - buf.get_shift() - IE::length::value; + u32 const data = buf.extract_u32(value, mask, shift); + + buf.push_u8(data >> 24); + buf.push_u8(data >> 16); + buf.push_u8(data >> 8); + buf.put_u8(data); + + CODEC_BIT_TRACE("put shift=%u(%u) data[%u]=%08X(%08X) mask=%08X: %s", shift, buf.get_shift() + , IE::length::value, data, value, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 24); + } + + static u32 get(buffer& buf) + { + u32 const mask = static_cast((1u << IE::length::value) - 1); + u32 const shift = 32 - buf.get_shift() - IE::length::value; + u32 const data = (buf.get_u32() >> shift) & mask; + buf.m_current += 3; + + CODEC_BIT_TRACE("get shift=%u(%u) data[%u]=%08X mask=%08X: %s", shift, buf.get_shift() + , IE::length::value, data, mask, buf.toString()); + + buf.bit_advance(IE::length::value - 24); + return data; + } +}; + +/******************************************************************************** +bit_accessor_cross_byte +*********************************************************************************/ +template<> +struct bit_accessor_cross_byte //MSB +{ + static bool put(u8 value, u8 length, buffer& buf) + { + u8 spare = 8 - buf.get_shift(); + + if (spare < length) + { + length -= spare; + u8 chunk = value >> length; + u8 const mask = static_cast((1u << spare) - 1); + u8 data = buf.extract_u8(chunk, mask, 0); + buf.put_u8(data); + + buf.bit_advance(spare); + } + if (buf.checkBytesLeft(1)) + { + u8 const mask = static_cast((1u << length) - 1); + u8 const shift = 8 - buf.get_shift() - length; + u8 data = buf.extract_u8(value, mask, shift); + buf.put_u8(data); + + buf.bit_advance(length); + + return true; + } + return false; + } + + static u8 get(u8 length, buffer& buf) + { + u8 rval {0}; + u8 const mask = static_cast((1u << length) - 1); + u8 const spare = 8 - buf.get_shift(); + if (spare < length) + { + length -= spare; + rval = buf.get_u8() << length; + buf.bit_advance(spare); + } + if (length && buf.checkBytesLeft(1)) + { + u8 val = buf.get_u8(); + val = val >> (8 - length - buf.get_shift()); + rval |= val; + rval &= mask; + buf.bit_advance(length); + } + return rval; + } + + static void padByte(buffer& buf) + { + if (buf.get_shift()) + { + u8 mask = static_cast((1u << buf.get_shift()) - 1); + mask = mask << (8 - buf.get_shift()); + buf.begin()[0] &= mask; + buf.bit_advance(8 - buf.get_shift()); + } + } + + static void padByte(buffer& buf) + { + if(buf.get_shift()) + buf.bit_advance(8 - buf.get_shift()); + } + + static bool put(const u8* in, size_t len, buffer& buf, u8 trail_bitsqty) + { + if (len) + { + if (trail_bitsqty) + { + buf.putBytes(in, len - 1); + u8 last_byte = in[len - 1]; + last_byte = last_byte >> (8 - trail_bitsqty); + return put(last_byte, trail_bitsqty, buf); + } + buf.putBytes(in, len); + } + return true; + } +}; + +} //end: namespace asn + + diff --git a/simulators/e2sim/src/ASN1/asn/chunked_allocator.hpp b/simulators/e2sim/src/ASN1/asn/chunked_allocator.hpp new file mode 100755 index 0000000..008be98 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/chunked_allocator.hpp @@ -0,0 +1,84 @@ +#pragma once + +/******************************************************************************* +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include //std::bad_alloc +#include +#include + +// Platform Includes: Platform specific classes, functions, and libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { + +template +class chunked_allocator +{ +public: + using allocator_t = ALLOC; + + chunked_allocator() + { + put_chunk(new_chunk()); + } + + template + decltype(auto) emplace_back(TSEQ& v) + { + try + { + return v.emplace_back(m_allocator); + } + catch (std::bad_alloc const&) + { + put_chunk(new_chunk()); + return v.emplace_back(m_allocator); + } + } + + uint8_t* alloc_bytes(std::size_t sz) + { + //TODO: unify allocation: now it returns nullptr instead of throw! + auto* ret = m_allocator.alloc_bytes(sz); + if (!ret) + { + put_chunk(new_chunk()); + ret = m_allocator.alloc_bytes(sz); + } + return ret; + } + +private: + static constexpr std::size_t CHUNK_SIZE = 32*1024; + using chunk_t = std::array; + using chunks_t = std::list; + + chunk_t& new_chunk() { return m_chunks.emplace_back(); } + void put_chunk(chunk_t& c) { m_allocator.reset(c.data(), c.size()); } + + + allocator_t m_allocator; + chunks_t m_chunks; +}; + +} //end: namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/constraints.hpp b/simulators/e2sim/src/ASN1/asn/constraints.hpp new file mode 100755 index 0000000..e8e787d --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/constraints.hpp @@ -0,0 +1,140 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include +#include +#include + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { + +using bound_t = int64_t; + +enum class constraint_type : uint8_t +{ + UNCONSTRAINED, + CONSTRAINED, + SEMICONSTRAINED, + CONSTRAINED_EXTENDED, + SEMICONSTRAINED_EXTENDED +}; + +template +struct span +{ + static_assert(UB >= LB, "UPPER >= LOWER"); + static constexpr bound_t lower_bound = LB; + static constexpr bound_t upper_bound = UB; +}; + +template +struct pair +{ + T const lower_bound; + T const upper_bound; +}; + +template +struct one : span {}; + +struct max : one::max()> {}; +struct min : one::min()> {}; + +static constexpr bound_t MAX = std::numeric_limits::max(); +static constexpr bound_t MIN = std::numeric_limits::min(); + +template +struct constraints +{ + static constexpr bool extended = Extended; + static constexpr bound_t lower_bound = std::min({RANGE::lower_bound...}); + static constexpr bound_t upper_bound = std::max({RANGE::upper_bound...}); + + static constexpr constraint_type type = + (Extended && lower_bound > min::lower_bound && upper_bound < max::upper_bound) ? constraint_type::CONSTRAINED_EXTENDED : + (!Extended && lower_bound > min::lower_bound && upper_bound < max::upper_bound) ? constraint_type::CONSTRAINED : + (Extended && lower_bound > min::lower_bound && upper_bound == max::upper_bound) ? constraint_type::SEMICONSTRAINED_EXTENDED : + (!Extended && lower_bound == min::lower_bound && upper_bound < max::upper_bound) ? constraint_type::SEMICONSTRAINED : + (Extended && lower_bound == min::lower_bound && upper_bound < max::upper_bound) ? constraint_type::SEMICONSTRAINED_EXTENDED : + (!Extended && lower_bound > min::lower_bound && upper_bound == max::upper_bound) ? constraint_type::SEMICONSTRAINED : constraint_type::UNCONSTRAINED; + + static constexpr bool is_signed = lower_bound < 0; + + static constexpr bound_t num_spans = static_cast(sizeof...(RANGE)); + static constexpr pair bounds[] = {{RANGE::lower_bound, RANGE::upper_bound}...}; + + using boundary_type = bound_t; + + static constexpr bool is_extended(bound_t val) + { + for (bound_t i = 0; i < num_spans; ++i) + { + auto const& p = bounds[i]; + if (val <= p.upper_bound) + { + if(val < p.lower_bound) + return true; + return false; + } + } + return true; + } +}; + +template +constexpr pair constraints::bounds[]; + +template +struct constraints +{ + static constexpr bool extended = Extended; + static constexpr constraint_type type = constraint_type::UNCONSTRAINED; + static constexpr bound_t lower_bound = std::numeric_limits::min(); + static constexpr bound_t upper_bound = std::numeric_limits::max(); + + static constexpr bool is_extended(bound_t val) {return true;} +}; + +/*************************************************************************************** +* RANGE for sequences +***************************************************************************************/ +template +struct seq_range +{ + static_assert(Extended || TotalNumEntries > 0, "TotalNumEntries must be > 0"); + static_assert(NumExtEntries <= TotalNumEntries, "NumExtEntries must be <= TotalNumEntries"); + + static constexpr constraint_type type = Extended ? constraint_type::CONSTRAINED_EXTENDED : constraint_type::CONSTRAINED; + static constexpr bool extended = Extended; + static constexpr bound_t lower_bound = 0; + static constexpr bound_t upper_bound = TotalNumEntries - NumExtEntries - 1; + static constexpr bound_t default_value = lower_bound; + static constexpr bound_t total_num_entries = TotalNumEntries; + + using boundary_type = bound_t; + using value_type = uint32_t; +}; + +} // namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/elements.hpp b/simulators/e2sim/src/ASN1/asn/elements.hpp new file mode 100755 index 0000000..9cbcd42 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/elements.hpp @@ -0,0 +1,565 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/constraints.hpp" +#include "asn/identifier.hpp" + +namespace asn { + +enum class element_type : uint8_t +{ + T_BOOLEAN + ,T_INTEGER + ,T_ENUMERATED + ,T_REAL + ,T_BITSTRING + ,T_OCTETSTRING + ,T_NULL + ,T_SEQUENCE + ,T_SEQUENCE_OF + ,T_SET + ,T_SET_OF + ,T_CHOICE + ,T_OBJECTIDENTIFIER + ,T_OBJFIELD_FTV + ,T_OBJFIELD_TF +}; + +/*************************************************************************************** +* BASE +***************************************************************************************/ + +struct base +{ + static constexpr bool optional = false; + static constexpr bool extension = false; + + static constexpr char const* name() {return "";} + + void setpresent(bool p) {is_set = p;} + void clear() {is_set = false;} + + bool is_valid() const {return is_set;} + +protected: + base() {} + void set() {is_set = true;} +protected: + bool is_set {false}; + + base& operator=(const base&) = delete; + base (const base&) = delete; +}; + +/*************************************************************************************** +* IE_NULL +***************************************************************************************/ + +struct nulltype : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::NULL_TYPE), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_NULL; + static constexpr const char* name() {return "NULL";} + + void clear() {} +}; + +/*************************************************************************************** +* T_BOOLEAN +***************************************************************************************/ + +struct boolean : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::BOOLEAN), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_BOOLEAN; + static constexpr const char* name() {return "BOOLEAN";} + + using value_type = bool; + + void set(value_type vl) { m_value = vl; base::set();} + value_type get() const { return m_value; } + void clear() { m_value = false; base::clear();} + +private: + value_type m_value {false}; +}; + +/*************************************************************************************** +* T_INTEGER +***************************************************************************************/ +template < class Constraint = constraints > +struct integer : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::INTEGER), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_INTEGER; + static constexpr const char* name() {return "INTEGER";} + + using constraint_t = Constraint; + using value_type = int64_t; + + bool equal(value_type v) const {return m_value == v;} + + void set(value_type v) { m_value = v; base::set();} + value_type get() const { return m_value; } + + void clear() { m_value = 0; base::clear();} + +private: + value_type m_value; +}; + +/*************************************************************************************** +* T_ENUMERATED +***************************************************************************************/ +template +struct enumerated : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::ENUMERATED), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_ENUMERATED; + static constexpr const char* name() {return "ENUMERATED";} + + using constraint_t = seq_range; + using value_type = typename constraint_t::value_type; + + bool equal(value_type v) const {return m_value == v;} + void set(value_type vl) { m_value = vl; base::set();} + value_type get() const { return m_value; } + void clear() { m_value = constraint_t::default_value; base::clear();} + +private: + value_type m_value; +}; + +/*************************************************************************************** +* T_OCTETSTRING +***************************************************************************************/ +template< class Constraint = constraints > +struct ostring : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::OCTET_STRING), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_OCTETSTRING; + static constexpr const char* name() {return "OCTET STING";} + using constraint_t = Constraint; + + struct value_type + { + value_type() {} + value_type(size_t size, const char* data) : m_size(size), m_data(reinterpret_cast(data)) {} + + size_t size() const { return m_size; } + const uint8_t* data() const { return m_data; } + + using const_iterator = uint8_t const*; + const_iterator begin() const { return data(); } + const_iterator end() const { return begin() + size(); } + + void assign(void const* p, size_t sz) { m_data = static_cast(p); m_size = sz; } + + private: + const uint8_t* m_data{ 0 }; + size_t m_size{ 0 }; + }; + + value_type const& get() const { return m_value; } + + //Use std::string, std::vector or IE_OSTR::value_type + template value_type const& set(T const& tval) + { + set(tval.size(), tval.data()); + base::set(); + return m_value; + } + + void set(size_t size, void const* data) + { + m_value.assign(data, size); + base::set(); + } + + template + ostring& emplace(AT& allocator, size_t size, uint8_t const * data_in) + { + if(size) + { + base::clear(); + uint8_t* data_out = allocator.alloc_bytes(size); + if (data_out) + { + memcpy(data_out, data_in, size); + set(size, data_out); + } + } + else + base::set(); + return *this; + } + + template + ostring& emplace(AT& allocator, T const& tval) + { + return emplace(allocator, tval.size(), reinterpret_cast(tval.data())); + } + + void clear() { m_value = value_type{}; base::clear();} + +private: + value_type m_value; +}; + +/*************************************************************************************** +* T_BITSTRING +***************************************************************************************/ +template > +struct bstring : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::BIT_STRING), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_BITSTRING; + static constexpr const char* name() {return "BIT STING";} + using constraint_t = Constraint; + + struct value_type + { + value_type() {} + value_type(size_t size, const char* data, size_t bitqty) : m_size(size), m_data(reinterpret_cast(data)), m_bitqty(bitqty){} + + size_t size() const { return m_size; } + const uint8_t* data() const { return m_data; } + size_t bitqty() const { return m_bitqty; } + + void assign(void const* p, size_t sz, size_t bits) { m_data = static_cast(p); m_size = sz; m_bitqty = bits; } + + private: + const uint8_t* m_data{ nullptr }; + size_t m_size{ 0 }; + size_t m_bitqty{ 0 }; + }; + + value_type const& get_buffer() const { return m_value; } + + size_t get_bitqty() const { return m_value.bitqty(); } + + //Use std::string, std::vector or IE_BSTR::value_type + template value_type const& set_buffer(T& tval, size_t bitqty) + { + m_value.assign(tval.data(), tval.size(), bitqty); + base::set(); + return m_value; + } + + void set_buffer(size_t bitqty, const uint8_t* data) + { + m_value.assign(data, (bitqty +7) >> 3, bitqty); + base::set(); + } + + template + bstring& emplace_buffer(AT& allocator, size_t bitqty, uint8_t const * data_in) + { + size_t size = (bitqty +7) >> 3; + uint8_t* data_out = allocator.alloc_bytes(size); + if (!data_out) { + throw std::bad_alloc(); + } + memcpy(data_out, data_in, size); + set_buffer(bitqty, data_out); + return *this; + } + + void clear() { m_value = value_type{}; base::clear();} + + uint64_t get_number() const + { + uint64_t retval{0}; + size_t i = 0; + for(; i < m_value.size() - 1; ++i) + { + retval <<= 8; + retval |= m_value.data()[i]; + } + + uint8_t shift = m_value.bitqty() % 8; + if (shift) + { + retval <<= shift; + } + else + { + retval <<= 8; + } + + retval |= m_value.data()[i]; + + return retval; + } + + template + void set_number(AT& allocator, size_t bitqty, uint64_t data) + { + size_t size = (bitqty +7) >> 3; + uint8_t* data_out = allocator.alloc_bytes(size); + if (!data_out) { + throw std::bad_alloc(); + } + + const uint8_t shift = bitqty % 8; + if (shift) + { + data_out[size-1] = data & (0xFF >> (8 - shift)); + data >>= shift; + } + else + { + data_out[size-1] = data & (0xFF); + data >>= 8; + } + + for (size_t i = 1; i <= size - 1; i++) + { + data_out[size-1-i] = data & (0xFF); + data >>= 8; + } + + m_value.assign(data_out, size, bitqty); + base::set(); + } + +private: + value_type m_value; +}; + +/*************************************************************************************** +* T_CHOICE +***************************************************************************************/ +template +struct choice : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::CHOICE), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_CHOICE; + static constexpr const char* name() {return "CHOICE";} + + using constraint_t = seq_range; + using index_type = size_t; + using value_type = size_t; + + static constexpr index_type fst_index = 1; + static constexpr index_type ext_index = fst_index + TotalNumEntries; + + static index_type normalize(index_type idx) {return idx - fst_index;} + static index_type denormalize(index_type idx) {return idx + fst_index;} +}; + +/*************************************************************************************** +* T_SEQUENCE +***************************************************************************************/ +template +struct sequence : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::SEQUENCE), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_SEQUENCE; + static constexpr const char* name() {return "SEQUENCE";} + + static constexpr bound_t num_total_entries = TotalNumEntries; + static constexpr bound_t num_opt_entries = NumOptEntries; + static constexpr bound_t num_ext_entries = NumExtEntries; + + using constraint_t = seq_range; + +}; + +/*************************************************************************************** +* T_SEQUENCE_OF +***************************************************************************************/ +template > +struct sequenceof : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::SEQUENCE_OF), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_SEQUENCE_OF; + static constexpr const char* name() {return "SEQUENCE OF";} + + struct value_type : T, boost::intrusive::list_base_hook< boost::intrusive::link_mode > + { + value_type(){} + private: + value_type& operator=(const value_type&) = delete; + value_type (const value_type&) = delete; + }; + + using values_t = boost::intrusive::list>; + using constraint_t = Constraint; + using element_t = T; + + void clear() { m_list.clear(); base::clear();} + size_t size() const { return m_list.size(); } + template + void sort(Predicate const& p) { m_list.sort(p); } + + template + void set(V& v) {for(auto & e : v) {m_list.push_back(e);} base::set();} + + void push_back(value_type& v) { m_list.push_back(v); base::set();} + + template //Note: Allocator must return word alligned buffer! + T& emplace_back(AT& allocator) + { + uint8_t* data = allocator.alloc_bytes(sizeof(value_type)); + if(!data) + throw std::bad_alloc(); + value_type* v = new (data) value_type; + push_back(*v); + return *v; + }; + + using iterator = typename values_t::iterator; + iterator begin() { return m_list.begin(); } + iterator end() { return m_list.end(); } + + using const_iterator = typename values_t::const_iterator; + const_iterator begin() const { return m_list.begin(); } + const_iterator end() const { return m_list.end(); } + + sequenceof(){} + +private: + values_t m_list; +}; + +/*************************************************************************************** +* T_OBJFIELD_FTV +***************************************************************************************/ +template +struct fixedtypefield : T +{ + static constexpr element_type ie_type = element_type::T_OBJFIELD_FTV; + + T& ref_nested() {return *this;} + T const & ref_nested() const {return *this;} +}; + +/*************************************************************************************** +* T_OBJFIELD_TF +***************************************************************************************/ +template +struct typefield : base +{ + static constexpr element_type ie_type = element_type::T_OBJFIELD_TF; + static constexpr const char* name() {return "type-field";} + + typefield& ref_nested() {return *this;} + typefield const& ref_nested() const {return *this;} + + bool is_unknown() const {return false;} +}; + +/*************************************************************************************** +* T_OBJECTIDENTIFIER +***************************************************************************************/ +struct oid : ostring<> +{ + using asn_identifier_t = identifier(tag_rvalue_t::OBJECT_IDENTIFIER), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_OBJECTIDENTIFIER; + static constexpr const char* name() {return "OBJECT IDENTIFIER";} +}; + +/*************************************************************************************** +* T_PRINTABLESTRING +***************************************************************************************/ +template > +struct printable_string : ostring +{ + using asn_identifier_t = identifier(tag_rvalue_t::PrintableString), tag_type_t::IMPLICIT>; + static constexpr const char* name() {return "PrintableString";} +}; + +/*************************************************************************************** +* T_IA5_STRING +***************************************************************************************/ +template > +struct ia5_string : ostring +{ + using asn_identifier_t = identifier(tag_rvalue_t::IA5String), tag_type_t::IMPLICIT>; + static constexpr const char* name() {return "IA5String";} +}; + +/*************************************************************************************** +* T_GRAPHIC_STRING +***************************************************************************************/ +template > +struct graphic_string : ostring +{ + using asn_identifier_t = identifier(tag_rvalue_t::GraphicString), tag_type_t::IMPLICIT>; + static constexpr const char* name() {return "IA5String";} +}; + +/*************************************************************************************** +* T_UTF8_STRING +***************************************************************************************/ +template > +struct utf8_string : ostring +{ + using asn_identifier_t = identifier(tag_rvalue_t::UTF8String), tag_type_t::IMPLICIT>; + static constexpr const char* name() {return "UTF8String";} +}; + +/*************************************************************************************** +* T_SET +***************************************************************************************/ +template +struct set : base +{ + using asn_identifier_t = identifier(tag_rvalue_t::SET), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_SET; + static constexpr const char* name() {return "SET";} + + static constexpr bound_t num_total_entries = TotalNumEntries; + static constexpr bound_t num_opt_entries = NumOptEntries; + static constexpr bound_t num_ext_entries = NumExtEntries; + + using constraint_t = seq_range; +}; + +/*************************************************************************************** +* T_SET_OF +***************************************************************************************/ +template > +struct setof : sequenceof +{ + using asn_identifier_t = identifier(tag_rvalue_t::SET_OF), tag_type_t::IMPLICIT>; + + static constexpr element_type ie_type = element_type::T_SET_OF; + static constexpr const char* name() {return "SET OF";} +}; +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/error_context.hpp b/simulators/e2sim/src/ASN1/asn/error_context.hpp new file mode 100755 index 0000000..8a7285a --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/error_context.hpp @@ -0,0 +1,267 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + + +// Local Includes: Application specific classes, functions, and libraries +#include "type_defs.h" + +namespace asn { + +class error_context +{ +public: + enum error_e : u8 + { + SUCCESS = 0 + ,INCORRECT_LENGTH_BITS + ,INCORRECT_LENGTH_BYTES + ,ALIGNMENT + ,INCORRECT_VALUE + ,INCORRECT_CHOICE_TAG + ,INCORRECT_IE_TAG + ,VALUE_OUT_OF_RANGE + ,SIZE_OUT_OF_RANGE + ,ALLOC_NO_MEMORY + ,NO_OBJECT + ,NO_MANDATORY + ,WRONG_END_OF_CONTENT + ,UNSUPPORTED + ,UNSPECIFIED + }; + + explicit operator bool() const { return SUCCESS == m_error; } + + void reset() { m_error = SUCCESS; } + error_e getError() const { return m_error; } + + char const* toString() const; + + void alignmentError(u32 shift); + void lengthErrorBytes(u32 bytes_left, u32 requested); + void lengthErrorBits(u32 bits_left, u32 requested); + void valueError(u32 got, u32 expected, u32 ofs); + void tagError(u32 tag); + void valueRangeError(size_t value); + void sizeRangeError(size_t size, size_t low = 0, size_t high = 0); + void allocatorNoMem(size_t bytes_left, size_t bytes_required); + void errorUnsupported() {setError(UNSUPPORTED);} + void errorUnspecified() {setError(UNSPECIFIED);} + void errorNoObject(const char* container_name_); + void errorNoMandatory(); + void errorWrongEndOfContent() {setError(WRONG_END_OF_CONTENT);} + + //to inline in choice decoder: TODO: think of changing it! + void choiceError(char const* name, u32 id) + { + m_name = name; + m_param[0] = id; + setError(INCORRECT_CHOICE_TAG); + } + //Name of the being processed IE + void ie_name(const char* name) { m_ie_name = name; } + char const* ie_name() const { return m_ie_name; } + + void container_name(const char* name) { m_container_name = name; } + char const* container_name() const { return m_container_name; } + + +private: + void setError(error_e n) { m_error = n; } + + enum { MAX_PARAMS = 3 }; + error_e m_error; + char const* m_name; + char const* m_ie_name {""}; + char const* m_container_name {""}; + size_t m_param[MAX_PARAMS]; + +}; + +inline +void error_context::errorNoObject(const char* c_name) +{ + container_name(c_name); + m_name = m_ie_name; + setError(NO_OBJECT); +} + +inline +void error_context::errorNoMandatory() +{ + m_name = m_ie_name; + setError(NO_MANDATORY); +} + +inline +void error_context::alignmentError(u32 shift) +{ + m_name = m_ie_name; + m_param[0] = shift; + setError(ALIGNMENT); +} + +inline +void error_context::lengthErrorBytes(u32 bytes_left, u32 requested) +{ + m_name = m_ie_name; + m_param[0] = bytes_left; + m_param[1] = requested; + setError(INCORRECT_LENGTH_BYTES); +} + +inline +void error_context::lengthErrorBits(u32 bits_left, u32 requested) +{ + m_name = m_ie_name; + m_param[0] = bits_left; + m_param[1] = requested; + setError(INCORRECT_LENGTH_BITS); +} + +inline +void error_context::valueError(u32 got, u32 expected, u32 ofs) +{ + m_name = m_ie_name; + m_param[0] = got; + m_param[1] = expected; + m_param[2] = ofs; + setError(INCORRECT_VALUE); +} + +inline +void error_context::tagError(u32 tag) +{ + m_name = m_ie_name; + m_param[0] = tag; + setError(INCORRECT_IE_TAG); +} + +inline +void error_context::valueRangeError(size_t value) +{ + m_name = m_ie_name; + m_param[0] = value; + setError(VALUE_OUT_OF_RANGE); +} + +inline +void error_context::sizeRangeError(size_t size, size_t low, size_t high) +{ + m_name = m_ie_name; + m_param[0] = size; + m_param[1] = low; + m_param[2] = high; + setError(SIZE_OUT_OF_RANGE); +} + +inline +void error_context::allocatorNoMem(size_t bytes_left, size_t bytes_required) +{ + m_name = m_ie_name; + m_param[0] = bytes_left; + m_param[1] = bytes_required; + setError(ALLOC_NO_MEMORY); +} + +inline +char const* error_context::toString() const +{ + static char sz[256]; + + switch (m_error) + { + case SUCCESS: + return "OK"; + + case INCORRECT_LENGTH_BITS: + snprintf(sz, sizeof(sz)-1, "%zu bits left, '%s::%s' needs %zu", m_param[0], m_container_name, m_name, m_param[1]); + break; + + case INCORRECT_LENGTH_BYTES: + snprintf(sz, sizeof(sz)-1, "%zu bytes left, '%s::%s' needs %zu", m_param[0], m_container_name, m_name, m_param[1]); + break; + case ALIGNMENT: + snprintf(sz, sizeof(sz)-1, "misaligned '%s::%s': shift %zu bits", m_container_name, m_name, m_param[0]); + break; + + case INCORRECT_VALUE: + snprintf(sz, sizeof(sz)-1, "Wrong value of '%s::%s' at %zu: 0x%zX expected=0x%zX", m_container_name, m_name, m_param[2], m_param[0], m_param[1]); + break; + + case INCORRECT_CHOICE_TAG: + snprintf(sz, sizeof(sz)-1, "Wrong choice tag of '%s::%s': %zu (0x%zX)", m_container_name, m_name, m_param[0], m_param[0]); + break; + + case INCORRECT_IE_TAG: + snprintf(sz, sizeof(sz)-1, "Wrong tag of '%s::%s': %zu (0x%zX)", m_container_name, m_name, m_param[0], m_param[0]); + break; + + case VALUE_OUT_OF_RANGE: + snprintf(sz, sizeof(sz) - 1, "Value is out of the range '%s::%s': value: %zu", m_container_name, m_name, m_param[0]); + break; + + case SIZE_OUT_OF_RANGE: + if (m_param[2]) + { + snprintf(sz, sizeof(sz) - 1, "Size=%zu bytes is out of the range [%zu, %zu] in '%s::%s'", m_param[0], m_param[1], m_param[2], m_container_name, m_name); + } + else + { + if (m_param[1]) + { + snprintf(sz, sizeof(sz) - 1, "Size=%zu bytes is less than %zu in '%s::%s'", m_param[0], m_param[1], m_container_name, m_name); + } + else + { + snprintf(sz, sizeof(sz) - 1, "Size=%zu bytes is out of the range in '%s::%s'", m_param[0], m_container_name, m_name); + } + } + break; + + case ALLOC_NO_MEMORY: + snprintf(sz, sizeof(sz) - 1, "Allocator memory has ended '%s::%s': left bytes: %zu; required bytes: %zu", m_container_name, m_name, m_param[0], m_param[1]); + break; + case NO_OBJECT: + snprintf(sz, sizeof(sz) - 1, "Component relation constraint violated '%s::%s'", m_container_name, m_name); + break; + case NO_MANDATORY: + snprintf(sz, sizeof(sz) - 1, "no mandatory '%s::%s' is found", m_container_name, m_name); + break; + case UNSUPPORTED: + snprintf(sz, sizeof(sz) - 1, "unsupported object '%s::%s' is found", m_container_name, m_name); + return "unsupported"; + break; + case UNSPECIFIED: + snprintf(sz, sizeof(sz) - 1, "unspecified object '%s::%s' is found", m_container_name, m_name); + return "unspecified"; + break; + case WRONG_END_OF_CONTENT: + snprintf(sz, sizeof(sz) - 1, "wrong end of content in object '%s::%s'", m_container_name, m_name); + return "wrong end of content"; + break; + } + + return sz; +} + +} //end: namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/identifier.hpp b/simulators/e2sim/src/ASN1/asn/identifier.hpp new file mode 100755 index 0000000..9b603fb --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/identifier.hpp @@ -0,0 +1,97 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn { + +enum class class_type_t : uint8_t +{ + UNIVERSAL + ,APPLICATION + ,CONTEXT + ,PRIVATE + ,UNSPECIFIED //reserved for internal use +}; + +enum class tag_type_t : uint8_t +{ + EXPLICIT + ,IMPLICIT + ,AUTOMATIC +}; + +using tag_value_t = uint64_t; + +template +struct identifier +{ + static constexpr class_type_t class_type = CT; + static constexpr tag_value_t tag_value = TAG; + static constexpr tag_type_t tag_type = TT; +}; + + +enum class tag_rvalue_t : tag_value_t +{ + BOOLEAN = 1 + ,INTEGER = 2 + ,BIT_STRING = 3 + ,OCTET_STRING = 4 + ,NULL_TYPE = 5 + ,OBJECT_IDENTIFIER = 6 + ,REAL = 9 + ,ENUMERATED = 10 + ,SEQUENCE = 16 + ,SEQUENCE_OF = 16 + ,UTF8String = 12 + ,NumericString = 18 + ,IA5String = 22 + ,VisibleString = 26 + ,DATE = 31 + ,TIME_OF_DAY = 32 + ,DATE_TIME = 33 + ,DURATION = 34 + ,ObjectDescriptor = 7 + ,EXTERNAL = 8 + ,EMBEDDED_PDV = 11 + ,OID_IRI = 35 + ,RELATIVE_OID_IRI = 36 + ,SET = 17 + ,SET_OF = 17 + ,UTCTime = 23 + ,GeneralizedTime = 24 + ,PrintableString = 19 + ,T61String = 20 + ,VideotexString = 21 + ,GraphicString = 25 + ,GeneralString = 27 + ,UniversalString = 28 + ,CHARACTER_STRING = 29 + ,BMPString = 30 + ,ISO646String = 26 + ,TeletexString = 20 + ,CHOICE = 99 // fake id for internal use +}; + +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/binary_integer.hpp b/simulators/e2sim/src/ASN1/asn/per/binary_integer.hpp new file mode 100755 index 0000000..6ba2f15 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/binary_integer.hpp @@ -0,0 +1,168 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/length.hpp" + +namespace asn { +namespace per { + +template +struct BinaryIntegerLength; + +/*************************************************************************************** +* Encoding of a non-negative-binary-integer (X.691 10.3) +***************************************************************************************/ +template +struct NonnegativeBinaryInteger +{ + static void inline run(u64 val, EncoderCtx& ctx) + { + if(val) + { + size_t const len = sizeof(val) - (__builtin_clzll(val) >> 3); + + BinaryIntegerLength< Range >::run(ctx, len); + Tools::bit_accessor::padByte(ctx.refBuffer()); + + u8 buff[len]; + size_t shift = (len - 1) << 3; + for(size_t i = 0; i < len; ++i) + { + buff[i] = static_cast(val >> shift); + shift -= 8; + } + + ctx.refBuffer().putBytes(buff, len); + } + else + { + BinaryIntegerLength< Range >::run(ctx, 1); + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putByte(0); + } + } + template + static void inline run(T& retval, DecoderCtx& ctx, bool extended_val) + { + retval = 0; + size_t len = (size_t)BinaryIntegerLength< Range >::run(ctx, extended_val); + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data = ctx.refBuffer().getBytes(len); + + if (data) + { + for (size_t i = 0; i < len; ++i) + { + retval = retval << 8; + retval |= data[i]; + } + } + } +}; + +/*************************************************************************************** +* Encoding of a 2's-complement-binary-integer (X.691 10.4) +***************************************************************************************/ + +template +struct TwosComplementBinaryInteger +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + + u64 val = ie.get(); + u64 tval = val; + u64 mask = static_cast(-128); + u8 len = 1; + u8 i = 7; + + u8 buf[8]; + + while (len < 8) + { + buf[i] = static_cast(tval); + if (!(val & mask) || (val & mask) == mask) + break; + mask = mask << 8; + tval = tval >> 8; + len++; + i--; + } + + ctx.refBuffer().putByte(len) && ctx.refBuffer().putBytes(&buf[i], len); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + + u8 const* data = nullptr; + typename IE::value_type val = 0; + + u8 const* len = ctx.refBuffer().getBytes(1); + + if (len && (*len) <= 8 && (data = ctx.refBuffer().getBytes(*len))) + { + for (u8 i = 0; i < *len; ++i) + { + val = val << 8; + val |= data[i]; + } + } + ie.set(val); + } +}; + +/*************************************************************************************** +* Encoding of a normally small non-negativebinary integer (X.691 10.6) +***************************************************************************************/ +template +struct NormallySmallNonnegativeBinaryInteger +{ + static void inline run(IE const& ie, EncoderCtx& ctx, typename IE::constraint_t::boundary_type val) + { + if (val <= 63) + { + Tools::bit_accessor::put(static_cast(val), 7, ctx.refBuffer()); //7 bits ('0' indicator + value) + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); //1 bit ('1' indicator) + NonnegativeBinaryInteger::run(val, ctx); + } + } + static TValue inline run(DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) { + TValue rval = 0; + NonnegativeBinaryInteger::run(rval, ctx, true); + return rval; + } + return Tools::bit_accessor::get(6, ctx.refBuffer()); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/bstring.hpp b/simulators/e2sim/src/ASN1/asn/per/bstring.hpp new file mode 100755 index 0000000..5d25599 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/bstring.hpp @@ -0,0 +1,279 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" + +namespace asn { +namespace per { + +//15.11 Default +template +struct BitstringNoExt +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + LengthDeterminant::run(ctx, ie.get_bitqty()); + Tools::bit_accessor::padByte(ctx.refBuffer()); + + const u8 tail = ie.get_bitqty() % 8; + if (tail) + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size() - 1); + u8 last_byte = *(ie.get_buffer().data() + ie.get_buffer().size() - 1); + + last_byte <<= 8 - tail; + ctx.refBuffer().putBytes(&last_byte, 1); + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, tail); + } + else + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size()); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + size_t len = LengthDeterminant::run(ctx, false); + size_t len_bytes = (len + 7) >> 3; + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data_in = ctx.refBuffer().getBytes(len_bytes); + if (data_in) + { + u8* data_out = ctx.refAllocator().alloc_bytes(len_bytes); + if (data_out) + { + memcpy(data_out, data_in, len_bytes); + const u8 shift = len % 8; + if (shift) + { + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, shift); + data_out[len_bytes - 1] >>= 8 - shift; + } + ie.set_buffer(len, data_out); + } + else + ctx.refErrorCtx().allocatorNoMem(0, len_bytes); + } + } +}; + +//15.8 Zero length +template +struct BitstringNoExt > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) {/* do nothing */ } + static void inline run(IE& ie, DecoderCtx& ctx) { ie.setpresent(true); } +}; + +//15.9 Up to 6 bits, fixed length +template +struct BitstringNoExt 0)) +>> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::put((static_cast(ie.get_buffer().data()[0])) & (0xFF >> (8 - IE::constraint_t::upper_bound)), + IE::constraint_t::upper_bound, ctx.refBuffer()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 * data = ctx.refAllocator().alloc_bytes(1); + if (data) + { + data[0] = Tools::bit_accessor::get(IE::constraint_t::upper_bound, ctx.refBuffer()); + ie.set_buffer(IE::constraint_t::upper_bound, data); + } + else + ctx.refErrorCtx().allocatorNoMem(0, 1); + } +}; +template +struct BitstringNoExt 8)) +>> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::put(ie.get_buffer().data()[0], 8, ctx.refBuffer()); + Tools::bit_accessor::put((static_cast(ie.get_buffer().data()[1])) & (0xFF >> (16 - IE::constraint_t::upper_bound)), + IE::constraint_t::upper_bound - 8, ctx.refBuffer()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 * data = ctx.refAllocator().alloc_bytes(2); + if (data) + { + data[0] = Tools::bit_accessor::get(8, ctx.refBuffer()); + data[1] = Tools::bit_accessor::get(IE::constraint_t::upper_bound - 8, ctx.refBuffer()); + ie.set_buffer(IE::constraint_t::upper_bound, data); + } + else + ctx.refErrorCtx().allocatorNoMem(0, 2); + } +}; + +//15.10 More than 6 bits, up to 64K bits, fixed length +template +struct BitstringNoExt 16)) +>> +{ + constexpr static size_t len_bytes = (IE::constraint_t::upper_bound + 7) >> 3; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + if (ie.get_buffer().size() != len_bytes) + { + ctx.refErrorCtx().sizeRangeError(ie.get_buffer().size(), len_bytes, len_bytes); + } + else + { + const u8 tail = ie.get_bitqty() % 8; + if (tail) + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size() - 1); + u8 last_byte = *(ie.get_buffer().data() + ie.get_buffer().size() - 1); + last_byte <<= 8 - tail; + ctx.refBuffer().putBytes(&last_byte, 1); + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, tail); + } + else + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size()); + } + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data_in = ctx.refBuffer().getBytes(len_bytes); + if (data_in) + { + u8* data_out = ctx.refAllocator().alloc_bytes(len_bytes); + if (data_out) + { + memcpy(data_out, data_in, len_bytes); + const u8 shift = IE::constraint_t::upper_bound % 8; + if (shift) + { + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, shift); + data_out[len_bytes - 1] >>= 8 - shift; + } + ie.set_buffer(IE::constraint_t::upper_bound, data_out); + } + else + ctx.refErrorCtx().allocatorNoMem(0, len_bytes); + } + } +}; + +/**************************************************/ + +template +struct Bitstring; + +//15.6 : Extension present +template +struct Bitstring > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + + if (ie.get_bitqty() <= IE::constraint_t::upper_bound && ie.get_bitqty() >= IE::constraint_t::lower_bound) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + BitstringNoExt::run(ie, ctx); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + Tools::bit_accessor::padByte(ctx.refBuffer()); + LengthDeterminant::run(ctx, ie.get_bitqty()); + Tools::bit_accessor::padByte(ctx.refBuffer()); + const u8 tail = ie.get_bitqty() % 8; + if (tail) + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size() - 1); + u8 last_byte = *(ie.get_buffer().data() + ie.get_buffer().size() - 1); + + last_byte <<= 8 - tail; + + ctx.refBuffer().putBytes(&last_byte, 1); + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, tail); + } + else + { + ctx.refBuffer().putBytes(ie.get_buffer().data(), ie.get_buffer().size()); + } + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + const size_t len = LengthDeterminant::run(ctx, true); + const size_t len_bytes = (len + 7) >> 3; + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data_in = ctx.refBuffer().getBytes(len_bytes); + if (data_in) + { + u8* data_out = ctx.refAllocator().alloc_bytes(len_bytes); + if (data_out) + { + memcpy(data_out, data_in, len_bytes); + const u8 shift = len % 8; + if (shift) + { + ctx.refBuffer().set_begin(ctx.refBuffer().begin() - 1, shift); + data_out[len_bytes - 1] >>= 8 - shift; + } + ie.set_buffer(len, data_out); + } + else + ctx.refErrorCtx().allocatorNoMem(0, len_bytes); + } + } + else + BitstringNoExt::run(ie, ctx); + } +}; + +//15.7 : No extension +template +struct Bitstring > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + BitstringNoExt::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + BitstringNoExt::run(ie, ctx); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/choice.hpp b/simulators/e2sim/src/ASN1/asn/per/choice.hpp new file mode 100755 index 0000000..f0d115c --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/choice.hpp @@ -0,0 +1,136 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/visitor.hpp" + +namespace asn { +namespace per { + +/******************************************************************************** +Choice +*********************************************************************************/ + +/**************************************************/ +//22.6-7 Default +template +struct ChoiceNoExt +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ConstrainedWholeNumber::run(ctx, IE::normalize(ie.get_index())); + VisitorEncoder ve{ ctx }; + ie.encode(ve); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + typename IE::index_type idx = ConstrainedWholeNumber::run(ctx); + VisitorDecoder ve{ ctx }; + ie.decode(IE::denormalize(idx), ve); + } +}; + +//22.4 One alternative +template +struct ChoiceNoExt > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + VisitorEncoder ve{ ctx }; + ie.encode(ve); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + VisitorDecoder ve{ ctx }; + ie.decode(IE::denormalize(0), ve); + } +}; + +/**************************************************/ + +template +struct Choice; + +//22.5 Extension present +template +struct Choice > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + auto idx = IE::normalize(ie.get_index()); + if (idx <= IE::constraint_t::upper_bound) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + ChoiceNoExt::run(ie, ctx); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + NormallySmallNonnegativeBinaryInteger::run(ie, ctx, idx - IE::constraint_t::upper_bound - 1); + OpenTypeVisitorEncoder ve{ ctx }; + ie.encode(ve); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + { + typename IE::index_type idx = IE::constraint_t::upper_bound + 1 + NormallySmallNonnegativeBinaryInteger::run(ctx); + if (idx >= IE::constraint_t::total_num_entries) + { + ie.set_unknown(); + size_t size = LengthDeterminantDefault::run(ctx); + DecoderCtx::buf_type& buffer = ctx.refBuffer(); + if (buffer.getBytesLeft() < size) + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), size); + else + buffer.advance(size); + } + else + { + OpenTypeVisitorDecoder ve{ ctx }; + ie.decode(IE::denormalize(idx), ve); + } + } + else + ChoiceNoExt::run(ie, ctx); + } +}; + +//22.6 No extension +template +struct Choice > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ChoiceNoExt::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ChoiceNoExt::run(ie, ctx); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/codec.hpp b/simulators/e2sim/src/ASN1/asn/per/codec.hpp new file mode 100755 index 0000000..176792a --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/codec.hpp @@ -0,0 +1,325 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/elements.hpp" +#include "asn/per/context.hpp" +#include "asn/per/length.hpp" +#include "asn/per/integer.hpp" +#include "asn/per/enumerated.hpp" +#include "asn/per/ostring.hpp" +#include "asn/per/bstring.hpp" +#include "asn/per/sequence_of.hpp" +#include "asn/per/sequence.hpp" +#include "asn/per/choice.hpp" +#include "asn/per/visitor.hpp" +#include "asn/per/oid.hpp" + +namespace asn { +namespace per { + +/******************************************************************************** +pack +*********************************************************************************/ +template +bool pack(IE const& ie, EncoderCtx& ctx) +{ + ctx.refErrorCtx().reset(); + Element::run(ie, ctx); + + if (ctx) + Tools::bit_accessor::padByte(ctx.refBuffer()); + + return static_cast(ctx); +} +/******************************************************************************** +unpack +*********************************************************************************/ +template +bool unpack(IE& ie, DecoderCtx& ctx) +{ + Element::run(ie, ctx); + + if (ctx) + Tools::bit_accessor::padByte(ctx.refBuffer()); + + if(ctx && ctx.refBuffer().getBytesLeft()) + { + ctx.ie_name(IE::name()); + ctx.refErrorCtx().lengthErrorBytes(ctx.refBuffer().getBytesLeft(), 0); + } + + return static_cast(ctx); +} + +/*************************************************************************************** +* ElementType +***************************************************************************************/ +template +struct ElementType; + +/*************************************************************************************** +* BOOLEAN: Encoding the boolean type (X.691 11) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::put(static_cast(ie.get()), 1, ctx.refBuffer()); + } + + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.set(0 != Tools::bit_accessor::get(1, ctx.refBuffer())); + } +}; +/*************************************************************************************** +* INTEGER: Encoding the integer type (X.691 12) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Integer::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + Integer::run(ie, ctx); + } +}; +/*************************************************************************************** +* ENUMERATED: Encoding the enumerated type (X.691 13) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Enumerated::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + Enumerated::run(ie, ctx); + } +}; +/*************************************************************************************** +* BIT STRING: Encoding the bitstring type (X.691 15) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Bitstring::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.clear(); + Bitstring::run(ie, ctx); + } +}; +/*************************************************************************************** +* OCTET STRING: Encoding the octetstring type (X.691 16) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Octetstring::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.clear(); + Octetstring::run(ie, ctx); + } +}; +/*************************************************************************************** +* NULL: Encoding the null type (X.691 17) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) { /*do nothing*/ } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.setpresent(true); + } +}; +/*************************************************************************************** +* SEQUENCE: Encoding the sequence type (X.691 18) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ctx.container_name(IE::name()); + Seq::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ctx.m_container = &ie; + Seq::run(ie, ctx); + ctx.m_container = nullptr; + } +}; +/*************************************************************************************** +* SEQUENCE OF: Encoding the sequence-of type (X.691 19) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + ctx.container_name(IE::name()); + SequenceOf::run(ie, ctx); + + for (auto& elem : ie) + Element::run(elem, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.clear(); + SequenceOf::run(ie, ctx); + + for (auto & elem : ie) + Element::run(elem, ctx); + } +}; +/*************************************************************************************** +* SET: Encoding the set type (X.691 20) +***************************************************************************************/ + + +/*************************************************************************************** +* SET OF: Encoding the set-of type (X.691 21) +***************************************************************************************/ + +/*************************************************************************************** +* CHOICE: Encoding the choice type (X.691 22) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if(ie.is_valid()) + { + ctx.container_name(IE::name()); + Choice::run(ie, ctx); + } + else + ctx.refErrorCtx().tagError(ie.get_index()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.clear(); + ctx.m_container = &ie; + Choice::run(ie, ctx); + ctx.m_container = nullptr; + } +}; + +/*************************************************************************************** +* IE_OBJECT_IDENTIFIER: Encoding the object identifier type (X.691 23) +***************************************************************************************/ +template +struct ElementType +{ +protected: + template friend struct Element; + + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Oid::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.clear(); + Oid::run(ie, ctx); + } +}; + +/*************************************************************************************** +* COMMON: Element +***************************************************************************************/ +template +struct Element +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (ctx) + { + ASN_ENCODER_TRACE("IE buffer: %s", static_cast(IE_TYPE), IE::name(), ctx.refBuffer().toString()); + ctx.ie_name(IE::name()); + if (IE_TYPE != element_type::T_SEQUENCE && !ie.is_valid()) + { + ctx.refErrorCtx().errorNoMandatory(); + } + else + ElementType::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + if (ctx) + { + ASN_DECODER_TRACE("IE buffer: %s", static_cast(IE_TYPE), IE::name(), ctx.refBuffer().toString()); + ctx.ie_name(IE::name()); + ElementType::run(ie, ctx); + } + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/common.hpp b/simulators/e2sim/src/ASN1/asn/per/common.hpp new file mode 100755 index 0000000..5b92100 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/common.hpp @@ -0,0 +1,58 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/asn.hpp" +#include "type_defs.h" + +#include "asn/buffer.hpp" +#include "context.hpp" + +//#define ASN_DECODER_TRACE_ENABLE +//#define ASN_ENCODER_TRACE_ENABLE + +#ifdef ASN_DECODER_TRACE_ENABLE +#define ASN_DECODER_TRACE(FMT, ...) printf(FMT "\n", __VA_ARGS__) +#else +#define ASN_DECODER_TRACE(...) +#endif + +#ifdef ASN_ENCODER_TRACE_ENABLE +#define ASN_ENCODER_TRACE(FMT, ...) printf(FMT "\n", __VA_ARGS__) +#else +#define ASN_ENCODER_TRACE(...) +#endif + +namespace asn { +namespace per { + +struct Tools +{ + typedef bit_accessor_cross_byte bit_accessor; +}; + +template +struct Element; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/context.hpp b/simulators/e2sim/src/ASN1/asn/per/context.hpp new file mode 100755 index 0000000..2a5d7e9 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/context.hpp @@ -0,0 +1,154 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/utility.hpp" +#include "asn/buffer.hpp" +#include "asn/error_context.hpp" + +namespace asn { +namespace per { + +/******************************************************************************** +EncoderCtx +*********************************************************************************/ +class EncoderCtx : boost::noncopyable +{ +public: + typedef buffer buf_type; + + EncoderCtx(u8* data, size_t size) + : m_buffer{ m_errCtx } + { + Reset(data, size); + } + + template + explicit EncoderCtx(u8(&buff)[SIZE]) + : EncoderCtx(buff, SIZE) + { + } + + explicit EncoderCtx() + : EncoderCtx(nullptr, 0) + { + } + + buf_type& refBuffer() { return m_buffer; } + error_context& refErrorCtx() { return m_errCtx; } + explicit operator bool() const { return static_cast(m_errCtx); } + + void Reset(void* data = nullptr, size_t size = 0) + { + m_buffer.reset(static_cast(data), size); + m_errCtx.reset(); + } + + //Name of the being processed IE + void ie_name(const char* name) { m_errCtx.ie_name(name); } + char const* ie_name() const { return m_errCtx.ie_name(); } + + void container_name(const char* name) { m_errCtx.container_name(name); } + char const* container_name() const { return m_errCtx.container_name(); } + +private: + template + friend struct Encode; + + error_context m_errCtx; + buf_type m_buffer; +}; + + +/******************************************************************************** +DecoderCtx +*********************************************************************************/ +class DecoderCtx : boost::noncopyable +{ +public: + typedef buffer buf_type; + typedef allocator alloc_type; + typedef u64 map_type; + + DecoderCtx(const void* data = nullptr, size_t size = 0, void* alloc_buffer = nullptr, size_t alloc_buffer_size = 0) + : m_buffer{ m_errCtx } + { + reset(data, size, alloc_buffer, alloc_buffer_size); + } + + buf_type& refBuffer() { return m_buffer; } + alloc_type& refAllocator() { return m_allocator; } + error_context& refErrorCtx() { return m_errCtx; } + explicit operator bool() const { return static_cast(m_errCtx); } + + void reset(const void* data = nullptr, size_t size = 0, void* alloc_buffer = nullptr, size_t alloc_buffer_size = 0) + { + m_allocator.reset(alloc_buffer, alloc_buffer_size); + m_buffer.reset(static_cast(data), size); + m_errCtx.reset(); + m_map = 0; + m_container = nullptr; + } + + bool map_elm() + { + //m_map = (m_map << 1) | (m_map >> (sizeof(m_map)*CHAR_BIT - 1)); + //return m_map & 1u; + + constexpr map_type mask = ((map_type)1) << (sizeof(map_type)*CHAR_BIT - 1); + + bool rv = m_map & mask; + m_map = m_map << 1; + + return rv; + } + + map_type set_map(map_type map) + { + map_type rval = m_map; + m_map = map; + return rval; + } + + map_type get_map() const {return m_map;} + + //Pointer to container (SEQ | CHO) + void* m_container{ nullptr }; + + //Name of the being processed IE + void ie_name(const char* name) { m_errCtx.ie_name(name); } + char const* ie_name() const { return m_errCtx.ie_name(); } + + void container_name(const char* name) { m_errCtx.container_name(name); } + char const* container_name() const { return m_errCtx.container_name(); } + +private: + //Optional or Extension elements' presence bitmap. Used in sequences + map_type m_map{ 0 }; + error_context m_errCtx; + buf_type m_buffer; + alloc_type m_allocator; +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/enumerated.hpp b/simulators/e2sim/src/ASN1/asn/per/enumerated.hpp new file mode 100755 index 0000000..c2e8851 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/enumerated.hpp @@ -0,0 +1,79 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/whole_number.hpp" +#include "asn/per/binary_integer.hpp" + +namespace asn { +namespace per { + +template +struct Enumerated; + +template +struct Enumerated > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (ie.get() > IE::constraint_t::upper_bound) + { + ctx.refErrorCtx().valueRangeError(static_cast(ie.get())); + return; + } + ConstrainedWholeNumber::run(ctx, ie.get()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.set(ConstrainedWholeNumber::run(ctx)); + } +}; + +template +struct Enumerated > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (ie.get() <= IE::constraint_t::upper_bound) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + ConstrainedWholeNumber::run(ctx, ie.get()); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + NormallySmallNonnegativeBinaryInteger::run(ie, ctx, ie.get() - IE::constraint_t::upper_bound - 1); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + ie.set(IE::constraint_t::upper_bound + 1 + NormallySmallNonnegativeBinaryInteger::run(ctx)); + else + ie.set(ConstrainedWholeNumber::run(ctx)); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/integer.hpp b/simulators/e2sim/src/ASN1/asn/per/integer.hpp new file mode 100755 index 0000000..7bb93c2 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/integer.hpp @@ -0,0 +1,154 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/elements.hpp" +#include "asn/per/common.hpp" +#include "asn/per/binary_integer.hpp" +#include "asn/per/whole_number.hpp" + +namespace asn { +namespace per { + +template +struct Integer; + +template +struct Integer > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if(IE::constraint_t::is_extended(ie.get())) + { + ctx.refErrorCtx().valueRangeError(static_cast(ie.get())); + return; + } + ConstrainedWholeNumber::run(ctx, ie.get()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + ie.set(ConstrainedWholeNumber::run(ctx)); + } +}; + +template +struct Integer > +{ + //X.691 12.1 + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (!IE::constraint_t::is_extended(ie.get())) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + //X.691 12.2 + ConstrainedWholeNumber::run(ctx, ie.get()); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + //X.691 12.2.4, 12.2.6, 10.8s + TwosComplementBinaryInteger::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + TwosComplementBinaryInteger::run(ie, ctx); + else + ie.set(ConstrainedWholeNumber::run(ctx)); + } +}; + +// (X.691 10.7) +template +struct Integer > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if(IE::constraint_t::is_extended(ie.get())) + { + ctx.refErrorCtx().valueRangeError(static_cast(ie.get())); + return; + } + NonnegativeBinaryInteger::run(ie.get() - IE::constraint_t::lower_bound, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + typename IE::value_type val = 0; + NonnegativeBinaryInteger::run(val, ctx, false); + ie.set(IE::constraint_t::lower_bound + val); + } +}; + +template +struct Integer > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (!IE::constraint_t::is_extended(ie.get())) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + NonnegativeBinaryInteger::run(ie.get() - IE::constraint_t::lower_bound, ctx); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + TwosComplementBinaryInteger::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + + if (ext) + TwosComplementBinaryInteger::run(ie, ctx); + else + { + typename IE::value_type val = 0; + NonnegativeBinaryInteger::run(val, ctx, false); + ie.set(val + IE::constraint_t::lower_bound); + } + } +}; + +/*************************************************************************************** +* Encoding of an unconstrained whole number (X.691 10.8) +***************************************************************************************/ + +template +struct Integer > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + TwosComplementBinaryInteger::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + TwosComplementBinaryInteger::run(ie, ctx); + } +}; + +} //namespace per +} //namespace asn + diff --git a/simulators/e2sim/src/ASN1/asn/per/length.hpp b/simulators/e2sim/src/ASN1/asn/per/length.hpp new file mode 100755 index 0000000..488a830 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/length.hpp @@ -0,0 +1,238 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/whole_number.hpp" + +namespace asn { +namespace per { + +/******************************************************************************** +* Encoding of a length determinant (X.691 10.9) +*********************************************************************************/ + +template +struct LengthDeterminant; + +struct LengthDeterminantDefault //Unconstrained length +{ + static u8 bytes_needed(size_t len) + { + if (len <= 127) + return 1; + return 2; + } + + static void run(EncoderCtx& ctx, size_t len) + { + if (len <= 127) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putByte(static_cast(len)); + } + else if (len < 16384) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + len += 0x8000; + ctx.refBuffer().putByte(static_cast(len >> 8)); + ctx.refBuffer().putByte(static_cast(len)); + } + else + { + //todo: 10.9.3.8.1 for len >= 16K + } + } + static size_t run(DecoderCtx& ctx) + { + size_t rval = 0; + Tools::bit_accessor::padByte(ctx.refBuffer()); + + u8 const* data = ctx.refBuffer().getBytes(1); + if (data) + { + if (*data & 0x80) + { + rval = (*data & 0x7F) << 8; + data = ctx.refBuffer().getBytes(1); + if (data) + rval |= *data; + } + else + rval = *data; + } + return rval; + } +}; + +//10.9.3.3 +template +struct LengthDeterminant> +{ + static void run(EncoderCtx& ctx, size_t len) + { + ConstrainedWholeNumber::run(ctx, len); + } + static size_t inline run(DecoderCtx& ctx, bool extended_len) + { + return ConstrainedWholeNumber::run(ctx); + } +}; +template +struct LengthDeterminant> +{ + static void run(EncoderCtx& ctx, size_t len) + { + if (len > Range::upper_bound || len < Range::lower_bound) + LengthDeterminantDefault::run(ctx, len); + else + ConstrainedWholeNumber::run(ctx, len); + } + static size_t inline run(DecoderCtx& ctx, bool extended_len) + { + if (extended_len) + return LengthDeterminantDefault::run(ctx); + + return ConstrainedWholeNumber::run(ctx); + } +}; + +template +struct LengthDeterminant= 65536) > > +{ + static void run(EncoderCtx& ctx, size_t len) + { + LengthDeterminantDefault::run(ctx, len); + } + static size_t inline run(DecoderCtx& ctx, bool extended_len) + { + return LengthDeterminantDefault::run(ctx); + } +}; + +//10.9.3.4 : for "normally small length". bitmaps, sequence types +template +struct NormallySmallLength; + +template +struct NormallySmallLength > +{ + static_assert(Length > 0, "NormallySmallLength must be > 0"); + + static void run(EncoderCtx& ctx) + { + Tools::bit_accessor::put((u8)(Length - 1), 7, ctx.refBuffer()); + } + static size_t run(DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + return LengthDeterminantDefault::run(ctx); + return Tools::bit_accessor::get(6, ctx.refBuffer()) + 1; + } +}; + +template +struct NormallySmallLength 64)> > +{ + static void run(EncoderCtx& ctx) + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + LengthDeterminantDefault::run(ctx, Length); + } +}; + +/* +* BinaryIntegerLength +*/ + +template +struct NBytes +{ + static constexpr bound_t value = std::log2( N ) / 8 + 1; +}; + +template +struct NBytes > +{ + static constexpr bound_t value = 1; +}; + +template +struct NRange +{ + static constexpr bound_t lower_bound = B1; + static constexpr bound_t upper_bound = B2; +}; + +template +struct NRange > +{ + static constexpr bound_t lower_bound = B2; + static constexpr bound_t upper_bound = B1; +}; + +template +struct BinaryIntegerLength +{ + typedef NRange< + NBytes::value, + NBytes::value + > nrange; + + using boundary_type = typename Range::boundary_type; + static constexpr bool extended = Range::extended; + static constexpr bound_t lower_bound = nrange::lower_bound; + static constexpr bound_t upper_bound = nrange::upper_bound; + + static void run(EncoderCtx& ctx, size_t len) + { + LengthDeterminant::run(ctx, len); + } + static size_t inline run(DecoderCtx& ctx, bool extended_len) + { + return LengthDeterminant::run(ctx, extended_len); + } +}; + +template +struct BinaryIntegerLength> +{ + static void run(EncoderCtx& ctx, size_t len) + { + LengthDeterminantDefault::run(ctx, len); + } + static size_t inline run(DecoderCtx& ctx, bool extended_len) + { + return LengthDeterminantDefault::run(ctx); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/oid.hpp b/simulators/e2sim/src/ASN1/asn/per/oid.hpp new file mode 100755 index 0000000..c4f222a --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/oid.hpp @@ -0,0 +1,68 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" + +namespace asn { +namespace per { + +template +struct Oid +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + size_t len = ie.get().size(); + + if (len > 255) + { + ctx.refErrorCtx().valueError(len, 0, 0); + } + else + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putBytes(reinterpret_cast(&len), 1); + ctx.refBuffer().putBytes(ie.get().data(), len); + } + } + + static void inline run(IE& ie, DecoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + + uint8_t const* data_in = ctx.refBuffer().getBytes(1); // length + + if(data_in) + { + size_t len = *data_in; + data_in = ctx.refBuffer().getBytes(len); + + if (data_in) + { + ie.set(len, data_in); + } + } + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/ostring.hpp b/simulators/e2sim/src/ASN1/asn/per/ostring.hpp new file mode 100755 index 0000000..4d601bb --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/ostring.hpp @@ -0,0 +1,209 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" + +namespace asn { +namespace per { + +template < class IE, class Enable = void> +struct Octetstring; + +//16.8 Default +template +struct OctetstringNoExt +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + bound_t size = ie.get().size(); + LengthDeterminant::run(ctx, size); + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putBytes(ie.get().data(), size); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + size_t len = LengthDeterminant::run(ctx, false); + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data_in = ctx.refBuffer().getBytes(len); + + if (data_in) + { + ie.set(len, data_in); + } + + } +}; + +//16.5 Zero length +template +struct OctetstringNoExt > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) {/* do nothing */ } + static void inline run(IE& ie, DecoderCtx& ctx) { ie.setpresent(true); } +}; + +//16.6 Up to two octets, fixed length +template +struct OctetstringNoExt> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::put(static_cast(ie.get().data()[0]), 8, ctx.refBuffer()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 data_in = Tools::bit_accessor::get(8, ctx.refBuffer()); + u8* data_out = ctx.refAllocator().alloc_bytes(1); + if (data_out) { + data_out[0] = data_in; + ie.set(1, data_out); + } + else + ctx.refErrorCtx().allocatorNoMem(0, 1); + } +}; + +template +struct OctetstringNoExt> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::put(static_cast(ie.get().data()[0]), 8, ctx.refBuffer()); + Tools::bit_accessor::put(static_cast(ie.get().data()[1]), 8, ctx.refBuffer()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 data_in[2]; + data_in[0] = Tools::bit_accessor::get(8, ctx.refBuffer()); + data_in[1] = Tools::bit_accessor::get(8, ctx.refBuffer()); + u8* data_out = ctx.refAllocator().alloc_bytes(sizeof(data_in)); + if (data_out) { + data_out[0] = data_in[0]; + data_out[1] = data_in[1]; + ie.set(sizeof(data_in), data_out); + } + else + ctx.refErrorCtx().allocatorNoMem(0, sizeof(data_in)); + } +}; + +//16.7 More than 2 octets, up to 64K, fixed length +template +struct OctetstringNoExt 2)) +>> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putBytes(ie.get().data(), ie.get().size()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + const size_t len = (size_t)IE::constraint_t::upper_bound; + u8 const* data_in = ctx.refBuffer().getBytes(len); + if (data_in) + { + ie.set(len, data_in); + } + } +}; + +/**************************************************/ + +//16.3 : Extension present +template +struct Octetstring > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + bound_t size = ie.get().size(); + if (size <= IE::constraint_t::upper_bound && size >= IE::constraint_t::lower_bound) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + OctetstringNoExt::run(ie, ctx); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + Tools::bit_accessor::padByte(ctx.refBuffer()); + LengthDeterminant::run(ctx, size); + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putBytes(ie.get().data(), size); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + size_t len = LengthDeterminant::run(ctx, true); + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data_in = ctx.refBuffer().getBytes(len); + if (data_in) + { + ie.set(len, data_in); + } + } + else + OctetstringNoExt::run(ie, ctx); + } +}; + +//16.4 : No extension +template +struct Octetstring > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if ( ie.get().size() > size_t(IE::constraint_t::upper_bound) || + (IE::constraint_t::lower_bound >= 0 && ie.get().size() < size_t(IE::constraint_t::lower_bound))) + { + ctx.refErrorCtx().sizeRangeError(ie.get().size(), size_t(IE::constraint_t::lower_bound), + size_t(IE::constraint_t::upper_bound)); + } + else + { + OctetstringNoExt::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + OctetstringNoExt::run(ie, ctx); + if ( ie.get().size() > size_t(IE::constraint_t::upper_bound) || + (IE::constraint_t::lower_bound >= 0 && ie.get().size() < size_t(IE::constraint_t::lower_bound))) + { + ctx.refErrorCtx().sizeRangeError(ie.get().size(), size_t(IE::constraint_t::lower_bound), + size_t(IE::constraint_t::upper_bound)); + } + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/sequence.hpp b/simulators/e2sim/src/ASN1/asn/per/sequence.hpp new file mode 100755 index 0000000..e533e80 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/sequence.hpp @@ -0,0 +1,568 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/visitor.hpp" + +namespace asn { +namespace per { + +/****************************************************************** + * Adapter + *****************************************************************/ +template +struct Adapter +{ + static void inline run(IE const& ie, EncoderCtx& ctx, Container const& cont) + { + Element::run(ie, ctx); + } + + static void inline run(IE& ie, DecoderCtx& ctx, Container const& cont) + { + Element::run(ie, ctx); + } +}; +template +struct Adapter> +{ + static void inline run(IE const& ie, EncoderCtx& ctx, Container const& cont) + { + VisitorEncoder v(ctx); + bool rv = ie.encode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + } + + static void inline run(IE& ie, DecoderCtx& ctx, Container const& cont) + { + VisitorDecoder v(ctx); + bool rv = ie.decode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + } +}; +template +struct Adapter > +{ + static void inline run(IE const& ie, EncoderCtx& ctx, Container const& cont) + { + OpenTypeVisitorEncoder v(ctx); + bool rv = ie.encode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + } + + static void inline run(IE& ie, DecoderCtx& ctx, Container const& cont) + { + OpenTypeVisitorDecoder v(ctx); + bool rv = ie.decode(v, cont); + if(!rv && static_cast(ctx)) + { + ctx.refErrorCtx().errorNoObject(Container::name()); + } + if(ie.is_unknown()) //skip the unknown Open Type + { + size_t size = LengthDeterminantDefault::run(ctx); + DecoderCtx::buf_type& buffer = ctx.refBuffer(); + if (buffer.getBytesLeft() < size) + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), size); + else + buffer.advance(size); + } + } +}; + +/****************************************************************** + * RootEncoder + *****************************************************************/ +template +struct RootEncoder +{ + RootEncoder(EncoderCtx& ctx, Container const& cont) : m_ctx(ctx), m_cont(cont) {} + + template + bool operator() (IE const& ie) const + { + if(!IE::extension) + { + if(IE::optional && !ie.is_valid()) + return static_cast(m_ctx); + Adapter::run(ie, m_ctx, m_cont); + } + return static_cast(m_ctx); + } + EncoderCtx& m_ctx; + Container const& m_cont; +}; + +/****************************************************************** + * RootDecoder + *****************************************************************/ +template +struct RootDecoder +{ + RootDecoder(DecoderCtx& ctx, Container const& cont) : m_ctx(ctx), m_cont(cont) {} + + template + bool operator() (IE& ie) const + { + if(!IE::extension) + { + if(IE::optional) + { + if(m_ctx.map_elm()) + { + ie.setpresent(true); + Adapter::run(ie, m_ctx, m_cont); + } + else + ie.setpresent(false); + } + else + { + Adapter::run(ie, m_ctx, m_cont); + } + } + return static_cast(m_ctx); + } + DecoderCtx& m_ctx; + Container const& m_cont; +}; + +/****************************************************************** + * ExtEncoder + *****************************************************************/ +template +struct ExtEncoder +{ + explicit ExtEncoder(EncoderCtx& ctx, Container const& cont) : m_ctx(ctx), m_cont(cont) {} + + template + bool operator() (IE const& ie) const + { + if(!IE::extension) + return static_cast(m_ctx); + + if(IE::optional && !ie.is_valid()) + return static_cast(m_ctx); + + size_t reserved_size = 1; //1 byte length is most likely + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + + if (m_ctx.refBuffer().getBytesLeft()) + { + EncoderCtx::buf_type::pointer p = m_ctx.refBuffer().advance(reserved_size); + EncoderCtx::buf_type::pointer start = p + reserved_size; + + Adapter::run(ie, m_ctx, m_cont); + + if (m_ctx) + { + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + EncoderCtx::buf_type::pointer p_new = m_ctx.refBuffer().begin(); + size_t size = p_new - start; + size_t needed = LengthDeterminantDefault::bytes_needed(size) - reserved_size; + if (needed) //1 byte is not enough for the length determinant. it is hardly possible + { + if (m_ctx.refBuffer().getBytesLeft() < needed) { + m_ctx.refErrorCtx().lengthErrorBytes(m_ctx.refBuffer().getBytesLeft(), needed); + return false; + } + memmove(start + needed, start, size); + p_new += needed; + } + m_ctx.refBuffer().set_begin(p, 0); + LengthDeterminantDefault::run(m_ctx, size); + if (m_ctx) { + m_ctx.refBuffer().set_begin(p_new, 0); + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + } + } + } + else + { + m_ctx.refErrorCtx().lengthErrorBytes(m_ctx.refBuffer().getBytesLeft(), reserved_size); + return false; + } + return static_cast(m_ctx); + } + EncoderCtx& m_ctx; + Container const& m_cont; +}; + +/****************************************************************** + * ExtDecoder + *****************************************************************/ +template +struct ExtDecoder +{ + explicit ExtDecoder(DecoderCtx& ctx, Container const& cont) : m_ctx(ctx), m_cont(cont) {} + + template + bool operator() (IE& ie) const + { + if(!IE::extension) + return static_cast(m_ctx); + + if (m_ctx.map_elm()) + { + ie.setpresent(true); + size_t size = LengthDeterminantDefault::run(m_ctx); + DecoderCtx::buf_type& buffer = m_ctx.refBuffer(); + if (buffer.getBytesLeft() < size) + { + m_ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), size); + return false; + } + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + size); + Adapter::run(ie, m_ctx, m_cont); + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + buffer.set_end(end); + } + else + { + ie.setpresent(false); + } + + return static_cast(m_ctx); + } + DecoderCtx& m_ctx; + Container const& m_cont; +}; + +/****************************************************************** + * SeqMap + *****************************************************************/ +template +struct SeqMap; + +/* +template +struct SeqMap 8) > > +{ + static void inline run(EncoderCtx& ctx, size_t val) + { + u8 k = IE::num_opt_entries / 8; // num of full bytes in a seq map mask + u8 fb_bits = IE::num_opt_entries % 8; // num of first byte bits (without padding) + + if (fb_bits) { + // Put a part of a first byte (without padding, only seq map own bits) + Tools::bit_accessor::put((u8)(val >> 8*k), fb_bits, ctx.refBuffer()); + } + + // Put other bytes (full bytes) + for (int i = (k-1); i >= 0; i--) { + Tools::bit_accessor::put((u8)(val >> 8*i), 8, ctx.refBuffer()); + } + } + + static DecoderCtx::map_type inline run(DecoderCtx& ctx) + { + uint num_opts = IE::num_opt_entries; + u64 res = 0; + u8 k = 1; + u8 lb_bits = IE::num_opt_entries % 8; // num of last byte bits (without padding) + + while (num_opts >= 8) { + size_t shift = sizeof(DecoderCtx::map_type) * CHAR_BIT - 8*k; + + DecoderCtx::map_type rval = Tools::bit_accessor::get(8, ctx.refBuffer()); + + rval = rval << shift; + res |= rval; + + k++; + num_opts -= 8; + } + + if (lb_bits > 0) { + // (8 - lb_bits) - padding in a last byte + size_t shift = sizeof(DecoderCtx::map_type) * CHAR_BIT - 8*k + 8 - lb_bits; + + DecoderCtx::map_type rval = Tools::bit_accessor::get(lb_bits, ctx.refBuffer()); + + rval = rval << shift; + res |= rval; + } + + return res; + } +} +; +*/ + +template +struct SeqMap > //todo: to add code for more than 8 optional elements +{ + static void inline run(EncoderCtx& ctx, size_t val) + { + Tools::bit_accessor::put((u8)val, IE::num_opt_entries, ctx.refBuffer()); + } + static DecoderCtx::map_type inline run(DecoderCtx& ctx) + { + size_t shift = sizeof(DecoderCtx::map_type) * CHAR_BIT - IE::num_opt_entries; + DecoderCtx::map_type rval = Tools::bit_accessor::get(IE::num_opt_entries, ctx.refBuffer()); + rval = rval << shift; + return rval; + } +}; + +/****************************************************************** + * SeqExtMap + *****************************************************************/ +template +struct SeqExtMap +{ + static void inline run(EncoderCtx& ctx, size_t val) {} + static DecoderCtx::map_type inline run(DecoderCtx& ctx) + { + size_t len = NormallySmallLength<1>::run(ctx); + size_t shift = sizeof(DecoderCtx::map_type) * CHAR_BIT - len; + u8 tmp; + DecoderCtx::map_type rval{ 0 }; + u8 val; + + while (len) { + tmp = len > 8 ? 8 : (u8)len; + val = Tools::bit_accessor::get(tmp, ctx.refBuffer()); + rval = rval << tmp; + rval |= val; + len -= tmp; + } + rval = rval << shift; + return rval; + } +}; + +template +struct SeqExtMap 0)) > > +{ + static void inline run(EncoderCtx& ctx, size_t val) + { + NormallySmallLength::run(ctx); + Tools::bit_accessor::put((u8)val, NumExtEntries, ctx.refBuffer()); + } +}; + +template +struct SeqExtMap 8) > > +{ + static void inline run(EncoderCtx& ctx, size_t val) + { + NormallySmallLength::run(ctx); + + size_t len = NumExtEntries; + size_t tmp; + + while (len) { + tmp = len > 8 ? 8 : len; + Tools::bit_accessor::put((u8)val, tmp, ctx.refBuffer()); + val = val >> tmp; + len -= tmp; + } + } +}; + +/****************************************************************** + * SeqMapBuilder + *****************************************************************/ +struct SeqMapBuilder +{ + SeqMapBuilder(uint64_t& map) : m_map(map) {} + + template + bool operator()(IE const& ie) + { + if(!IE::extension && IE::optional) + { + m_map = m_map << 1; + if(ie.is_valid()) + m_map |= 1; + } + return true; + } + uint64_t& m_map; +}; + +/****************************************************************** + * SeqExtMapBuilder + *****************************************************************/ +struct SeqExtMapBuilder +{ + SeqExtMapBuilder(uint64_t& map) : m_map(map) {} + + template + bool operator()(IE const& ie) + { + if(IE::extension) + { + m_map = m_map << 1; + if(!IE::optional || (IE::optional && ie.is_valid())) + m_map |= 1; + } + return true; + } + uint64_t& m_map; +}; + +/****************************************************************** + * SeqNoExtDefault + *****************************************************************/ +// Default (No OPT/DEF present within the extension root) +template +struct SeqNoExtDefault +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + RootEncoder ve(ctx, ie); + ie.encode(ve); + } + static void inline run(IE& ie, DecoderCtx& ctx, DecoderCtx::map_type map = 0) + { + RootDecoder ve(ctx, ie); + + DecoderCtx::map_type old_map = ctx.set_map(map); + ie.decode(ve); + ctx.set_map(old_map); + } +}; + +/****************************************************************** + * SeqNoExt + *****************************************************************/ +// Default (No OPT/DEF present within the extension root) +template +struct SeqNoExt +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + SeqNoExtDefault::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + SeqNoExtDefault::run(ie, ctx); + } +}; + +//18.2 OPT/DEF present within the extension root +template +struct SeqNoExt 0) > > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + uint64_t map = 0; + SeqMapBuilder mb(map); + ie.encode(mb); + SeqMap::run(ctx, map); + SeqNoExtDefault::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + SeqNoExtDefault::run(ie, ctx, SeqMap::run(ctx)); + } +}; + +/****************************************************************** + * Seq + *****************************************************************/ +template +struct Seq; + +template +struct Seq > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + uint64_t map = 0; + SeqExtMapBuilder emb(map); + ie.encode(emb); + + if (map) { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + SeqNoExt::run(ie, ctx); + SeqExtMap::run(ctx, map); + ExtEncoder ove(ctx, ie); + ie.encode(ove); + } + else { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + SeqNoExt::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + { + SeqNoExt::run(ie, ctx); + + auto old_map = ctx.set_map(SeqExtMap::run(ctx)); // we do not know how many exts can be received + { + ExtDecoder ove(ctx, ie); + ie.decode(ove); + + auto& buffer = ctx.refBuffer(); + while(ctx.get_map()) + { + if(ctx.map_elm()) //skip unknown extensions + { + size_t size = LengthDeterminantDefault::run(ctx); + if (buffer.getBytesLeft() < size) + { + ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), size); + break; + } + buffer.advance(size); + } + } + } + ctx.set_map(old_map); + } + else + SeqNoExt::run(ie, ctx); + } +}; + +template +struct Seq > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + SeqNoExt::run(ie, ctx); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + SeqNoExt::run(ie, ctx); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/sequence_of.hpp b/simulators/e2sim/src/ASN1/asn/per/sequence_of.hpp new file mode 100755 index 0000000..d4e21a9 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/sequence_of.hpp @@ -0,0 +1,156 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" + +namespace asn { +namespace per { + +template +struct SequenceOf; + +//19.6 Default +template +struct SequenceOfNoExt +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + LengthDeterminant::run(ctx, ie.size()); + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + size_t len = LengthDeterminant::run(ctx, false); + for (size_t i = 0; i < len; ++i) + { + u8* data = ctx.refAllocator().alloc_bytes(sizeof(typename IE::value_type)); + if (data) + { + typename IE::value_type * v = new (data) typename IE::value_type; + v->clear(); + ie.push_back(*v); + } + else + { + ctx.refErrorCtx().allocatorNoMem(0, sizeof(typename IE::value_type)); + break; + } + } + } +}; + +//16.6 +template +struct SequenceOfNoExt> +{ + static void inline run(IE const& ie, EncoderCtx& ctx) {/*do nothing*/ } + static void inline run(IE& ie, DecoderCtx& ctx) + { + for (size_t i = 0; i < IE::constraint_t::upper_bound; ++i) + { + u8* data = ctx.refAllocator().alloc_bytes(sizeof(typename IE::value_type)); + if (data) + { + typename IE::value_type * v = new (data) typename IE::value_type; + v->clear(); + ie.push_back(*v); + } + else + { + ctx.refErrorCtx().allocatorNoMem(0, sizeof(typename IE::value_type)); + break; + } + } + } +}; + +/**************************************************/ + +//19.4 Extension present +template +struct SequenceOf > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (ie.size() <= IE::constraint_t::upper_bound && ie.size() >= IE::constraint_t::lower_bound) + { + Tools::bit_accessor::put(0, 1, ctx.refBuffer()); + SequenceOfNoExt::run(ie, ctx); + } + else + { + Tools::bit_accessor::put(1, 1, ctx.refBuffer()); + LengthDeterminant::run(ctx, ie.size()); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + u8 ext = Tools::bit_accessor::get(1, ctx.refBuffer()); + if (ext) + { + size_t len = LengthDeterminant::run(ctx, true); + for (size_t i = 0; i < len; ++i) + { + u8* data = ctx.refAllocator().alloc_bytes(sizeof(typename IE::value_type)); + if (data) + { + typename IE::value_type * v = new (data) typename IE::value_type; + //v->clear(); + ie.push_back(*v); + } + else + { + ctx.refErrorCtx().allocatorNoMem(0, sizeof(typename IE::value_type)); + break; + } + } + } + else + SequenceOfNoExt::run(ie, ctx); + } +}; + +//19.5-6 No extension +template +struct SequenceOf > +{ + static void inline run(IE const& ie, EncoderCtx& ctx) + { + if (IE::constraint_t::lower_bound >= 0 && ie.size() < size_t(IE::constraint_t::lower_bound)) + { + ctx.refErrorCtx().sizeRangeError(ie.size(), size_t(IE::constraint_t::lower_bound)); + } + else + { + SequenceOfNoExt::run(ie, ctx); + } + } + static void inline run(IE& ie, DecoderCtx& ctx) + { + SequenceOfNoExt::run(ie, ctx); + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/visitor.hpp b/simulators/e2sim/src/ASN1/asn/per/visitor.hpp new file mode 100755 index 0000000..f379044 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/visitor.hpp @@ -0,0 +1,141 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" + +namespace asn { +namespace per { + +/******************************************************************************** +VisitorEncoder +*********************************************************************************/ +struct VisitorEncoder +{ + explicit VisitorEncoder(EncoderCtx& ctx) : m_ctx(ctx) {} + + template + bool operator() (IE const& ie) const + { + Element::run(ie, m_ctx); + return static_cast(m_ctx); + } + EncoderCtx& m_ctx; +}; + +/******************************************************************************** +VisitorDecoder +*********************************************************************************/ +struct VisitorDecoder +{ + VisitorDecoder(DecoderCtx& ctx) : m_ctx(ctx) {} + + template + bool operator() (IE& ie) const + { + Element::run(ie, m_ctx); + return static_cast(m_ctx); + } + DecoderCtx& m_ctx; +}; + +/*************************************************************************************** +* Open Type Visitor // Encode Open Type (10.2) +***************************************************************************************/ +struct OpenTypeVisitorEncoder +{ + explicit OpenTypeVisitorEncoder(EncoderCtx& ctx) : m_ctx(ctx) {} + + template + bool operator() (IE const& ie) const + { + size_t reserved_size = 1; //1 byte length is most likely + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + + if (m_ctx.refBuffer().getBytesLeft()) + { + EncoderCtx::buf_type::pointer p = m_ctx.refBuffer().advance(reserved_size); + EncoderCtx::buf_type::pointer start = p + reserved_size; + + Element::run(ie, m_ctx); + + if (m_ctx) + { + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + EncoderCtx::buf_type::pointer p_new = m_ctx.refBuffer().begin(); + size_t size = p_new - start; + size_t needed = LengthDeterminantDefault::bytes_needed(size) - reserved_size; + if (needed) //1 byte is not enough for the length determinant. it is hardly possible + { + if (m_ctx.refBuffer().getBytesLeft() < needed) { + m_ctx.refErrorCtx().lengthErrorBytes(m_ctx.refBuffer().getBytesLeft(), needed); + return false; + } + memmove(start + needed, start, size); + p_new += needed; + } + m_ctx.refBuffer().set_begin(p, 0); + LengthDeterminantDefault::run(m_ctx, size); + if (m_ctx) { + m_ctx.refBuffer().set_begin(p_new, 0); + Tools::bit_accessor::padByte(m_ctx.refBuffer()); + } + } + } + else + { + m_ctx.refErrorCtx().lengthErrorBytes(m_ctx.refBuffer().getBytesLeft(), reserved_size); + } + return static_cast(m_ctx); + } + EncoderCtx& m_ctx; +}; + +/*************************************************************************************** +* Open Type Visitor // Decode Open Type (10.2) +***************************************************************************************/ +struct OpenTypeVisitorDecoder +{ + explicit OpenTypeVisitorDecoder(DecoderCtx& ctx) : m_ctx(ctx) {} + + template + bool operator() (IE& ie) const + { + size_t size = LengthDeterminantDefault::run(m_ctx); + DecoderCtx::buf_type& buffer = m_ctx.refBuffer(); + if (buffer.getBytesLeft() < size) + { + m_ctx.refErrorCtx().lengthErrorBytes(buffer.getBytesLeft(), size); + return false; + } + DecoderCtx::buf_type::pointer end = buffer.end(); + buffer.set_end(buffer.begin() + size); + Element::run(ie, m_ctx); + buffer.set_end(end); + + return static_cast(m_ctx); + } + DecoderCtx& m_ctx; +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/per/whole_number.hpp b/simulators/e2sim/src/ASN1/asn/per/whole_number.hpp new file mode 100755 index 0000000..c614998 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/per/whole_number.hpp @@ -0,0 +1,147 @@ +#pragma once +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/per/common.hpp" +#include "asn/per/binary_integer.hpp" + +namespace asn { +namespace per { + +/*************************************************************************************** +* Encoding of a constrained whole number (X.691 10.5) +***************************************************************************************/ + +template +struct length_determinant; + +template +struct length_determinant > { static constexpr bound_t value = 0; }; + +template +struct length_determinant > { static constexpr bound_t value = 1; }; + +template +struct length_determinant 1) > > { static constexpr bound_t value = boost::static_log2<(R - 1)>::value + 1; }; + +/*************************************************************************************** +***************************************************************************************/ + +template +struct ConstrainedWholeNumber; + +//Bit-field case +template +struct ConstrainedWholeNumber > +{ + //non-negative-binary-integer X.691 10.5 + static void inline run(EncoderCtx& ctx, const V& val) + { + Tools::bit_accessor::put(static_cast(val - Range::lower_bound), + length_determinant<(Range::upper_bound - Range::lower_bound + 1)>::value, + ctx.refBuffer()); + } + static V inline run(DecoderCtx& ctx) + { + return Range::lower_bound + Tools::bit_accessor::get( + length_determinant<(Range::upper_bound - Range::lower_bound + 1)>::value, + ctx.refBuffer()); + } +}; + +//One octet case +template +struct ConstrainedWholeNumber > +{ + //non-negative-binary-integer X.691 10.5 + static void inline run(EncoderCtx& ctx, const V& val) + { + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putByte(static_cast(val - Range::lower_bound)); + } + static V inline run(DecoderCtx& ctx) + { + V rval = 0; + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data = ctx.refBuffer().getBytes(1); + if (data) + rval = Range::lower_bound + data[0]; + return rval; + } +}; + +//Two octets case +template +struct ConstrainedWholeNumber (Range::lower_bound + 255)) && (Range::upper_bound <= (Range::lower_bound + 65535))> > +{ + //non-negative-binary-integer X.691 10.5 + static void inline run(EncoderCtx& ctx, const V& v) + { + u64 val = static_cast(v - Range::lower_bound); + Tools::bit_accessor::padByte(ctx.refBuffer()); + ctx.refBuffer().putByte((u8)(val >> 8)); + ctx.refBuffer().putByte((u8)val); + } + static V inline run(DecoderCtx& ctx) + { + V rval = 0; + Tools::bit_accessor::padByte(ctx.refBuffer()); + u8 const* data = ctx.refBuffer().getBytes(2); + if (data) { + rval = data[0]; + rval = rval << 8; + rval |= data[1]; + rval += Range::lower_bound; + } + return rval; + } +}; + +//Indefinite case +template +struct ConstrainedWholeNumber Range::lower_bound + 65535) > > +{ + struct NormalizedValueRange + { + using boundary_type = typename Range::boundary_type; + static constexpr bool extended = Range::extended; + static constexpr boundary_type lower_bound = 0; + static constexpr boundary_type upper_bound = Range::upper_bound - Range::lower_bound; + }; + + //non-negative-binary-integer X.691 10.5 + static void inline run(EncoderCtx& ctx, const V& val) + { + NonnegativeBinaryInteger::run(val - Range::lower_bound, ctx); + } + static V inline run(DecoderCtx& ctx) + { + V rval = 0; + NonnegativeBinaryInteger::run(rval, ctx, false); + return rval + Range::lower_bound; + } +}; + +} //namespace per +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/printer.hpp b/simulators/e2sim/src/ASN1/asn/printer.hpp new file mode 100755 index 0000000..b21eaef --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/printer.hpp @@ -0,0 +1,338 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include + +// Local Includes: Application specific classes, functions, and libraries +#include "asn/elements.hpp" + +namespace asn{ + +/******************************************************************************** +Utility +**********************************S***********************************************/ +inline void skip_row(std::ostream* str, size_t row_shift) + //{*str << std::string(row_shift, ' ');} +{ + std::string s(row_shift, ' '); + str->write(s.data(), s.size()); +} + +inline void print_hex(std::ostream* str, size_t size, const uint8_t* data, size_t row_shift) +{ + *str << std::setfill('0') << std::hex << std::noshowbase; + for (size_t i = 0; i < size; ++i) + { + if (i && (0x00 == (i & 0x0f))) { skip_row(str, row_shift); } + *str << std::setw(2) << (int)data[i] << " "; + if (0x0f == (i & 0x0f)) { *str << '\n'; } + } +} + +/******************************************************************************** + +Print + +*********************************************************************************/ + + +/******************************************************************************** +default implementation for IE +*********************************************************************************/ +template +struct Print; + +template +void print(IE const& ie, std::ostream& out, size_t row_shift) +{ + Print::run(ie, &out, row_shift); +} + +template +std::string get_printed(IE const& ie, size_t row_shift = 0) +{ + std::stringstream out; + print(ie, out, row_shift); + return out.str(); +} + + +/******************************************************************************** +VisitorPrinter +*********************************************************************************/ +struct VisitorPrinter +{ + VisitorPrinter(std::ostream* str, size_t row_shift) : m_pStream(str), m_RowShift(row_shift) {} + + template + bool operator() (IE & ie) + { + Print::run(ie, m_pStream, m_RowShift); + return true; + } + + std::ostream* m_pStream; + size_t m_RowShift; +}; + +/****************************************************************** + * PrinterAdapter + *****************************************************************/ +template +struct PrinterAdapter +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift, Container const& cont) + { + Print::run(ie, str, row_shift); + } +}; +template +struct PrinterAdapter> +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift, Container const& cont) + { + VisitorPrinter vp(str, row_shift); + ie.encode(vp, cont); + } +}; +template +struct PrinterAdapter > +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift, Container const& cont) + { + VisitorPrinter vp(str, row_shift); + ie.encode(vp, cont); + } +}; + +/******************************************************************************** +SeqVisitorPrinter +*********************************************************************************/ +template +struct SeqVisitorPrinter +{ + SeqVisitorPrinter(Container const& cont, std::ostream* str, size_t row_shift) : m_pStream(str), m_RowShift(row_shift), m_cont(cont) {} + + template + bool operator() (IE & ie) + { + if(!IE::optional || ie.is_valid()) + PrinterAdapter::run(ie, m_pStream, m_RowShift, m_cont); + return true; + } + + std::ostream* m_pStream; + size_t m_RowShift; + Container const& m_cont; +}; + + +/******************************************************************************** +T_NULL +*********************************************************************************/ + +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << std::endl; + } +}; + +/******************************************************************************** +T_BOOLEAN +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << " = " << (ie.get() ? "true" : "false")<< std::endl; + } +}; + +/******************************************************************************** +T_INTEGER +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << " = " << std::hex << std::showbase << (size_t)ie.get() << std::endl; + } +}; + +/******************************************************************************** +T_ENUMERATED +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << " = " << std::hex << std::showbase << (size_t)ie.get() << std::endl; + } +}; + +/******************************************************************************** +T_BITSTRING +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + auto& val = ie.get_buffer(); + *str << IE::name() << " = "; + + print_hex(str, val.size() - 1, val.data(), row_shift + strlen(IE::name()) + 3); + + size_t i = val.size() - 1; + uint8_t c = val.data()[i]; + uint8_t b = val.bitqty() % 8; + if (b != 0) c = c << (8 - b); + + if (i && (0x00 == (i & 0x0f))) { skip_row(str, row_shift); } + *str << std::setw(2) << (int)c; + + *str << " (" << std::dec << val.bitqty() << " bits)" << std::endl; + + } +}; + +/******************************************************************************** +T_OCTETSTRING +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << " = "; + auto & val = ie.get(); + print_hex(str, val.size(), val.data(), row_shift + strlen(IE::name()) + 3); + *str << std::endl; + } +}; + +/******************************************************************************** +T_SEQUENCE +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << std::endl; + SeqVisitorPrinter vp(ie, str, row_shift + 1); + ie.encode(vp); + } +}; + +/******************************************************************************** +T_SET +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << std::endl; + SeqVisitorPrinter vp(ie, str, row_shift + 1); + ie.encode(vp); + } +}; + + +/******************************************************************************** +T_CHOICE +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + VisitorPrinter vp(str, row_shift+1); + skip_row(str, row_shift); *str << IE::name() << ":\n"; + ie.encode(vp); + } +}; + +/******************************************************************************** +T_SEQUENCE_OF +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); *str << IE::name() << ":\n"; + ++row_shift; + for (auto& elem : ie) + { + Print::run(elem, str, row_shift); + } + } +}; + +/******************************************************************************** +T_SET_OF +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); *str << IE::name() << ":\n"; + ++row_shift; + for (auto& elem : ie) + { + Print::run(elem, str, row_shift); + } + } +}; + +/******************************************************************************** +T_OBJECTIDENTIFIER +*********************************************************************************/ +template +struct Print +{ + static void inline run(IE const& ie, std::ostream* str, size_t row_shift) + { + skip_row(str, row_shift); + *str << IE::name() << std::endl; + } +}; + +} //namespace asn diff --git a/simulators/e2sim/src/ASN1/asn/type_defs.h b/simulators/e2sim/src/ASN1/asn/type_defs.h new file mode 100755 index 0000000..b82fd16 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/type_defs.h @@ -0,0 +1,34 @@ +#pragma once +/******************************************************************************* + * @file $HeadURL: $ + * @version $LastChangedRevision: $ + * @date $LastChangedDate: $ + * @author ngf684 + * + * @brief /iphy_debug/src/common/type_defs.h: + * + * Revision History: + * 01.06.2012 ngf684 created + * + * Copyright Nokia 2015. All rights reserved. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND + * + *******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include + +// Platform Includes: Platform specific classes, functions, and libraries + +// Local Includes: Application specific classes, functions, and libraries + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; + +typedef int8_t i8; +typedef int16_t i16; +typedef int32_t i32; +typedef int64_t i64; diff --git a/simulators/e2sim/src/ASN1/asn/utility.hpp b/simulators/e2sim/src/ASN1/asn/utility.hpp new file mode 100755 index 0000000..ae1ad74 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/utility.hpp @@ -0,0 +1,88 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include + +// Local Includes: Application specific classes, functions, and libraries + +namespace asn +{ + +struct allocator +{ + allocator() = default; + + allocator(void* data, size_t size) { reset(data, size); } + + template + explicit allocator(T (&buf)[SZ]) : allocator(buf, SZ * sizeof(T)) { } + + void reset(void* data, size_t size) + { + std::size_t space = size; + m_begin = static_cast(std::align(alignment, size, data, space)); + m_end = m_begin ? m_begin + space : nullptr; + m_current = m_begin; + m_ref_counter = 0; + } + + uint8_t* alloc_bytes(std::size_t size) + { + std::size_t const esize = (size + alignment - 1) & -alignment; + if (m_current + esize > m_end) { return nullptr; } //throw std::bad_alloc(); + + uint8_t* const rval = m_current; + m_current += esize; + return rval; + } + + size_t add_ref() { return ++m_ref_counter; } + size_t release() + { + if (m_ref_counter) --m_ref_counter; + if (m_ref_counter == 0) reset(); + return m_ref_counter; + } + size_t ref_counter() const { return m_ref_counter; } +private: + //called by last release() when m_ref_counter becomes 0 + void reset() + { + m_current = m_begin; + } + + + enum : std::size_t + { + alignment = alignof(std::size_t) + }; + + uint8_t* m_begin { nullptr }; //set in reset() + uint8_t* m_current { nullptr }; //changed by alloc_bytes + uint8_t* m_end { nullptr }; + + size_t m_ref_counter {0}; +}; + +} //namespace asn + diff --git a/simulators/e2sim/src/ASN1/asn/value_traits.hpp b/simulators/e2sim/src/ASN1/asn/value_traits.hpp new file mode 100755 index 0000000..4b67374 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/value_traits.hpp @@ -0,0 +1,187 @@ +#ifndef _STDEX_VALUE_TRAITS_HPP_INCLUDED_ +#define _STDEX_VALUE_TRAITS_HPP_INCLUDED_ + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +#include +#include +#include +#include +#include + +#include "type_defs.h" + +namespace stdex { +namespace value { + +namespace mpl = boost::mpl; + +//NOTE! length is in bits +typedef mpl::int_<8> _8; +typedef mpl::int_<16> _16; +typedef mpl::int_<24> _24; +typedef mpl::int_<32> _32; +typedef mpl::int_<40> _40; +typedef mpl::int_<48> _48; +typedef mpl::int_<56> _56; +typedef mpl::int_<64> _64; + +template +struct bits_to_bytes : mpl::int_< (num_bits + 7) / 8 > {}; + +/****************************************************************************** +* Class: value::traits +* Description: select min integer type to fit LEN bits +* Notes: LEN is positive integer type (mpl::int_) = number of bits +******************************************************************************/ +template struct traits; + +template +struct traits + >::type +> +{ + typedef _8 value_length; + typedef u8 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _16 value_length; + typedef u16 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _24 value_length; + typedef u32 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _32 value_length; + typedef u32 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _40 value_length; + typedef u64 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _48 value_length; + typedef u64 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _56 value_length; + typedef u64 value_type; + typedef value_type param_type; +}; + +template +struct traits, mpl::less_equal > + >::type +> +{ + typedef _64 value_length; + typedef u64 value_type; + typedef value_type param_type; +}; + +template +struct traits + >::type +> +{ + typedef LEN value_length; + struct value_type {u8 value[bits_to_bytes::value];}; + typedef value_type const& param_type; +}; + + +//template +//struct traits +// >::type +//> +//{ +// typedef LEN value_length; +// struct value_type {unsigned char value[LEN::value/8];}; +// typedef value_type const& param_type; +// +//}; + +/****************************************************************************** +* Class: value::traits_c +* Description: select min integer type to fit BITS bits +* Notes: N is positive integer value = number of bits +******************************************************************************/ +template +struct traits_c : traits > +{ +}; + +} //end: namespace value + +} //end: namespace stdex + +#ifdef _MSC_VER +#pragma component( mintypeinfo, off ) +#endif + +#endif //_STDEX_VALUE_TRAITS_HPP_INCLUDED_ diff --git a/simulators/e2sim/src/ASN1/asn/variant.hpp b/simulators/e2sim/src/ASN1/asn/variant.hpp new file mode 100755 index 0000000..be205aa --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/variant.hpp @@ -0,0 +1,146 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries +#include +#include + + +// Local Includes: Application specific classes, functions, and libraries + + +namespace asn{ + +template +struct variant +{ + typedef variant self_type; + + template + static void check_size () {static_assert(sizeof (T) <= S, "wrong type");} + + variant () + : typeinfo (nullptr) + {} + + template + variant (const T& t) + : typeinfo (&typeid (T)) + { + check_size(); + new (as_()) T (t); + } + + ~variant () + { + assert(!typeinfo); + } + + template + T& build () + { + assert(!typeinfo); + typeinfo = & typeid (T); + return *new (as_()) T; + } + + template + T& build (const T& t) + { + assert(!typeinfo); + check_size(); + typeinfo = & typeid (T); + return *new (as_ ()) T (t); + } + + template + T& as() + { + assert(*typeinfo == typeid (T)); + check_size(); + return *as_ (); + } + + template + const T& as() const + { + assert(*typeinfo == typeid (T)); + check_size(); + return *as_ (); + } + + template + void swap(self_type& other) + { + assert (typeinfo); + assert (*typeinfo == *other.typeinfo); + std::swap (as (), other.as ()); + } + + template + void move(self_type& other) + { + build (); + swap (other); + other.destroy (); + } + + template + void copy(const self_type& other) + { + build (other.as ()); + } + + template + void destroy() + { + as ().~T (); + typeinfo = nullptr; + } + +private: + self_type& operator=(const self_type&){} + variant (const self_type&){} + + template + T* as_() + { + void *p = buffer.raw; + return static_cast (p); + } + + template + const T* as_() const + { + const void *p = buffer.raw; + return static_cast (p); + } + + union + { + long double align_me; + char raw[S]; + } buffer; + + const std::type_info *typeinfo; +}; + +} //namspace asn diff --git a/simulators/e2sim/src/ASN1/asn/version.hpp b/simulators/e2sim/src/ASN1/asn/version.hpp new file mode 100755 index 0000000..50854f3 --- /dev/null +++ b/simulators/e2sim/src/ASN1/asn/version.hpp @@ -0,0 +1,27 @@ +#pragma once + +/****************************************************************************** +* +* Copyright (c) 2019 AT&T Intellectual Property. +* Copyright (c) 2018-2019 Nokia. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +******************************************************************************/ + +// Standard Includes: ANSI C/C++, MSA, and Third-Party Libraries + +// Local Includes: Application specific classes, functions, and libraries + +#define ASN_API_VERSION_MAJOR 5 +#define ASN_API_VERSION_MINOR 0 diff --git a/simulators/e2sim/src/ASN1/generated/E2AP-Constants.hpp b/simulators/e2sim/src/ASN1/generated/E2AP-Constants.hpp new file mode 100644 index 0000000..2ed8200 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/E2AP-Constants.hpp @@ -0,0 +1,244 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-CommonDataTypes.hpp" + +/* +id-RANfunction-Item ProtocolIE-ID ::= 60001 +*/ + +constexpr int64_t id_RANfunction_Item = 60001; +/* +id-RANfunctionDefinition ProtocolIE-ID ::= 60002 +*/ + +constexpr int64_t id_RANfunctionDefinition = 60002; +/* +id-RANfunctionID ProtocolIE-ID ::= 60003 +*/ + +constexpr int64_t id_RANfunctionID = 60003; +/* +id-RANfunctionID-Item ProtocolIE-ID ::= 60004 +*/ + +constexpr int64_t id_RANfunctionID_Item = 60004; +/* +id-RANfunctionIEcause-Item ProtocolIE-ID ::= 60005 +*/ + +constexpr int64_t id_RANfunctionIEcause_Item = 60005; +/* +id-RANfunctionsAccepted ProtocolIE-ID ::= 60006 +*/ + +constexpr int64_t id_RANfunctionsAccepted = 60006; +/* +id-RANfunctionsAdded ProtocolIE-ID ::= 60007 +*/ + +constexpr int64_t id_RANfunctionsAdded = 60007; +/* +id-RANfunctionsDeleted ProtocolIE-ID ::= 60008 +*/ + +constexpr int64_t id_RANfunctionsDeleted = 60008; +/* +id-RANfunctionsModified ProtocolIE-ID ::= 60009 +*/ + +constexpr int64_t id_RANfunctionsModified = 60009; +/* +id-RANfunctionsRejected ProtocolIE-ID ::= 60010 +*/ + +constexpr int64_t id_RANfunctionsRejected = 60010; +/* +id-RICaction-Admitted-Item ProtocolIE-ID ::= 60013 +*/ + +constexpr int64_t id_RICaction_Admitted_Item = 60013; +/* +id-RICaction-NotAdmitted-Item ProtocolIE-ID ::= 60015 +*/ + +constexpr int64_t id_RICaction_NotAdmitted_Item = 60015; +/* +id-RICaction-ToBeSetup-Item ProtocolIE-ID ::= 60011 +*/ + +constexpr int64_t id_RICaction_ToBeSetup_Item = 60011; +/* +id-RICactionDefinition ProtocolIE-ID ::= 60016 +*/ + +constexpr int64_t id_RICactionDefinition = 60016; +/* +id-RICactionID ProtocolIE-ID ::= 60017 +*/ + +constexpr int64_t id_RICactionID = 60017; +/* +id-RICactionType ProtocolIE-ID ::= 60018 +*/ + +constexpr int64_t id_RICactionType = 60018; +/* +id-RICactions-Admitted ProtocolIE-ID ::= 60012 +*/ + +constexpr int64_t id_RICactions_Admitted = 60012; +/* +id-RICactions-NotAdmitted ProtocolIE-ID ::= 60014 +*/ + +constexpr int64_t id_RICactions_NotAdmitted = 60014; +/* +id-RICcallProcessID ProtocolIE-ID ::= 60019 +*/ + +constexpr int64_t id_RICcallProcessID = 60019; +/* +id-RICcause ProtocolIE-ID ::= 60020 +*/ + +constexpr int64_t id_RICcause = 60020; +/* +id-RICcontrolAckRequest ProtocolIE-ID ::= 60021 +*/ + +constexpr int64_t id_RICcontrolAckRequest = 60021; +/* +id-RICcontrolHeader ProtocolIE-ID ::= 60022 +*/ + +constexpr int64_t id_RICcontrolHeader = 60022; +/* +id-RICcontrolMessage ProtocolIE-ID ::= 60023 +*/ + +constexpr int64_t id_RICcontrolMessage = 60023; +/* +id-RICcontrolStatus ProtocolIE-ID ::= 60024 +*/ + +constexpr int64_t id_RICcontrolStatus = 60024; +/* +id-RICeventTriggerDefinition ProtocolIE-ID ::= 60025 +*/ + +constexpr int64_t id_RICeventTriggerDefinition = 60025; +/* +id-RICindicationHeader ProtocolIE-ID ::= 60026 +*/ + +constexpr int64_t id_RICindicationHeader = 60026; +/* +id-RICindicationMessage ProtocolIE-ID ::= 60027 +*/ + +constexpr int64_t id_RICindicationMessage = 60027; +/* +id-RICindicationSN ProtocolIE-ID ::= 60028 +*/ + +constexpr int64_t id_RICindicationSN = 60028; +/* +id-RICindicationType ProtocolIE-ID ::= 60029 +*/ + +constexpr int64_t id_RICindicationType = 60029; +/* +id-RICrequestID ProtocolIE-ID ::= 60030 +*/ + +constexpr int64_t id_RICrequestID = 60030; +/* +id-RICrequestSequenceNumber ProtocolIE-ID ::= 60032 +*/ + +constexpr int64_t id_RICrequestSequenceNumber = 60032; +/* +id-RICrequestorID ProtocolIE-ID ::= 60031 +*/ + +constexpr int64_t id_RICrequestorID = 60031; +/* +id-RICsubscription ProtocolIE-ID ::= 60033 +*/ + +constexpr int64_t id_RICsubscription = 60033; +/* +id-RICsubsequentAction ProtocolIE-ID ::= 60034 +*/ + +constexpr int64_t id_RICsubsequentAction = 60034; +/* +id-RICsubsequentActionType ProtocolIE-ID ::= 60035 +*/ + +constexpr int64_t id_RICsubsequentActionType = 60035; +/* +id-RICtimeToWait ProtocolIE-ID ::= 60036 +*/ + +constexpr int64_t id_RICtimeToWait = 60036; +/* +id-ricControl ProcedureCode ::= 204 +*/ + +constexpr int64_t id_ricControl = 204; +/* +id-ricIndication ProcedureCode ::= 205 +*/ + +constexpr int64_t id_ricIndication = 205; +/* +id-ricServiceQuery ProcedureCode ::= 206 +*/ + +constexpr int64_t id_ricServiceQuery = 206; +/* +id-ricServiceUpdate ProcedureCode ::= 203 +*/ + +constexpr int64_t id_ricServiceUpdate = 203; +/* +id-ricSubscription ProcedureCode ::= 201 +*/ + +constexpr int64_t id_ricSubscription = 201; +/* +id-ricSubscriptionDelete ProcedureCode ::= 202 +*/ + +constexpr int64_t id_ricSubscriptionDelete = 202; +/* +maxofRANfunctionID INTEGER ::=256 +*/ + +constexpr int64_t maxofRANfunctionID = 256; +/* +maxofRICactionID INTEGER ::= 16 +*/ + +constexpr int64_t maxofRICactionID = 16; diff --git a/simulators/e2sim/src/ASN1/generated/E2AP-IEs.hpp b/simulators/e2sim/src/ASN1/generated/E2AP-IEs.hpp new file mode 100644 index 0000000..40f7bbb --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/E2AP-IEs.hpp @@ -0,0 +1,568 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-IEs.hpp" + +/* +CauseRIC ::= ENUMERATED { + function-id-Invalid, + action-not-supported, + excessive-actions, + duplicate-action, + duplicate-event, + function-resource-limit, + request-id-unknown, + inconsistent-action-subsequent-action-sequence, + control-message-invalid, + call-process-id-invalid, + function-not-required, + excessive-functions, + ric-resource-limit, + ... +} +*/ + +struct CauseRIC : asn::enumerated<13, 0, true> +{ + static constexpr const char* name() {return "CauseRIC";} + using parent_t = asn::enumerated<13, 0, true>; + typedef enum { + function_id_Invalid + ,action_not_supported + ,excessive_actions + ,duplicate_action + ,duplicate_event + ,function_resource_limit + ,request_id_unknown + ,inconsistent_action_subsequent_action_sequence + ,control_message_invalid + ,call_process_id_invalid + ,function_not_required + ,excessive_functions + ,ric_resource_limit + } index_t; + +}; + +/* +RANfunctionDefinition ::= OCTET STRING +*/ + +struct RANfunctionDefinition : asn::ostring<> +{ + static constexpr const char* name() {return "RANfunctionDefinition";} + using parent_t = asn::ostring<>; + +}; + +/* +RANfunctionID ::= INTEGER (0..4095) +*/ + +struct RANfunctionID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "RANfunctionID";} + using parent_t = asn::integer<>; + +}; + +/* +RICactionDefinition ::= OCTET STRING +*/ + +struct RICactionDefinition : asn::ostring<> +{ + static constexpr const char* name() {return "RICactionDefinition";} + using parent_t = asn::ostring<>; + +}; + +/* +RICactionID ::= INTEGER (0..255) +*/ + +struct RICactionID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "RICactionID";} + using parent_t = asn::integer<>; + +}; + +/* +RICactionType ::= ENUMERATED{ + report, + insert, + policy, + ... +} +*/ + +struct RICactionType : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "RICactionType";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + report + ,insert + ,policy + } index_t; + +}; + +/* +RICcallProcessID ::= OCTET STRING +*/ + +struct RICcallProcessID : asn::ostring<> +{ + static constexpr const char* name() {return "RICcallProcessID";} + using parent_t = asn::ostring<>; + +}; + +/* +RICcause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + ric CauseRIC, + ... +} +*/ + +struct RICcause : asn::choice<5, 0, true> +{ + static constexpr const char* name() {return "RICcause";} + using parent_t = asn::choice<5, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 6;} + void set_unknown() { set_index(6); } + ~RICcause() {clear();} + struct radioNetwork_t : CauseRadioNetwork + { + static constexpr const char* name() {return "radioNetwork_t";} + using parent_t = CauseRadioNetwork; + + }; + struct transport_t : CauseTransport + { + static constexpr const char* name() {return "transport_t";} + using parent_t = CauseTransport; + + }; + struct protocol_t : CauseProtocol + { + static constexpr const char* name() {return "protocol_t";} + using parent_t = CauseProtocol; + + }; + struct misc_t : CauseMisc + { + static constexpr const char* name() {return "misc_t";} + using parent_t = CauseMisc; + + }; + struct ric_t : CauseRIC + { + static constexpr const char* name() {return "ric_t";} + using parent_t = CauseRIC; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + case 5: set_index(5); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + case 5: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + radioNetwork_t& select_radioNetwork() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + radioNetwork_t const* get_radioNetwork() const { if(get_index() == 1) { return &var.as();} return nullptr; } + transport_t& select_transport() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + transport_t const* get_transport() const { if(get_index() == 2) { return &var.as();} return nullptr; } + protocol_t& select_protocol() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + protocol_t const* get_protocol() const { if(get_index() == 3) { return &var.as();} return nullptr; } + misc_t& select_misc() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + misc_t const* get_misc() const { if(get_index() == 4) { return &var.as();} return nullptr; } + ric_t& select_ric() { if(get_index() != 5) { clear(); set_index(5); return var.build();} return var.as();} + ric_t const* get_ric() const { if(get_index() == 5) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(radioNetwork_t)]; + char dummy2[sizeof(transport_t)]; + char dummy3[sizeof(protocol_t)]; + char dummy4[sizeof(misc_t)]; + char dummy5[sizeof(ric_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +RICcontrolAckRequest ::= ENUMERATED{ + noAck, + ack, + nAck, + ... +} +*/ + +struct RICcontrolAckRequest : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "RICcontrolAckRequest";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + noAck + ,ack + ,nAck + } index_t; + +}; + +/* +RICcontrolHeader ::= OCTET STRING +*/ + +struct RICcontrolHeader : asn::ostring<> +{ + static constexpr const char* name() {return "RICcontrolHeader";} + using parent_t = asn::ostring<>; + +}; + +/* +RICcontrolMessage ::= OCTET STRING +*/ + +struct RICcontrolMessage : asn::ostring<> +{ + static constexpr const char* name() {return "RICcontrolMessage";} + using parent_t = asn::ostring<>; + +}; + +/* +RICcontrolStatus ::= ENUMERATED{ + success, + rejected, + failed, + ... +} +*/ + +struct RICcontrolStatus : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "RICcontrolStatus";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + success + ,rejected + ,failed + } index_t; + +}; + +/* +RICeventTriggerDefinition ::= OCTET STRING +*/ + +struct RICeventTriggerDefinition : asn::ostring<> +{ + static constexpr const char* name() {return "RICeventTriggerDefinition";} + using parent_t = asn::ostring<>; + +}; + +/* +RICindicationHeader ::= OCTET STRING +*/ + +struct RICindicationHeader : asn::ostring<> +{ + static constexpr const char* name() {return "RICindicationHeader";} + using parent_t = asn::ostring<>; + +}; + +/* +RICindicationMessage ::= OCTET STRING +*/ + +struct RICindicationMessage : asn::ostring<> +{ + static constexpr const char* name() {return "RICindicationMessage";} + using parent_t = asn::ostring<>; + +}; + +/* +RICindicationSN ::= INTEGER (0..65535) +*/ + +struct RICindicationSN : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "RICindicationSN";} + using parent_t = asn::integer<>; + +}; + +/* +RICindicationType ::= ENUMERATED{ + report, + insert, + ... +} +*/ + +struct RICindicationType : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "RICindicationType";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + report + ,insert + } index_t; + +}; + +/* +RICrequestID ::= SEQUENCE { + ricRequestorID INTEGER (0..65535), + ricRequestSequenceNumber INTEGER (0..65535), + ... +} +*/ + +struct RICrequestID : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RICrequestID";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ricRequestorID_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ricRequestorID_t";} + using parent_t = asn::integer<>; + + }; + + ricRequestorID_t& ref_ricRequestorID() {return ricRequestorID;} + ricRequestorID_t const& ref_ricRequestorID() const {return ricRequestorID;} + struct ricRequestSequenceNumber_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ricRequestSequenceNumber_t";} + using parent_t = asn::integer<>; + + }; + + ricRequestSequenceNumber_t& ref_ricRequestSequenceNumber() {return ricRequestSequenceNumber;} + ricRequestSequenceNumber_t const& ref_ricRequestSequenceNumber() const {return ricRequestSequenceNumber;} + template void decode(V& v) + { + v(ricRequestorID); + v(ricRequestSequenceNumber); + + }; + template void encode(V& v) const + { + v(ricRequestorID); + v(ricRequestSequenceNumber); + + }; + void clear() + { + ricRequestorID.clear(); + ricRequestSequenceNumber.clear(); + + }; + private: + ricRequestorID_t ricRequestorID; + ricRequestSequenceNumber_t ricRequestSequenceNumber; + +}; +/* +RICsubsequentActionType ::= ENUMERATED{ + continue, + wait, + ... +} +*/ + +struct RICsubsequentActionType : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "RICsubsequentActionType";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + Continue + ,wait + } index_t; + +}; + +/* +RICtimeToWait ::= ENUMERATED{ + zero, + w1ms, + w2ms, + w5ms, + w10ms, + w20ms, + w30ms, + w40ms, + w50ms, + w100ms, + w200ms, + w500ms, + w1s, + w2s, + w5s, + w10s, + w20s, + w60s, + ... +} +*/ + +struct RICtimeToWait : asn::enumerated<18, 0, true> +{ + static constexpr const char* name() {return "RICtimeToWait";} + using parent_t = asn::enumerated<18, 0, true>; + typedef enum { + zero + ,w1ms + ,w2ms + ,w5ms + ,w10ms + ,w20ms + ,w30ms + ,w40ms + ,w50ms + ,w100ms + ,w200ms + ,w500ms + ,w1s + ,w2s + ,w5s + ,w10s + ,w20s + ,w60s + } index_t; + +}; + +/* +RICsubsequentAction ::=SEQUENCE{ + ricSubsequentActionType RICsubsequentActionType, + ricTimeToWait RICtimeToWait, + ... +} +*/ + +struct RICsubsequentAction : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubsequentAction";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ricSubsequentActionType_t : RICsubsequentActionType + { + static constexpr const char* name() {return "ricSubsequentActionType_t";} + using parent_t = RICsubsequentActionType; + + }; + ricSubsequentActionType_t& ref_ricSubsequentActionType() {return ricSubsequentActionType;} + ricSubsequentActionType_t const& ref_ricSubsequentActionType() const {return ricSubsequentActionType;} + struct ricTimeToWait_t : RICtimeToWait + { + static constexpr const char* name() {return "ricTimeToWait_t";} + using parent_t = RICtimeToWait; + + }; + ricTimeToWait_t& ref_ricTimeToWait() {return ricTimeToWait;} + ricTimeToWait_t const& ref_ricTimeToWait() const {return ricTimeToWait;} + template void decode(V& v) + { + v(ricSubsequentActionType); + v(ricTimeToWait); + + }; + template void encode(V& v) const + { + v(ricSubsequentActionType); + v(ricTimeToWait); + + }; + void clear() + { + ricSubsequentActionType.clear(); + ricTimeToWait.clear(); + + }; + private: + ricSubsequentActionType_t ricSubsequentActionType; + ricTimeToWait_t ricTimeToWait; + +}; diff --git a/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Contents.hpp b/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Contents.hpp new file mode 100644 index 0000000..e2073d1 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Contents.hpp @@ -0,0 +1,5512 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "E2AP-IEs.hpp" +#include "X2AP-IEs.hpp" +#include "X2AP-Constants.hpp" +#include "X2AP-Containers.hpp" +#include "E2AP-Constants.hpp" + +/* +RANfunction-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + ranFunctionDefinition RANfunctionDefinition, + ... +} +*/ + +struct RANfunction_Item : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RANfunction-Item";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ranFunctionID_t : RANfunctionID + { + static constexpr const char* name() {return "ranFunctionID_t";} + using parent_t = RANfunctionID; + + }; + ranFunctionID_t& ref_ranFunctionID() {return ranFunctionID;} + ranFunctionID_t const& ref_ranFunctionID() const {return ranFunctionID;} + struct ranFunctionDefinition_t : RANfunctionDefinition + { + static constexpr const char* name() {return "ranFunctionDefinition_t";} + using parent_t = RANfunctionDefinition; + + }; + ranFunctionDefinition_t& ref_ranFunctionDefinition() {return ranFunctionDefinition;} + ranFunctionDefinition_t const& ref_ranFunctionDefinition() const {return ranFunctionDefinition;} + template void decode(V& v) + { + v(ranFunctionID); + v(ranFunctionDefinition); + + }; + template void encode(V& v) const + { + v(ranFunctionID); + v(ranFunctionDefinition); + + }; + void clear() + { + ranFunctionID.clear(); + ranFunctionDefinition.clear(); + + }; + private: + ranFunctionID_t ranFunctionID; + ranFunctionDefinition_t ranFunctionDefinition; + +}; +/* +RANfunction-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunction-Item CRITICALITY ignore TYPE RANfunction-Item PRESENCE mandatory }, + ... +} +*/ + +struct RANfunction_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunction_Item() { set(id_RANfunction_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunction_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunction_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunction_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunction_Item& select_id_RANfunction_Item() { return set(1); } + RANfunction_Item const* get_id_RANfunction_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunction_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunction_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunction_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RANfunctionID-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + ... +} +*/ + +struct RANfunctionID_Item : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RANfunctionID-Item";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct ranFunctionID_t : RANfunctionID + { + static constexpr const char* name() {return "ranFunctionID_t";} + using parent_t = RANfunctionID; + + }; + ranFunctionID_t& ref_ranFunctionID() {return ranFunctionID;} + ranFunctionID_t const& ref_ranFunctionID() const {return ranFunctionID;} + template void decode(V& v) + { + v(ranFunctionID); + + }; + template void encode(V& v) const + { + v(ranFunctionID); + + }; + void clear() + { + ranFunctionID.clear(); + + }; + private: + ranFunctionID_t ranFunctionID; + +}; +/* +RANfunctionID-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionID-Item CRITICALITY ignore TYPE RANfunctionID-Item PRESENCE mandatory }, + ... +} +*/ + +struct RANfunctionID_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionID_Item() { set(id_RANfunctionID_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionID_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionID_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionID_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctionID_Item& select_id_RANfunctionID_Item() { return set(1); } + RANfunctionID_Item const* get_id_RANfunctionID_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionID_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionID_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RANfunctionIDcause-Item ::= SEQUENCE { + ranFunctionID RANfunctionID, + ricCause RICcause, + ... +} +*/ + +struct RANfunctionIDcause_Item : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RANfunctionIDcause-Item";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ranFunctionID_t : RANfunctionID + { + static constexpr const char* name() {return "ranFunctionID_t";} + using parent_t = RANfunctionID; + + }; + ranFunctionID_t& ref_ranFunctionID() {return ranFunctionID;} + ranFunctionID_t const& ref_ranFunctionID() const {return ranFunctionID;} + struct ricCause_t : RICcause + { + static constexpr const char* name() {return "ricCause_t";} + using parent_t = RICcause; + + }; + ricCause_t& ref_ricCause() {return ricCause;} + ricCause_t const& ref_ricCause() const {return ricCause;} + template void decode(V& v) + { + v(ranFunctionID); + v(ricCause); + + }; + template void encode(V& v) const + { + v(ranFunctionID); + v(ricCause); + + }; + void clear() + { + ranFunctionID.clear(); + ricCause.clear(); + + }; + private: + ranFunctionID_t ranFunctionID; + ricCause_t ricCause; + +}; +/* +RANfunctionIDcause-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionIEcause-Item CRITICALITY ignore TYPE RANfunctionIDcause-Item PRESENCE mandatory }, + ... +} +*/ + +struct RANfunctionIDcause_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionIEcause_Item() { set(id_RANfunctionIEcause_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionIEcause_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionIEcause_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionIEcause_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctionIDcause_Item& select_id_RANfunctionIEcause_Item() { return set(1); } + RANfunctionIDcause_Item const* get_id_RANfunctionIEcause_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionIEcause_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionIDcause_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionIEcause_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RANfunctions-List ::= SEQUENCE (SIZE(0..maxofRANfunctionID)) OF ProtocolIE-Single-Container { {RANfunction-ItemIEs} } +*/ + +struct RANfunctions_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RANfunctions_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RANfunctions_List : asn::sequenceof +{ + static constexpr const char* name() {return "RANfunctions-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RANfunctionsID-List ::= SEQUENCE (SIZE(0..maxofRANfunctionID)) OF ProtocolIE-Single-Container{{RANfunctionID-ItemIEs}} +*/ + +struct RANfunctionsID_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RANfunctionsID_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RANfunctionsID_List : asn::sequenceof +{ + static constexpr const char* name() {return "RANfunctionsID-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RANfunctionsIDcause-List ::= SEQUENCE (SIZE(0..maxofRANfunctionID)) OF ProtocolIE-Single-Container { {RANfunctionIDcause-ItemIEs} } +*/ + +struct RANfunctionsIDcause_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RANfunctionsIDcause_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RANfunctionsIDcause_List : asn::sequenceof +{ + static constexpr const char* name() {return "RANfunctionsIDcause-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RICaction-Admitted-Item ::= SEQUENCE { + ricActionID RICactionID, + ... +} +*/ + +struct RICaction_Admitted_Item : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICaction-Admitted-Item";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct ricActionID_t : RICactionID + { + static constexpr const char* name() {return "ricActionID_t";} + using parent_t = RICactionID; + + }; + ricActionID_t& ref_ricActionID() {return ricActionID;} + ricActionID_t const& ref_ricActionID() const {return ricActionID;} + template void decode(V& v) + { + v(ricActionID); + + }; + template void encode(V& v) const + { + v(ricActionID); + + }; + void clear() + { + ricActionID.clear(); + + }; + private: + ricActionID_t ricActionID; + +}; +/* +RICaction-Admitted-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RICaction-Admitted-Item CRITICALITY ignore TYPE RICaction-Admitted-Item PRESENCE mandatory }, + ... +} +*/ + +struct RICaction_Admitted_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_Admitted_Item() { set(id_RICaction_Admitted_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICaction_Admitted_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICaction_Admitted_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_Admitted_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICaction_Admitted_Item& select_id_RICaction_Admitted_Item() { return set(1); } + RICaction_Admitted_Item const* get_id_RICaction_Admitted_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICaction_Admitted_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RICaction_Admitted_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_Admitted_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICaction-Admitted-List ::= SEQUENCE (SIZE(1..maxofRICactionID)) OF ProtocolIE-Single-Container{{RICaction-Admitted-ItemIEs}} +*/ + +struct RICaction_Admitted_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RICaction_Admitted_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RICaction_Admitted_List : asn::sequenceof +{ + static constexpr const char* name() {return "RICaction-Admitted-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RICaction-NotAdmitted-Item ::= SEQUENCE { + ricActionID RICactionID, + ricCause RICcause, + ... +} +*/ + +struct RICaction_NotAdmitted_Item : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RICaction-NotAdmitted-Item";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ricActionID_t : RICactionID + { + static constexpr const char* name() {return "ricActionID_t";} + using parent_t = RICactionID; + + }; + ricActionID_t& ref_ricActionID() {return ricActionID;} + ricActionID_t const& ref_ricActionID() const {return ricActionID;} + struct ricCause_t : RICcause + { + static constexpr const char* name() {return "ricCause_t";} + using parent_t = RICcause; + + }; + ricCause_t& ref_ricCause() {return ricCause;} + ricCause_t const& ref_ricCause() const {return ricCause;} + template void decode(V& v) + { + v(ricActionID); + v(ricCause); + + }; + template void encode(V& v) const + { + v(ricActionID); + v(ricCause); + + }; + void clear() + { + ricActionID.clear(); + ricCause.clear(); + + }; + private: + ricActionID_t ricActionID; + ricCause_t ricCause; + +}; +/* +RICaction-NotAdmitted-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RICaction-NotAdmitted-Item CRITICALITY ignore TYPE RICaction-NotAdmitted-Item PRESENCE mandatory }, + ... +} +*/ + +struct RICaction_NotAdmitted_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_NotAdmitted_Item() { set(id_RICaction_NotAdmitted_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICaction_NotAdmitted_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICaction_NotAdmitted_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_NotAdmitted_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICaction_NotAdmitted_Item& select_id_RICaction_NotAdmitted_Item() { return set(1); } + RICaction_NotAdmitted_Item const* get_id_RICaction_NotAdmitted_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICaction_NotAdmitted_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RICaction_NotAdmitted_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_NotAdmitted_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICaction-NotAdmitted-List ::= SEQUENCE (SIZE(0..maxofRICactionID)) OF ProtocolIE-Single-Container { {RICaction-NotAdmitted-ItemIEs} } +*/ + +struct RICaction_NotAdmitted_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RICaction_NotAdmitted_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RICaction_NotAdmitted_List : asn::sequenceof +{ + static constexpr const char* name() {return "RICaction-NotAdmitted-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RICaction-ToBeSetup-Item ::= SEQUENCE { + ricActionID RICactionID, + ricActionType RICactionType, + ricActionDefinition RICactionDefinition OPTIONAL, + ricSubsequentAction RICsubsequentAction OPTIONAL, + ... +} +*/ + +struct RICaction_ToBeSetup_Item : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "RICaction-ToBeSetup-Item";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct ricActionID_t : RICactionID + { + static constexpr const char* name() {return "ricActionID_t";} + using parent_t = RICactionID; + + }; + ricActionID_t& ref_ricActionID() {return ricActionID;} + ricActionID_t const& ref_ricActionID() const {return ricActionID;} + struct ricActionType_t : RICactionType + { + static constexpr const char* name() {return "ricActionType_t";} + using parent_t = RICactionType; + + }; + ricActionType_t& ref_ricActionType() {return ricActionType;} + ricActionType_t const& ref_ricActionType() const {return ricActionType;} + struct ricActionDefinition_t : RICactionDefinition + { + static constexpr const char* name() {return "ricActionDefinition_t";} + using parent_t = RICactionDefinition; + static constexpr bool optional = true; + + }; + ricActionDefinition_t& set_ricActionDefinition() { ricActionDefinition.setpresent(true); return ricActionDefinition;} + ricActionDefinition_t const* get_ricActionDefinition() const {return ricActionDefinition.is_valid() ? &ricActionDefinition : nullptr;} + struct ricSubsequentAction_t : RICsubsequentAction + { + static constexpr const char* name() {return "ricSubsequentAction_t";} + using parent_t = RICsubsequentAction; + static constexpr bool optional = true; + + }; + ricSubsequentAction_t& set_ricSubsequentAction() { ricSubsequentAction.setpresent(true); return ricSubsequentAction;} + ricSubsequentAction_t const* get_ricSubsequentAction() const {return ricSubsequentAction.is_valid() ? &ricSubsequentAction : nullptr;} + template void decode(V& v) + { + v(ricActionID); + v(ricActionType); + v(ricActionDefinition); + v(ricSubsequentAction); + + }; + template void encode(V& v) const + { + v(ricActionID); + v(ricActionType); + v(ricActionDefinition); + v(ricSubsequentAction); + + }; + void clear() + { + ricActionID.clear(); + ricActionType.clear(); + ricActionDefinition.clear(); + ricSubsequentAction.clear(); + + }; + private: + ricActionID_t ricActionID; + ricActionType_t ricActionType; + ricActionDefinition_t ricActionDefinition; + ricSubsequentAction_t ricSubsequentAction; + +}; +/* +RICaction-ToBeSetup-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RICaction-ToBeSetup-Item CRITICALITY ignore TYPE RICaction-ToBeSetup-Item PRESENCE mandatory }, + ... +} +*/ + +struct RICaction_ToBeSetup_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_ToBeSetup_Item() { set(id_RICaction_ToBeSetup_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICaction_ToBeSetup_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICaction_ToBeSetup_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_ToBeSetup_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICaction_ToBeSetup_Item& select_id_RICaction_ToBeSetup_Item() { return set(1); } + RICaction_ToBeSetup_Item const* get_id_RICaction_ToBeSetup_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICaction_ToBeSetup_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RICaction_ToBeSetup_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RICaction_ToBeSetup_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICactions-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxofRICactionID)) OF ProtocolIE-Single-Container { {RICaction-ToBeSetup-ItemIEs} } +*/ + +struct RICactions_ToBeSetup_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "RICactions_ToBeSetup_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct RICactions_ToBeSetup_List : asn::sequenceof +{ + static constexpr const char* name() {return "RICactions-ToBeSetup-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RICcontrolAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional}| + { ID id-RICcontrolStatus CRITICALITY reject TYPE RICcontrolStatus PRESENCE mandatory}, + ... +} +*/ + +struct RICcontrolAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICcallProcessID() { set(id_RICcallProcessID); type=3;} + void select_id_RICcontrolStatus() { set(id_RICcontrolStatus); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICcallProcessID)) { type = 3; return true; } + else if(equal(id_RICcontrolStatus)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICcallProcessID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_RICcontrolStatus);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICcallProcessID() { set(reject); type=3;} + void select_id_RICcontrolStatus() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICcallProcessID& select_id_RICcallProcessID() { return set(3); } + RICcallProcessID const* get_id_RICcallProcessID() const { return get(3); } + RICcontrolStatus& select_id_RICcontrolStatus() { return set(4); } + RICcontrolStatus const* get_id_RICcontrolStatus() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICcallProcessID()); return true; + case 4: v(select_id_RICcontrolStatus()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICcallProcessID)]; + char dummy3[sizeof(RICcontrolStatus)]; + char dummy4[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICcallProcessID() { set(optional); type=3;} + void select_id_RICcontrolStatus() { set(mandatory); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICcontrolAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolAcknowledge-IEs}}, + ... +} +*/ + +struct RICcontrolAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICcontrolAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICcontrolFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional}| + { ID id-RICcause CRITICALITY reject TYPE RICcause PRESENCE mandatory}, + ... +} +*/ + +struct RICcontrolFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICcallProcessID() { set(id_RICcallProcessID); type=3;} + void select_id_RICcause() { set(id_RICcause); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICcallProcessID)) { type = 3; return true; } + else if(equal(id_RICcause)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICcallProcessID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_RICcause);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICcallProcessID() { set(reject); type=3;} + void select_id_RICcause() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICcallProcessID& select_id_RICcallProcessID() { return set(3); } + RICcallProcessID const* get_id_RICcallProcessID() const { return get(3); } + RICcause& select_id_RICcause() { return set(4); } + RICcause const* get_id_RICcause() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICcallProcessID()); return true; + case 4: v(select_id_RICcause()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICcallProcessID)]; + char dummy3[sizeof(RICcause)]; + char dummy4[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICcallProcessID() { set(optional); type=3;} + void select_id_RICcause() { set(mandatory); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICcontrolFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolFailure-IEs}}, + ... +} +*/ + +struct RICcontrolFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICcontrolFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICcontrolRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional}| + { ID id-RICcontrolHeader CRITICALITY reject TYPE RICcontrolHeader PRESENCE mandatory}| + { ID id-RICcontrolMessage CRITICALITY reject TYPE RICcontrolMessage PRESENCE mandatory}| + { ID id-RICcontrolAckRequest CRITICALITY reject TYPE RICcontrolAckRequest PRESENCE optional}, + ... +} +*/ + +struct RICcontrolRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICcallProcessID() { set(id_RICcallProcessID); type=3;} + void select_id_RICcontrolHeader() { set(id_RICcontrolHeader); type=4;} + void select_id_RICcontrolMessage() { set(id_RICcontrolMessage); type=5;} + void select_id_RICcontrolAckRequest() { set(id_RICcontrolAckRequest); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICcallProcessID)) { type = 3; return true; } + else if(equal(id_RICcontrolHeader)) { type = 4; return true; } + else if(equal(id_RICcontrolMessage)) { type = 5; return true; } + else if(equal(id_RICcontrolAckRequest)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICcallProcessID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_RICcontrolHeader);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_RICcontrolMessage);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_RICcontrolAckRequest);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICcallProcessID() { set(reject); type=3;} + void select_id_RICcontrolHeader() { set(reject); type=4;} + void select_id_RICcontrolMessage() { set(reject); type=5;} + void select_id_RICcontrolAckRequest() { set(reject); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICcallProcessID& select_id_RICcallProcessID() { return set(3); } + RICcallProcessID const* get_id_RICcallProcessID() const { return get(3); } + RICcontrolHeader& select_id_RICcontrolHeader() { return set(4); } + RICcontrolHeader const* get_id_RICcontrolHeader() const { return get(4); } + RICcontrolMessage& select_id_RICcontrolMessage() { return set(5); } + RICcontrolMessage const* get_id_RICcontrolMessage() const { return get(5); } + RICcontrolAckRequest& select_id_RICcontrolAckRequest() { return set(6); } + RICcontrolAckRequest const* get_id_RICcontrolAckRequest() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICcallProcessID()); return true; + case 4: v(select_id_RICcontrolHeader()); return true; + case 5: v(select_id_RICcontrolMessage()); return true; + case 6: v(select_id_RICcontrolAckRequest()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICcallProcessID)]; + char dummy3[sizeof(RICcontrolAckRequest)]; + char dummy4[sizeof(RICcontrolHeader)]; + char dummy5[sizeof(RICcontrolMessage)]; + char dummy6[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICcallProcessID() { set(optional); type=3;} + void select_id_RICcontrolHeader() { set(mandatory); type=4;} + void select_id_RICcontrolMessage() { set(mandatory); type=5;} + void select_id_RICcontrolAckRequest() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICcontrolRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICcontrolRequest-IEs}}, + ... +} +*/ + +struct RICcontrolRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICcontrolRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICindication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICactionID CRITICALITY reject TYPE RICactionID PRESENCE mandatory}| + { ID id-RICindicationSN CRITICALITY reject TYPE RICindicationSN PRESENCE mandatory}| + { ID id-RICindicationType CRITICALITY reject TYPE RICindicationType PRESENCE mandatory}| + { ID id-RICindicationHeader CRITICALITY reject TYPE RICindicationHeader PRESENCE mandatory}| + { ID id-RICindicationMessage CRITICALITY reject TYPE RICindicationMessage PRESENCE mandatory} | + { ID id-RICcallProcessID CRITICALITY reject TYPE RICcallProcessID PRESENCE optional}, + ... +} +*/ + +struct RICindication_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICactionID() { set(id_RICactionID); type=3;} + void select_id_RICindicationSN() { set(id_RICindicationSN); type=4;} + void select_id_RICindicationType() { set(id_RICindicationType); type=5;} + void select_id_RICindicationHeader() { set(id_RICindicationHeader); type=6;} + void select_id_RICindicationMessage() { set(id_RICindicationMessage); type=7;} + void select_id_RICcallProcessID() { set(id_RICcallProcessID); type=8;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICactionID)) { type = 3; return true; } + else if(equal(id_RICindicationSN)) { type = 4; return true; } + else if(equal(id_RICindicationType)) { type = 5; return true; } + else if(equal(id_RICindicationHeader)) { type = 6; return true; } + else if(equal(id_RICindicationMessage)) { type = 7; return true; } + else if(equal(id_RICcallProcessID)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICactionID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_RICindicationSN);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_RICindicationType);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_RICindicationHeader);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_RICindicationMessage);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_RICcallProcessID);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICactionID() { set(reject); type=3;} + void select_id_RICindicationSN() { set(reject); type=4;} + void select_id_RICindicationType() { set(reject); type=5;} + void select_id_RICindicationHeader() { set(reject); type=6;} + void select_id_RICindicationMessage() { set(reject); type=7;} + void select_id_RICcallProcessID() { set(reject); type=8;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICactionID& select_id_RICactionID() { return set(3); } + RICactionID const* get_id_RICactionID() const { return get(3); } + RICindicationSN& select_id_RICindicationSN() { return set(4); } + RICindicationSN const* get_id_RICindicationSN() const { return get(4); } + RICindicationType& select_id_RICindicationType() { return set(5); } + RICindicationType const* get_id_RICindicationType() const { return get(5); } + RICindicationHeader& select_id_RICindicationHeader() { return set(6); } + RICindicationHeader const* get_id_RICindicationHeader() const { return get(6); } + RICindicationMessage& select_id_RICindicationMessage() { return set(7); } + RICindicationMessage const* get_id_RICindicationMessage() const { return get(7); } + RICcallProcessID& select_id_RICcallProcessID() { return set(8); } + RICcallProcessID const* get_id_RICcallProcessID() const { return get(8); } + bool is_unknown() const { return type == 9; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICactionID()); return true; + case 4: v(select_id_RICindicationSN()); return true; + case 5: v(select_id_RICindicationType()); return true; + case 6: v(select_id_RICindicationHeader()); return true; + case 7: v(select_id_RICindicationMessage()); return true; + case 8: v(select_id_RICcallProcessID()); return true; + case 9: if(type != 9) {clear(); asn::base::set();} type = 9; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICactionID)]; + char dummy3[sizeof(RICcallProcessID)]; + char dummy4[sizeof(RICindicationHeader)]; + char dummy5[sizeof(RICindicationMessage)]; + char dummy6[sizeof(RICindicationSN)]; + char dummy7[sizeof(RICindicationType)]; + char dummy8[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICactionID() { set(mandatory); type=3;} + void select_id_RICindicationSN() { set(mandatory); type=4;} + void select_id_RICindicationType() { set(mandatory); type=5;} + void select_id_RICindicationHeader() { set(mandatory); type=6;} + void select_id_RICindicationMessage() { set(mandatory); type=7;} + void select_id_RICcallProcessID() { set(optional); type=8;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(mandatory)) { type = 6; return true; } + else if(equal(mandatory)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(mandatory);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(mandatory);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICindication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICindication-IEs}}, + ... +} +*/ + +struct RICindication : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICindication";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICserviceQuery-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionsAccepted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional}, + ... +} +*/ + +struct RICserviceQuery_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(id_RANfunctionsAccepted); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionsAccepted)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionsAccepted);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctionsID_List& select_id_RANfunctionsAccepted() { return set(1); } + RANfunctionsID_List const* get_id_RANfunctionsAccepted() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionsAccepted()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionsID_List)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(optional); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICserviceQuery ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceQuery-IEs}}, + ... +} +*/ + +struct RICserviceQuery : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICserviceQuery";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICserviceUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionsAdded CRITICALITY reject TYPE RANfunctions-List PRESENCE optional}| + { ID id-RANfunctionsModified CRITICALITY reject TYPE RANfunctions-List PRESENCE optional}| + { ID id-RANfunctionsDeleted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional}, + ... +} +*/ + +struct RICserviceUpdate_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsAdded() { set(id_RANfunctionsAdded); type=1;} + void select_id_RANfunctionsModified() { set(id_RANfunctionsModified); type=2;} + void select_id_RANfunctionsDeleted() { set(id_RANfunctionsDeleted); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionsAdded)) { type = 1; return true; } + else if(equal(id_RANfunctionsModified)) { type = 2; return true; } + else if(equal(id_RANfunctionsDeleted)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionsAdded);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionsModified);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RANfunctionsDeleted);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsAdded() { set(reject); type=1;} + void select_id_RANfunctionsModified() { set(reject); type=2;} + void select_id_RANfunctionsDeleted() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctions_List& select_id_RANfunctionsAdded() { return set(1); } + RANfunctions_List const* get_id_RANfunctionsAdded() const { return get(1); } + RANfunctions_List& select_id_RANfunctionsModified() { return set(2); } + RANfunctions_List const* get_id_RANfunctionsModified() const { return get(2); } + RANfunctionsID_List& select_id_RANfunctionsDeleted() { return set(3); } + RANfunctionsID_List const* get_id_RANfunctionsDeleted() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionsAdded()); return true; + case 2: v(select_id_RANfunctionsModified()); return true; + case 3: v(select_id_RANfunctionsDeleted()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionsID_List)]; + char dummy2[sizeof(RANfunctions_List)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsAdded() { set(optional); type=1;} + void select_id_RANfunctionsModified() { set(optional); type=2;} + void select_id_RANfunctionsDeleted() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICserviceUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdate-IEs}}, + ... +} +*/ + +struct RICserviceUpdate : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICserviceUpdate";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICserviceUpdateAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionsAccepted CRITICALITY reject TYPE RANfunctionsID-List PRESENCE optional}| + { ID id-RANfunctionsRejected CRITICALITY reject TYPE RANfunctionsIDcause-List PRESENCE optional}, + ... +} +*/ + +struct RICserviceUpdateAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(id_RANfunctionsAccepted); type=1;} + void select_id_RANfunctionsRejected() { set(id_RANfunctionsRejected); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionsAccepted)) { type = 1; return true; } + else if(equal(id_RANfunctionsRejected)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionsAccepted);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionsRejected);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(reject); type=1;} + void select_id_RANfunctionsRejected() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctionsID_List& select_id_RANfunctionsAccepted() { return set(1); } + RANfunctionsID_List const* get_id_RANfunctionsAccepted() const { return get(1); } + RANfunctionsIDcause_List& select_id_RANfunctionsRejected() { return set(2); } + RANfunctionsIDcause_List const* get_id_RANfunctionsRejected() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionsAccepted()); return true; + case 2: v(select_id_RANfunctionsRejected()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionsID_List)]; + char dummy2[sizeof(RANfunctionsIDcause_List)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RANfunctionsAccepted() { set(optional); type=1;} + void select_id_RANfunctionsRejected() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICserviceUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdateAcknowledge-IEs}}, + ... +} +*/ + +struct RICserviceUpdateAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICserviceUpdateAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICserviceUpdateFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RANfunctionsRejected CRITICALITY reject TYPE RANfunctionsIDcause-List PRESENCE optional}| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct RICserviceUpdateFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsRejected() { set(id_RANfunctionsRejected); type=1;} + void select_id_TimeToWait() { set(id_TimeToWait); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RANfunctionsRejected)) { type = 1; return true; } + else if(equal(id_TimeToWait)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RANfunctionsRejected);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_TimeToWait);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsRejected() { set(reject); type=1;} + void select_id_TimeToWait() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RANfunctionsIDcause_List& select_id_RANfunctionsRejected() { return set(1); } + RANfunctionsIDcause_List const* get_id_RANfunctionsRejected() const { return get(1); } + TimeToWait& select_id_TimeToWait() { return set(2); } + TimeToWait const* get_id_TimeToWait() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RANfunctionsRejected()); return true; + case 2: v(select_id_TimeToWait()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(RANfunctionsIDcause_List)]; + char dummy3[sizeof(TimeToWait)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RANfunctionsRejected() { set(optional); type=1;} + void select_id_TimeToWait() { set(optional); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICserviceUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICserviceUpdateFailure-IEs}}, + ... +} +*/ + +struct RICserviceUpdateFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICserviceUpdateFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscription ::= SEQUENCE { + ricEventTriggerDefinition RICeventTriggerDefinition, + ricAction-ToBeSetup-List RICactions-ToBeSetup-List, + ... +} +*/ + +struct RICsubscription : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscription";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct ricEventTriggerDefinition_t : RICeventTriggerDefinition + { + static constexpr const char* name() {return "ricEventTriggerDefinition_t";} + using parent_t = RICeventTriggerDefinition; + + }; + ricEventTriggerDefinition_t& ref_ricEventTriggerDefinition() {return ricEventTriggerDefinition;} + ricEventTriggerDefinition_t const& ref_ricEventTriggerDefinition() const {return ricEventTriggerDefinition;} + struct ricAction_ToBeSetup_List_t : RICactions_ToBeSetup_List + { + static constexpr const char* name() {return "ricAction_ToBeSetup_List_t";} + using parent_t = RICactions_ToBeSetup_List; + + }; + ricAction_ToBeSetup_List_t& ref_ricAction_ToBeSetup_List() {return ricAction_ToBeSetup_List;} + ricAction_ToBeSetup_List_t const& ref_ricAction_ToBeSetup_List() const {return ricAction_ToBeSetup_List;} + template void decode(V& v) + { + v(ricEventTriggerDefinition); + v(ricAction_ToBeSetup_List); + + }; + template void encode(V& v) const + { + v(ricEventTriggerDefinition); + v(ricAction_ToBeSetup_List); + + }; + void clear() + { + ricEventTriggerDefinition.clear(); + ricAction_ToBeSetup_List.clear(); + + }; + private: + ricEventTriggerDefinition_t ricEventTriggerDefinition; + ricAction_ToBeSetup_List_t ricAction_ToBeSetup_List; + +}; +/* +RICsubscriptionDeleteFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICcause CRITICALITY reject TYPE RICcause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct RICsubscriptionDeleteFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICcause() { set(id_RICcause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICcause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICcause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICcause() { set(reject); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICcause& select_id_RICcause() { return set(3); } + RICcause const* get_id_RICcause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICcause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(RANfunctionID)]; + char dummy3[sizeof(RICcause)]; + char dummy4[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICcause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionDeleteFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteFailure-IEs}}, + ... +} +*/ + +struct RICsubscriptionDeleteFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionDeleteFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscriptionDeleteRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}, + ... +} +*/ + +struct RICsubscriptionDeleteRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionDeleteRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteRequest-IEs}}, + ... +} +*/ + +struct RICsubscriptionDeleteRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionDeleteRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscriptionDeleteResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}, + ... +} +*/ + +struct RICsubscriptionDeleteResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionDeleteResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionDeleteResponse-IEs}}, + ... +} +*/ + +struct RICsubscriptionDeleteResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionDeleteResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscriptionFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICactions-NotAdmitted CRITICALITY reject TYPE RICaction-NotAdmitted-List PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct RICsubscriptionFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICactions_NotAdmitted() { set(id_RICactions_NotAdmitted); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICactions_NotAdmitted)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICactions_NotAdmitted);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICactions_NotAdmitted() { set(reject); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICaction_NotAdmitted_List& select_id_RICactions_NotAdmitted() { return set(3); } + RICaction_NotAdmitted_List const* get_id_RICactions_NotAdmitted() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICactions_NotAdmitted()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(RANfunctionID)]; + char dummy3[sizeof(RICaction_NotAdmitted_List)]; + char dummy4[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICactions_NotAdmitted() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionFailure-IEs}}, + ... +} +*/ + +struct RICsubscriptionFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscriptionRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory}| + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory}| + { ID id-RICsubscription CRITICALITY reject TYPE RICsubscription PRESENCE mandatory}, + ... +} +*/ + +struct RICsubscriptionRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICsubscription() { set(id_RICsubscription); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICsubscription)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICsubscription);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICsubscription() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICsubscription& select_id_RICsubscription() { return set(3); } + RICsubscription const* get_id_RICsubscription() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICsubscription()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICrequestID)]; + char dummy3[sizeof(RICsubscription)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICsubscription() { set(mandatory); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RICsubscriptionRequest-IEs}}, + ... +} +*/ + +struct RICsubscriptionRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RICsubscriptionResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RICrequestID CRITICALITY reject TYPE RICrequestID PRESENCE mandatory } | + { ID id-RANfunctionID CRITICALITY reject TYPE RANfunctionID PRESENCE mandatory } | + { ID id-RICactions-Admitted CRITICALITY reject TYPE RICaction-Admitted-List PRESENCE mandatory } | + { ID id-RICactions-NotAdmitted CRITICALITY reject TYPE RICaction-NotAdmitted-List PRESENCE optional }, + ... +} +*/ + +struct RICsubscriptionResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(id_RICrequestID); type=1;} + void select_id_RANfunctionID() { set(id_RANfunctionID); type=2;} + void select_id_RICactions_Admitted() { set(id_RICactions_Admitted); type=3;} + void select_id_RICactions_NotAdmitted() { set(id_RICactions_NotAdmitted); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RICrequestID)) { type = 1; return true; } + else if(equal(id_RANfunctionID)) { type = 2; return true; } + else if(equal(id_RICactions_Admitted)) { type = 3; return true; } + else if(equal(id_RICactions_NotAdmitted)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RICrequestID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RANfunctionID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RICactions_Admitted);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_RICactions_NotAdmitted);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(reject); type=1;} + void select_id_RANfunctionID() { set(reject); type=2;} + void select_id_RICactions_Admitted() { set(reject); type=3;} + void select_id_RICactions_NotAdmitted() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RICrequestID& select_id_RICrequestID() { return set(1); } + RICrequestID const* get_id_RICrequestID() const { return get(1); } + RANfunctionID& select_id_RANfunctionID() { return set(2); } + RANfunctionID const* get_id_RANfunctionID() const { return get(2); } + RICaction_Admitted_List& select_id_RICactions_Admitted() { return set(3); } + RICaction_Admitted_List const* get_id_RICactions_Admitted() const { return get(3); } + RICaction_NotAdmitted_List& select_id_RICactions_NotAdmitted() { return set(4); } + RICaction_NotAdmitted_List const* get_id_RICactions_NotAdmitted() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RICrequestID()); return true; + case 2: v(select_id_RANfunctionID()); return true; + case 3: v(select_id_RICactions_Admitted()); return true; + case 4: v(select_id_RICactions_NotAdmitted()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RANfunctionID)]; + char dummy2[sizeof(RICaction_Admitted_List)]; + char dummy3[sizeof(RICaction_NotAdmitted_List)]; + char dummy4[sizeof(RICrequestID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_RICrequestID() { set(mandatory); type=1;} + void select_id_RANfunctionID() { set(mandatory); type=2;} + void select_id_RICactions_Admitted() { set(mandatory); type=3;} + void select_id_RICactions_NotAdmitted() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RICsubscriptionResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container{{RICsubscriptionResponse-IEs}}, + ... +} +*/ + +struct RICsubscriptionResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RICsubscriptionResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; diff --git a/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Descriptions.hpp b/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Descriptions.hpp new file mode 100644 index 0000000..f426b97 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/E2AP-PDU-Descriptions.hpp @@ -0,0 +1,980 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-CommonDataTypes.hpp" +#include "X2AP-PDU-Contents.hpp" +#include "X2AP-Constants.hpp" +#include "E2AP-PDU-Contents.hpp" +#include "E2AP-Constants.hpp" + +/* +E2AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} +*/ + +struct E2AP_ELEMENTARY_PROCEDURE +{ + struct procedureCode_t : ProcedureCode + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = ProcedureCode; + + }; + struct criticality_t : Criticality + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = Criticality; + + }; + +}; +/* +E2AP-ELEMENTARY-PROCEDURES E2AP-ELEMENTARY-PROCEDURE ::= { + E2AP-ELEMENTARY-PROCEDURES-CLASS-1 | + E2AP-ELEMENTARY-PROCEDURES-CLASS-2, + ... +} +*/ + +struct E2AP_ELEMENTARY_PROCEDURES +{ + struct InitiatingMessage_t : asn::typefield + { + ~InitiatingMessage_t() {clear();} + size_t get_index() const {return type;} + RICsubscriptionRequest& select_id_ricSubscription() { return set(1); } + RICsubscriptionRequest const* get_id_ricSubscription() const { return get(1); } + RICsubscriptionDeleteRequest& select_id_ricSubscriptionDelete() { return set(2); } + RICsubscriptionDeleteRequest const* get_id_ricSubscriptionDelete() const { return get(2); } + RICserviceUpdate& select_id_ricServiceUpdate() { return set(3); } + RICserviceUpdate const* get_id_ricServiceUpdate() const { return get(3); } + RICcontrolRequest& select_id_ricControl() { return set(4); } + RICcontrolRequest const* get_id_ricControl() const { return get(4); } + X2SetupRequest& select_id_x2Setup() { return set(5); } + X2SetupRequest const* get_id_x2Setup() const { return get(5); } + ENDCX2SetupRequest& select_id_endcX2Setup() { return set(6); } + ENDCX2SetupRequest const* get_id_endcX2Setup() const { return get(6); } + ResourceStatusRequest& select_id_resourceStatusReportingInitiation() { return set(7); } + ResourceStatusRequest const* get_id_resourceStatusReportingInitiation() const { return get(7); } + ENBConfigurationUpdate& select_id_eNBConfigurationUpdate() { return set(8); } + ENBConfigurationUpdate const* get_id_eNBConfigurationUpdate() const { return get(8); } + ENDCConfigurationUpdate& select_id_endcConfigurationUpdate() { return set(9); } + ENDCConfigurationUpdate const* get_id_endcConfigurationUpdate() const { return get(9); } + ResetRequest& select_id_reset() { return set(10); } + ResetRequest const* get_id_reset() const { return get(10); } + RICindication& select_id_ricIndication() { return set(11); } + RICindication const* get_id_ricIndication() const { return get(11); } + RICserviceQuery& select_id_ricServiceQuery() { return set(12); } + RICserviceQuery const* get_id_ricServiceQuery() const { return get(12); } + LoadInformation& select_id_loadIndication() { return set(13); } + LoadInformation const* get_id_loadIndication() const { return get(13); } + GNBStatusIndication& select_id_gNBStatusIndication() { return set(14); } + GNBStatusIndication const* get_id_gNBStatusIndication() const { return get(14); } + ResourceStatusUpdate& select_id_resourceStatusReporting() { return set(15); } + ResourceStatusUpdate const* get_id_resourceStatusReporting() const { return get(15); } + ErrorIndication& select_id_errorIndication() { return set(16); } + ErrorIndication const* get_id_errorIndication() const { return get(16); } + bool is_unknown() const { return type == 17; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ricSubscription()); return true; + case 2: v(select_id_ricSubscriptionDelete()); return true; + case 3: v(select_id_ricServiceUpdate()); return true; + case 4: v(select_id_ricControl()); return true; + case 5: v(select_id_x2Setup()); return true; + case 6: v(select_id_endcX2Setup()); return true; + case 7: v(select_id_resourceStatusReportingInitiation()); return true; + case 8: v(select_id_eNBConfigurationUpdate()); return true; + case 9: v(select_id_endcConfigurationUpdate()); return true; + case 10: v(select_id_reset()); return true; + case 11: v(select_id_ricIndication()); return true; + case 12: v(select_id_ricServiceQuery()); return true; + case 13: v(select_id_loadIndication()); return true; + case 14: v(select_id_gNBStatusIndication()); return true; + case 15: v(select_id_resourceStatusReporting()); return true; + case 16: v(select_id_errorIndication()); return true; + case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ENBConfigurationUpdate)]; + char dummy2[sizeof(ENDCConfigurationUpdate)]; + char dummy3[sizeof(ENDCX2SetupRequest)]; + char dummy4[sizeof(ErrorIndication)]; + char dummy5[sizeof(GNBStatusIndication)]; + char dummy6[sizeof(LoadInformation)]; + char dummy7[sizeof(RICcontrolRequest)]; + char dummy8[sizeof(RICindication)]; + char dummy9[sizeof(RICserviceQuery)]; + char dummy10[sizeof(RICserviceUpdate)]; + char dummy11[sizeof(RICsubscriptionDeleteRequest)]; + char dummy12[sizeof(RICsubscriptionRequest)]; + char dummy13[sizeof(ResetRequest)]; + char dummy14[sizeof(ResourceStatusRequest)]; + char dummy15[sizeof(ResourceStatusUpdate)]; + char dummy16[sizeof(X2SetupRequest)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct SuccessfulOutcome_t : asn::typefield + { + ~SuccessfulOutcome_t() {clear();} + size_t get_index() const {return type;} + RICsubscriptionResponse& select_id_ricSubscription() { return set(1); } + RICsubscriptionResponse const* get_id_ricSubscription() const { return get(1); } + RICsubscriptionDeleteResponse& select_id_ricSubscriptionDelete() { return set(2); } + RICsubscriptionDeleteResponse const* get_id_ricSubscriptionDelete() const { return get(2); } + RICserviceUpdateAcknowledge& select_id_ricServiceUpdate() { return set(3); } + RICserviceUpdateAcknowledge const* get_id_ricServiceUpdate() const { return get(3); } + RICcontrolAcknowledge& select_id_ricControl() { return set(4); } + RICcontrolAcknowledge const* get_id_ricControl() const { return get(4); } + X2SetupResponse& select_id_x2Setup() { return set(5); } + X2SetupResponse const* get_id_x2Setup() const { return get(5); } + ENDCX2SetupResponse& select_id_endcX2Setup() { return set(6); } + ENDCX2SetupResponse const* get_id_endcX2Setup() const { return get(6); } + ResourceStatusResponse& select_id_resourceStatusReportingInitiation() { return set(7); } + ResourceStatusResponse const* get_id_resourceStatusReportingInitiation() const { return get(7); } + ENBConfigurationUpdateAcknowledge& select_id_eNBConfigurationUpdate() { return set(8); } + ENBConfigurationUpdateAcknowledge const* get_id_eNBConfigurationUpdate() const { return get(8); } + ENDCConfigurationUpdateAcknowledge& select_id_endcConfigurationUpdate() { return set(9); } + ENDCConfigurationUpdateAcknowledge const* get_id_endcConfigurationUpdate() const { return get(9); } + ResetResponse& select_id_reset() { return set(10); } + ResetResponse const* get_id_reset() const { return get(10); } + bool is_unknown() const { return type == 17; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ricSubscription()); return true; + case 2: v(select_id_ricSubscriptionDelete()); return true; + case 3: v(select_id_ricServiceUpdate()); return true; + case 4: v(select_id_ricControl()); return true; + case 5: v(select_id_x2Setup()); return true; + case 6: v(select_id_endcX2Setup()); return true; + case 7: v(select_id_resourceStatusReportingInitiation()); return true; + case 8: v(select_id_eNBConfigurationUpdate()); return true; + case 9: v(select_id_endcConfigurationUpdate()); return true; + case 10: v(select_id_reset()); return true; + case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ENBConfigurationUpdateAcknowledge)]; + char dummy2[sizeof(ENDCConfigurationUpdateAcknowledge)]; + char dummy3[sizeof(ENDCX2SetupResponse)]; + char dummy4[sizeof(RICcontrolAcknowledge)]; + char dummy5[sizeof(RICserviceUpdateAcknowledge)]; + char dummy6[sizeof(RICsubscriptionDeleteResponse)]; + char dummy7[sizeof(RICsubscriptionResponse)]; + char dummy8[sizeof(ResetResponse)]; + char dummy9[sizeof(ResourceStatusResponse)]; + char dummy10[sizeof(X2SetupResponse)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct UnsuccessfulOutcome_t : asn::typefield + { + ~UnsuccessfulOutcome_t() {clear();} + size_t get_index() const {return type;} + RICsubscriptionFailure& select_id_ricSubscription() { return set(1); } + RICsubscriptionFailure const* get_id_ricSubscription() const { return get(1); } + RICsubscriptionDeleteFailure& select_id_ricSubscriptionDelete() { return set(2); } + RICsubscriptionDeleteFailure const* get_id_ricSubscriptionDelete() const { return get(2); } + RICserviceUpdateFailure& select_id_ricServiceUpdate() { return set(3); } + RICserviceUpdateFailure const* get_id_ricServiceUpdate() const { return get(3); } + RICcontrolFailure& select_id_ricControl() { return set(4); } + RICcontrolFailure const* get_id_ricControl() const { return get(4); } + X2SetupFailure& select_id_x2Setup() { return set(5); } + X2SetupFailure const* get_id_x2Setup() const { return get(5); } + ENDCX2SetupFailure& select_id_endcX2Setup() { return set(6); } + ENDCX2SetupFailure const* get_id_endcX2Setup() const { return get(6); } + ResourceStatusFailure& select_id_resourceStatusReportingInitiation() { return set(7); } + ResourceStatusFailure const* get_id_resourceStatusReportingInitiation() const { return get(7); } + ENBConfigurationUpdateFailure& select_id_eNBConfigurationUpdate() { return set(8); } + ENBConfigurationUpdateFailure const* get_id_eNBConfigurationUpdate() const { return get(8); } + ENDCConfigurationUpdateFailure& select_id_endcConfigurationUpdate() { return set(9); } + ENDCConfigurationUpdateFailure const* get_id_endcConfigurationUpdate() const { return get(9); } + bool is_unknown() const { return type == 17; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ricSubscription()); return true; + case 2: v(select_id_ricSubscriptionDelete()); return true; + case 3: v(select_id_ricServiceUpdate()); return true; + case 4: v(select_id_ricControl()); return true; + case 5: v(select_id_x2Setup()); return true; + case 6: v(select_id_endcX2Setup()); return true; + case 7: v(select_id_resourceStatusReportingInitiation()); return true; + case 8: v(select_id_eNBConfigurationUpdate()); return true; + case 9: v(select_id_endcConfigurationUpdate()); return true; + case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ENBConfigurationUpdateFailure)]; + char dummy2[sizeof(ENDCConfigurationUpdateFailure)]; + char dummy3[sizeof(ENDCX2SetupFailure)]; + char dummy4[sizeof(RICcontrolFailure)]; + char dummy5[sizeof(RICserviceUpdateFailure)]; + char dummy6[sizeof(RICsubscriptionDeleteFailure)]; + char dummy7[sizeof(RICsubscriptionFailure)]; + char dummy8[sizeof(ResourceStatusFailure)]; + char dummy9[sizeof(X2SetupFailure)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct procedureCode_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 17; } + void clear() {type = 0;} + void select_id_ricSubscription() { set(id_ricSubscription); type=1;} + void select_id_ricSubscriptionDelete() { set(id_ricSubscriptionDelete); type=2;} + void select_id_ricServiceUpdate() { set(id_ricServiceUpdate); type=3;} + void select_id_ricControl() { set(id_ricControl); type=4;} + void select_id_x2Setup() { set(id_x2Setup); type=5;} + void select_id_endcX2Setup() { set(id_endcX2Setup); type=6;} + void select_id_resourceStatusReportingInitiation() { set(id_resourceStatusReportingInitiation); type=7;} + void select_id_eNBConfigurationUpdate() { set(id_eNBConfigurationUpdate); type=8;} + void select_id_endcConfigurationUpdate() { set(id_endcConfigurationUpdate); type=9;} + void select_id_reset() { set(id_reset); type=10;} + void select_id_ricIndication() { set(id_ricIndication); type=11;} + void select_id_ricServiceQuery() { set(id_ricServiceQuery); type=12;} + void select_id_loadIndication() { set(id_loadIndication); type=13;} + void select_id_gNBStatusIndication() { set(id_gNBStatusIndication); type=14;} + void select_id_resourceStatusReporting() { set(id_resourceStatusReporting); type=15;} + void select_id_errorIndication() { set(id_errorIndication); type=16;} + E2AP_ELEMENTARY_PROCEDURE::procedureCode_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ricSubscription)) { type = 1; return true; } + else if(equal(id_ricSubscriptionDelete)) { type = 2; return true; } + else if(equal(id_ricServiceUpdate)) { type = 3; return true; } + else if(equal(id_ricControl)) { type = 4; return true; } + else if(equal(id_x2Setup)) { type = 5; return true; } + else if(equal(id_endcX2Setup)) { type = 6; return true; } + else if(equal(id_resourceStatusReportingInitiation)) { type = 7; return true; } + else if(equal(id_eNBConfigurationUpdate)) { type = 8; return true; } + else if(equal(id_endcConfigurationUpdate)) { type = 9; return true; } + else if(equal(id_reset)) { type = 10; return true; } + else if(equal(id_ricIndication)) { type = 11; return true; } + else if(equal(id_ricServiceQuery)) { type = 12; return true; } + else if(equal(id_loadIndication)) { type = 13; return true; } + else if(equal(id_gNBStatusIndication)) { type = 14; return true; } + else if(equal(id_resourceStatusReporting)) { type = 15; return true; } + else if(equal(id_errorIndication)) { type = 16; return true; } + else { type = 17; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ricSubscription);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ricSubscriptionDelete);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ricServiceUpdate);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ricControl);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_x2Setup);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_endcX2Setup);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_resourceStatusReportingInitiation);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_eNBConfigurationUpdate);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_endcConfigurationUpdate);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_reset);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_ricIndication);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_ricServiceQuery);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_loadIndication);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(id_gNBStatusIndication);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(id_resourceStatusReporting);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(id_errorIndication);} return false; + case 17: type = 17; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 17; } + void clear() {type = 0;} + void select_id_ricSubscription() { set(reject); type=1;} + void select_id_ricSubscriptionDelete() { set(reject); type=2;} + void select_id_ricServiceUpdate() { set(reject); type=3;} + void select_id_ricControl() { set(reject); type=4;} + void select_id_x2Setup() { set(reject); type=5;} + void select_id_endcX2Setup() { set(reject); type=6;} + void select_id_resourceStatusReportingInitiation() { set(reject); type=7;} + void select_id_eNBConfigurationUpdate() { set(reject); type=8;} + void select_id_endcConfigurationUpdate() { set(reject); type=9;} + void select_id_reset() { set(reject); type=10;} + void select_id_ricIndication() { set(ignore); type=11;} + void select_id_ricServiceQuery() { set(ignore); type=12;} + void select_id_loadIndication() { set(ignore); type=13;} + void select_id_gNBStatusIndication() { set(ignore); type=14;} + void select_id_resourceStatusReporting() { set(ignore); type=15;} + void select_id_errorIndication() { set(ignore); type=16;} + E2AP_ELEMENTARY_PROCEDURE::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(ignore)) { type = 12; return true; } + else if(equal(ignore)) { type = 13; return true; } + else if(equal(ignore)) { type = 14; return true; } + else if(equal(ignore)) { type = 15; return true; } + else if(equal(ignore)) { type = 16; return true; } + else { type = 17; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(ignore);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(ignore);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(ignore);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(ignore);} return false; + case 17: type = 17; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingMessage ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&InitiatingMessage({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct InitiatingMessage : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "InitiatingMessage";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +SuccessfulOutcome ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct SuccessfulOutcome : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "SuccessfulOutcome";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode E2AP-ELEMENTARY-PROCEDURE.&procedureCode({E2AP-ELEMENTARY-PROCEDURES}), + criticality E2AP-ELEMENTARY-PROCEDURE.&criticality({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value E2AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome({E2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct UnsuccessfulOutcome : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "UnsuccessfulOutcome";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : E2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : E2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return E2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +E2AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} +*/ + +struct E2AP_PDU : asn::choice<3, 0, true> +{ + static constexpr const char* name() {return "E2AP-PDU";} + using parent_t = asn::choice<3, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 4;} + void set_unknown() { set_index(4); } + ~E2AP_PDU() {clear();} + struct initiatingMessage_t : InitiatingMessage + { + static constexpr const char* name() {return "initiatingMessage_t";} + using parent_t = InitiatingMessage; + + }; + struct successfulOutcome_t : SuccessfulOutcome + { + static constexpr const char* name() {return "successfulOutcome_t";} + using parent_t = SuccessfulOutcome; + + }; + struct unsuccessfulOutcome_t : UnsuccessfulOutcome + { + static constexpr const char* name() {return "unsuccessfulOutcome_t";} + using parent_t = UnsuccessfulOutcome; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + initiatingMessage_t& select_initiatingMessage() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + initiatingMessage_t const* get_initiatingMessage() const { if(get_index() == 1) { return &var.as();} return nullptr; } + successfulOutcome_t& select_successfulOutcome() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + successfulOutcome_t const* get_successfulOutcome() const { if(get_index() == 2) { return &var.as();} return nullptr; } + unsuccessfulOutcome_t& select_unsuccessfulOutcome() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + unsuccessfulOutcome_t const* get_unsuccessfulOutcome() const { if(get_index() == 3) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(initiatingMessage_t)]; + char dummy2[sizeof(successfulOutcome_t)]; + char dummy3[sizeof(unsuccessfulOutcome_t)]; + + }; + asn::variant var; + index_type index {0}; +}; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-CommonDataTypes.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-CommonDataTypes.hpp new file mode 100644 index 0000000..0e1bb53 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-CommonDataTypes.hpp @@ -0,0 +1,188 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + + +/* +Criticality ::= ENUMERATED { reject, ignore, notify } +*/ + +struct Criticality : asn::enumerated<3, 0, false> +{ + static constexpr const char* name() {return "Criticality";} + using parent_t = asn::enumerated<3, 0, false>; + typedef enum { + reject + ,ignore + ,notify + } index_t; + +}; + +/* +Presence ::= ENUMERATED { optional, conditional, mandatory } +*/ + +struct Presence : asn::enumerated<3, 0, false> +{ + static constexpr const char* name() {return "Presence";} + using parent_t = asn::enumerated<3, 0, false>; + typedef enum { + optional + ,conditional + ,mandatory + } index_t; + +}; + +/* +maxPrivateIEs INTEGER ::= 65535 +*/ + +constexpr int64_t maxPrivateIEs = 65535; +/* +PrivateIE-ID ::= CHOICE { + local INTEGER (0.. maxPrivateIEs), + global OBJECT IDENTIFIER +} +*/ + +struct PrivateIE_ID : asn::choice<2, 0, false> +{ + static constexpr const char* name() {return "PrivateIE-ID";} + using parent_t = asn::choice<2, 0, false>; + index_type get_index() const {return index;} + ~PrivateIE_ID() {clear();} + struct local_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "local_t";} + using parent_t = asn::integer<>; + + }; + + struct global_t : asn::oid + { + static constexpr const char* name() {return "global_t";} + using parent_t = asn::oid; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + local_t& select_local() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + local_t const* get_local() const { if(get_index() == 1) { return &var.as();} return nullptr; } + global_t& select_global() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + global_t const* get_global() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(local_t)]; + char dummy2[sizeof(global_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ProcedureCode ::= INTEGER (0..255) +*/ + +struct ProcedureCode : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ProcedureCode";} + using parent_t = asn::integer<>; + +}; + +/* +maxProtocolIEs INTEGER ::= 65535 +*/ + +constexpr int64_t maxProtocolIEs = 65535; +/* +ProtocolIE-ID ::= INTEGER (0..maxProtocolIEs) +*/ + +struct ProtocolIE_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ProtocolIE-ID";} + using parent_t = asn::integer<>; + +}; + +/* +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome} +*/ + +struct TriggeringMessage : asn::enumerated<3, 0, false> +{ + static constexpr const char* name() {return "TriggeringMessage";} + using parent_t = asn::enumerated<3, 0, false>; + typedef enum { + initiating_message + ,successful_outcome + ,unsuccessful_outcome + } index_t; + +}; + +/* +maxProtocolExtensions INTEGER ::= 65535 +*/ + +constexpr int64_t maxProtocolExtensions = 65535; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-Constants.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-Constants.hpp new file mode 100644 index 0000000..28be45d --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-Constants.hpp @@ -0,0 +1,2054 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-CommonDataTypes.hpp" + +/* +id-ABS-Status ProtocolIE-ID ::= 63 +*/ + +constexpr int64_t id_ABS_Status = 63; +/* +id-ABSInformation ProtocolIE-ID ::= 61 +*/ + +constexpr int64_t id_ABSInformation = 61; +/* +id-ActivatedCellList ProtocolIE-ID ::= 58 +*/ + +constexpr int64_t id_ActivatedCellList = 58; +/* +id-ActivatedNRCellList ProtocolIE-ID ::= 268 +*/ + +constexpr int64_t id_ActivatedNRCellList = 268; +/* +id-ActivationID ProtocolIE-ID ::= 256 +*/ + +constexpr int64_t id_ActivationID = 256; +/* +id-AdditionalSpecialSubframe-Info ProtocolIE-ID ::= 97 +*/ + +constexpr int64_t id_AdditionalSpecialSubframe_Info = 97; +/* +id-AdditionalSpecialSubframeExtension-Info ProtocolIE-ID ::= 179 +*/ + +constexpr int64_t id_AdditionalSpecialSubframeExtension_Info = 179; +/* +id-AdmittedSplitSRBs ProtocolIE-ID ::= 212 +*/ + +constexpr int64_t id_AdmittedSplitSRBs = 212; +/* +id-AdmittedSplitSRBsrelease ProtocolIE-ID ::= 281 +*/ + +constexpr int64_t id_AdmittedSplitSRBsrelease = 281; +/* +id-AerialUEsubscriptionInformation ProtocolIE-ID ::= 277 +*/ + +constexpr int64_t id_AerialUEsubscriptionInformation = 277; +/* +id-BandwidthReducedSI ProtocolIE-ID ::= 180 +*/ + +constexpr int64_t id_BandwidthReducedSI = 180; +/* +id-BearerType ProtocolIE-ID ::= 171 +*/ + +constexpr int64_t id_BearerType = 171; +/* +id-BluetoothMeasurementConfiguration ProtocolIE-ID ::= 303 +*/ + +constexpr int64_t id_BluetoothMeasurementConfiguration = 303; +/* +id-CNTypeRestrictions ProtocolIE-ID ::= 301 +*/ + +constexpr int64_t id_CNTypeRestrictions = 301; +/* +id-CSG-Id ProtocolIE-ID ::= 70 +*/ + +constexpr int64_t id_CSG_Id = 70; +/* +id-CSGMembershipStatus ProtocolIE-ID ::= 71 +*/ + +constexpr int64_t id_CSGMembershipStatus = 71; +/* +id-CSIReportList ProtocolIE-ID ::= 146 +*/ + +constexpr int64_t id_CSIReportList = 146; +/* +id-Cause ProtocolIE-ID ::= 5 +*/ + +constexpr int64_t id_Cause = 5; +/* +id-CellAssistanceInformation ProtocolIE-ID ::= 251 +*/ + +constexpr int64_t id_CellAssistanceInformation = 251; +/* +id-CellInformation ProtocolIE-ID ::= 6 +*/ + +constexpr int64_t id_CellInformation = 6; +/* +id-CellInformation-Item ProtocolIE-ID ::= 7 +*/ + +constexpr int64_t id_CellInformation_Item = 7; +/* +id-CellMeasurementResult ProtocolIE-ID ::= 32 +*/ + +constexpr int64_t id_CellMeasurementResult = 32; +/* +id-CellMeasurementResult-Item ProtocolIE-ID ::= 33 +*/ + +constexpr int64_t id_CellMeasurementResult_Item = 33; +/* +id-CellReportingIndicator ProtocolIE-ID ::= 170 +*/ + +constexpr int64_t id_CellReportingIndicator = 170; +/* +id-CellToReport ProtocolIE-ID ::= 29 +*/ + +constexpr int64_t id_CellToReport = 29; +/* +id-CellToReport-Item ProtocolIE-ID ::= 31 +*/ + +constexpr int64_t id_CellToReport_Item = 31; +/* +id-CoMPInformation ProtocolIE-ID ::= 108 +*/ + +constexpr int64_t id_CoMPInformation = 108; +/* +id-CompleteFailureCauseInformation-Item ProtocolIE-ID ::= 69 +*/ + +constexpr int64_t id_CompleteFailureCauseInformation_Item = 69; +/* +id-CompleteFailureCauseInformation-List ProtocolIE-ID ::= 68 +*/ + +constexpr int64_t id_CompleteFailureCauseInformation_List = 68; +/* +id-CompositeAvailableCapacityGroup ProtocolIE-ID ::= 42 +*/ + +constexpr int64_t id_CompositeAvailableCapacityGroup = 42; +/* +id-Correlation-ID ProtocolIE-ID ::= 166 +*/ + +constexpr int64_t id_Correlation_ID = 166; +/* +id-CoverageModificationList ProtocolIE-ID ::= 143 +*/ + +constexpr int64_t id_CoverageModificationList = 143; +/* +id-CriticalityDiagnostics ProtocolIE-ID ::= 17 +*/ + +constexpr int64_t id_CriticalityDiagnostics = 17; +/* +id-DL-EARFCNExtension ProtocolIE-ID ::= 96 +*/ + +constexpr int64_t id_DL_EARFCNExtension = 96; +/* +id-DL-scheduling-PDCCH-CCE-usage ProtocolIE-ID ::= 193 +*/ + +constexpr int64_t id_DL_scheduling_PDCCH_CCE_usage = 193; +/* +id-DLCOUNTValueExtended ProtocolIE-ID ::= 93 +*/ + +constexpr int64_t id_DLCOUNTValueExtended = 93; +/* +id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 152 +*/ + +constexpr int64_t id_DLCOUNTValuePDCP_SNlength18 = 152; +/* +id-DataTrafficResourceIndication ProtocolIE-ID ::= 287 +*/ + +constexpr int64_t id_DataTrafficResourceIndication = 287; +/* +id-DeactivationIndication ProtocolIE-ID ::= 59 +*/ + +constexpr int64_t id_DeactivationIndication = 59; +/* +id-DownlinkPacketLossRate ProtocolIE-ID ::= 273 +*/ + +constexpr int64_t id_DownlinkPacketLossRate = 273; +/* +id-DynamicDLTransmissionInformation ProtocolIE-ID ::= 106 +*/ + +constexpr int64_t id_DynamicDLTransmissionInformation = 106; +/* +id-E-RAB-Item ProtocolIE-ID ::= 2 +*/ + +constexpr int64_t id_E_RAB_Item = 2; +/* +id-E-RABUsageReport-Item ProtocolIE-ID ::= 263 +*/ + +constexpr int64_t id_E_RABUsageReport_Item = 263; +/* +id-E-RABs-Admitted-Item ProtocolIE-ID ::= 0 +*/ + +constexpr int64_t id_E_RABs_Admitted_Item = 0; +/* +id-E-RABs-Admitted-List ProtocolIE-ID ::= 1 +*/ + +constexpr int64_t id_E_RABs_Admitted_List = 1; +/* +id-E-RABs-Admitted-ToBeAdded-Item ProtocolIE-ID ::= 121 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_Item = 121; +/* +id-E-RABs-Admitted-ToBeAdded-List ProtocolIE-ID ::= 120 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_List = 120; +/* +id-E-RABs-Admitted-ToBeAdded-ModAckItem ProtocolIE-ID ::= 131 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_ModAckItem = 131; +/* +id-E-RABs-Admitted-ToBeAdded-ModAckList ProtocolIE-ID ::= 128 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_ModAckList = 128; +/* +id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item ProtocolIE-ID ::= 213 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item = 213; +/* +id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList ProtocolIE-ID ::= 210 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList = 210; +/* +id-E-RABs-Admitted-ToBeAdded-SgNBModAck-Item ProtocolIE-ID ::= 222 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item = 222; +/* +id-E-RABs-Admitted-ToBeAdded-SgNBModAckList ProtocolIE-ID ::= 219 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeAdded_SgNBModAckList = 219; +/* +id-E-RABs-Admitted-ToBeModified-ModAckItem ProtocolIE-ID ::= 132 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeModified_ModAckItem = 132; +/* +id-E-RABs-Admitted-ToBeModified-ModAckList ProtocolIE-ID ::= 129 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeModified_ModAckList = 129; +/* +id-E-RABs-Admitted-ToBeModified-SgNBModAck-Item ProtocolIE-ID ::= 223 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item = 223; +/* +id-E-RABs-Admitted-ToBeModified-SgNBModAckList ProtocolIE-ID ::= 220 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeModified_SgNBModAckList = 220; +/* +id-E-RABs-Admitted-ToBeReleased-ModAckItem ProtocolIE-ID ::= 133 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_ModAckItem = 133; +/* +id-E-RABs-Admitted-ToBeReleased-ModAckList ProtocolIE-ID ::= 130 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_ModAckList = 130; +/* +id-E-RABs-Admitted-ToBeReleased-SgNBModAck-Item ProtocolIE-ID ::= 224 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item = 224; +/* +id-E-RABs-Admitted-ToBeReleased-SgNBModAckList ProtocolIE-ID ::= 221 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_SgNBModAckList = 221; +/* +id-E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-Item ProtocolIE-ID ::= 319 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item = 319; +/* +id-E-RABs-Admitted-ToBeReleased-SgNBRelReqAckList ProtocolIE-ID ::= 318 +*/ + +constexpr int64_t id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList = 318; +/* +id-E-RABs-AdmittedToBeModified-SgNBModConf-Item ProtocolIE-ID ::= 295 +*/ + +constexpr int64_t id_E_RABs_AdmittedToBeModified_SgNBModConf_Item = 295; +/* +id-E-RABs-AdmittedToBeModified-SgNBModConfList ProtocolIE-ID ::= 294 +*/ + +constexpr int64_t id_E_RABs_AdmittedToBeModified_SgNBModConfList = 294; +/* +id-E-RABs-DataForwardingAddress-Item ProtocolIE-ID ::= 308 +*/ + +constexpr int64_t id_E_RABs_DataForwardingAddress_Item = 308; +/* +id-E-RABs-DataForwardingAddress-List ProtocolIE-ID ::= 307 +*/ + +constexpr int64_t id_E_RABs_DataForwardingAddress_List = 307; +/* +id-E-RABs-NotAdmitted-List ProtocolIE-ID ::= 3 +*/ + +constexpr int64_t id_E_RABs_NotAdmitted_List = 3; +/* +id-E-RABs-SubjectToCounterCheck-List ProtocolIE-ID ::= 141 +*/ + +constexpr int64_t id_E_RABs_SubjectToCounterCheck_List = 141; +/* +id-E-RABs-SubjectToCounterCheckItem ProtocolIE-ID ::= 142 +*/ + +constexpr int64_t id_E_RABs_SubjectToCounterCheckItem = 142; +/* +id-E-RABs-SubjectToSgNBCounterCheck-Item ProtocolIE-ID ::= 236 +*/ + +constexpr int64_t id_E_RABs_SubjectToSgNBCounterCheck_Item = 236; +/* +id-E-RABs-SubjectToSgNBCounterCheck-List ProtocolIE-ID ::= 235 +*/ + +constexpr int64_t id_E_RABs_SubjectToSgNBCounterCheck_List = 235; +/* +id-E-RABs-SubjectToStatusTransfer-Item ProtocolIE-ID ::= 19 +*/ + +constexpr int64_t id_E_RABs_SubjectToStatusTransfer_Item = 19; +/* +id-E-RABs-SubjectToStatusTransfer-List ProtocolIE-ID ::= 18 +*/ + +constexpr int64_t id_E_RABs_SubjectToStatusTransfer_List = 18; +/* +id-E-RABs-ToBeAdded-Item ProtocolIE-ID ::= 118 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_Item = 118; +/* +id-E-RABs-ToBeAdded-List ProtocolIE-ID ::= 117 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_List = 117; +/* +id-E-RABs-ToBeAdded-ModReqItem ProtocolIE-ID ::= 125 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_ModReqItem = 125; +/* +id-E-RABs-ToBeAdded-SgNBAddReq-Item ProtocolIE-ID ::= 209 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_SgNBAddReq_Item = 209; +/* +id-E-RABs-ToBeAdded-SgNBAddReqList ProtocolIE-ID ::= 205 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_SgNBAddReqList = 205; +/* +id-E-RABs-ToBeAdded-SgNBModReq-Item ProtocolIE-ID ::= 216 +*/ + +constexpr int64_t id_E_RABs_ToBeAdded_SgNBModReq_Item = 216; +/* +id-E-RABs-ToBeModified-ModReqItem ProtocolIE-ID ::= 126 +*/ + +constexpr int64_t id_E_RABs_ToBeModified_ModReqItem = 126; +/* +id-E-RABs-ToBeModified-SgNBModReq-Item ProtocolIE-ID ::= 217 +*/ + +constexpr int64_t id_E_RABs_ToBeModified_SgNBModReq_Item = 217; +/* +id-E-RABs-ToBeModified-SgNBModReqd-Item ProtocolIE-ID ::= 228 +*/ + +constexpr int64_t id_E_RABs_ToBeModified_SgNBModReqd_Item = 228; +/* +id-E-RABs-ToBeModified-SgNBModReqdList ProtocolIE-ID ::= 226 +*/ + +constexpr int64_t id_E_RABs_ToBeModified_SgNBModReqdList = 226; +/* +id-E-RABs-ToBeReleased-List-RelConf ProtocolIE-ID ::= 139 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_List_RelConf = 139; +/* +id-E-RABs-ToBeReleased-List-RelReq ProtocolIE-ID ::= 137 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_List_RelReq = 137; +/* +id-E-RABs-ToBeReleased-ModReqItem ProtocolIE-ID ::= 127 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_ModReqItem = 127; +/* +id-E-RABs-ToBeReleased-ModReqd ProtocolIE-ID ::= 134 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_ModReqd = 134; +/* +id-E-RABs-ToBeReleased-ModReqdItem ProtocolIE-ID ::= 135 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_ModReqdItem = 135; +/* +id-E-RABs-ToBeReleased-RelConfItem ProtocolIE-ID ::= 140 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_RelConfItem = 140; +/* +id-E-RABs-ToBeReleased-RelReqItem ProtocolIE-ID ::= 138 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_RelReqItem = 138; +/* +id-E-RABs-ToBeReleased-SgNBChaConf-Item ProtocolIE-ID ::= 230 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBChaConf_Item = 230; +/* +id-E-RABs-ToBeReleased-SgNBChaConfList ProtocolIE-ID ::= 229 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBChaConfList = 229; +/* +id-E-RABs-ToBeReleased-SgNBModReq-Item ProtocolIE-ID ::= 218 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBModReq_Item = 218; +/* +id-E-RABs-ToBeReleased-SgNBModReqd-Item ProtocolIE-ID ::= 227 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBModReqd_Item = 227; +/* +id-E-RABs-ToBeReleased-SgNBModReqdList ProtocolIE-ID ::= 225 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBModReqdList = 225; +/* +id-E-RABs-ToBeReleased-SgNBRelConf-Item ProtocolIE-ID ::= 234 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelConf_Item = 234; +/* +id-E-RABs-ToBeReleased-SgNBRelConfList ProtocolIE-ID ::= 233 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelConfList = 233; +/* +id-E-RABs-ToBeReleased-SgNBRelReq-Item ProtocolIE-ID ::= 232 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelReq_Item = 232; +/* +id-E-RABs-ToBeReleased-SgNBRelReqList ProtocolIE-ID ::= 231 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelReqList = 231; +/* +id-E-RABs-ToBeReleased-SgNBRelReqd-Item ProtocolIE-ID ::= 321 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelReqd_Item = 321; +/* +id-E-RABs-ToBeReleased-SgNBRelReqdList ProtocolIE-ID ::= 320 +*/ + +constexpr int64_t id_E_RABs_ToBeReleased_SgNBRelReqdList = 320; +/* +id-E-RABs-ToBeSetup-Item ProtocolIE-ID ::= 4 +*/ + +constexpr int64_t id_E_RABs_ToBeSetup_Item = 4; +/* +id-E-RABs-ToBeSetupRetrieve-Item ProtocolIE-ID ::= 174 +*/ + +constexpr int64_t id_E_RABs_ToBeSetupRetrieve_Item = 174; +/* +id-ECGI ProtocolIE-ID ::= 316 +*/ + +constexpr int64_t id_ECGI = 316; +/* +id-ENB1-Cell-ID ProtocolIE-ID ::= 43 +*/ + +constexpr int64_t id_ENB1_Cell_ID = 43; +/* +id-ENB1-Measurement-ID ProtocolIE-ID ::= 39 +*/ + +constexpr int64_t id_ENB1_Measurement_ID = 39; +/* +id-ENB1-Mobility-Parameters ProtocolIE-ID ::= 46 +*/ + +constexpr int64_t id_ENB1_Mobility_Parameters = 46; +/* +id-ENB2-Cell-ID ProtocolIE-ID ::= 44 +*/ + +constexpr int64_t id_ENB2_Cell_ID = 44; +/* +id-ENB2-Measurement-ID ProtocolIE-ID ::= 40 +*/ + +constexpr int64_t id_ENB2_Measurement_ID = 40; +/* +id-ENB2-Mobility-Parameters-Modification-Range ProtocolIE-ID ::= 47 +*/ + +constexpr int64_t id_ENB2_Mobility_Parameters_Modification_Range = 47; +/* +id-ENB2-Proposed-Mobility-Parameters ProtocolIE-ID ::= 45 +*/ + +constexpr int64_t id_ENB2_Proposed_Mobility_Parameters = 45; +/* +id-ERABActivityNotifyItemList ProtocolIE-ID ::= 297 +*/ + +constexpr int64_t id_ERABActivityNotifyItemList = 297; +/* +id-ExpectedUEBehaviour ProtocolIE-ID ::= 104 +*/ + +constexpr int64_t id_ExpectedUEBehaviour = 104; +/* +id-ExtendedULInterferenceOverloadInfo ProtocolIE-ID ::= 100 +*/ + +constexpr int64_t id_ExtendedULInterferenceOverloadInfo = 100; +/* +id-FailureCellCRNTI ProtocolIE-ID ::= 50 +*/ + +constexpr int64_t id_FailureCellCRNTI = 50; +/* +id-FailureCellECGI ProtocolIE-ID ::= 53 +*/ + +constexpr int64_t id_FailureCellECGI = 53; +/* +id-FailureCellPCI ProtocolIE-ID ::= 48 +*/ + +constexpr int64_t id_FailureCellPCI = 48; +/* +id-FreqBandIndicatorPriority ProtocolIE-ID ::= 160 +*/ + +constexpr int64_t id_FreqBandIndicatorPriority = 160; +/* +id-GNBOverloadInformation ProtocolIE-ID ::= 310 +*/ + +constexpr int64_t id_GNBOverloadInformation = 310; +/* +id-GUGroupIDList ProtocolIE-ID ::= 24 +*/ + +constexpr int64_t id_GUGroupIDList = 24; +/* +id-GUGroupIDToAddList ProtocolIE-ID ::= 34 +*/ + +constexpr int64_t id_GUGroupIDToAddList = 34; +/* +id-GUGroupIDToDeleteList ProtocolIE-ID ::= 35 +*/ + +constexpr int64_t id_GUGroupIDToDeleteList = 35; +/* +id-GUMMEI-ID ProtocolIE-ID ::= 23 +*/ + +constexpr int64_t id_GUMMEI_ID = 23; +/* +id-GW-TransportLayerAddress ProtocolIE-ID ::= 165 +*/ + +constexpr int64_t id_GW_TransportLayerAddress = 165; +/* +id-GlobalENB-ID ProtocolIE-ID ::= 21 +*/ + +constexpr int64_t id_GlobalENB_ID = 21; +/* +id-Globalen-gNB-ID ProtocolIE-ID ::= 252 +*/ + +constexpr int64_t id_Globalen_gNB_ID = 252; +/* +id-HO-cause ProtocolIE-ID ::= 80 +*/ + +constexpr int64_t id_HO_cause = 80; +/* +id-HandoverReportType ProtocolIE-ID ::= 54 +*/ + +constexpr int64_t id_HandoverReportType = 54; +/* +id-HandoverRestrictionList ProtocolIE-ID ::= 240 +*/ + +constexpr int64_t id_HandoverRestrictionList = 240; +/* +id-InitiatingNodeType-EndcConfigUpdate ProtocolIE-ID ::= 245 +*/ + +constexpr int64_t id_InitiatingNodeType_EndcConfigUpdate = 245; +/* +id-InitiatingNodeType-EndcX2Removal ProtocolIE-ID ::= 298 +*/ + +constexpr int64_t id_InitiatingNodeType_EndcX2Removal = 298; +/* +id-InitiatingNodeType-EndcX2Setup ProtocolIE-ID ::= 244 +*/ + +constexpr int64_t id_InitiatingNodeType_EndcX2Setup = 244; +/* +id-InitiatingNodeType-EutranrCellResourceCoordination ProtocolIE-ID ::= 285 +*/ + +constexpr int64_t id_InitiatingNodeType_EutranrCellResourceCoordination = 285; +/* +id-IntendedULDLConfiguration ProtocolIE-ID ::= 99 +*/ + +constexpr int64_t id_IntendedULDLConfiguration = 99; +/* +id-InvokeIndication ProtocolIE-ID ::= 62 +*/ + +constexpr int64_t id_InvokeIndication = 62; +/* +id-LHN-ID ProtocolIE-ID ::= 159 +*/ + +constexpr int64_t id_LHN_ID = 159; +/* +id-ListofEUTRACellsinEUTRACoordinationReq ProtocolIE-ID ::= 289 +*/ + +constexpr int64_t id_ListofEUTRACellsinEUTRACoordinationReq = 289; +/* +id-ListofEUTRACellsinEUTRACoordinationResp ProtocolIE-ID ::= 290 +*/ + +constexpr int64_t id_ListofEUTRACellsinEUTRACoordinationResp = 290; +/* +id-ListofEUTRACellsinNRCoordinationReq ProtocolIE-ID ::= 291 +*/ + +constexpr int64_t id_ListofEUTRACellsinNRCoordinationReq = 291; +/* +id-ListofNRCellsinNRCoordinationReq ProtocolIE-ID ::= 292 +*/ + +constexpr int64_t id_ListofNRCellsinNRCoordinationReq = 292; +/* +id-ListofNRCellsinNRCoordinationResp ProtocolIE-ID ::= 293 +*/ + +constexpr int64_t id_ListofNRCellsinNRCoordinationResp = 293; +/* +id-M3Configuration ProtocolIE-ID ::= 85 +*/ + +constexpr int64_t id_M3Configuration = 85; +/* +id-M4Configuration ProtocolIE-ID ::= 86 +*/ + +constexpr int64_t id_M4Configuration = 86; +/* +id-M5Configuration ProtocolIE-ID ::= 87 +*/ + +constexpr int64_t id_M5Configuration = 87; +/* +id-M6Configuration ProtocolIE-ID ::= 161 +*/ + +constexpr int64_t id_M6Configuration = 161; +/* +id-M7Configuration ProtocolIE-ID ::= 162 +*/ + +constexpr int64_t id_M7Configuration = 162; +/* +id-MBMS-Service-Area-List ProtocolIE-ID ::= 79 +*/ + +constexpr int64_t id_MBMS_Service_Area_List = 79; +/* +id-MBSFN-Subframe-Info ProtocolIE-ID ::= 56 +*/ + +constexpr int64_t id_MBSFN_Subframe_Info = 56; +/* +id-MDT-Location-Info ProtocolIE-ID ::= 88 +*/ + +constexpr int64_t id_MDT_Location_Info = 88; +/* +id-MDTConfiguration ProtocolIE-ID ::= 72 +*/ + +constexpr int64_t id_MDTConfiguration = 72; +/* +id-MakeBeforeBreakIndicator ProtocolIE-ID ::= 181 +*/ + +constexpr int64_t id_MakeBeforeBreakIndicator = 181; +/* +id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 89 +*/ + +constexpr int64_t id_ManagementBasedMDTPLMNList = 89; +/* +id-ManagementBasedMDTallowed ProtocolIE-ID ::= 74 +*/ + +constexpr int64_t id_ManagementBasedMDTallowed = 74; +/* +id-Masked-IMEISV ProtocolIE-ID ::= 98 +*/ + +constexpr int64_t id_Masked_IMEISV = 98; +/* +id-MeNB-UE-X2AP-ID ProtocolIE-ID ::= 111 +*/ + +constexpr int64_t id_MeNB_UE_X2AP_ID = 111; +/* +id-MeNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 157 +*/ + +constexpr int64_t id_MeNB_UE_X2AP_ID_Extension = 157; +/* +id-MeNBCell-ID ProtocolIE-ID ::= 279 +*/ + +constexpr int64_t id_MeNBCell_ID = 279; +/* +id-MeNBCoordinationAssistanceInformation ProtocolIE-ID ::= 323 +*/ + +constexpr int64_t id_MeNBCoordinationAssistanceInformation = 323; +/* +id-MeNBResourceCoordinationInformation ProtocolIE-ID ::= 257 +*/ + +constexpr int64_t id_MeNBResourceCoordinationInformation = 257; +/* +id-MeNBtoSeNBContainer ProtocolIE-ID ::= 119 +*/ + +constexpr int64_t id_MeNBtoSeNBContainer = 119; +/* +id-MeNBtoSgNBContainer ProtocolIE-ID ::= 206 +*/ + +constexpr int64_t id_MeNBtoSgNBContainer = 206; +/* +id-Measurement-ID ProtocolIE-ID ::= 37 +*/ + +constexpr int64_t id_Measurement_ID = 37; +/* +id-MeasurementFailureCause-Item ProtocolIE-ID ::= 67 +*/ + +constexpr int64_t id_MeasurementFailureCause_Item = 67; +/* +id-MeasurementInitiationResult-Item ProtocolIE-ID ::= 66 +*/ + +constexpr int64_t id_MeasurementInitiationResult_Item = 66; +/* +id-MeasurementInitiationResult-List ProtocolIE-ID ::= 65 +*/ + +constexpr int64_t id_MeasurementInitiationResult_List = 65; +/* +id-MobilityInformation ProtocolIE-ID ::= 82 +*/ + +constexpr int64_t id_MobilityInformation = 82; +/* +id-MultibandInfoList ProtocolIE-ID ::= 84 +*/ + +constexpr int64_t id_MultibandInfoList = 84; +/* +id-NRCGI ProtocolIE-ID ::= 322 +*/ + +constexpr int64_t id_NRCGI = 322; +/* +id-NRS-NSSS-PowerOffset ProtocolIE-ID ::= 282 +*/ + +constexpr int64_t id_NRS_NSSS_PowerOffset = 282; +/* +id-NRUESecurityCapabilities ProtocolIE-ID ::= 248 +*/ + +constexpr int64_t id_NRUESecurityCapabilities = 248; +/* +id-NRrestrictionin5GS ProtocolIE-ID ::= 305 +*/ + +constexpr int64_t id_NRrestrictionin5GS = 305; +/* +id-NRrestrictioninEPSasSecondaryRAT ProtocolIE-ID ::= 202 +*/ + +constexpr int64_t id_NRrestrictioninEPSasSecondaryRAT = 202; +/* +id-NSSS-NumOccasionDifferentPrecoder ProtocolIE-ID ::= 283 +*/ + +constexpr int64_t id_NSSS_NumOccasionDifferentPrecoder = 283; +/* +id-NeighbourTAC ProtocolIE-ID ::= 76 +*/ + +constexpr int64_t id_NeighbourTAC = 76; +/* +id-New-eNB-UE-X2AP-ID ProtocolIE-ID ::= 9 +*/ + +constexpr int64_t id_New_eNB_UE_X2AP_ID = 9; +/* +id-New-eNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 155 +*/ + +constexpr int64_t id_New_eNB_UE_X2AP_ID_Extension = 155; +/* +id-NewEUTRANCellIdentifier ProtocolIE-ID ::= 175 +*/ + +constexpr int64_t id_NewEUTRANCellIdentifier = 175; +/* +id-Number-of-Antennaports ProtocolIE-ID ::= 41 +*/ + +constexpr int64_t id_Number_of_Antennaports = 41; +/* +id-OffsetOfNbiotChannelNumberToDL-EARFCN ProtocolIE-ID ::= 177 +*/ + +constexpr int64_t id_OffsetOfNbiotChannelNumberToDL_EARFCN = 177; +/* +id-OffsetOfNbiotChannelNumberToUL-EARFCN ProtocolIE-ID ::= 178 +*/ + +constexpr int64_t id_OffsetOfNbiotChannelNumberToUL_EARFCN = 178; +/* +id-Old-SgNB-UE-X2AP-ID ProtocolIE-ID ::= 264 +*/ + +constexpr int64_t id_Old_SgNB_UE_X2AP_ID = 264; +/* +id-Old-eNB-UE-X2AP-ID ProtocolIE-ID ::= 10 +*/ + +constexpr int64_t id_Old_eNB_UE_X2AP_ID = 10; +/* +id-Old-eNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 156 +*/ + +constexpr int64_t id_Old_eNB_UE_X2AP_ID_Extension = 156; +/* +id-PDCPChangeIndication ProtocolIE-ID ::= 249 +*/ + +constexpr int64_t id_PDCPChangeIndication = 249; +/* +id-PRACH-Configuration ProtocolIE-ID ::= 55 +*/ + +constexpr int64_t id_PRACH_Configuration = 55; +/* +id-PartialSuccessIndicator ProtocolIE-ID ::= 64 +*/ + +constexpr int64_t id_PartialSuccessIndicator = 64; +/* +id-ProSeAuthorized ProtocolIE-ID ::= 103 +*/ + +constexpr int64_t id_ProSeAuthorized = 103; +/* +id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 149 +*/ + +constexpr int64_t id_ProSeUEtoNetworkRelaying = 149; +/* +id-ProtectedEUTRAResourceIndication ProtocolIE-ID ::= 284 +*/ + +constexpr int64_t id_ProtectedEUTRAResourceIndication = 284; +/* +id-RLC-Status ProtocolIE-ID ::= 300 +*/ + +constexpr int64_t id_RLC_Status = 300; +/* +id-RLCMode-transferred ProtocolIE-ID ::= 317 +*/ + +constexpr int64_t id_RLCMode_transferred = 317; +/* +id-RNL-Header ProtocolIE-ID ::= 101 +*/ + +constexpr int64_t id_RNL_Header = 101; +/* +id-RRCConfigIndication ProtocolIE-ID ::= 272 +*/ + +constexpr int64_t id_RRCConfigIndication = 272; +/* +id-RRCConnReestabIndicator ProtocolIE-ID ::= 78 +*/ + +constexpr int64_t id_RRCConnReestabIndicator = 78; +/* +id-RRCConnSetupIndicator ProtocolIE-ID ::= 75 +*/ + +constexpr int64_t id_RRCConnSetupIndicator = 75; +/* +id-RRCContainer ProtocolIE-ID ::= 237 +*/ + +constexpr int64_t id_RRCContainer = 237; +/* +id-RSRPMRList ProtocolIE-ID ::= 110 +*/ + +constexpr int64_t id_RSRPMRList = 110; +/* +id-Re-establishmentCellECGI ProtocolIE-ID ::= 49 +*/ + +constexpr int64_t id_Re_establishmentCellECGI = 49; +/* +id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 91 +*/ + +constexpr int64_t id_ReceiveStatusOfULPDCPSDUsExtended = 91; +/* +id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 150 +*/ + +constexpr int64_t id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 = 150; +/* +id-Registration-Request ProtocolIE-ID ::= 28 +*/ + +constexpr int64_t id_Registration_Request = 28; +/* +id-ReportCharacteristics ProtocolIE-ID ::= 38 +*/ + +constexpr int64_t id_ReportCharacteristics = 38; +/* +id-ReportingPeriodicity ProtocolIE-ID ::= 30 +*/ + +constexpr int64_t id_ReportingPeriodicity = 30; +/* +id-ReportingPeriodicityCSIR ProtocolIE-ID ::= 145 +*/ + +constexpr int64_t id_ReportingPeriodicityCSIR = 145; +/* +id-ReportingPeriodicityRSRPMR ProtocolIE-ID ::= 109 +*/ + +constexpr int64_t id_ReportingPeriodicityRSRPMR = 109; +/* +id-RequestedSplitSRBs ProtocolIE-ID ::= 208 +*/ + +constexpr int64_t id_RequestedSplitSRBs = 208; +/* +id-RequestedSplitSRBsrelease ProtocolIE-ID ::= 280 +*/ + +constexpr int64_t id_RequestedSplitSRBsrelease = 280; +/* +id-RespondingNodeType-EndcConfigUpdate ProtocolIE-ID ::= 247 +*/ + +constexpr int64_t id_RespondingNodeType_EndcConfigUpdate = 247; +/* +id-RespondingNodeType-EndcX2Removal ProtocolIE-ID ::= 299 +*/ + +constexpr int64_t id_RespondingNodeType_EndcX2Removal = 299; +/* +id-RespondingNodeType-EndcX2Setup ProtocolIE-ID ::= 246 +*/ + +constexpr int64_t id_RespondingNodeType_EndcX2Setup = 246; +/* +id-RespondingNodeType-EutranrCellResourceCoordination ProtocolIE-ID ::= 286 +*/ + +constexpr int64_t id_RespondingNodeType_EutranrCellResourceCoordination = 286; +/* +id-ResponseInformationSeNBReconfComp ProtocolIE-ID ::= 123 +*/ + +constexpr int64_t id_ResponseInformationSeNBReconfComp = 123; +/* +id-ResponseInformationSgNBReconfComp ProtocolIE-ID ::= 214 +*/ + +constexpr int64_t id_ResponseInformationSgNBReconfComp = 214; +/* +id-SCGChangeIndication ProtocolIE-ID ::= 136 +*/ + +constexpr int64_t id_SCGChangeIndication = 136; +/* +id-SCGConfigurationQuery ProtocolIE-ID ::= 241 +*/ + +constexpr int64_t id_SCGConfigurationQuery = 241; +/* +id-SGNB-Addition-Trigger-Ind ProtocolIE-ID ::= 278 +*/ + +constexpr int64_t id_SGNB_Addition_Trigger_Ind = 278; +/* +id-SIPTO-BearerDeactivationIndication ProtocolIE-ID ::= 164 +*/ + +constexpr int64_t id_SIPTO_BearerDeactivationIndication = 164; +/* +id-SIPTO-Correlation-ID ProtocolIE-ID ::= 167 +*/ + +constexpr int64_t id_SIPTO_Correlation_ID = 167; +/* +id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 168 +*/ + +constexpr int64_t id_SIPTO_L_GW_TransportLayerAddress = 168; +/* +id-SRBType ProtocolIE-ID ::= 238 +*/ + +constexpr int64_t id_SRBType = 238; +/* +id-SRVCCOperationPossible ProtocolIE-ID ::= 36 +*/ + +constexpr int64_t id_SRVCCOperationPossible = 36; +/* +id-SeNB-UE-X2AP-ID ProtocolIE-ID ::= 112 +*/ + +constexpr int64_t id_SeNB_UE_X2AP_ID = 112; +/* +id-SeNB-UE-X2AP-ID-Extension ProtocolIE-ID ::= 158 +*/ + +constexpr int64_t id_SeNB_UE_X2AP_ID_Extension = 158; +/* +id-SeNBSecurityKey ProtocolIE-ID ::= 114 +*/ + +constexpr int64_t id_SeNBSecurityKey = 114; +/* +id-SeNBUEAggregateMaximumBitRate ProtocolIE-ID ::= 115 +*/ + +constexpr int64_t id_SeNBUEAggregateMaximumBitRate = 115; +/* +id-SeNBtoMeNBContainer ProtocolIE-ID ::= 122 +*/ + +constexpr int64_t id_SeNBtoMeNBContainer = 122; +/* +id-SecondaryRATUsageReport ProtocolIE-ID ::= 255 +*/ + +constexpr int64_t id_SecondaryRATUsageReport = 255; +/* +id-SecondaryRATUsageReport-Item ProtocolIE-ID ::= 266 +*/ + +constexpr int64_t id_SecondaryRATUsageReport_Item = 266; +/* +id-SecondaryRATUsageReportList ProtocolIE-ID ::= 265 +*/ + +constexpr int64_t id_SecondaryRATUsageReportList = 265; +/* +id-SelectedPLMN ProtocolIE-ID ::= 269 +*/ + +constexpr int64_t id_SelectedPLMN = 269; +/* +id-ServedCells ProtocolIE-ID ::= 20 +*/ + +constexpr int64_t id_ServedCells = 20; +/* +id-ServedCellsToActivate ProtocolIE-ID ::= 57 +*/ + +constexpr int64_t id_ServedCellsToActivate = 57; +/* +id-ServedCellsToAdd ProtocolIE-ID ::= 25 +*/ + +constexpr int64_t id_ServedCellsToAdd = 25; +/* +id-ServedCellsToDelete ProtocolIE-ID ::= 27 +*/ + +constexpr int64_t id_ServedCellsToDelete = 27; +/* +id-ServedCellsToModify ProtocolIE-ID ::= 26 +*/ + +constexpr int64_t id_ServedCellsToModify = 26; +/* +id-ServedEUTRAcellsENDCX2ManagementList ProtocolIE-ID ::= 250 +*/ + +constexpr int64_t id_ServedEUTRAcellsENDCX2ManagementList = 250; +/* +id-ServedEUTRAcellsToDeleteListENDCConfUpd ProtocolIE-ID ::= 260 +*/ + +constexpr int64_t id_ServedEUTRAcellsToDeleteListENDCConfUpd = 260; +/* +id-ServedEUTRAcellsToModifyListENDCConfUpd ProtocolIE-ID ::= 259 +*/ + +constexpr int64_t id_ServedEUTRAcellsToModifyListENDCConfUpd = 259; +/* +id-ServedNRCellsToActivate ProtocolIE-ID ::= 267 +*/ + +constexpr int64_t id_ServedNRCellsToActivate = 267; +/* +id-ServedNRcellsENDCX2ManagementList ProtocolIE-ID ::= 253 +*/ + +constexpr int64_t id_ServedNRcellsENDCX2ManagementList = 253; +/* +id-ServedNRcellsToDeleteListENDCConfUpd ProtocolIE-ID ::= 262 +*/ + +constexpr int64_t id_ServedNRcellsToDeleteListENDCConfUpd = 262; +/* +id-ServedNRcellsToModifyListENDCConfUpd ProtocolIE-ID ::= 261 +*/ + +constexpr int64_t id_ServedNRcellsToModifyListENDCConfUpd = 261; +/* +id-ServingPLMN ProtocolIE-ID ::= 116 +*/ + +constexpr int64_t id_ServingPLMN = 116; +/* +id-SgNB-UE-X2AP-ID ProtocolIE-ID ::= 207 +*/ + +constexpr int64_t id_SgNB_UE_X2AP_ID = 207; +/* +id-SgNBActivityNotification ProcedureCode ::= 42 +*/ + +constexpr int64_t id_SgNBActivityNotification = 42; +/* +id-SgNBCoordinationAssistanceInformation ProtocolIE-ID ::= 324 +*/ + +constexpr int64_t id_SgNBCoordinationAssistanceInformation = 324; +/* +id-SgNBResourceCoordinationInformation ProtocolIE-ID ::= 258 +*/ + +constexpr int64_t id_SgNBResourceCoordinationInformation = 258; +/* +id-SgNBSecurityKey ProtocolIE-ID ::= 203 +*/ + +constexpr int64_t id_SgNBSecurityKey = 203; +/* +id-SgNBUEAggregateMaximumBitRate ProtocolIE-ID ::= 204 +*/ + +constexpr int64_t id_SgNBUEAggregateMaximumBitRate = 204; +/* +id-SgNBtoMeNBContainer ProtocolIE-ID ::= 211 +*/ + +constexpr int64_t id_SgNBtoMeNBContainer = 211; +/* +id-ShortMAC-I ProtocolIE-ID ::= 51 +*/ + +constexpr int64_t id_ShortMAC_I = 51; +/* +id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 90 +*/ + +constexpr int64_t id_SignallingBasedMDTPLMNList = 90; +/* +id-SourceCellCRNTI ProtocolIE-ID ::= 83 +*/ + +constexpr int64_t id_SourceCellCRNTI = 83; +/* +id-SourceCellECGI ProtocolIE-ID ::= 52 +*/ + +constexpr int64_t id_SourceCellECGI = 52; +/* +id-SpectrumSharingGroupID ProtocolIE-ID ::= 288 +*/ + +constexpr int64_t id_SpectrumSharingGroupID = 288; +/* +id-SplitSRB ProtocolIE-ID ::= 242 +*/ + +constexpr int64_t id_SplitSRB = 242; +/* +id-SubscriberProfileIDforRFP ProtocolIE-ID ::= 275 +*/ + +constexpr int64_t id_SubscriberProfileIDforRFP = 275; +/* +id-Subscription-Based-UE-DifferentiationInfo ProtocolIE-ID ::= 309 +*/ + +constexpr int64_t id_Subscription_Based_UE_DifferentiationInfo = 309; +/* +id-Target-SgNB-ID ProtocolIE-ID ::= 239 +*/ + +constexpr int64_t id_Target_SgNB_ID = 239; +/* +id-TargetCell-ID ProtocolIE-ID ::= 11 +*/ + +constexpr int64_t id_TargetCell_ID = 11; +/* +id-TargetCellInUTRAN ProtocolIE-ID ::= 81 +*/ + +constexpr int64_t id_TargetCellInUTRAN = 81; +/* +id-TargeteNBtoSource-eNBTransparentContainer ProtocolIE-ID ::= 12 +*/ + +constexpr int64_t id_TargeteNBtoSource_eNBTransparentContainer = 12; +/* +id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 77 +*/ + +constexpr int64_t id_Time_UE_StayedInCell_EnhancedGranularity = 77; +/* +id-TimeToWait ProtocolIE-ID ::= 22 +*/ + +constexpr int64_t id_TimeToWait = 22; +/* +id-TraceActivation ProtocolIE-ID ::= 13 +*/ + +constexpr int64_t id_TraceActivation = 13; +/* +id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 163 +*/ + +constexpr int64_t id_Tunnel_Information_for_BBF = 163; +/* +id-UE-ContextInformation ProtocolIE-ID ::= 14 +*/ + +constexpr int64_t id_UE_ContextInformation = 14; +/* +id-UE-ContextInformation-SgNBModReq ProtocolIE-ID ::= 215 +*/ + +constexpr int64_t id_UE_ContextInformation_SgNBModReq = 215; +/* +id-UE-ContextInformationRetrieve ProtocolIE-ID ::= 173 +*/ + +constexpr int64_t id_UE_ContextInformationRetrieve = 173; +/* +id-UE-ContextInformationSeNBModReq ProtocolIE-ID ::= 124 +*/ + +constexpr int64_t id_UE_ContextInformationSeNBModReq = 124; +/* +id-UE-ContextKeptIndicator ProtocolIE-ID ::= 154 +*/ + +constexpr int64_t id_UE_ContextKeptIndicator = 154; +/* +id-UE-ContextReferenceAtSeNB ProtocolIE-ID ::= 153 +*/ + +constexpr int64_t id_UE_ContextReferenceAtSeNB = 153; +/* +id-UE-ContextReferenceAtSgNB ProtocolIE-ID ::= 254 +*/ + +constexpr int64_t id_UE_ContextReferenceAtSgNB = 254; +/* +id-UE-ContextReferenceAtWT ProtocolIE-ID ::= 182 +*/ + +constexpr int64_t id_UE_ContextReferenceAtWT = 182; +/* +id-UE-HistoryInformation ProtocolIE-ID ::= 15 +*/ + +constexpr int64_t id_UE_HistoryInformation = 15; +/* +id-UE-HistoryInformationFromTheUE ProtocolIE-ID ::= 105 +*/ + +constexpr int64_t id_UE_HistoryInformationFromTheUE = 105; +/* +id-UE-RLF-Report-Container ProtocolIE-ID ::= 60 +*/ + +constexpr int64_t id_UE_RLF_Report_Container = 60; +/* +id-UE-RLF-Report-Container-for-extended-bands ProtocolIE-ID ::= 107 +*/ + +constexpr int64_t id_UE_RLF_Report_Container_for_extended_bands = 107; +/* +id-UE-SecurityCapabilities ProtocolIE-ID ::= 113 +*/ + +constexpr int64_t id_UE_SecurityCapabilities = 113; +/* +id-UE-X2AP-ID ProtocolIE-ID ::= 16 +*/ + +constexpr int64_t id_UE_X2AP_ID = 16; +/* +id-UEAppLayerMeasConfig ProtocolIE-ID ::= 195 +*/ + +constexpr int64_t id_UEAppLayerMeasConfig = 195; +/* +id-UEContextLevelUserPlaneActivity ProtocolIE-ID ::= 296 +*/ + +constexpr int64_t id_UEContextLevelUserPlaneActivity = 296; +/* +id-UEID ProtocolIE-ID ::= 147 +*/ + +constexpr int64_t id_UEID = 147; +/* +id-UENRMeasurement ProtocolIE-ID ::= 243 +*/ + +constexpr int64_t id_UENRMeasurement = 243; +/* +id-UESidelinkAggregateMaximumBitRate ProtocolIE-ID ::= 184 +*/ + +constexpr int64_t id_UESidelinkAggregateMaximumBitRate = 184; +/* +id-UEs-Admitted-ToBeReset ProtocolIE-ID ::= 271 +*/ + +constexpr int64_t id_UEs_Admitted_ToBeReset = 271; +/* +id-UEs-ToBeReset ProtocolIE-ID ::= 270 +*/ + +constexpr int64_t id_UEs_ToBeReset = 270; +/* +id-UL-EARFCNExtension ProtocolIE-ID ::= 95 +*/ + +constexpr int64_t id_UL_EARFCNExtension = 95; +/* +id-UL-scheduling-PDCCH-CCE-usage ProtocolIE-ID ::= 194 +*/ + +constexpr int64_t id_UL_scheduling_PDCCH_CCE_usage = 194; +/* +id-ULCOUNTValueExtended ProtocolIE-ID ::= 92 +*/ + +constexpr int64_t id_ULCOUNTValueExtended = 92; +/* +id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 151 +*/ + +constexpr int64_t id_ULCOUNTValuePDCP_SNlength18 = 151; +/* +id-UplinkPacketLossRate ProtocolIE-ID ::= 274 +*/ + +constexpr int64_t id_UplinkPacketLossRate = 274; +/* +id-V2XServicesAuthorized ProtocolIE-ID ::= 176 +*/ + +constexpr int64_t id_V2XServicesAuthorized = 176; +/* +id-WLANMeasurementConfiguration ProtocolIE-ID ::= 304 +*/ + +constexpr int64_t id_WLANMeasurementConfiguration = 304; +/* +id-WT-UE-ContextKeptIndicator ProtocolIE-ID ::= 183 +*/ + +constexpr int64_t id_WT_UE_ContextKeptIndicator = 183; +/* +id-X2RemovalThreshold ProtocolIE-ID ::= 169 +*/ + +constexpr int64_t id_X2RemovalThreshold = 169; +/* +id-cellActivation ProcedureCode ::= 15 +*/ + +constexpr int64_t id_cellActivation = 15; +/* +id-dL-Forwarding ProtocolIE-ID ::= 306 +*/ + +constexpr int64_t id_dL_Forwarding = 306; +/* +id-dLPDCPSnLength ProtocolIE-ID ::= 311 +*/ + +constexpr int64_t id_dLPDCPSnLength = 311; +/* +id-dataForwardingAddressIndication ProcedureCode ::= 44 +*/ + +constexpr int64_t id_dataForwardingAddressIndication = 44; +/* +id-duplicationActivation ProtocolIE-ID ::= 315 +*/ + +constexpr int64_t id_duplicationActivation = 315; +/* +id-eARFCNExtension ProtocolIE-ID ::= 94 +*/ + +constexpr int64_t id_eARFCNExtension = 94; +/* +id-eNBConfigurationUpdate ProcedureCode ::= 8 +*/ + +constexpr int64_t id_eNBConfigurationUpdate = 8; +/* +id-eUTRANRCellResourceCoordination ProcedureCode ::= 41 +*/ + +constexpr int64_t id_eUTRANRCellResourceCoordination = 41; +/* +id-endcCellActivation ProcedureCode ::= 39 +*/ + +constexpr int64_t id_endcCellActivation = 39; +/* +id-endcConfigurationUpdate ProcedureCode ::= 37 +*/ + +constexpr int64_t id_endcConfigurationUpdate = 37; +/* +id-endcPartialReset ProcedureCode ::= 40 +*/ + +constexpr int64_t id_endcPartialReset = 40; +/* +id-endcX2Removal ProcedureCode ::= 43 +*/ + +constexpr int64_t id_endcX2Removal = 43; +/* +id-endcX2Setup ProcedureCode ::= 36 +*/ + +constexpr int64_t id_endcX2Setup = 36; +/* +id-enhancedRNTP ProtocolIE-ID ::= 148 +*/ + +constexpr int64_t id_enhancedRNTP = 148; +/* +id-errorIndication ProcedureCode ::= 3 +*/ + +constexpr int64_t id_errorIndication = 3; +/* +id-extended-e-RAB-GuaranteedBitrateDL ProtocolIE-ID ::= 198 +*/ + +constexpr int64_t id_extended_e_RAB_GuaranteedBitrateDL = 198; +/* +id-extended-e-RAB-GuaranteedBitrateUL ProtocolIE-ID ::= 199 +*/ + +constexpr int64_t id_extended_e_RAB_GuaranteedBitrateUL = 199; +/* +id-extended-e-RAB-MaximumBitrateDL ProtocolIE-ID ::= 196 +*/ + +constexpr int64_t id_extended_e_RAB_MaximumBitrateDL = 196; +/* +id-extended-e-RAB-MaximumBitrateUL ProtocolIE-ID ::= 197 +*/ + +constexpr int64_t id_extended_e_RAB_MaximumBitrateUL = 197; +/* +id-extended-uEaggregateMaximumBitRateDownlink ProtocolIE-ID ::= 200 +*/ + +constexpr int64_t id_extended_uEaggregateMaximumBitRateDownlink = 200; +/* +id-extended-uEaggregateMaximumBitRateUplink ProtocolIE-ID ::= 201 +*/ + +constexpr int64_t id_extended_uEaggregateMaximumBitRateUplink = 201; +/* +id-gNBStatusIndication ProcedureCode ::= 45 +*/ + +constexpr int64_t id_gNBStatusIndication = 45; +/* +id-handoverCancel ProcedureCode ::= 1 +*/ + +constexpr int64_t id_handoverCancel = 1; +/* +id-handoverPreparation ProcedureCode ::= 0 +*/ + +constexpr int64_t id_handoverPreparation = 0; +/* +id-handoverReport ProcedureCode ::= 14 +*/ + +constexpr int64_t id_handoverReport = 14; +/* +id-lCID ProtocolIE-ID ::= 314 +*/ + +constexpr int64_t id_lCID = 314; +/* +id-loadIndication ProcedureCode ::= 2 +*/ + +constexpr int64_t id_loadIndication = 2; +/* +id-meNBinitiatedSeNBModificationPreparation ProcedureCode ::= 21 +*/ + +constexpr int64_t id_meNBinitiatedSeNBModificationPreparation = 21; +/* +id-meNBinitiatedSeNBRelease ProcedureCode ::= 23 +*/ + +constexpr int64_t id_meNBinitiatedSeNBRelease = 23; +/* +id-meNBinitiatedSgNBModificationPreparation ProcedureCode ::= 29 +*/ + +constexpr int64_t id_meNBinitiatedSgNBModificationPreparation = 29; +/* +id-meNBinitiatedSgNBRelease ProcedureCode ::= 31 +*/ + +constexpr int64_t id_meNBinitiatedSgNBRelease = 31; +/* +id-mobilitySettingsChange ProcedureCode ::= 12 +*/ + +constexpr int64_t id_mobilitySettingsChange = 12; +/* +id-new-drb-ID-req ProtocolIE-ID ::= 325 +*/ + +constexpr int64_t id_new_drb_ID_req = 325; +/* +id-privateMessage ProcedureCode ::= 11 +*/ + +constexpr int64_t id_privateMessage = 11; +/* +id-rLFIndication ProcedureCode ::= 13 +*/ + +constexpr int64_t id_rLFIndication = 13; +/* +id-rRCTransfer ProcedureCode ::= 35 +*/ + +constexpr int64_t id_rRCTransfer = 35; +/* +id-reset ProcedureCode ::= 7 +*/ + +constexpr int64_t id_reset = 7; +/* +id-resourceStatusReporting ProcedureCode ::= 10 +*/ + +constexpr int64_t id_resourceStatusReporting = 10; +/* +id-resourceStatusReportingInitiation ProcedureCode ::= 9 +*/ + +constexpr int64_t id_resourceStatusReportingInitiation = 9; +/* +id-resumeID ProtocolIE-ID ::= 172 +*/ + +constexpr int64_t id_resumeID = 172; +/* +id-retrieveUEContext ProcedureCode ::= 26 +*/ + +constexpr int64_t id_retrieveUEContext = 26; +/* +id-seNBAdditionPreparation ProcedureCode ::= 19 +*/ + +constexpr int64_t id_seNBAdditionPreparation = 19; +/* +id-seNBCounterCheck ProcedureCode ::= 25 +*/ + +constexpr int64_t id_seNBCounterCheck = 25; +/* +id-seNBReconfigurationCompletion ProcedureCode ::= 20 +*/ + +constexpr int64_t id_seNBReconfigurationCompletion = 20; +/* +id-seNBinitiatedSeNBModification ProcedureCode ::= 22 +*/ + +constexpr int64_t id_seNBinitiatedSeNBModification = 22; +/* +id-seNBinitiatedSeNBRelease ProcedureCode ::= 24 +*/ + +constexpr int64_t id_seNBinitiatedSeNBRelease = 24; +/* +id-secondaryRATDataUsageReport ProcedureCode ::= 38 +*/ + +constexpr int64_t id_secondaryRATDataUsageReport = 38; +/* +id-secondarymeNBULGTPTEIDatPDCP ProtocolIE-ID ::= 313 +*/ + +constexpr int64_t id_secondarymeNBULGTPTEIDatPDCP = 313; +/* +id-secondarysgNBDLGTPTEIDatPDCP ProtocolIE-ID ::= 312 +*/ + +constexpr int64_t id_secondarysgNBDLGTPTEIDatPDCP = 312; +/* +id-serviceType ProtocolIE-ID ::= 276 +*/ + +constexpr int64_t id_serviceType = 276; +/* +id-sgNBAdditionPreparation ProcedureCode ::= 27 +*/ + +constexpr int64_t id_sgNBAdditionPreparation = 27; +/* +id-sgNBChange ProcedureCode ::= 34 +*/ + +constexpr int64_t id_sgNBChange = 34; +/* +id-sgNBCounterCheck ProcedureCode ::= 33 +*/ + +constexpr int64_t id_sgNBCounterCheck = 33; +/* +id-sgNBReconfigurationCompletion ProcedureCode ::= 28 +*/ + +constexpr int64_t id_sgNBReconfigurationCompletion = 28; +/* +id-sgNBinitiatedSgNBModification ProcedureCode ::= 30 +*/ + +constexpr int64_t id_sgNBinitiatedSgNBModification = 30; +/* +id-sgNBinitiatedSgNBRelease ProcedureCode ::= 32 +*/ + +constexpr int64_t id_sgNBinitiatedSgNBRelease = 32; +/* +id-snStatusTransfer ProcedureCode ::= 4 +*/ + +constexpr int64_t id_snStatusTransfer = 4; +/* +id-uEContextRelease ProcedureCode ::= 5 +*/ + +constexpr int64_t id_uEContextRelease = 5; +/* +id-uL-GTPtunnelEndpoint ProtocolIE-ID ::= 185 +*/ + +constexpr int64_t id_uL_GTPtunnelEndpoint = 185; +/* +id-uLpDCPSnLength ProtocolIE-ID ::= 302 +*/ + +constexpr int64_t id_uLpDCPSnLength = 302; +/* +id-x2APMessage ProtocolIE-ID ::= 102 +*/ + +constexpr int64_t id_x2APMessage = 102; +/* +id-x2APMessageTransfer ProcedureCode ::= 17 +*/ + +constexpr int64_t id_x2APMessageTransfer = 17; +/* +id-x2Release ProcedureCode ::= 16 +*/ + +constexpr int64_t id_x2Release = 16; +/* +id-x2Removal ProcedureCode ::= 18 +*/ + +constexpr int64_t id_x2Removal = 18; +/* +id-x2Setup ProcedureCode ::= 6 +*/ + +constexpr int64_t id_x2Setup = 6; +/* +maxCSIProcess INTEGER ::= 4 +*/ + +constexpr int64_t maxCSIProcess = 4; +/* +maxCSIReport INTEGER ::= 2 +*/ + +constexpr int64_t maxCSIReport = 2; +/* +maxCellReport INTEGER ::= 9 +*/ + +constexpr int64_t maxCellReport = 9; +/* +maxCellineNB INTEGER ::= 256 +*/ + +constexpr int64_t maxCellineNB = 256; +/* +maxCellinengNB INTEGER ::= 16384 +*/ + +constexpr int64_t maxCellinengNB = 16384; +/* +maxEARFCN INTEGER ::= 65535 +*/ + +constexpr int64_t maxEARFCN = 65535; +/* +maxEARFCNPlusOne INTEGER ::= 65536 +*/ + +constexpr int64_t maxEARFCNPlusOne = 65536; +/* +maxFailedMeasObjects INTEGER ::= 32 +*/ + +constexpr int64_t maxFailedMeasObjects = 32; +/* +maxInterfaces INTEGER ::= 16 +*/ + +constexpr int64_t maxInterfaces = 16; +/* +maxNrOfErrors INTEGER ::= 256 +*/ + +constexpr int64_t maxNrOfErrors = 256; +/* +maxPools INTEGER ::= 16 +*/ + +constexpr int64_t maxPools = 16; +/* +maxSubband INTEGER ::= 14 +*/ + +constexpr int64_t maxSubband = 14; +/* +maxUEReport INTEGER ::= 128 +*/ + +constexpr int64_t maxUEReport = 128; +/* +maxUEsinengNBDU INTEGER ::= 8192 +*/ + +constexpr int64_t maxUEsinengNBDU = 8192; +/* +maxnoNRcellsSpectrumSharingWithE-UTRA INTEGER ::= 64 +*/ + +constexpr int64_t maxnoNRcellsSpectrumSharingWithE_UTRA = 64; +/* +maxnoofBPLMNs INTEGER ::= 6 +*/ + +constexpr int64_t maxnoofBPLMNs = 6; +/* +maxnoofBands INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofBands = 16; +/* +maxnoofBearers INTEGER ::= 256 +*/ + +constexpr int64_t maxnoofBearers = 256; +/* +maxnoofBluetoothName INTEGER ::= 4 +*/ + +constexpr int64_t maxnoofBluetoothName = 4; +/* +maxnoofCellIDforMDT INTEGER ::= 32 +*/ + +constexpr int64_t maxnoofCellIDforMDT = 32; +/* +maxnoofCellIDforQMC INTEGER ::= 32 +*/ + +constexpr int64_t maxnoofCellIDforQMC = 32; +/* +maxnoofCells INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofCells = 16; +/* +maxnoofCoMPCells INTEGER ::= 32 +*/ + +constexpr int64_t maxnoofCoMPCells = 32; +/* +maxnoofCoMPHypothesisSet INTEGER ::= 256 +*/ + +constexpr int64_t maxnoofCoMPHypothesisSet = 256; +/* +maxnoofEPLMNs INTEGER ::= 15 +*/ + +constexpr int64_t maxnoofEPLMNs = 15; +/* +maxnoofEPLMNsPlusOne INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofEPLMNsPlusOne = 16; +/* +maxnoofForbLACs INTEGER ::= 4096 +*/ + +constexpr int64_t maxnoofForbLACs = 4096; +/* +maxnoofForbTACs INTEGER ::= 4096 +*/ + +constexpr int64_t maxnoofForbTACs = 4096; +/* +maxnoofMBMSServiceAreaIdentities INTEGER ::= 256 +*/ + +constexpr int64_t maxnoofMBMSServiceAreaIdentities = 256; +/* +maxnoofMBSFN INTEGER ::= 8 +*/ + +constexpr int64_t maxnoofMBSFN = 8; +/* +maxnoofMDTPLMNs INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofMDTPLMNs = 16; +/* +maxnoofNeighbours INTEGER ::= 512 +*/ + +constexpr int64_t maxnoofNeighbours = 512; +/* +maxnoofNrCellBands INTEGER ::= 32 +*/ + +constexpr int64_t maxnoofNrCellBands = 32; +/* +maxnoofPA INTEGER ::= 3 +*/ + +constexpr int64_t maxnoofPA = 3; +/* +maxnoofPDCP-SN INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofPDCP_SN = 16; +/* +maxnoofPLMNforQMC INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofPLMNforQMC = 16; +/* +maxnoofPRBs INTEGER ::= 110 +*/ + +constexpr int64_t maxnoofPRBs = 110; +/* +maxnoofProtectedResourcePatterns INTEGER ::= 16 +*/ + +constexpr int64_t maxnoofProtectedResourcePatterns = 16; +/* +maxnoofTAforMDT INTEGER ::= 8 +*/ + +constexpr int64_t maxnoofTAforMDT = 8; +/* +maxnoofTAforQMC INTEGER ::= 8 +*/ + +constexpr int64_t maxnoofTAforQMC = 8; +/* +maxnoofWLANName INTEGER ::= 4 +*/ + +constexpr int64_t maxnoofWLANName = 4; +/* +maxnooftimeperiods INTEGER ::= 2 +*/ + +constexpr int64_t maxnooftimeperiods = 2; +/* +maxofNRNeighbours INTEGER ::= 1024 +*/ + +constexpr int64_t maxofNRNeighbours = 1024; +/* +newmaxEARFCN INTEGER ::= 262143 +*/ + +constexpr int64_t newmaxEARFCN = 262143; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-Containers.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-Containers.hpp new file mode 100644 index 0000000..09545bf --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-Containers.hpp @@ -0,0 +1,700 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-CommonDataTypes.hpp" + +/* +X2AP-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} +*/ + +struct X2AP_PRIVATE_IES +{ + struct id_t : PrivateIE_ID + { + static constexpr const char* name() {return "id_t";} + using parent_t = PrivateIE_ID; + + }; + struct criticality_t : Criticality + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = Criticality; + + }; + struct presence_t : Presence + { + static constexpr const char* name() {return "presence_t";} + using parent_t = Presence; + + }; + +}; +/* +PrivateIE-Field {X2AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id X2AP-PRIVATE-IES.&id ({IEsSetParam}), + criticality X2AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value X2AP-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} +*/ + +template +struct PrivateIE_Field : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "PrivateIE-Field";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct id_t : IEsSetParam::id_t + { + static constexpr const char* name() {return "id_t";} + using parent_t = typename IEsSetParam::id_t; + template bool decode(V& v, PrivateIE_Field const& c) + { + return IEsSetParam::id_t::decode(v); + }; + template bool encode(V& v, PrivateIE_Field const& c) const + { + return IEsSetParam::id_t::encode(v); + }; + }; + id_t& ref_id() {return id;} + id_t const& ref_id() const {return id;} + struct criticality_t : IEsSetParam::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename IEsSetParam::criticality_t; + template bool decode(V& v, PrivateIE_Field const& c) + { + return IEsSetParam::criticality_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, PrivateIE_Field const& c) const + { + return IEsSetParam::criticality_t::encode(c.id.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : IEsSetParam::Value_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename IEsSetParam::Value_t; + template bool decode(V& v, PrivateIE_Field const& c) + { + return IEsSetParam::Value_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, PrivateIE_Field const& c) const + { + return IEsSetParam::Value_t::encode(c.id.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(id); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(id); + v(criticality); + v(value); + + }; + void clear() + { + id.clear(); + criticality.clear(); + value.clear(); + + }; + private: + id_t id; + criticality_t criticality; + value_t value; + +}; +/* +PrivateIE-Container {X2AP-PRIVATE-IES : IEsSetParam} ::= + SEQUENCE (SIZE (1..maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} +*/ + +template +struct PrivateIE_Container_elm : PrivateIE_Field +{ + static constexpr const char* name() {return "PrivateIE_Container_elm";} + using parent_t = PrivateIE_Field; + +}; +template +struct PrivateIE_Container : asn::sequenceof > +{ + static constexpr const char* name() {return "PrivateIE-Container";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +X2AP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} +*/ + +struct X2AP_PROTOCOL_EXTENSION +{ + struct id_t : ProtocolIE_ID + { + static constexpr const char* name() {return "id_t";} + using parent_t = ProtocolIE_ID; + + }; + struct criticality_t : Criticality + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = Criticality; + + }; + struct presence_t : Presence + { + static constexpr const char* name() {return "presence_t";} + using parent_t = Presence; + + }; + +}; +/* +ProtocolExtensionField {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality X2AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue X2AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} +*/ + +template +struct ProtocolExtensionField : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "ProtocolExtensionField";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct id_t : ExtensionSetParam::id_t + { + static constexpr const char* name() {return "id_t";} + using parent_t = typename ExtensionSetParam::id_t; + template bool decode(V& v, ProtocolExtensionField const& c) + { + return ExtensionSetParam::id_t::decode(v); + }; + template bool encode(V& v, ProtocolExtensionField const& c) const + { + return ExtensionSetParam::id_t::encode(v); + }; + }; + id_t& ref_id() {return id;} + id_t const& ref_id() const {return id;} + struct criticality_t : ExtensionSetParam::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename ExtensionSetParam::criticality_t; + template bool decode(V& v, ProtocolExtensionField const& c) + { + return ExtensionSetParam::criticality_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolExtensionField const& c) const + { + return ExtensionSetParam::criticality_t::encode(c.id.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct extensionValue_t : ExtensionSetParam::Extension_t + { + static constexpr const char* name() {return "extensionValue_t";} + using parent_t = typename ExtensionSetParam::Extension_t; + template bool decode(V& v, ProtocolExtensionField const& c) + { + return ExtensionSetParam::Extension_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolExtensionField const& c) const + { + return ExtensionSetParam::Extension_t::encode(c.id.get_index(), v); + }; + }; + extensionValue_t& ref_extensionValue() {return extensionValue;} + extensionValue_t const& ref_extensionValue() const {return extensionValue;} + template void decode(V& v) + { + v(id); + v(criticality); + v(extensionValue); + + }; + template void encode(V& v) const + { + v(id); + v(criticality); + v(extensionValue); + + }; + void clear() + { + id.clear(); + criticality.clear(); + extensionValue.clear(); + + }; + private: + id_t id; + criticality_t criticality; + extensionValue_t extensionValue; + +}; +/* +ProtocolExtensionContainer {X2AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} +*/ + +template +struct ProtocolExtensionContainer_elm : ProtocolExtensionField +{ + static constexpr const char* name() {return "ProtocolExtensionContainer_elm";} + using parent_t = ProtocolExtensionField; + +}; +template +struct ProtocolExtensionContainer : asn::sequenceof > +{ + static constexpr const char* name() {return "ProtocolExtensionContainer";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +X2AP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} +*/ + +struct X2AP_PROTOCOL_IES +{ + struct id_t : ProtocolIE_ID + { + static constexpr const char* name() {return "id_t";} + using parent_t = ProtocolIE_ID; + + }; + struct criticality_t : Criticality + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = Criticality; + + }; + struct presence_t : Presence + { + static constexpr const char* name() {return "presence_t";} + using parent_t = Presence; + + }; + +}; +/* +ProtocolIE-Field {X2AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality X2AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value X2AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} +*/ + +template +struct ProtocolIE_Field : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "ProtocolIE-Field";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct id_t : IEsSetParam::id_t + { + static constexpr const char* name() {return "id_t";} + using parent_t = typename IEsSetParam::id_t; + template bool decode(V& v, ProtocolIE_Field const& c) + { + return IEsSetParam::id_t::decode(v); + }; + template bool encode(V& v, ProtocolIE_Field const& c) const + { + return IEsSetParam::id_t::encode(v); + }; + }; + id_t& ref_id() {return id;} + id_t const& ref_id() const {return id;} + struct criticality_t : IEsSetParam::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename IEsSetParam::criticality_t; + template bool decode(V& v, ProtocolIE_Field const& c) + { + return IEsSetParam::criticality_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_Field const& c) const + { + return IEsSetParam::criticality_t::encode(c.id.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : IEsSetParam::Value_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename IEsSetParam::Value_t; + template bool decode(V& v, ProtocolIE_Field const& c) + { + return IEsSetParam::Value_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_Field const& c) const + { + return IEsSetParam::Value_t::encode(c.id.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(id); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(id); + v(criticality); + v(value); + + }; + void clear() + { + id.clear(); + criticality.clear(); + value.clear(); + + }; + private: + id_t id; + criticality_t criticality; + value_t value; + +}; +/* +ProtocolIE-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} +*/ + +template +struct ProtocolIE_Container_elm : ProtocolIE_Field +{ + static constexpr const char* name() {return "ProtocolIE_Container_elm";} + using parent_t = ProtocolIE_Field; + +}; +template +struct ProtocolIE_Container : asn::sequenceof > +{ + static constexpr const char* name() {return "ProtocolIE-Container";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-Container {{IEsSetParam}} +*/ + +template +struct ProtocolIE_ContainerList_elm : ProtocolIE_Container +{ + static constexpr const char* name() {return "ProtocolIE_ContainerList_elm";} + using parent_t = ProtocolIE_Container; + +}; +template +struct ProtocolIE_ContainerList : asn::sequenceof > +{ + static constexpr const char* name() {return "ProtocolIE-ContainerList";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +X2AP-PROTOCOL-IES-PAIR ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &firstCriticality Criticality, + &FirstValue, + &secondCriticality Criticality, + &SecondValue, + &presence Presence +} +WITH SYNTAX { + ID &id + FIRST CRITICALITY &firstCriticality + FIRST TYPE &FirstValue + SECOND CRITICALITY &secondCriticality + SECOND TYPE &SecondValue + PRESENCE &presence +} +*/ + +struct X2AP_PROTOCOL_IES_PAIR +{ + struct id_t : ProtocolIE_ID + { + static constexpr const char* name() {return "id_t";} + using parent_t = ProtocolIE_ID; + + }; + struct firstCriticality_t : Criticality + { + static constexpr const char* name() {return "firstCriticality_t";} + using parent_t = Criticality; + + }; + struct secondCriticality_t : Criticality + { + static constexpr const char* name() {return "secondCriticality_t";} + using parent_t = Criticality; + + }; + struct presence_t : Presence + { + static constexpr const char* name() {return "presence_t";} + using parent_t = Presence; + + }; + +}; +/* +ProtocolIE-FieldPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE { + id X2AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}), + firstCriticality X2AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}), + firstValue X2AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}), + secondCriticality X2AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}), + secondValue X2AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id}) +} +*/ + +template +struct ProtocolIE_FieldPair : asn::sequence<5, 0, false, 0> +{ + static constexpr const char* name() {return "ProtocolIE-FieldPair";} + using parent_t = asn::sequence<5, 0, false, 0>; + struct id_t : IEsSetParam::id_t + { + static constexpr const char* name() {return "id_t";} + using parent_t = typename IEsSetParam::id_t; + template bool decode(V& v, ProtocolIE_FieldPair const& c) + { + return IEsSetParam::id_t::decode(v); + }; + template bool encode(V& v, ProtocolIE_FieldPair const& c) const + { + return IEsSetParam::id_t::encode(v); + }; + }; + id_t& ref_id() {return id;} + id_t const& ref_id() const {return id;} + struct firstCriticality_t : IEsSetParam::firstCriticality_t + { + static constexpr const char* name() {return "firstCriticality_t";} + using parent_t = typename IEsSetParam::firstCriticality_t; + template bool decode(V& v, ProtocolIE_FieldPair const& c) + { + return IEsSetParam::firstCriticality_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_FieldPair const& c) const + { + return IEsSetParam::firstCriticality_t::encode(c.id.get_index(), v); + }; + }; + firstCriticality_t& ref_firstCriticality() {return firstCriticality;} + firstCriticality_t const& ref_firstCriticality() const {return firstCriticality;} + struct firstValue_t : IEsSetParam::FirstValue_t + { + static constexpr const char* name() {return "firstValue_t";} + using parent_t = typename IEsSetParam::FirstValue_t; + template bool decode(V& v, ProtocolIE_FieldPair const& c) + { + return IEsSetParam::FirstValue_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_FieldPair const& c) const + { + return IEsSetParam::FirstValue_t::encode(c.id.get_index(), v); + }; + }; + firstValue_t& ref_firstValue() {return firstValue;} + firstValue_t const& ref_firstValue() const {return firstValue;} + struct secondCriticality_t : IEsSetParam::secondCriticality_t + { + static constexpr const char* name() {return "secondCriticality_t";} + using parent_t = typename IEsSetParam::secondCriticality_t; + template bool decode(V& v, ProtocolIE_FieldPair const& c) + { + return IEsSetParam::secondCriticality_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_FieldPair const& c) const + { + return IEsSetParam::secondCriticality_t::encode(c.id.get_index(), v); + }; + }; + secondCriticality_t& ref_secondCriticality() {return secondCriticality;} + secondCriticality_t const& ref_secondCriticality() const {return secondCriticality;} + struct secondValue_t : IEsSetParam::SecondValue_t + { + static constexpr const char* name() {return "secondValue_t";} + using parent_t = typename IEsSetParam::SecondValue_t; + template bool decode(V& v, ProtocolIE_FieldPair const& c) + { + return IEsSetParam::SecondValue_t::decode(c.id.get_index(), v); + }; + template bool encode(V& v, ProtocolIE_FieldPair const& c) const + { + return IEsSetParam::SecondValue_t::encode(c.id.get_index(), v); + }; + }; + secondValue_t& ref_secondValue() {return secondValue;} + secondValue_t const& ref_secondValue() const {return secondValue;} + template void decode(V& v) + { + v(id); + v(firstCriticality); + v(firstValue); + v(secondCriticality); + v(secondValue); + + }; + template void encode(V& v) const + { + v(id); + v(firstCriticality); + v(firstValue); + v(secondCriticality); + v(secondValue); + + }; + void clear() + { + id.clear(); + firstCriticality.clear(); + firstValue.clear(); + secondCriticality.clear(); + secondValue.clear(); + + }; + private: + id_t id; + firstCriticality_t firstCriticality; + firstValue_t firstValue; + secondCriticality_t secondCriticality; + secondValue_t secondValue; + +}; +/* +ProtocolIE-ContainerPair {X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-FieldPair {{IEsSetParam}} +*/ + +template +struct ProtocolIE_ContainerPair_elm : ProtocolIE_FieldPair +{ + static constexpr const char* name() {return "ProtocolIE_ContainerPair_elm";} + using parent_t = ProtocolIE_FieldPair; + +}; +template +struct ProtocolIE_ContainerPair : asn::sequenceof > +{ + static constexpr const char* name() {return "ProtocolIE-ContainerPair";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, X2AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-ContainerPair {{IEsSetParam}} +*/ + +template +struct ProtocolIE_ContainerPairList_elm : ProtocolIE_ContainerPair +{ + static constexpr const char* name() {return "ProtocolIE_ContainerPairList_elm";} + using parent_t = ProtocolIE_ContainerPair; + +}; +template +struct ProtocolIE_ContainerPairList : asn::sequenceof > +{ + static constexpr const char* name() {return "ProtocolIE-ContainerPairList";} + using parent_t = asn::sequenceof >; + using constraint_t = asn::constraints>; + +}; +/* +ProtocolIE-Single-Container {X2AP-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} +*/ + +template +struct ProtocolIE_Single_Container : ProtocolIE_Field +{ + static constexpr const char* name() {return "ProtocolIE-Single-Container";} + using parent_t = ProtocolIE_Field; + +}; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-IEs.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-IEs.hpp new file mode 100644 index 0000000..f056563 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-IEs.hpp @@ -0,0 +1,35962 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-Constants.hpp" +#include "X2AP-CommonDataTypes.hpp" +#include "X2AP-Containers.hpp" + +/* +DL-ABS-status::= INTEGER (0..100) +*/ + +struct DL_ABS_status : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DL-ABS-status";} + using parent_t = asn::integer<>; + +}; + +/* +UsableABSInformationFDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UsableABSInformationFDD_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UsableABSInformationFDD ::= SEQUENCE { + usable-abs-pattern-info BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { {UsableABSInformationFDD-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UsableABSInformationFDD : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "UsableABSInformationFDD";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct usable_abs_pattern_info_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "usable_abs_pattern_info_t";} + using parent_t = asn::bstring<>; + + }; + + usable_abs_pattern_info_t& ref_usable_abs_pattern_info() {return usable_abs_pattern_info;} + usable_abs_pattern_info_t const& ref_usable_abs_pattern_info() const {return usable_abs_pattern_info;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(usable_abs_pattern_info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(usable_abs_pattern_info); + v(iE_Extensions); + + }; + void clear() + { + usable_abs_pattern_info.clear(); + iE_Extensions.clear(); + + }; + private: + usable_abs_pattern_info_t usable_abs_pattern_info; + iE_Extensions_t iE_Extensions; + +}; +/* +UsableABSInformationTDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UsableABSInformationTDD_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UsableABSInformationTDD ::= SEQUENCE { + usaable-abs-pattern-info BIT STRING (SIZE(1..70, ...)), + iE-Extensions ProtocolExtensionContainer { {UsableABSInformationTDD-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UsableABSInformationTDD : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "UsableABSInformationTDD";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct usaable_abs_pattern_info_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "usaable_abs_pattern_info_t";} + using parent_t = asn::bstring<>; + + }; + + usaable_abs_pattern_info_t& ref_usaable_abs_pattern_info() {return usaable_abs_pattern_info;} + usaable_abs_pattern_info_t const& ref_usaable_abs_pattern_info() const {return usaable_abs_pattern_info;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(usaable_abs_pattern_info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(usaable_abs_pattern_info); + v(iE_Extensions); + + }; + void clear() + { + usaable_abs_pattern_info.clear(); + iE_Extensions.clear(); + + }; + private: + usaable_abs_pattern_info_t usaable_abs_pattern_info; + iE_Extensions_t iE_Extensions; + +}; +/* +UsableABSInformation ::= CHOICE { + fdd UsableABSInformationFDD, + tdd UsableABSInformationTDD, + ... +} +*/ + +struct UsableABSInformation : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "UsableABSInformation";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~UsableABSInformation() {clear();} + struct fdd_t : UsableABSInformationFDD + { + static constexpr const char* name() {return "fdd_t";} + using parent_t = UsableABSInformationFDD; + + }; + struct tdd_t : UsableABSInformationTDD + { + static constexpr const char* name() {return "tdd_t";} + using parent_t = UsableABSInformationTDD; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + fdd_t& select_fdd() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + fdd_t const* get_fdd() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tdd_t& select_tdd() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tdd_t const* get_tdd() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(fdd_t)]; + char dummy2[sizeof(tdd_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ABS-Status-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ABS_Status_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ABS-Status ::= SEQUENCE { + dL-ABS-status DL-ABS-status, + usableABSInformation UsableABSInformation, + iE-Extensions ProtocolExtensionContainer { {ABS-Status-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ABS_Status : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ABS-Status";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct dL_ABS_status_t : DL_ABS_status + { + static constexpr const char* name() {return "dL_ABS_status_t";} + using parent_t = DL_ABS_status; + + }; + dL_ABS_status_t& ref_dL_ABS_status() {return dL_ABS_status;} + dL_ABS_status_t const& ref_dL_ABS_status() const {return dL_ABS_status;} + struct usableABSInformation_t : UsableABSInformation + { + static constexpr const char* name() {return "usableABSInformation_t";} + using parent_t = UsableABSInformation; + + }; + usableABSInformation_t& ref_usableABSInformation() {return usableABSInformation;} + usableABSInformation_t const& ref_usableABSInformation() const {return usableABSInformation;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dL_ABS_status); + v(usableABSInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dL_ABS_status); + v(usableABSInformation); + v(iE_Extensions); + + }; + void clear() + { + dL_ABS_status.clear(); + usableABSInformation.clear(); + iE_Extensions.clear(); + + }; + private: + dL_ABS_status_t dL_ABS_status; + usableABSInformation_t usableABSInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +ABSInformationFDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ABSInformationFDD_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ABSInformationFDD ::= SEQUENCE { + abs-pattern-info BIT STRING (SIZE(40)), + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + measurement-subset BIT STRING (SIZE(40)), + iE-Extensions ProtocolExtensionContainer { {ABSInformationFDD-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ABSInformationFDD : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "ABSInformationFDD";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct abs_pattern_info_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "abs_pattern_info_t";} + using parent_t = asn::bstring<>; + + }; + + abs_pattern_info_t& ref_abs_pattern_info() {return abs_pattern_info;} + abs_pattern_info_t const& ref_abs_pattern_info() const {return abs_pattern_info;} + struct numberOfCellSpecificAntennaPorts_t : asn::enumerated<3, 0, true> + { + static constexpr const char* name() {return "numberOfCellSpecificAntennaPorts_t";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + one + ,two + ,four + } index_t; + + }; + + numberOfCellSpecificAntennaPorts_t& ref_numberOfCellSpecificAntennaPorts() {return numberOfCellSpecificAntennaPorts;} + numberOfCellSpecificAntennaPorts_t const& ref_numberOfCellSpecificAntennaPorts() const {return numberOfCellSpecificAntennaPorts;} + struct measurement_subset_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "measurement_subset_t";} + using parent_t = asn::bstring<>; + + }; + + measurement_subset_t& ref_measurement_subset() {return measurement_subset;} + measurement_subset_t const& ref_measurement_subset() const {return measurement_subset;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(abs_pattern_info); + v(numberOfCellSpecificAntennaPorts); + v(measurement_subset); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(abs_pattern_info); + v(numberOfCellSpecificAntennaPorts); + v(measurement_subset); + v(iE_Extensions); + + }; + void clear() + { + abs_pattern_info.clear(); + numberOfCellSpecificAntennaPorts.clear(); + measurement_subset.clear(); + iE_Extensions.clear(); + + }; + private: + abs_pattern_info_t abs_pattern_info; + numberOfCellSpecificAntennaPorts_t numberOfCellSpecificAntennaPorts; + measurement_subset_t measurement_subset; + iE_Extensions_t iE_Extensions; + +}; +/* +ABSInformationTDD-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ABSInformationTDD_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ABSInformationTDD ::= SEQUENCE { + abs-pattern-info BIT STRING (SIZE(1..70, ...)), + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + measurement-subset BIT STRING (SIZE(1..70, ...)), + iE-Extensions ProtocolExtensionContainer { {ABSInformationTDD-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ABSInformationTDD : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "ABSInformationTDD";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct abs_pattern_info_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "abs_pattern_info_t";} + using parent_t = asn::bstring<>; + + }; + + abs_pattern_info_t& ref_abs_pattern_info() {return abs_pattern_info;} + abs_pattern_info_t const& ref_abs_pattern_info() const {return abs_pattern_info;} + struct numberOfCellSpecificAntennaPorts_t : asn::enumerated<3, 0, true> + { + static constexpr const char* name() {return "numberOfCellSpecificAntennaPorts_t";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + one + ,two + ,four + } index_t; + + }; + + numberOfCellSpecificAntennaPorts_t& ref_numberOfCellSpecificAntennaPorts() {return numberOfCellSpecificAntennaPorts;} + numberOfCellSpecificAntennaPorts_t const& ref_numberOfCellSpecificAntennaPorts() const {return numberOfCellSpecificAntennaPorts;} + struct measurement_subset_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "measurement_subset_t";} + using parent_t = asn::bstring<>; + + }; + + measurement_subset_t& ref_measurement_subset() {return measurement_subset;} + measurement_subset_t const& ref_measurement_subset() const {return measurement_subset;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(abs_pattern_info); + v(numberOfCellSpecificAntennaPorts); + v(measurement_subset); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(abs_pattern_info); + v(numberOfCellSpecificAntennaPorts); + v(measurement_subset); + v(iE_Extensions); + + }; + void clear() + { + abs_pattern_info.clear(); + numberOfCellSpecificAntennaPorts.clear(); + measurement_subset.clear(); + iE_Extensions.clear(); + + }; + private: + abs_pattern_info_t abs_pattern_info; + numberOfCellSpecificAntennaPorts_t numberOfCellSpecificAntennaPorts; + measurement_subset_t measurement_subset; + iE_Extensions_t iE_Extensions; + +}; +/* +ABSInformation ::= CHOICE { + fdd ABSInformationFDD, + tdd ABSInformationTDD, + abs-inactive NULL, + ... +} +*/ + +struct ABSInformation : asn::choice<3, 0, true> +{ + static constexpr const char* name() {return "ABSInformation";} + using parent_t = asn::choice<3, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 4;} + void set_unknown() { set_index(4); } + ~ABSInformation() {clear();} + struct fdd_t : ABSInformationFDD + { + static constexpr const char* name() {return "fdd_t";} + using parent_t = ABSInformationFDD; + + }; + struct tdd_t : ABSInformationTDD + { + static constexpr const char* name() {return "tdd_t";} + using parent_t = ABSInformationTDD; + + }; + struct abs_inactive_t : asn::nulltype + { + static constexpr const char* name() {return "abs_inactive_t";} + using parent_t = asn::nulltype; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + fdd_t& select_fdd() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + fdd_t const* get_fdd() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tdd_t& select_tdd() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tdd_t const* get_tdd() const { if(get_index() == 2) { return &var.as();} return nullptr; } + abs_inactive_t& select_abs_inactive() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + abs_inactive_t const* get_abs_inactive() const { if(get_index() == 3) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(fdd_t)]; + char dummy2[sizeof(tdd_t)]; + char dummy3[sizeof(abs_inactive_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +Key-eNodeB-Star ::= BIT STRING (SIZE(256)) +*/ + +struct Key_eNodeB_Star : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Key-eNodeB-Star";} + using parent_t = asn::bstring<>; + +}; + +/* +NextHopChainingCount ::= INTEGER (0..7) +*/ + +struct NextHopChainingCount : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "NextHopChainingCount";} + using parent_t = asn::integer<>; + +}; + +/* +AS-SecurityInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct AS_SecurityInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +AS-SecurityInformation ::= SEQUENCE { + key-eNodeB-star Key-eNodeB-Star, + nextHopChainingCount NextHopChainingCount, + iE-Extensions ProtocolExtensionContainer { {AS-SecurityInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct AS_SecurityInformation : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "AS-SecurityInformation";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct key_eNodeB_star_t : Key_eNodeB_Star + { + static constexpr const char* name() {return "key_eNodeB_star_t";} + using parent_t = Key_eNodeB_Star; + + }; + key_eNodeB_star_t& ref_key_eNodeB_star() {return key_eNodeB_star;} + key_eNodeB_star_t const& ref_key_eNodeB_star() const {return key_eNodeB_star;} + struct nextHopChainingCount_t : NextHopChainingCount + { + static constexpr const char* name() {return "nextHopChainingCount_t";} + using parent_t = NextHopChainingCount; + + }; + nextHopChainingCount_t& ref_nextHopChainingCount() {return nextHopChainingCount;} + nextHopChainingCount_t const& ref_nextHopChainingCount() const {return nextHopChainingCount;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(key_eNodeB_star); + v(nextHopChainingCount); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(key_eNodeB_star); + v(nextHopChainingCount); + v(iE_Extensions); + + }; + void clear() + { + key_eNodeB_star.clear(); + nextHopChainingCount.clear(); + iE_Extensions.clear(); + + }; + private: + key_eNodeB_star_t key_eNodeB_star; + nextHopChainingCount_t nextHopChainingCount; + iE_Extensions_t iE_Extensions; + +}; +/* +ActivationID ::= INTEGER (0..255) +*/ + +struct ActivationID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ActivationID";} + using parent_t = asn::integer<>; + +}; + +/* +AdditionalSpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ssp9, + ... +} +*/ + +struct AdditionalSpecialSubframePatterns : asn::enumerated<10, 0, true> +{ + static constexpr const char* name() {return "AdditionalSpecialSubframePatterns";} + using parent_t = asn::enumerated<10, 0, true>; + typedef enum { + ssp0 + ,ssp1 + ,ssp2 + ,ssp3 + ,ssp4 + ,ssp5 + ,ssp6 + ,ssp7 + ,ssp8 + ,ssp9 + } index_t; + +}; + +/* +CyclicPrefixDL ::= ENUMERATED { + normal, + extended, + ... +} +*/ + +struct CyclicPrefixDL : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "CyclicPrefixDL";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + normal + ,extended + } index_t; + +}; + +/* +CyclicPrefixUL ::= ENUMERATED { + normal, + extended, + ... +} +*/ + +struct CyclicPrefixUL : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "CyclicPrefixUL";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + normal + ,extended + } index_t; + +}; + +/* +AdditionalSpecialSubframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct AdditionalSpecialSubframe_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +AdditionalSpecialSubframe-Info ::= SEQUENCE { + additionalspecialSubframePatterns AdditionalSpecialSubframePatterns, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {AdditionalSpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct AdditionalSpecialSubframe_Info : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "AdditionalSpecialSubframe-Info";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct additionalspecialSubframePatterns_t : AdditionalSpecialSubframePatterns + { + static constexpr const char* name() {return "additionalspecialSubframePatterns_t";} + using parent_t = AdditionalSpecialSubframePatterns; + + }; + additionalspecialSubframePatterns_t& ref_additionalspecialSubframePatterns() {return additionalspecialSubframePatterns;} + additionalspecialSubframePatterns_t const& ref_additionalspecialSubframePatterns() const {return additionalspecialSubframePatterns;} + struct cyclicPrefixDL_t : CyclicPrefixDL + { + static constexpr const char* name() {return "cyclicPrefixDL_t";} + using parent_t = CyclicPrefixDL; + + }; + cyclicPrefixDL_t& ref_cyclicPrefixDL() {return cyclicPrefixDL;} + cyclicPrefixDL_t const& ref_cyclicPrefixDL() const {return cyclicPrefixDL;} + struct cyclicPrefixUL_t : CyclicPrefixUL + { + static constexpr const char* name() {return "cyclicPrefixUL_t";} + using parent_t = CyclicPrefixUL; + + }; + cyclicPrefixUL_t& ref_cyclicPrefixUL() {return cyclicPrefixUL;} + cyclicPrefixUL_t const& ref_cyclicPrefixUL() const {return cyclicPrefixUL;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(additionalspecialSubframePatterns); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(additionalspecialSubframePatterns); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + void clear() + { + additionalspecialSubframePatterns.clear(); + cyclicPrefixDL.clear(); + cyclicPrefixUL.clear(); + iE_Extensions.clear(); + + }; + private: + additionalspecialSubframePatterns_t additionalspecialSubframePatterns; + cyclicPrefixDL_t cyclicPrefixDL; + cyclicPrefixUL_t cyclicPrefixUL; + iE_Extensions_t iE_Extensions; + +}; +/* +AdditionalSpecialSubframePatternsExtension ::= ENUMERATED { + ssp10, + ... +} +*/ + +struct AdditionalSpecialSubframePatternsExtension : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "AdditionalSpecialSubframePatternsExtension";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + ssp10 + } index_t; + +}; + +/* +AdditionalSpecialSubframeExtension-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct AdditionalSpecialSubframeExtension_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +AdditionalSpecialSubframeExtension-Info ::= SEQUENCE { + additionalspecialSubframePatternsExtension AdditionalSpecialSubframePatternsExtension, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {AdditionalSpecialSubframeExtension-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct AdditionalSpecialSubframeExtension_Info : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "AdditionalSpecialSubframeExtension-Info";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct additionalspecialSubframePatternsExtension_t : AdditionalSpecialSubframePatternsExtension + { + static constexpr const char* name() {return "additionalspecialSubframePatternsExtension_t";} + using parent_t = AdditionalSpecialSubframePatternsExtension; + + }; + additionalspecialSubframePatternsExtension_t& ref_additionalspecialSubframePatternsExtension() {return additionalspecialSubframePatternsExtension;} + additionalspecialSubframePatternsExtension_t const& ref_additionalspecialSubframePatternsExtension() const {return additionalspecialSubframePatternsExtension;} + struct cyclicPrefixDL_t : CyclicPrefixDL + { + static constexpr const char* name() {return "cyclicPrefixDL_t";} + using parent_t = CyclicPrefixDL; + + }; + cyclicPrefixDL_t& ref_cyclicPrefixDL() {return cyclicPrefixDL;} + cyclicPrefixDL_t const& ref_cyclicPrefixDL() const {return cyclicPrefixDL;} + struct cyclicPrefixUL_t : CyclicPrefixUL + { + static constexpr const char* name() {return "cyclicPrefixUL_t";} + using parent_t = CyclicPrefixUL; + + }; + cyclicPrefixUL_t& ref_cyclicPrefixUL() {return cyclicPrefixUL;} + cyclicPrefixUL_t const& ref_cyclicPrefixUL() const {return cyclicPrefixUL;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(additionalspecialSubframePatternsExtension); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(additionalspecialSubframePatternsExtension); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + void clear() + { + additionalspecialSubframePatternsExtension.clear(); + cyclicPrefixDL.clear(); + cyclicPrefixUL.clear(); + iE_Extensions.clear(); + + }; + private: + additionalspecialSubframePatternsExtension_t additionalspecialSubframePatternsExtension; + cyclicPrefixDL_t cyclicPrefixDL; + cyclicPrefixUL_t cyclicPrefixUL; + iE_Extensions_t iE_Extensions; + +}; +/* +AerialUEsubscriptionInformation ::= ENUMERATED { + allowed, + not-allowed, + ... +} +*/ + +struct AerialUEsubscriptionInformation : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "AerialUEsubscriptionInformation";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + allowed + ,not_allowed + } index_t; + +}; + +/* +PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) +*/ + +struct PriorityLevel : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PriorityLevel";} + using parent_t = asn::integer<>; + enum {spare = 0, highest = 1, lowest = 14, no_priority = 15}; + +}; + +/* +Pre-emptionCapability ::= ENUMERATED { + shall-not-trigger-pre-emption, + may-trigger-pre-emption +} +*/ + +struct Pre_emptionCapability : asn::enumerated<2, 0, false> +{ + static constexpr const char* name() {return "Pre-emptionCapability";} + using parent_t = asn::enumerated<2, 0, false>; + typedef enum { + shall_not_trigger_pre_emption + ,may_trigger_pre_emption + } index_t; + +}; + +/* +Pre-emptionVulnerability ::= ENUMERATED { + not-pre-emptable, + pre-emptable +} +*/ + +struct Pre_emptionVulnerability : asn::enumerated<2, 0, false> +{ + static constexpr const char* name() {return "Pre-emptionVulnerability";} + using parent_t = asn::enumerated<2, 0, false>; + typedef enum { + not_pre_emptable + ,pre_emptable + } index_t; + +}; + +/* +AllocationAndRetentionPriority-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct AllocationAndRetentionPriority_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +AllocationAndRetentionPriority ::= SEQUENCE { + priorityLevel PriorityLevel, + pre-emptionCapability Pre-emptionCapability, + pre-emptionVulnerability Pre-emptionVulnerability, + iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct AllocationAndRetentionPriority : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "AllocationAndRetentionPriority";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct priorityLevel_t : PriorityLevel + { + static constexpr const char* name() {return "priorityLevel_t";} + using parent_t = PriorityLevel; + + }; + priorityLevel_t& ref_priorityLevel() {return priorityLevel;} + priorityLevel_t const& ref_priorityLevel() const {return priorityLevel;} + struct pre_emptionCapability_t : Pre_emptionCapability + { + static constexpr const char* name() {return "pre_emptionCapability_t";} + using parent_t = Pre_emptionCapability; + + }; + pre_emptionCapability_t& ref_pre_emptionCapability() {return pre_emptionCapability;} + pre_emptionCapability_t const& ref_pre_emptionCapability() const {return pre_emptionCapability;} + struct pre_emptionVulnerability_t : Pre_emptionVulnerability + { + static constexpr const char* name() {return "pre_emptionVulnerability_t";} + using parent_t = Pre_emptionVulnerability; + + }; + pre_emptionVulnerability_t& ref_pre_emptionVulnerability() {return pre_emptionVulnerability;} + pre_emptionVulnerability_t const& ref_pre_emptionVulnerability() const {return pre_emptionVulnerability;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(priorityLevel); + v(pre_emptionCapability); + v(pre_emptionVulnerability); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(priorityLevel); + v(pre_emptionCapability); + v(pre_emptionVulnerability); + v(iE_Extensions); + + }; + void clear() + { + priorityLevel.clear(); + pre_emptionCapability.clear(); + pre_emptionVulnerability.clear(); + iE_Extensions.clear(); + + }; + private: + priorityLevel_t priorityLevel; + pre_emptionCapability_t pre_emptionCapability; + pre_emptionVulnerability_t pre_emptionVulnerability; + iE_Extensions_t iE_Extensions; + +}; +/* +PLMN-Identity ::= OCTET STRING (SIZE(3)) +*/ + +struct PLMN_Identity : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PLMN-Identity";} + using parent_t = asn::ostring<>; + +}; + +/* +EUTRANCellIdentifier ::= BIT STRING (SIZE (28)) +*/ + +struct EUTRANCellIdentifier : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "EUTRANCellIdentifier";} + using parent_t = asn::bstring<>; + +}; + +/* +ECGI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ECGI_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ECGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + eUTRANcellIdentifier EUTRANCellIdentifier, + iE-Extensions ProtocolExtensionContainer { {ECGI-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ECGI : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ECGI";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct eUTRANcellIdentifier_t : EUTRANCellIdentifier + { + static constexpr const char* name() {return "eUTRANcellIdentifier_t";} + using parent_t = EUTRANCellIdentifier; + + }; + eUTRANcellIdentifier_t& ref_eUTRANcellIdentifier() {return eUTRANcellIdentifier;} + eUTRANcellIdentifier_t const& ref_eUTRANcellIdentifier() const {return eUTRANcellIdentifier;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(eUTRANcellIdentifier); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(eUTRANcellIdentifier); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + eUTRANcellIdentifier.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + eUTRANcellIdentifier_t eUTRANcellIdentifier; + iE_Extensions_t iE_Extensions; + +}; +/* +CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF ECGI +*/ + +struct CellIdListforMDT_elm : ECGI +{ + static constexpr const char* name() {return "CellIdListforMDT_elm";} + using parent_t = ECGI; + +}; +struct CellIdListforMDT : asn::sequenceof +{ + static constexpr const char* name() {return "CellIdListforMDT";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellBasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CellBasedMDT_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellBasedMDT::= SEQUENCE { + cellIdListforMDT CellIdListforMDT, + iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CellBasedMDT : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "CellBasedMDT";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct cellIdListforMDT_t : CellIdListforMDT + { + static constexpr const char* name() {return "cellIdListforMDT_t";} + using parent_t = CellIdListforMDT; + + }; + cellIdListforMDT_t& ref_cellIdListforMDT() {return cellIdListforMDT;} + cellIdListforMDT_t const& ref_cellIdListforMDT() const {return cellIdListforMDT;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cellIdListforMDT); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cellIdListforMDT); + v(iE_Extensions); + + }; + void clear() + { + cellIdListforMDT.clear(); + iE_Extensions.clear(); + + }; + private: + cellIdListforMDT_t cellIdListforMDT; + iE_Extensions_t iE_Extensions; + +}; +/* +TAC ::= OCTET STRING (SIZE (2)) +*/ + +struct TAC : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "TAC";} + using parent_t = asn::ostring<>; + +}; + +/* +TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC +*/ + +struct TAListforMDT_elm : TAC +{ + static constexpr const char* name() {return "TAListforMDT_elm";} + using parent_t = TAC; + +}; +struct TAListforMDT : asn::sequenceof +{ + static constexpr const char* name() {return "TAListforMDT";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +TABasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TABasedMDT_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TABasedMDT::= SEQUENCE { + tAListforMDT TAListforMDT, + iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TABasedMDT : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "TABasedMDT";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct tAListforMDT_t : TAListforMDT + { + static constexpr const char* name() {return "tAListforMDT_t";} + using parent_t = TAListforMDT; + + }; + tAListforMDT_t& ref_tAListforMDT() {return tAListforMDT;} + tAListforMDT_t const& ref_tAListforMDT() const {return tAListforMDT;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(tAListforMDT); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(tAListforMDT); + v(iE_Extensions); + + }; + void clear() + { + tAListforMDT.clear(); + iE_Extensions.clear(); + + }; + private: + tAListforMDT_t tAListforMDT; + iE_Extensions_t iE_Extensions; + +}; +/* +TAI-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TAI_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TAI-Item ::= SEQUENCE { + tAC TAC, + pLMN-Identity PLMN-Identity, + iE-Extensions ProtocolExtensionContainer { {TAI-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TAI_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "TAI-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct tAC_t : TAC + { + static constexpr const char* name() {return "tAC_t";} + using parent_t = TAC; + + }; + tAC_t& ref_tAC() {return tAC;} + tAC_t const& ref_tAC() const {return tAC;} + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(tAC); + v(pLMN_Identity); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(tAC); + v(pLMN_Identity); + v(iE_Extensions); + + }; + void clear() + { + tAC.clear(); + pLMN_Identity.clear(); + iE_Extensions.clear(); + + }; + private: + tAC_t tAC; + pLMN_Identity_t pLMN_Identity; + iE_Extensions_t iE_Extensions; + +}; +/* +TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI-Item +*/ + +struct TAIListforMDT_elm : TAI_Item +{ + static constexpr const char* name() {return "TAIListforMDT_elm";} + using parent_t = TAI_Item; + +}; +struct TAIListforMDT : asn::sequenceof +{ + static constexpr const char* name() {return "TAIListforMDT";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +TAIBasedMDT-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TAIBasedMDT_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TAIBasedMDT ::= SEQUENCE { + tAIListforMDT TAIListforMDT, + iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TAIBasedMDT : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "TAIBasedMDT";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct tAIListforMDT_t : TAIListforMDT + { + static constexpr const char* name() {return "tAIListforMDT_t";} + using parent_t = TAIListforMDT; + + }; + tAIListforMDT_t& ref_tAIListforMDT() {return tAIListforMDT;} + tAIListforMDT_t const& ref_tAIListforMDT() const {return tAIListforMDT;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(tAIListforMDT); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(tAIListforMDT); + v(iE_Extensions); + + }; + void clear() + { + tAIListforMDT.clear(); + iE_Extensions.clear(); + + }; + private: + tAIListforMDT_t tAIListforMDT; + iE_Extensions_t iE_Extensions; + +}; +/* +AreaScopeOfMDT ::= CHOICE { + cellBased CellBasedMDT, + tABased TABasedMDT, + pLMNWide NULL, + ..., + tAIBased TAIBasedMDT +} +*/ + +struct AreaScopeOfMDT : asn::choice<4, 1, true> +{ + static constexpr const char* name() {return "AreaScopeOfMDT";} + using parent_t = asn::choice<4, 1, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~AreaScopeOfMDT() {clear();} + struct cellBased_t : CellBasedMDT + { + static constexpr const char* name() {return "cellBased_t";} + using parent_t = CellBasedMDT; + + }; + struct tABased_t : TABasedMDT + { + static constexpr const char* name() {return "tABased_t";} + using parent_t = TABasedMDT; + + }; + struct pLMNWide_t : asn::nulltype + { + static constexpr const char* name() {return "pLMNWide_t";} + using parent_t = asn::nulltype; + + }; + struct tAIBased_t : TAIBasedMDT + { + static constexpr const char* name() {return "tAIBased_t";} + using parent_t = TAIBasedMDT; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + cellBased_t& select_cellBased() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + cellBased_t const* get_cellBased() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tABased_t& select_tABased() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tABased_t const* get_tABased() const { if(get_index() == 2) { return &var.as();} return nullptr; } + pLMNWide_t& select_pLMNWide() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + pLMNWide_t const* get_pLMNWide() const { if(get_index() == 3) { return &var.as();} return nullptr; } + tAIBased_t& select_tAIBased() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + tAIBased_t const* get_tAIBased() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(cellBased_t)]; + char dummy2[sizeof(tABased_t)]; + char dummy3[sizeof(pLMNWide_t)]; + char dummy4[sizeof(tAIBased_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +CellIdListforQMC ::= SEQUENCE (SIZE(1..maxnoofCellIDforQMC)) OF ECGI +*/ + +struct CellIdListforQMC_elm : ECGI +{ + static constexpr const char* name() {return "CellIdListforQMC_elm";} + using parent_t = ECGI; + +}; +struct CellIdListforQMC : asn::sequenceof +{ + static constexpr const char* name() {return "CellIdListforQMC";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CellBasedQMC_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellBasedQMC::= SEQUENCE { + cellIdListforQMC CellIdListforQMC, + iE-Extensions ProtocolExtensionContainer { {CellBasedQMC-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CellBasedQMC : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "CellBasedQMC";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct cellIdListforQMC_t : CellIdListforQMC + { + static constexpr const char* name() {return "cellIdListforQMC_t";} + using parent_t = CellIdListforQMC; + + }; + cellIdListforQMC_t& ref_cellIdListforQMC() {return cellIdListforQMC;} + cellIdListforQMC_t const& ref_cellIdListforQMC() const {return cellIdListforQMC;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cellIdListforQMC); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cellIdListforQMC); + v(iE_Extensions); + + }; + void clear() + { + cellIdListforQMC.clear(); + iE_Extensions.clear(); + + }; + private: + cellIdListforQMC_t cellIdListforQMC; + iE_Extensions_t iE_Extensions; + +}; +/* +TAListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAC +*/ + +struct TAListforQMC_elm : TAC +{ + static constexpr const char* name() {return "TAListforQMC_elm";} + using parent_t = TAC; + +}; +struct TAListforQMC : asn::sequenceof +{ + static constexpr const char* name() {return "TAListforQMC";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +TABasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TABasedQMC_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TABasedQMC ::= SEQUENCE { + tAListforQMC TAListforQMC, + iE-Extensions ProtocolExtensionContainer { {TABasedQMC-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TABasedQMC : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "TABasedQMC";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct tAListforQMC_t : TAListforQMC + { + static constexpr const char* name() {return "tAListforQMC_t";} + using parent_t = TAListforQMC; + + }; + tAListforQMC_t& ref_tAListforQMC() {return tAListforQMC;} + tAListforQMC_t const& ref_tAListforQMC() const {return tAListforQMC;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(tAListforQMC); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(tAListforQMC); + v(iE_Extensions); + + }; + void clear() + { + tAListforQMC.clear(); + iE_Extensions.clear(); + + }; + private: + tAListforQMC_t tAListforQMC; + iE_Extensions_t iE_Extensions; + +}; +/* +TAIListforQMC ::= SEQUENCE (SIZE(1..maxnoofTAforQMC)) OF TAI-Item +*/ + +struct TAIListforQMC_elm : TAI_Item +{ + static constexpr const char* name() {return "TAIListforQMC_elm";} + using parent_t = TAI_Item; + +}; +struct TAIListforQMC : asn::sequenceof +{ + static constexpr const char* name() {return "TAIListforQMC";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +TAIBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TAIBasedQMC_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TAIBasedQMC ::= SEQUENCE { + tAIListforQMC TAIListforQMC, + iE-Extensions ProtocolExtensionContainer { {TAIBasedQMC-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TAIBasedQMC : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "TAIBasedQMC";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct tAIListforQMC_t : TAIListforQMC + { + static constexpr const char* name() {return "tAIListforQMC_t";} + using parent_t = TAIListforQMC; + + }; + tAIListforQMC_t& ref_tAIListforQMC() {return tAIListforQMC;} + tAIListforQMC_t const& ref_tAIListforQMC() const {return tAIListforQMC;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(tAIListforQMC); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(tAIListforQMC); + v(iE_Extensions); + + }; + void clear() + { + tAIListforQMC.clear(); + iE_Extensions.clear(); + + }; + private: + tAIListforQMC_t tAIListforQMC; + iE_Extensions_t iE_Extensions; + +}; +/* +PLMNListforQMC ::= SEQUENCE (SIZE(1..maxnoofPLMNforQMC)) OF PLMN-Identity +*/ + +struct PLMNListforQMC_elm : PLMN_Identity +{ + static constexpr const char* name() {return "PLMNListforQMC_elm";} + using parent_t = PLMN_Identity; + +}; +struct PLMNListforQMC : asn::sequenceof +{ + static constexpr const char* name() {return "PLMNListforQMC";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +PLMNAreaBasedQMC-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct PLMNAreaBasedQMC_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +PLMNAreaBasedQMC ::= SEQUENCE { + plmnListforQMC PLMNListforQMC, + iE-Extensions ProtocolExtensionContainer { {PLMNAreaBasedQMC-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct PLMNAreaBasedQMC : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "PLMNAreaBasedQMC";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct plmnListforQMC_t : PLMNListforQMC + { + static constexpr const char* name() {return "plmnListforQMC_t";} + using parent_t = PLMNListforQMC; + + }; + plmnListforQMC_t& ref_plmnListforQMC() {return plmnListforQMC;} + plmnListforQMC_t const& ref_plmnListforQMC() const {return plmnListforQMC;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(plmnListforQMC); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(plmnListforQMC); + v(iE_Extensions); + + }; + void clear() + { + plmnListforQMC.clear(); + iE_Extensions.clear(); + + }; + private: + plmnListforQMC_t plmnListforQMC; + iE_Extensions_t iE_Extensions; + +}; +/* +AreaScopeOfQMC ::= CHOICE { + cellBased CellBasedQMC, + tABased TABasedQMC, + tAIBased TAIBasedQMC, + pLMNAreaBased PLMNAreaBasedQMC, + ... +} +*/ + +struct AreaScopeOfQMC : asn::choice<4, 0, true> +{ + static constexpr const char* name() {return "AreaScopeOfQMC";} + using parent_t = asn::choice<4, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~AreaScopeOfQMC() {clear();} + struct cellBased_t : CellBasedQMC + { + static constexpr const char* name() {return "cellBased_t";} + using parent_t = CellBasedQMC; + + }; + struct tABased_t : TABasedQMC + { + static constexpr const char* name() {return "tABased_t";} + using parent_t = TABasedQMC; + + }; + struct tAIBased_t : TAIBasedQMC + { + static constexpr const char* name() {return "tAIBased_t";} + using parent_t = TAIBasedQMC; + + }; + struct pLMNAreaBased_t : PLMNAreaBasedQMC + { + static constexpr const char* name() {return "pLMNAreaBased_t";} + using parent_t = PLMNAreaBasedQMC; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + cellBased_t& select_cellBased() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + cellBased_t const* get_cellBased() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tABased_t& select_tABased() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tABased_t const* get_tABased() const { if(get_index() == 2) { return &var.as();} return nullptr; } + tAIBased_t& select_tAIBased() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + tAIBased_t const* get_tAIBased() const { if(get_index() == 3) { return &var.as();} return nullptr; } + pLMNAreaBased_t& select_pLMNAreaBased() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + pLMNAreaBased_t const* get_pLMNAreaBased() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(cellBased_t)]; + char dummy2[sizeof(tABased_t)]; + char dummy3[sizeof(tAIBased_t)]; + char dummy4[sizeof(pLMNAreaBased_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +FreqBandIndicator ::= INTEGER (1..256, ...) +*/ + +struct FreqBandIndicator : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "FreqBandIndicator";} + using parent_t = asn::integer<>; + +}; + +/* +BandInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct BandInfo_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +BandInfo ::= SEQUENCE { + freqBandIndicator FreqBandIndicator, + iE-Extensions ProtocolExtensionContainer { {BandInfo-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct BandInfo : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "BandInfo";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct freqBandIndicator_t : FreqBandIndicator + { + static constexpr const char* name() {return "freqBandIndicator_t";} + using parent_t = FreqBandIndicator; + + }; + freqBandIndicator_t& ref_freqBandIndicator() {return freqBandIndicator;} + freqBandIndicator_t const& ref_freqBandIndicator() const {return freqBandIndicator;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(freqBandIndicator); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(freqBandIndicator); + v(iE_Extensions); + + }; + void clear() + { + freqBandIndicator.clear(); + iE_Extensions.clear(); + + }; + private: + freqBandIndicator_t freqBandIndicator; + iE_Extensions_t iE_Extensions; + +}; +/* +BandwidthReducedSI::= ENUMERATED { + scheduled, + ... +} +*/ + +struct BandwidthReducedSI : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "BandwidthReducedSI";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + scheduled + } index_t; + +}; + +/* +BearerType ::= ENUMERATED { + non-IP, + ... +} +*/ + +struct BearerType : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "BearerType";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + non_IP + } index_t; + +}; + +/* +BenefitMetric ::= INTEGER (-101..100, ...) +*/ + +struct BenefitMetric : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "BenefitMetric";} + using parent_t = asn::integer<>; + +}; + +/* +BitRate ::= INTEGER (0..10000000000) +*/ + +struct BitRate : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "BitRate";} + using parent_t = asn::integer<>; + +}; + +/* +BluetoothMeasConfig::= ENUMERATED {setup,...} +*/ + +struct BluetoothMeasConfig : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "BluetoothMeasConfig";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + setup + } index_t; + +}; + +/* +BluetoothName ::= OCTET STRING (SIZE (1..248)) +*/ + +struct BluetoothName : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "BluetoothName";} + using parent_t = asn::ostring<>; + +}; + +/* +BluetoothMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofBluetoothName)) OF BluetoothName +*/ + +struct BluetoothMeasConfigNameList_elm : BluetoothName +{ + static constexpr const char* name() {return "BluetoothMeasConfigNameList_elm";} + using parent_t = BluetoothName; + +}; +struct BluetoothMeasConfigNameList : asn::sequenceof +{ + static constexpr const char* name() {return "BluetoothMeasConfigNameList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +BluetoothMeasurementConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct BluetoothMeasurementConfiguration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +BluetoothMeasurementConfiguration ::= SEQUENCE { + bluetoothMeasConfig BluetoothMeasConfig, + bluetoothMeasConfigNameList BluetoothMeasConfigNameList OPTIONAL, + bt-rssi ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {BluetoothMeasurementConfiguration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct BluetoothMeasurementConfiguration : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "BluetoothMeasurementConfiguration";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct bluetoothMeasConfig_t : BluetoothMeasConfig + { + static constexpr const char* name() {return "bluetoothMeasConfig_t";} + using parent_t = BluetoothMeasConfig; + + }; + bluetoothMeasConfig_t& ref_bluetoothMeasConfig() {return bluetoothMeasConfig;} + bluetoothMeasConfig_t const& ref_bluetoothMeasConfig() const {return bluetoothMeasConfig;} + struct bluetoothMeasConfigNameList_t : BluetoothMeasConfigNameList + { + static constexpr const char* name() {return "bluetoothMeasConfigNameList_t";} + using parent_t = BluetoothMeasConfigNameList; + static constexpr bool optional = true; + + }; + bluetoothMeasConfigNameList_t& set_bluetoothMeasConfigNameList() { bluetoothMeasConfigNameList.setpresent(true); return bluetoothMeasConfigNameList;} + bluetoothMeasConfigNameList_t const* get_bluetoothMeasConfigNameList() const {return bluetoothMeasConfigNameList.is_valid() ? &bluetoothMeasConfigNameList : nullptr;} + struct bt_rssi_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "bt_rssi_t";} + using parent_t = asn::enumerated<1, 0, true>; + static constexpr bool optional = true; + typedef enum { + True + } index_t; + + }; + + bt_rssi_t& set_bt_rssi() { bt_rssi.setpresent(true); return bt_rssi;} + bt_rssi_t const* get_bt_rssi() const {return bt_rssi.is_valid() ? &bt_rssi : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(bluetoothMeasConfig); + v(bluetoothMeasConfigNameList); + v(bt_rssi); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(bluetoothMeasConfig); + v(bluetoothMeasConfigNameList); + v(bt_rssi); + v(iE_Extensions); + + }; + void clear() + { + bluetoothMeasConfig.clear(); + bluetoothMeasConfigNameList.clear(); + bt_rssi.clear(); + iE_Extensions.clear(); + + }; + private: + bluetoothMeasConfig_t bluetoothMeasConfig; + bluetoothMeasConfigNameList_t bluetoothMeasConfigNameList; + bt_rssi_t bt_rssi; + iE_Extensions_t iE_Extensions; + +}; +/* +BroadcastPLMNs-Item ::= SEQUENCE (SIZE(1..maxnoofBPLMNs)) OF PLMN-Identity +*/ + +struct BroadcastPLMNs_Item_elm : PLMN_Identity +{ + static constexpr const char* name() {return "BroadcastPLMNs_Item_elm";} + using parent_t = PLMN_Identity; + +}; +struct BroadcastPLMNs_Item : asn::sequenceof +{ + static constexpr const char* name() {return "BroadcastPLMNs-Item";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CNTypeRestrictionsItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CNTypeRestrictionsItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CNTypeRestrictionsItem ::= SEQUENCE { + plmn-Id PLMN-Identity, + cn-type ENUMERATED {fiveGC-forbidden, ...}, + iE-Extensions ProtocolExtensionContainer { {CNTypeRestrictionsItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CNTypeRestrictionsItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CNTypeRestrictionsItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct plmn_Id_t : PLMN_Identity + { + static constexpr const char* name() {return "plmn_Id_t";} + using parent_t = PLMN_Identity; + + }; + plmn_Id_t& ref_plmn_Id() {return plmn_Id;} + plmn_Id_t const& ref_plmn_Id() const {return plmn_Id;} + struct cn_type_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "cn_type_t";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + fiveGC_forbidden + } index_t; + + }; + + cn_type_t& ref_cn_type() {return cn_type;} + cn_type_t const& ref_cn_type() const {return cn_type;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(plmn_Id); + v(cn_type); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(plmn_Id); + v(cn_type); + v(iE_Extensions); + + }; + void clear() + { + plmn_Id.clear(); + cn_type.clear(); + iE_Extensions.clear(); + + }; + private: + plmn_Id_t plmn_Id; + cn_type_t cn_type; + iE_Extensions_t iE_Extensions; + +}; +/* +CNTypeRestrictions ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF CNTypeRestrictionsItem +*/ + +struct CNTypeRestrictions_elm : CNTypeRestrictionsItem +{ + static constexpr const char* name() {return "CNTypeRestrictions_elm";} + using parent_t = CNTypeRestrictionsItem; + +}; +struct CNTypeRestrictions : asn::sequenceof +{ + static constexpr const char* name() {return "CNTypeRestrictions";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +PDCP-SNExtended ::= INTEGER (0..32767) +*/ + +struct PDCP_SNExtended : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PDCP-SNExtended";} + using parent_t = asn::integer<>; + +}; + +/* +HFNModified ::= INTEGER (0..131071) +*/ + +struct HFNModified : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "HFNModified";} + using parent_t = asn::integer<>; + +}; + +/* +COUNTValueExtended-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct COUNTValueExtended_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +COUNTValueExtended ::= SEQUENCE { + pDCP-SNExtended PDCP-SNExtended, + hFNModified HFNModified, + iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct COUNTValueExtended : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "COUNTValueExtended";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pDCP_SNExtended_t : PDCP_SNExtended + { + static constexpr const char* name() {return "pDCP_SNExtended_t";} + using parent_t = PDCP_SNExtended; + + }; + pDCP_SNExtended_t& ref_pDCP_SNExtended() {return pDCP_SNExtended;} + pDCP_SNExtended_t const& ref_pDCP_SNExtended() const {return pDCP_SNExtended;} + struct hFNModified_t : HFNModified + { + static constexpr const char* name() {return "hFNModified_t";} + using parent_t = HFNModified; + + }; + hFNModified_t& ref_hFNModified() {return hFNModified;} + hFNModified_t const& ref_hFNModified() const {return hFNModified;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pDCP_SNExtended); + v(hFNModified); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pDCP_SNExtended); + v(hFNModified); + v(iE_Extensions); + + }; + void clear() + { + pDCP_SNExtended.clear(); + hFNModified.clear(); + iE_Extensions.clear(); + + }; + private: + pDCP_SNExtended_t pDCP_SNExtended; + hFNModified_t hFNModified; + iE_Extensions_t iE_Extensions; + +}; +/* +PDCP-SN ::= INTEGER (0..4095) +*/ + +struct PDCP_SN : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PDCP-SN";} + using parent_t = asn::integer<>; + +}; + +/* +HFN ::= INTEGER (0..1048575) +*/ + +struct HFN : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "HFN";} + using parent_t = asn::integer<>; + +}; + +/* +COUNTvalue-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct COUNTvalue_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +COUNTvalue ::= SEQUENCE { + pDCP-SN PDCP-SN, + hFN HFN, + iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct COUNTvalue : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "COUNTvalue";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pDCP_SN_t : PDCP_SN + { + static constexpr const char* name() {return "pDCP_SN_t";} + using parent_t = PDCP_SN; + + }; + pDCP_SN_t& ref_pDCP_SN() {return pDCP_SN;} + pDCP_SN_t const& ref_pDCP_SN() const {return pDCP_SN;} + struct hFN_t : HFN + { + static constexpr const char* name() {return "hFN_t";} + using parent_t = HFN; + + }; + hFN_t& ref_hFN() {return hFN;} + hFN_t const& ref_hFN() const {return hFN;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pDCP_SN); + v(hFN); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pDCP_SN); + v(hFN); + v(iE_Extensions); + + }; + void clear() + { + pDCP_SN.clear(); + hFN.clear(); + iE_Extensions.clear(); + + }; + private: + pDCP_SN_t pDCP_SN; + hFN_t hFN; + iE_Extensions_t iE_Extensions; + +}; +/* +PDCP-SNlength18 ::= INTEGER (0..262143) +*/ + +struct PDCP_SNlength18 : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PDCP-SNlength18";} + using parent_t = asn::integer<>; + +}; + +/* +HFNforPDCP-SNlength18 ::= INTEGER (0..16383) +*/ + +struct HFNforPDCP_SNlength18 : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "HFNforPDCP-SNlength18";} + using parent_t = asn::integer<>; + +}; + +/* +COUNTvaluePDCP-SNlength18-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct COUNTvaluePDCP_SNlength18_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +COUNTvaluePDCP-SNlength18 ::= SEQUENCE { + pDCP-SNlength18 PDCP-SNlength18, + hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, + iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct COUNTvaluePDCP_SNlength18 : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "COUNTvaluePDCP-SNlength18";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pDCP_SNlength18_t : PDCP_SNlength18 + { + static constexpr const char* name() {return "pDCP_SNlength18_t";} + using parent_t = PDCP_SNlength18; + + }; + pDCP_SNlength18_t& ref_pDCP_SNlength18() {return pDCP_SNlength18;} + pDCP_SNlength18_t const& ref_pDCP_SNlength18() const {return pDCP_SNlength18;} + struct hFNforPDCP_SNlength18_t : HFNforPDCP_SNlength18 + { + static constexpr const char* name() {return "hFNforPDCP_SNlength18_t";} + using parent_t = HFNforPDCP_SNlength18; + + }; + hFNforPDCP_SNlength18_t& ref_hFNforPDCP_SNlength18() {return hFNforPDCP_SNlength18;} + hFNforPDCP_SNlength18_t const& ref_hFNforPDCP_SNlength18() const {return hFNforPDCP_SNlength18;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pDCP_SNlength18); + v(hFNforPDCP_SNlength18); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pDCP_SNlength18); + v(hFNforPDCP_SNlength18); + v(iE_Extensions); + + }; + void clear() + { + pDCP_SNlength18.clear(); + hFNforPDCP_SNlength18.clear(); + iE_Extensions.clear(); + + }; + private: + pDCP_SNlength18_t pDCP_SNlength18; + hFNforPDCP_SNlength18_t hFNforPDCP_SNlength18; + iE_Extensions_t iE_Extensions; + +}; +/* +CRNTI ::= BIT STRING (SIZE (16)) +*/ + +struct CRNTI : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "CRNTI";} + using parent_t = asn::bstring<>; + +}; + +/* +CSG-Id ::= BIT STRING (SIZE (27)) +*/ + +struct CSG_Id : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "CSG-Id";} + using parent_t = asn::bstring<>; + +}; + +/* +CSGMembershipStatus ::= ENUMERATED { + member, + not-member +} +*/ + +struct CSGMembershipStatus : asn::enumerated<2, 0, false> +{ + static constexpr const char* name() {return "CSGMembershipStatus";} + using parent_t = asn::enumerated<2, 0, false>; + typedef enum { + member + ,not_member + } index_t; + +}; + +/* +UEID ::= BIT STRING (SIZE (16)) +*/ + +struct UEID : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UEID";} + using parent_t = asn::bstring<>; + +}; + +/* +WidebandCQICodeword1::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + three-bitSpatialDifferentialCQI INTEGER (0..7, ...), + ... +} +*/ + +struct WidebandCQICodeword1 : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "WidebandCQICodeword1";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~WidebandCQICodeword1() {clear();} + struct four_bitCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "four_bitCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct three_bitSpatialDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "three_bitSpatialDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + four_bitCQI_t& select_four_bitCQI() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + four_bitCQI_t const* get_four_bitCQI() const { if(get_index() == 1) { return &var.as();} return nullptr; } + three_bitSpatialDifferentialCQI_t& select_three_bitSpatialDifferentialCQI() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + three_bitSpatialDifferentialCQI_t const* get_three_bitSpatialDifferentialCQI() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(four_bitCQI_t)]; + char dummy2[sizeof(three_bitSpatialDifferentialCQI_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +WidebandCQI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct WidebandCQI_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +WidebandCQI ::= SEQUENCE { + widebandCQICodeword0 INTEGER (0..15, ...), + widebandCQICodeword1 WidebandCQICodeword1 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {WidebandCQI-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct WidebandCQI : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "WidebandCQI";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct widebandCQICodeword0_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "widebandCQICodeword0_t";} + using parent_t = asn::integer<>; + + }; + + widebandCQICodeword0_t& ref_widebandCQICodeword0() {return widebandCQICodeword0;} + widebandCQICodeword0_t const& ref_widebandCQICodeword0() const {return widebandCQICodeword0;} + struct widebandCQICodeword1_t : WidebandCQICodeword1 + { + static constexpr const char* name() {return "widebandCQICodeword1_t";} + using parent_t = WidebandCQICodeword1; + static constexpr bool optional = true; + + }; + widebandCQICodeword1_t& set_widebandCQICodeword1() { widebandCQICodeword1.setpresent(true); return widebandCQICodeword1;} + widebandCQICodeword1_t const* get_widebandCQICodeword1() const {return widebandCQICodeword1.is_valid() ? &widebandCQICodeword1 : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(widebandCQICodeword0); + v(widebandCQICodeword1); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(widebandCQICodeword0); + v(widebandCQICodeword1); + v(iE_Extensions); + + }; + void clear() + { + widebandCQICodeword0.clear(); + widebandCQICodeword1.clear(); + iE_Extensions.clear(); + + }; + private: + widebandCQICodeword0_t widebandCQICodeword0; + widebandCQICodeword1_t widebandCQICodeword1; + iE_Extensions_t iE_Extensions; + +}; +/* +SubbandSize ::= ENUMERATED { + size2, + size3, + size4, + size6, + size8, + ... +} +*/ + +struct SubbandSize : asn::enumerated<5, 0, true> +{ + static constexpr const char* name() {return "SubbandSize";} + using parent_t = asn::enumerated<5, 0, true>; + typedef enum { + size2 + ,size3 + ,size4 + ,size6 + ,size8 + } index_t; + +}; + +/* +SubbandCQICodeword0 ::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + two-bitSubbandDifferentialCQI INTEGER (0..3, ...), + two-bitDifferentialCQI INTEGER (0..3, ...), + ... +} +*/ + +struct SubbandCQICodeword0 : asn::choice<3, 0, true> +{ + static constexpr const char* name() {return "SubbandCQICodeword0";} + using parent_t = asn::choice<3, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 4;} + void set_unknown() { set_index(4); } + ~SubbandCQICodeword0() {clear();} + struct four_bitCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "four_bitCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct two_bitSubbandDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "two_bitSubbandDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct two_bitDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "two_bitDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + four_bitCQI_t& select_four_bitCQI() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + four_bitCQI_t const* get_four_bitCQI() const { if(get_index() == 1) { return &var.as();} return nullptr; } + two_bitSubbandDifferentialCQI_t& select_two_bitSubbandDifferentialCQI() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + two_bitSubbandDifferentialCQI_t const* get_two_bitSubbandDifferentialCQI() const { if(get_index() == 2) { return &var.as();} return nullptr; } + two_bitDifferentialCQI_t& select_two_bitDifferentialCQI() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + two_bitDifferentialCQI_t const* get_two_bitDifferentialCQI() const { if(get_index() == 3) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(four_bitCQI_t)]; + char dummy2[sizeof(two_bitSubbandDifferentialCQI_t)]; + char dummy3[sizeof(two_bitDifferentialCQI_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +SubbandCQICodeword1 ::= CHOICE { + four-bitCQI INTEGER (0..15, ...), + three-bitSpatialDifferentialCQI INTEGER (0..7, ...), + two-bitSubbandDifferentialCQI INTEGER (0..3, ...), + two-bitDifferentialCQI INTEGER (0..3, ...), + ... +} +*/ + +struct SubbandCQICodeword1 : asn::choice<4, 0, true> +{ + static constexpr const char* name() {return "SubbandCQICodeword1";} + using parent_t = asn::choice<4, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~SubbandCQICodeword1() {clear();} + struct four_bitCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "four_bitCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct three_bitSpatialDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "three_bitSpatialDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct two_bitSubbandDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "two_bitSubbandDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + struct two_bitDifferentialCQI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "two_bitDifferentialCQI_t";} + using parent_t = asn::integer<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + four_bitCQI_t& select_four_bitCQI() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + four_bitCQI_t const* get_four_bitCQI() const { if(get_index() == 1) { return &var.as();} return nullptr; } + three_bitSpatialDifferentialCQI_t& select_three_bitSpatialDifferentialCQI() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + three_bitSpatialDifferentialCQI_t const* get_three_bitSpatialDifferentialCQI() const { if(get_index() == 2) { return &var.as();} return nullptr; } + two_bitSubbandDifferentialCQI_t& select_two_bitSubbandDifferentialCQI() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + two_bitSubbandDifferentialCQI_t const* get_two_bitSubbandDifferentialCQI() const { if(get_index() == 3) { return &var.as();} return nullptr; } + two_bitDifferentialCQI_t& select_two_bitDifferentialCQI() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + two_bitDifferentialCQI_t const* get_two_bitDifferentialCQI() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(four_bitCQI_t)]; + char dummy2[sizeof(three_bitSpatialDifferentialCQI_t)]; + char dummy3[sizeof(two_bitSubbandDifferentialCQI_t)]; + char dummy4[sizeof(two_bitDifferentialCQI_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +SubbandCQI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SubbandCQI_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SubbandCQI ::= SEQUENCE { + subbandCQICodeword0 SubbandCQICodeword0, + subbandCQICodeword1 SubbandCQICodeword1 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SubbandCQI-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SubbandCQI : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "SubbandCQI";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct subbandCQICodeword0_t : SubbandCQICodeword0 + { + static constexpr const char* name() {return "subbandCQICodeword0_t";} + using parent_t = SubbandCQICodeword0; + + }; + subbandCQICodeword0_t& ref_subbandCQICodeword0() {return subbandCQICodeword0;} + subbandCQICodeword0_t const& ref_subbandCQICodeword0() const {return subbandCQICodeword0;} + struct subbandCQICodeword1_t : SubbandCQICodeword1 + { + static constexpr const char* name() {return "subbandCQICodeword1_t";} + using parent_t = SubbandCQICodeword1; + static constexpr bool optional = true; + + }; + subbandCQICodeword1_t& set_subbandCQICodeword1() { subbandCQICodeword1.setpresent(true); return subbandCQICodeword1;} + subbandCQICodeword1_t const* get_subbandCQICodeword1() const {return subbandCQICodeword1.is_valid() ? &subbandCQICodeword1 : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(subbandCQICodeword0); + v(subbandCQICodeword1); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(subbandCQICodeword0); + v(subbandCQICodeword1); + v(iE_Extensions); + + }; + void clear() + { + subbandCQICodeword0.clear(); + subbandCQICodeword1.clear(); + iE_Extensions.clear(); + + }; + private: + subbandCQICodeword0_t subbandCQICodeword0; + subbandCQICodeword1_t subbandCQICodeword1; + iE_Extensions_t iE_Extensions; + +}; +/* +SubbandCQIItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SubbandCQIItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SubbandCQIItem ::= SEQUENCE { + subbandCQI SubbandCQI, + subbandIndex INTEGER (0..27,...), + iE-Extensions ProtocolExtensionContainer { {SubbandCQIItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SubbandCQIItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "SubbandCQIItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct subbandCQI_t : SubbandCQI + { + static constexpr const char* name() {return "subbandCQI_t";} + using parent_t = SubbandCQI; + + }; + subbandCQI_t& ref_subbandCQI() {return subbandCQI;} + subbandCQI_t const& ref_subbandCQI() const {return subbandCQI;} + struct subbandIndex_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "subbandIndex_t";} + using parent_t = asn::integer<>; + + }; + + subbandIndex_t& ref_subbandIndex() {return subbandIndex;} + subbandIndex_t const& ref_subbandIndex() const {return subbandIndex;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(subbandCQI); + v(subbandIndex); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(subbandCQI); + v(subbandIndex); + v(iE_Extensions); + + }; + void clear() + { + subbandCQI.clear(); + subbandIndex.clear(); + iE_Extensions.clear(); + + }; + private: + subbandCQI_t subbandCQI; + subbandIndex_t subbandIndex; + iE_Extensions_t iE_Extensions; + +}; +/* +SubbandCQIList ::= SEQUENCE (SIZE(1.. maxSubband)) OF SubbandCQIItem +*/ + +struct SubbandCQIList_elm : SubbandCQIItem +{ + static constexpr const char* name() {return "SubbandCQIList_elm";} + using parent_t = SubbandCQIItem; + +}; +struct SubbandCQIList : asn::sequenceof +{ + static constexpr const char* name() {return "SubbandCQIList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CSIReportPerCSIProcessItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CSIReportPerCSIProcessItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CSIReportPerCSIProcessItem ::= SEQUENCE (SIZE(1.. maxCSIReport)) OF + SEQUENCE { + rI INTEGER (1..8, ...), + widebandCQI WidebandCQI, + subbandSize SubbandSize, + subbandCQIList SubbandCQIList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CSIReportPerCSIProcessItem-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct CSIReportPerCSIProcessItem_elm : asn::sequence<5, 0, true, 2> +{ + static constexpr const char* name() {return "CSIReportPerCSIProcessItem_elm";} + using parent_t = asn::sequence<5, 0, true, 2>; + struct rI_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "rI_t";} + using parent_t = asn::integer<>; + + }; + + rI_t& ref_rI() {return rI;} + rI_t const& ref_rI() const {return rI;} + struct widebandCQI_t : WidebandCQI + { + static constexpr const char* name() {return "widebandCQI_t";} + using parent_t = WidebandCQI; + + }; + widebandCQI_t& ref_widebandCQI() {return widebandCQI;} + widebandCQI_t const& ref_widebandCQI() const {return widebandCQI;} + struct subbandSize_t : SubbandSize + { + static constexpr const char* name() {return "subbandSize_t";} + using parent_t = SubbandSize; + + }; + subbandSize_t& ref_subbandSize() {return subbandSize;} + subbandSize_t const& ref_subbandSize() const {return subbandSize;} + struct subbandCQIList_t : SubbandCQIList + { + static constexpr const char* name() {return "subbandCQIList_t";} + using parent_t = SubbandCQIList; + static constexpr bool optional = true; + + }; + subbandCQIList_t& set_subbandCQIList() { subbandCQIList.setpresent(true); return subbandCQIList;} + subbandCQIList_t const* get_subbandCQIList() const {return subbandCQIList.is_valid() ? &subbandCQIList : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rI); + v(widebandCQI); + v(subbandSize); + v(subbandCQIList); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rI); + v(widebandCQI); + v(subbandSize); + v(subbandCQIList); + v(iE_Extensions); + + }; + void clear() + { + rI.clear(); + widebandCQI.clear(); + subbandSize.clear(); + subbandCQIList.clear(); + iE_Extensions.clear(); + + }; + private: + rI_t rI; + widebandCQI_t widebandCQI; + subbandSize_t subbandSize; + subbandCQIList_t subbandCQIList; + iE_Extensions_t iE_Extensions; + +}; +struct CSIReportPerCSIProcessItem : asn::sequenceof +{ + static constexpr const char* name() {return "CSIReportPerCSIProcessItem";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CSIReportPerCSIProcess-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CSIReportPerCSIProcess_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CSIReportPerCSIProcess ::= SEQUENCE (SIZE(1.. maxCSIProcess)) OF + SEQUENCE { + cSIProcessConfigurationIndex INTEGER (1..7, ...), + cSIReportPerCSIProcessItem CSIReportPerCSIProcessItem, + iE-Extensions ProtocolExtensionContainer { {CSIReportPerCSIProcess-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct CSIReportPerCSIProcess_elm : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CSIReportPerCSIProcess_elm";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct cSIProcessConfigurationIndex_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "cSIProcessConfigurationIndex_t";} + using parent_t = asn::integer<>; + + }; + + cSIProcessConfigurationIndex_t& ref_cSIProcessConfigurationIndex() {return cSIProcessConfigurationIndex;} + cSIProcessConfigurationIndex_t const& ref_cSIProcessConfigurationIndex() const {return cSIProcessConfigurationIndex;} + struct cSIReportPerCSIProcessItem_t : CSIReportPerCSIProcessItem + { + static constexpr const char* name() {return "cSIReportPerCSIProcessItem_t";} + using parent_t = CSIReportPerCSIProcessItem; + + }; + cSIReportPerCSIProcessItem_t& ref_cSIReportPerCSIProcessItem() {return cSIReportPerCSIProcessItem;} + cSIReportPerCSIProcessItem_t const& ref_cSIReportPerCSIProcessItem() const {return cSIReportPerCSIProcessItem;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cSIProcessConfigurationIndex); + v(cSIReportPerCSIProcessItem); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cSIProcessConfigurationIndex); + v(cSIReportPerCSIProcessItem); + v(iE_Extensions); + + }; + void clear() + { + cSIProcessConfigurationIndex.clear(); + cSIReportPerCSIProcessItem.clear(); + iE_Extensions.clear(); + + }; + private: + cSIProcessConfigurationIndex_t cSIProcessConfigurationIndex; + cSIReportPerCSIProcessItem_t cSIReportPerCSIProcessItem; + iE_Extensions_t iE_Extensions; + +}; +struct CSIReportPerCSIProcess : asn::sequenceof +{ + static constexpr const char* name() {return "CSIReportPerCSIProcess";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CSIReportList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CSIReportList_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CSIReportList ::= SEQUENCE (SIZE(1..maxUEReport)) OF + SEQUENCE { + uEID UEID, + cSIReportPerCSIProcess CSIReportPerCSIProcess, + iE-Extensions ProtocolExtensionContainer { {CSIReportList-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct CSIReportList_elm : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CSIReportList_elm";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct uEID_t : UEID + { + static constexpr const char* name() {return "uEID_t";} + using parent_t = UEID; + + }; + uEID_t& ref_uEID() {return uEID;} + uEID_t const& ref_uEID() const {return uEID;} + struct cSIReportPerCSIProcess_t : CSIReportPerCSIProcess + { + static constexpr const char* name() {return "cSIReportPerCSIProcess_t";} + using parent_t = CSIReportPerCSIProcess; + + }; + cSIReportPerCSIProcess_t& ref_cSIReportPerCSIProcess() {return cSIReportPerCSIProcess;} + cSIReportPerCSIProcess_t const& ref_cSIReportPerCSIProcess() const {return cSIReportPerCSIProcess;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uEID); + v(cSIReportPerCSIProcess); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uEID); + v(cSIReportPerCSIProcess); + v(iE_Extensions); + + }; + void clear() + { + uEID.clear(); + cSIReportPerCSIProcess.clear(); + iE_Extensions.clear(); + + }; + private: + uEID_t uEID; + cSIReportPerCSIProcess_t cSIReportPerCSIProcess; + iE_Extensions_t iE_Extensions; + +}; +struct CSIReportList : asn::sequenceof +{ + static constexpr const char* name() {return "CSIReportList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CapacityValue ::= INTEGER (0..100) +*/ + +struct CapacityValue : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "CapacityValue";} + using parent_t = asn::integer<>; + +}; + +/* +CauseRadioNetwork ::= ENUMERATED { + handover-desirable-for-radio-reasons, + time-critical-handover, + resource-optimisation-handover, + reduce-load-in-serving-cell, + partial-handover, + unknown-new-eNB-UE-X2AP-ID, + unknown-old-eNB-UE-X2AP-ID, + unknown-pair-of-UE-X2AP-ID, + ho-target-not-allowed, + tx2relocoverall-expiry, + trelocprep-expiry, + cell-not-available, + no-radio-resources-available-in-target-cell, + invalid-MME-GroupID, + unknown-MME-Code, + encryption-and-or-integrity-protection-algorithms-not-supported, + reportCharacteristicsEmpty, + noReportPeriodicity, + existingMeasurementID, + unknown-eNB-Measurement-ID, + measurement-temporarily-not-available, + unspecified, + ..., + load-balancing, + handover-optimisation, + value-out-of-allowed-range, + multiple-E-RAB-ID-instances, + switch-off-ongoing, + not-supported-QCI-value, + measurement-not-supported-for-the-object, + tDCoverall-expiry, + tDCprep-expiry, + action-desirable-for-radio-reasons, + reduce-load, + resource-optimisation, + time-critical-action, + target-not-allowed, + no-radio-resources-available, + invalid-QoS-combination, + encryption-algorithms-not-aupported, + procedure-cancelled, + rRM-purpose, + improve-user-bit-rate, + user-inactivity, + radio-connection-with-UE-lost, + failure-in-the-radio-interface-procedure, + bearer-option-not-supported, + mCG-Mobility, + sCG-Mobility, + count-reaches-max-value, + unknown-old-en-gNB-UE-X2AP-ID, + pDCP-Overload + +} +*/ + +struct CauseRadioNetwork : asn::enumerated<51, 29, true> +{ + static constexpr const char* name() {return "CauseRadioNetwork";} + using parent_t = asn::enumerated<51, 29, true>; + typedef enum { + handover_desirable_for_radio_reasons + ,time_critical_handover + ,resource_optimisation_handover + ,reduce_load_in_serving_cell + ,partial_handover + ,unknown_new_eNB_UE_X2AP_ID + ,unknown_old_eNB_UE_X2AP_ID + ,unknown_pair_of_UE_X2AP_ID + ,ho_target_not_allowed + ,tx2relocoverall_expiry + ,trelocprep_expiry + ,cell_not_available + ,no_radio_resources_available_in_target_cell + ,invalid_MME_GroupID + ,unknown_MME_Code + ,encryption_and_or_integrity_protection_algorithms_not_supported + ,reportCharacteristicsEmpty + ,noReportPeriodicity + ,existingMeasurementID + ,unknown_eNB_Measurement_ID + ,measurement_temporarily_not_available + ,unspecified + ,load_balancing + ,handover_optimisation + ,value_out_of_allowed_range + ,multiple_E_RAB_ID_instances + ,switch_off_ongoing + ,not_supported_QCI_value + ,measurement_not_supported_for_the_object + ,tDCoverall_expiry + ,tDCprep_expiry + ,action_desirable_for_radio_reasons + ,reduce_load + ,resource_optimisation + ,time_critical_action + ,target_not_allowed + ,no_radio_resources_available + ,invalid_QoS_combination + ,encryption_algorithms_not_aupported + ,procedure_cancelled + ,rRM_purpose + ,improve_user_bit_rate + ,user_inactivity + ,radio_connection_with_UE_lost + ,failure_in_the_radio_interface_procedure + ,bearer_option_not_supported + ,mCG_Mobility + ,sCG_Mobility + ,count_reaches_max_value + ,unknown_old_en_gNB_UE_X2AP_ID + ,pDCP_Overload + } index_t; + +}; + +/* +CauseTransport ::= ENUMERATED { + transport-resource-unavailable, + unspecified, + ... +} +*/ + +struct CauseTransport : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "CauseTransport";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + transport_resource_unavailable + ,unspecified + } index_t; + +}; + +/* +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + unspecified, + abstract-syntax-error-falsely-constructed-message, + ... +} +*/ + +struct CauseProtocol : asn::enumerated<7, 0, true> +{ + static constexpr const char* name() {return "CauseProtocol";} + using parent_t = asn::enumerated<7, 0, true>; + typedef enum { + transfer_syntax_error + ,abstract_syntax_error_reject + ,abstract_syntax_error_ignore_and_notify + ,message_not_compatible_with_receiver_state + ,semantic_error + ,unspecified + ,abstract_syntax_error_falsely_constructed_message + } index_t; + +}; + +/* +CauseMisc ::= ENUMERATED { + control-processing-overload, + hardware-failure, + om-intervention, + not-enough-user-plane-processing-resources, + unspecified, + ... +} +*/ + +struct CauseMisc : asn::enumerated<5, 0, true> +{ + static constexpr const char* name() {return "CauseMisc";} + using parent_t = asn::enumerated<5, 0, true>; + typedef enum { + control_processing_overload + ,hardware_failure + ,om_intervention + ,not_enough_user_plane_processing_resources + ,unspecified + } index_t; + +}; + +/* +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + ... +} +*/ + +struct Cause : asn::choice<4, 0, true> +{ + static constexpr const char* name() {return "Cause";} + using parent_t = asn::choice<4, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~Cause() {clear();} + struct radioNetwork_t : CauseRadioNetwork + { + static constexpr const char* name() {return "radioNetwork_t";} + using parent_t = CauseRadioNetwork; + + }; + struct transport_t : CauseTransport + { + static constexpr const char* name() {return "transport_t";} + using parent_t = CauseTransport; + + }; + struct protocol_t : CauseProtocol + { + static constexpr const char* name() {return "protocol_t";} + using parent_t = CauseProtocol; + + }; + struct misc_t : CauseMisc + { + static constexpr const char* name() {return "misc_t";} + using parent_t = CauseMisc; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + radioNetwork_t& select_radioNetwork() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + radioNetwork_t const* get_radioNetwork() const { if(get_index() == 1) { return &var.as();} return nullptr; } + transport_t& select_transport() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + transport_t const* get_transport() const { if(get_index() == 2) { return &var.as();} return nullptr; } + protocol_t& select_protocol() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + protocol_t const* get_protocol() const { if(get_index() == 3) { return &var.as();} return nullptr; } + misc_t& select_misc() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + misc_t const* get_misc() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(radioNetwork_t)]; + char dummy2[sizeof(transport_t)]; + char dummy3[sizeof(protocol_t)]; + char dummy4[sizeof(misc_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ... } +*/ + +struct Cell_Size : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "Cell-Size";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + verysmall + ,small + ,medium + ,large + } index_t; + +}; + +/* +CellCapacityClassValue ::= INTEGER (1..100, ...) +*/ + +struct CellCapacityClassValue : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "CellCapacityClassValue";} + using parent_t = asn::integer<>; + +}; + +/* +CellDeploymentStatusIndicator ::= ENUMERATED {pre-change-notification, ...} +*/ + +struct CellDeploymentStatusIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "CellDeploymentStatusIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + pre_change_notification + } index_t; + +}; + +/* +ReplacingCellsList-Item ::= SEQUENCE { + eCGI ECGI, + ... +} +*/ + +struct ReplacingCellsList_Item : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ReplacingCellsList-Item";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct eCGI_t : ECGI + { + static constexpr const char* name() {return "eCGI_t";} + using parent_t = ECGI; + + }; + eCGI_t& ref_eCGI() {return eCGI;} + eCGI_t const& ref_eCGI() const {return eCGI;} + template void decode(V& v) + { + v(eCGI); + + }; + template void encode(V& v) const + { + v(eCGI); + + }; + void clear() + { + eCGI.clear(); + + }; + private: + eCGI_t eCGI; + +}; +/* +ReplacingCellsList ::= SEQUENCE (SIZE(0.. maxCellineNB)) OF ReplacingCellsList-Item +*/ + +struct ReplacingCellsList_elm : ReplacingCellsList_Item +{ + static constexpr const char* name() {return "ReplacingCellsList_elm";} + using parent_t = ReplacingCellsList_Item; + +}; +struct ReplacingCellsList : asn::sequenceof +{ + static constexpr const char* name() {return "ReplacingCellsList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellReplacingInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CellReplacingInfo_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellReplacingInfo ::= SEQUENCE { + replacingCellsList ReplacingCellsList, + iE-Extensions ProtocolExtensionContainer { {CellReplacingInfo-ExtIEs}} OPTIONAL, + ... +} +*/ + +struct CellReplacingInfo : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "CellReplacingInfo";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct replacingCellsList_t : ReplacingCellsList + { + static constexpr const char* name() {return "replacingCellsList_t";} + using parent_t = ReplacingCellsList; + + }; + replacingCellsList_t& ref_replacingCellsList() {return replacingCellsList;} + replacingCellsList_t const& ref_replacingCellsList() const {return replacingCellsList;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(replacingCellsList); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(replacingCellsList); + v(iE_Extensions); + + }; + void clear() + { + replacingCellsList.clear(); + iE_Extensions.clear(); + + }; + private: + replacingCellsList_t replacingCellsList; + iE_Extensions_t iE_Extensions; + +}; +/* +CellReportingIndicator ::= ENUMERATED {stop-request, ... } +*/ + +struct CellReportingIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "CellReportingIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + stop_request + } index_t; + +}; + +/* +CellType-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CellType_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellType ::= SEQUENCE { + cell-Size Cell-Size, + iE-Extensions ProtocolExtensionContainer { {CellType-ExtIEs}} OPTIONAL, + ... +} +*/ + +struct CellType : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "CellType";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct cell_Size_t : Cell_Size + { + static constexpr const char* name() {return "cell_Size_t";} + using parent_t = Cell_Size; + + }; + cell_Size_t& ref_cell_Size() {return cell_Size;} + cell_Size_t const& ref_cell_Size() const {return cell_Size;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_Size); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_Size); + v(iE_Extensions); + + }; + void clear() + { + cell_Size.clear(); + iE_Extensions.clear(); + + }; + private: + cell_Size_t cell_Size; + iE_Extensions_t iE_Extensions; + +}; +/* +CoMPHypothesisSetItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CoMPHypothesisSetItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CoMPHypothesisSetItem ::= SEQUENCE { + coMPCellID ECGI, + coMPHypothesis BIT STRING (SIZE(6..4400, ...)), + iE-Extensions ProtocolExtensionContainer { {CoMPHypothesisSetItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CoMPHypothesisSetItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CoMPHypothesisSetItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct coMPCellID_t : ECGI + { + static constexpr const char* name() {return "coMPCellID_t";} + using parent_t = ECGI; + + }; + coMPCellID_t& ref_coMPCellID() {return coMPCellID;} + coMPCellID_t const& ref_coMPCellID() const {return coMPCellID;} + struct coMPHypothesis_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "coMPHypothesis_t";} + using parent_t = asn::bstring<>; + + }; + + coMPHypothesis_t& ref_coMPHypothesis() {return coMPHypothesis;} + coMPHypothesis_t const& ref_coMPHypothesis() const {return coMPHypothesis;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(coMPCellID); + v(coMPHypothesis); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(coMPCellID); + v(coMPHypothesis); + v(iE_Extensions); + + }; + void clear() + { + coMPCellID.clear(); + coMPHypothesis.clear(); + iE_Extensions.clear(); + + }; + private: + coMPCellID_t coMPCellID; + coMPHypothesis_t coMPHypothesis; + iE_Extensions_t iE_Extensions; + +}; +/* +CoMPHypothesisSet ::= SEQUENCE (SIZE(1..maxnoofCoMPCells)) OF CoMPHypothesisSetItem +*/ + +struct CoMPHypothesisSet_elm : CoMPHypothesisSetItem +{ + static constexpr const char* name() {return "CoMPHypothesisSet_elm";} + using parent_t = CoMPHypothesisSetItem; + +}; +struct CoMPHypothesisSet : asn::sequenceof +{ + static constexpr const char* name() {return "CoMPHypothesisSet";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CoMPInformationItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CoMPInformationItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CoMPInformationItem ::= SEQUENCE (SIZE(1..maxnoofCoMPHypothesisSet)) OF + SEQUENCE { + coMPHypothesisSet CoMPHypothesisSet, + benefitMetric BenefitMetric, + iE-Extensions ProtocolExtensionContainer { {CoMPInformationItem-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct CoMPInformationItem_elm : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CoMPInformationItem_elm";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct coMPHypothesisSet_t : CoMPHypothesisSet + { + static constexpr const char* name() {return "coMPHypothesisSet_t";} + using parent_t = CoMPHypothesisSet; + + }; + coMPHypothesisSet_t& ref_coMPHypothesisSet() {return coMPHypothesisSet;} + coMPHypothesisSet_t const& ref_coMPHypothesisSet() const {return coMPHypothesisSet;} + struct benefitMetric_t : BenefitMetric + { + static constexpr const char* name() {return "benefitMetric_t";} + using parent_t = BenefitMetric; + + }; + benefitMetric_t& ref_benefitMetric() {return benefitMetric;} + benefitMetric_t const& ref_benefitMetric() const {return benefitMetric;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(coMPHypothesisSet); + v(benefitMetric); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(coMPHypothesisSet); + v(benefitMetric); + v(iE_Extensions); + + }; + void clear() + { + coMPHypothesisSet.clear(); + benefitMetric.clear(); + iE_Extensions.clear(); + + }; + private: + coMPHypothesisSet_t coMPHypothesisSet; + benefitMetric_t benefitMetric; + iE_Extensions_t iE_Extensions; + +}; +struct CoMPInformationItem : asn::sequenceof +{ + static constexpr const char* name() {return "CoMPInformationItem";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CoMPInformationStartTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CoMPInformationStartTime_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CoMPInformationStartTime ::= SEQUENCE (SIZE(0..1)) OF + SEQUENCE { + startSFN INTEGER (0..1023, ...), + startSubframeNumber INTEGER (0..9, ...), + iE-Extensions ProtocolExtensionContainer { {CoMPInformationStartTime-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct CoMPInformationStartTime_elm : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CoMPInformationStartTime_elm";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct startSFN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "startSFN_t";} + using parent_t = asn::integer<>; + + }; + + startSFN_t& ref_startSFN() {return startSFN;} + startSFN_t const& ref_startSFN() const {return startSFN;} + struct startSubframeNumber_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "startSubframeNumber_t";} + using parent_t = asn::integer<>; + + }; + + startSubframeNumber_t& ref_startSubframeNumber() {return startSubframeNumber;} + startSubframeNumber_t const& ref_startSubframeNumber() const {return startSubframeNumber;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(startSFN); + v(startSubframeNumber); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(startSFN); + v(startSubframeNumber); + v(iE_Extensions); + + }; + void clear() + { + startSFN.clear(); + startSubframeNumber.clear(); + iE_Extensions.clear(); + + }; + private: + startSFN_t startSFN; + startSubframeNumber_t startSubframeNumber; + iE_Extensions_t iE_Extensions; + +}; +struct CoMPInformationStartTime : asn::sequenceof +{ + static constexpr const char* name() {return "CoMPInformationStartTime";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CoMPInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CoMPInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CoMPInformation ::= SEQUENCE { + coMPInformationItem CoMPInformationItem, + coMPInformationStartTime CoMPInformationStartTime, + iE-Extensions ProtocolExtensionContainer { {CoMPInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CoMPInformation : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CoMPInformation";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct coMPInformationItem_t : CoMPInformationItem + { + static constexpr const char* name() {return "coMPInformationItem_t";} + using parent_t = CoMPInformationItem; + + }; + coMPInformationItem_t& ref_coMPInformationItem() {return coMPInformationItem;} + coMPInformationItem_t const& ref_coMPInformationItem() const {return coMPInformationItem;} + struct coMPInformationStartTime_t : CoMPInformationStartTime + { + static constexpr const char* name() {return "coMPInformationStartTime_t";} + using parent_t = CoMPInformationStartTime; + + }; + coMPInformationStartTime_t& ref_coMPInformationStartTime() {return coMPInformationStartTime;} + coMPInformationStartTime_t const& ref_coMPInformationStartTime() const {return coMPInformationStartTime;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(coMPInformationItem); + v(coMPInformationStartTime); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(coMPInformationItem); + v(coMPInformationStartTime); + v(iE_Extensions); + + }; + void clear() + { + coMPInformationItem.clear(); + coMPInformationStartTime.clear(); + iE_Extensions.clear(); + + }; + private: + coMPInformationItem_t coMPInformationItem; + coMPInformationStartTime_t coMPInformationStartTime; + iE_Extensions_t iE_Extensions; + +}; +/* +CompositeAvailableCapacity-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CompositeAvailableCapacity_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CompositeAvailableCapacity ::= SEQUENCE { + cellCapacityClassValue CellCapacityClassValue OPTIONAL, + capacityValue CapacityValue, + iE-Extensions ProtocolExtensionContainer { {CompositeAvailableCapacity-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CompositeAvailableCapacity : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "CompositeAvailableCapacity";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct cellCapacityClassValue_t : CellCapacityClassValue + { + static constexpr const char* name() {return "cellCapacityClassValue_t";} + using parent_t = CellCapacityClassValue; + static constexpr bool optional = true; + + }; + cellCapacityClassValue_t& set_cellCapacityClassValue() { cellCapacityClassValue.setpresent(true); return cellCapacityClassValue;} + cellCapacityClassValue_t const* get_cellCapacityClassValue() const {return cellCapacityClassValue.is_valid() ? &cellCapacityClassValue : nullptr;} + struct capacityValue_t : CapacityValue + { + static constexpr const char* name() {return "capacityValue_t";} + using parent_t = CapacityValue; + + }; + capacityValue_t& ref_capacityValue() {return capacityValue;} + capacityValue_t const& ref_capacityValue() const {return capacityValue;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cellCapacityClassValue); + v(capacityValue); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cellCapacityClassValue); + v(capacityValue); + v(iE_Extensions); + + }; + void clear() + { + cellCapacityClassValue.clear(); + capacityValue.clear(); + iE_Extensions.clear(); + + }; + private: + cellCapacityClassValue_t cellCapacityClassValue; + capacityValue_t capacityValue; + iE_Extensions_t iE_Extensions; + +}; +/* +CompositeAvailableCapacityGroup-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CompositeAvailableCapacityGroup_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CompositeAvailableCapacityGroup ::= SEQUENCE { + dL-CompositeAvailableCapacity CompositeAvailableCapacity, + uL-CompositeAvailableCapacity CompositeAvailableCapacity, + iE-Extensions ProtocolExtensionContainer { {CompositeAvailableCapacityGroup-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CompositeAvailableCapacityGroup : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CompositeAvailableCapacityGroup";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct dL_CompositeAvailableCapacity_t : CompositeAvailableCapacity + { + static constexpr const char* name() {return "dL_CompositeAvailableCapacity_t";} + using parent_t = CompositeAvailableCapacity; + + }; + dL_CompositeAvailableCapacity_t& ref_dL_CompositeAvailableCapacity() {return dL_CompositeAvailableCapacity;} + dL_CompositeAvailableCapacity_t const& ref_dL_CompositeAvailableCapacity() const {return dL_CompositeAvailableCapacity;} + struct uL_CompositeAvailableCapacity_t : CompositeAvailableCapacity + { + static constexpr const char* name() {return "uL_CompositeAvailableCapacity_t";} + using parent_t = CompositeAvailableCapacity; + + }; + uL_CompositeAvailableCapacity_t& ref_uL_CompositeAvailableCapacity() {return uL_CompositeAvailableCapacity;} + uL_CompositeAvailableCapacity_t const& ref_uL_CompositeAvailableCapacity() const {return uL_CompositeAvailableCapacity;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dL_CompositeAvailableCapacity); + v(uL_CompositeAvailableCapacity); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dL_CompositeAvailableCapacity); + v(uL_CompositeAvailableCapacity); + v(iE_Extensions); + + }; + void clear() + { + dL_CompositeAvailableCapacity.clear(); + uL_CompositeAvailableCapacity.clear(); + iE_Extensions.clear(); + + }; + private: + dL_CompositeAvailableCapacity_t dL_CompositeAvailableCapacity; + uL_CompositeAvailableCapacity_t uL_CompositeAvailableCapacity; + iE_Extensions_t iE_Extensions; + +}; +/* +Correlation-ID ::= OCTET STRING (SIZE (4)) +*/ + +struct Correlation_ID : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Correlation-ID";} + using parent_t = asn::ostring<>; + +}; + +/* +CoverageModification-Item ::= SEQUENCE { + eCGI ECGI, + coverageState INTEGER (0..15, ...), + cellDeploymentStatusIndicator CellDeploymentStatusIndicator OPTIONAL, + cellReplacingInfo CellReplacingInfo OPTIONAL, +-- Included in case the Cell Deployment Status Indicator IE is present + ... +} +*/ + +struct CoverageModification_Item : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "CoverageModification-Item";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct eCGI_t : ECGI + { + static constexpr const char* name() {return "eCGI_t";} + using parent_t = ECGI; + + }; + eCGI_t& ref_eCGI() {return eCGI;} + eCGI_t const& ref_eCGI() const {return eCGI;} + struct coverageState_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "coverageState_t";} + using parent_t = asn::integer<>; + + }; + + coverageState_t& ref_coverageState() {return coverageState;} + coverageState_t const& ref_coverageState() const {return coverageState;} + struct cellDeploymentStatusIndicator_t : CellDeploymentStatusIndicator + { + static constexpr const char* name() {return "cellDeploymentStatusIndicator_t";} + using parent_t = CellDeploymentStatusIndicator; + static constexpr bool optional = true; + + }; + cellDeploymentStatusIndicator_t& set_cellDeploymentStatusIndicator() { cellDeploymentStatusIndicator.setpresent(true); return cellDeploymentStatusIndicator;} + cellDeploymentStatusIndicator_t const* get_cellDeploymentStatusIndicator() const {return cellDeploymentStatusIndicator.is_valid() ? &cellDeploymentStatusIndicator : nullptr;} + struct cellReplacingInfo_t : CellReplacingInfo + { + static constexpr const char* name() {return "cellReplacingInfo_t";} + using parent_t = CellReplacingInfo; + static constexpr bool optional = true; + + }; + cellReplacingInfo_t& set_cellReplacingInfo() { cellReplacingInfo.setpresent(true); return cellReplacingInfo;} + cellReplacingInfo_t const* get_cellReplacingInfo() const {return cellReplacingInfo.is_valid() ? &cellReplacingInfo : nullptr;} + template void decode(V& v) + { + v(eCGI); + v(coverageState); + v(cellDeploymentStatusIndicator); + v(cellReplacingInfo); + + }; + template void encode(V& v) const + { + v(eCGI); + v(coverageState); + v(cellDeploymentStatusIndicator); + v(cellReplacingInfo); + + }; + void clear() + { + eCGI.clear(); + coverageState.clear(); + cellDeploymentStatusIndicator.clear(); + cellReplacingInfo.clear(); + + }; + private: + eCGI_t eCGI; + coverageState_t coverageState; + cellDeploymentStatusIndicator_t cellDeploymentStatusIndicator; + cellReplacingInfo_t cellReplacingInfo; + +}; +/* +CoverageModificationList ::= SEQUENCE (SIZE (1..maxCellineNB)) OF CoverageModification-Item +*/ + +struct CoverageModificationList_elm : CoverageModification_Item +{ + static constexpr const char* name() {return "CoverageModificationList_elm";} + using parent_t = CoverageModification_Item; + +}; +struct CoverageModificationList : asn::sequenceof +{ + static constexpr const char* name() {return "CoverageModificationList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} +*/ + +struct TypeOfError : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "TypeOfError";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + not_understood + ,missing + } index_t; + +}; + +/* +CriticalityDiagnostics-IE-List-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CriticalityDiagnostics_IE_List_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxNrOfErrors)) OF + SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CriticalityDiagnostics_IE_List_elm : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "CriticalityDiagnostics_IE_List_elm";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct iECriticality_t : Criticality + { + static constexpr const char* name() {return "iECriticality_t";} + using parent_t = Criticality; + + }; + iECriticality_t& ref_iECriticality() {return iECriticality;} + iECriticality_t const& ref_iECriticality() const {return iECriticality;} + struct iE_ID_t : ProtocolIE_ID + { + static constexpr const char* name() {return "iE_ID_t";} + using parent_t = ProtocolIE_ID; + + }; + iE_ID_t& ref_iE_ID() {return iE_ID;} + iE_ID_t const& ref_iE_ID() const {return iE_ID;} + struct typeOfError_t : TypeOfError + { + static constexpr const char* name() {return "typeOfError_t";} + using parent_t = TypeOfError; + + }; + typeOfError_t& ref_typeOfError() {return typeOfError;} + typeOfError_t const& ref_typeOfError() const {return typeOfError;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iECriticality); + v(iE_ID); + v(typeOfError); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iECriticality); + v(iE_ID); + v(typeOfError); + v(iE_Extensions); + + }; + void clear() + { + iECriticality.clear(); + iE_ID.clear(); + typeOfError.clear(); + iE_Extensions.clear(); + + }; + private: + iECriticality_t iECriticality; + iE_ID_t iE_ID; + typeOfError_t typeOfError; + iE_Extensions_t iE_Extensions; + +}; +struct CriticalityDiagnostics_IE_List : asn::sequenceof +{ + static constexpr const char* name() {return "CriticalityDiagnostics-IE-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CriticalityDiagnostics-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CriticalityDiagnostics_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CriticalityDiagnostics : asn::sequence<5, 0, true, 5> +{ + static constexpr const char* name() {return "CriticalityDiagnostics";} + using parent_t = asn::sequence<5, 0, true, 5>; + struct procedureCode_t : ProcedureCode + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = ProcedureCode; + static constexpr bool optional = true; + + }; + procedureCode_t& set_procedureCode() { procedureCode.setpresent(true); return procedureCode;} + procedureCode_t const* get_procedureCode() const {return procedureCode.is_valid() ? &procedureCode : nullptr;} + struct triggeringMessage_t : TriggeringMessage + { + static constexpr const char* name() {return "triggeringMessage_t";} + using parent_t = TriggeringMessage; + static constexpr bool optional = true; + + }; + triggeringMessage_t& set_triggeringMessage() { triggeringMessage.setpresent(true); return triggeringMessage;} + triggeringMessage_t const* get_triggeringMessage() const {return triggeringMessage.is_valid() ? &triggeringMessage : nullptr;} + struct procedureCriticality_t : Criticality + { + static constexpr const char* name() {return "procedureCriticality_t";} + using parent_t = Criticality; + static constexpr bool optional = true; + + }; + procedureCriticality_t& set_procedureCriticality() { procedureCriticality.setpresent(true); return procedureCriticality;} + procedureCriticality_t const* get_procedureCriticality() const {return procedureCriticality.is_valid() ? &procedureCriticality : nullptr;} + struct iEsCriticalityDiagnostics_t : CriticalityDiagnostics_IE_List + { + static constexpr const char* name() {return "iEsCriticalityDiagnostics_t";} + using parent_t = CriticalityDiagnostics_IE_List; + static constexpr bool optional = true; + + }; + iEsCriticalityDiagnostics_t& set_iEsCriticalityDiagnostics() { iEsCriticalityDiagnostics.setpresent(true); return iEsCriticalityDiagnostics;} + iEsCriticalityDiagnostics_t const* get_iEsCriticalityDiagnostics() const {return iEsCriticalityDiagnostics.is_valid() ? &iEsCriticalityDiagnostics : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(procedureCode); + v(triggeringMessage); + v(procedureCriticality); + v(iEsCriticalityDiagnostics); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(triggeringMessage); + v(procedureCriticality); + v(iEsCriticalityDiagnostics); + v(iE_Extensions); + + }; + void clear() + { + procedureCode.clear(); + triggeringMessage.clear(); + procedureCriticality.clear(); + iEsCriticalityDiagnostics.clear(); + iE_Extensions.clear(); + + }; + private: + procedureCode_t procedureCode; + triggeringMessage_t triggeringMessage; + procedureCriticality_t procedureCriticality; + iEsCriticalityDiagnostics_t iEsCriticalityDiagnostics; + iE_Extensions_t iE_Extensions; + +}; +/* +DL-Forwarding ::= ENUMERATED { + dL-forwardingProposed, + ... +} +*/ + +struct DL_Forwarding : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "DL-Forwarding";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + dL_forwardingProposed + } index_t; + +}; + +/* +DL-GBR-PRB-usage::= INTEGER (0..100) +*/ + +struct DL_GBR_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DL-GBR-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +DL-Total-PRB-usage::= INTEGER (0..100) +*/ + +struct DL_Total_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DL-Total-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +DL-non-GBR-PRB-usage::= INTEGER (0..100) +*/ + +struct DL_non_GBR_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DL-non-GBR-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +DL-scheduling-PDCCH-CCE-usage::= INTEGER (0..100) +*/ + +struct DL_scheduling_PDCCH_CCE_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DL-scheduling-PDCCH-CCE-usage";} + using parent_t = asn::integer<>; + +}; + +/* +DataTrafficResources ::= BIT STRING (SIZE(6..17600)) +*/ + +struct DataTrafficResources : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DataTrafficResources";} + using parent_t = asn::bstring<>; + +}; + +/* +DLResourceBitmapULandDLSharing ::= DataTrafficResources +*/ + +struct DLResourceBitmapULandDLSharing : DataTrafficResources +{ + static constexpr const char* name() {return "DLResourceBitmapULandDLSharing";} + using parent_t = DataTrafficResources; + +}; +/* +DLResourcesULandDLSharing ::= CHOICE { +unchanged NULL, + changed DLResourceBitmapULandDLSharing, + ... +} +*/ + +struct DLResourcesULandDLSharing : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "DLResourcesULandDLSharing";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~DLResourcesULandDLSharing() {clear();} + struct unchanged_t : asn::nulltype + { + static constexpr const char* name() {return "unchanged_t";} + using parent_t = asn::nulltype; + + }; + struct changed_t : DLResourceBitmapULandDLSharing + { + static constexpr const char* name() {return "changed_t";} + using parent_t = DLResourceBitmapULandDLSharing; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + unchanged_t& select_unchanged() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + unchanged_t const* get_unchanged() const { if(get_index() == 1) { return &var.as();} return nullptr; } + changed_t& select_changed() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + changed_t const* get_changed() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(unchanged_t)]; + char dummy2[sizeof(changed_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +DRB-ID ::= INTEGER (1..32) +*/ + +struct DRB_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "DRB-ID";} + using parent_t = asn::integer<>; + +}; + +/* +ULOnlySharing-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ULOnlySharing_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ULOnlySharing ::= SEQUENCE{ + uLResourceBitmapULOnlySharing DataTrafficResources, + iE-Extensions ProtocolExtensionContainer { {ULOnlySharing-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ULOnlySharing : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ULOnlySharing";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct uLResourceBitmapULOnlySharing_t : DataTrafficResources + { + static constexpr const char* name() {return "uLResourceBitmapULOnlySharing_t";} + using parent_t = DataTrafficResources; + + }; + uLResourceBitmapULOnlySharing_t& ref_uLResourceBitmapULOnlySharing() {return uLResourceBitmapULOnlySharing;} + uLResourceBitmapULOnlySharing_t const& ref_uLResourceBitmapULOnlySharing() const {return uLResourceBitmapULOnlySharing;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uLResourceBitmapULOnlySharing); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uLResourceBitmapULOnlySharing); + v(iE_Extensions); + + }; + void clear() + { + uLResourceBitmapULOnlySharing.clear(); + iE_Extensions.clear(); + + }; + private: + uLResourceBitmapULOnlySharing_t uLResourceBitmapULOnlySharing; + iE_Extensions_t iE_Extensions; + +}; +/* +ULResourceBitmapULandDLSharing ::= DataTrafficResources +*/ + +struct ULResourceBitmapULandDLSharing : DataTrafficResources +{ + static constexpr const char* name() {return "ULResourceBitmapULandDLSharing";} + using parent_t = DataTrafficResources; + +}; +/* +ULResourcesULandDLSharing ::= CHOICE { + unchanged NULL, + changed ULResourceBitmapULandDLSharing, + ... +} +*/ + +struct ULResourcesULandDLSharing : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "ULResourcesULandDLSharing";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~ULResourcesULandDLSharing() {clear();} + struct unchanged_t : asn::nulltype + { + static constexpr const char* name() {return "unchanged_t";} + using parent_t = asn::nulltype; + + }; + struct changed_t : ULResourceBitmapULandDLSharing + { + static constexpr const char* name() {return "changed_t";} + using parent_t = ULResourceBitmapULandDLSharing; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + unchanged_t& select_unchanged() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + unchanged_t const* get_unchanged() const { if(get_index() == 1) { return &var.as();} return nullptr; } + changed_t& select_changed() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + changed_t const* get_changed() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(unchanged_t)]; + char dummy2[sizeof(changed_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ULandDLSharing-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ULandDLSharing_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ULandDLSharing ::= SEQUENCE{ + uLResourcesULandDLSharing ULResourcesULandDLSharing, + dLResourcesULandDLSharing DLResourcesULandDLSharing, + iE-Extensions ProtocolExtensionContainer { {ULandDLSharing-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ULandDLSharing : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ULandDLSharing";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct uLResourcesULandDLSharing_t : ULResourcesULandDLSharing + { + static constexpr const char* name() {return "uLResourcesULandDLSharing_t";} + using parent_t = ULResourcesULandDLSharing; + + }; + uLResourcesULandDLSharing_t& ref_uLResourcesULandDLSharing() {return uLResourcesULandDLSharing;} + uLResourcesULandDLSharing_t const& ref_uLResourcesULandDLSharing() const {return uLResourcesULandDLSharing;} + struct dLResourcesULandDLSharing_t : DLResourcesULandDLSharing + { + static constexpr const char* name() {return "dLResourcesULandDLSharing_t";} + using parent_t = DLResourcesULandDLSharing; + + }; + dLResourcesULandDLSharing_t& ref_dLResourcesULandDLSharing() {return dLResourcesULandDLSharing;} + dLResourcesULandDLSharing_t const& ref_dLResourcesULandDLSharing() const {return dLResourcesULandDLSharing;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uLResourcesULandDLSharing); + v(dLResourcesULandDLSharing); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uLResourcesULandDLSharing); + v(dLResourcesULandDLSharing); + v(iE_Extensions); + + }; + void clear() + { + uLResourcesULandDLSharing.clear(); + dLResourcesULandDLSharing.clear(); + iE_Extensions.clear(); + + }; + private: + uLResourcesULandDLSharing_t uLResourcesULandDLSharing; + dLResourcesULandDLSharing_t dLResourcesULandDLSharing; + iE_Extensions_t iE_Extensions; + +}; +/* +SharedResourceType ::= CHOICE{ + uLOnlySharing ULOnlySharing, + uLandDLSharing ULandDLSharing, + ... +} +*/ + +struct SharedResourceType : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "SharedResourceType";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~SharedResourceType() {clear();} + struct uLOnlySharing_t : ULOnlySharing + { + static constexpr const char* name() {return "uLOnlySharing_t";} + using parent_t = ULOnlySharing; + + }; + struct uLandDLSharing_t : ULandDLSharing + { + static constexpr const char* name() {return "uLandDLSharing_t";} + using parent_t = ULandDLSharing; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + uLOnlySharing_t& select_uLOnlySharing() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + uLOnlySharing_t const* get_uLOnlySharing() const { if(get_index() == 1) { return &var.as();} return nullptr; } + uLandDLSharing_t& select_uLandDLSharing() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + uLandDLSharing_t const* get_uLandDLSharing() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(uLOnlySharing_t)]; + char dummy2[sizeof(uLandDLSharing_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +SubframeType ::= ENUMERATED{mbsfn,nonmbsfn,...} +*/ + +struct SubframeType : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "SubframeType";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + mbsfn + ,nonmbsfn + } index_t; + +}; + +/* +ReservedSubframePattern-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ReservedSubframePattern_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ReservedSubframePattern ::= SEQUENCE{ + subframeType SubframeType, + reservedSubframePattern BIT STRING (SIZE(10..160)), + mBSFNControlRegionLength INTEGER (0..3), + iE-Extensions ProtocolExtensionContainer { {ReservedSubframePattern-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ReservedSubframePattern : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "ReservedSubframePattern";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct subframeType_t : SubframeType + { + static constexpr const char* name() {return "subframeType_t";} + using parent_t = SubframeType; + + }; + subframeType_t& ref_subframeType() {return subframeType;} + subframeType_t const& ref_subframeType() const {return subframeType;} + struct reservedSubframePattern_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "reservedSubframePattern_t";} + using parent_t = asn::bstring<>; + + }; + + reservedSubframePattern_t& ref_reservedSubframePattern() {return reservedSubframePattern;} + reservedSubframePattern_t const& ref_reservedSubframePattern() const {return reservedSubframePattern;} + struct mBSFNControlRegionLength_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "mBSFNControlRegionLength_t";} + using parent_t = asn::integer<>; + + }; + + mBSFNControlRegionLength_t& ref_mBSFNControlRegionLength() {return mBSFNControlRegionLength;} + mBSFNControlRegionLength_t const& ref_mBSFNControlRegionLength() const {return mBSFNControlRegionLength;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(subframeType); + v(reservedSubframePattern); + v(mBSFNControlRegionLength); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(subframeType); + v(reservedSubframePattern); + v(mBSFNControlRegionLength); + v(iE_Extensions); + + }; + void clear() + { + subframeType.clear(); + reservedSubframePattern.clear(); + mBSFNControlRegionLength.clear(); + iE_Extensions.clear(); + + }; + private: + subframeType_t subframeType; + reservedSubframePattern_t reservedSubframePattern; + mBSFNControlRegionLength_t mBSFNControlRegionLength; + iE_Extensions_t iE_Extensions; + +}; +/* +DataTrafficResourceIndication-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct DataTrafficResourceIndication_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +DataTrafficResourceIndication ::= SEQUENCE { + activationSFN INTEGER (0..1023), + sharedResourceType SharedResourceType, + reservedSubframePattern ReservedSubframePattern OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {DataTrafficResourceIndication-ExtIEs} } OPTIONAL, +... +} +*/ + +struct DataTrafficResourceIndication : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "DataTrafficResourceIndication";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct activationSFN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "activationSFN_t";} + using parent_t = asn::integer<>; + + }; + + activationSFN_t& ref_activationSFN() {return activationSFN;} + activationSFN_t const& ref_activationSFN() const {return activationSFN;} + struct sharedResourceType_t : SharedResourceType + { + static constexpr const char* name() {return "sharedResourceType_t";} + using parent_t = SharedResourceType; + + }; + sharedResourceType_t& ref_sharedResourceType() {return sharedResourceType;} + sharedResourceType_t const& ref_sharedResourceType() const {return sharedResourceType;} + struct reservedSubframePattern_t : ReservedSubframePattern + { + static constexpr const char* name() {return "reservedSubframePattern_t";} + using parent_t = ReservedSubframePattern; + static constexpr bool optional = true; + + }; + reservedSubframePattern_t& set_reservedSubframePattern() { reservedSubframePattern.setpresent(true); return reservedSubframePattern;} + reservedSubframePattern_t const* get_reservedSubframePattern() const {return reservedSubframePattern.is_valid() ? &reservedSubframePattern : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(activationSFN); + v(sharedResourceType); + v(reservedSubframePattern); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(activationSFN); + v(sharedResourceType); + v(reservedSubframePattern); + v(iE_Extensions); + + }; + void clear() + { + activationSFN.clear(); + sharedResourceType.clear(); + reservedSubframePattern.clear(); + iE_Extensions.clear(); + + }; + private: + activationSFN_t activationSFN; + sharedResourceType_t sharedResourceType; + reservedSubframePattern_t reservedSubframePattern; + iE_Extensions_t iE_Extensions; + +}; +/* +DeactivationIndication::= ENUMERATED { + deactivated, + ... +} +*/ + +struct DeactivationIndication : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "DeactivationIndication";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + deactivated + } index_t; + +}; + +/* +DeliveryStatus-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct DeliveryStatus_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +DeliveryStatus ::= SEQUENCE { + highestSuccessDeliveredPDCPSN INTEGER (0..4095), + iE-Extensions ProtocolExtensionContainer { {DeliveryStatus-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct DeliveryStatus : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "DeliveryStatus";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct highestSuccessDeliveredPDCPSN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "highestSuccessDeliveredPDCPSN_t";} + using parent_t = asn::integer<>; + + }; + + highestSuccessDeliveredPDCPSN_t& ref_highestSuccessDeliveredPDCPSN() {return highestSuccessDeliveredPDCPSN;} + highestSuccessDeliveredPDCPSN_t const& ref_highestSuccessDeliveredPDCPSN() const {return highestSuccessDeliveredPDCPSN;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(highestSuccessDeliveredPDCPSN); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(highestSuccessDeliveredPDCPSN); + v(iE_Extensions); + + }; + void clear() + { + highestSuccessDeliveredPDCPSN.clear(); + iE_Extensions.clear(); + + }; + private: + highestSuccessDeliveredPDCPSN_t highestSuccessDeliveredPDCPSN; + iE_Extensions_t iE_Extensions; + +}; +/* +DuplicationActivation::= ENUMERATED {active, inactive, ...} +*/ + +struct DuplicationActivation : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "DuplicationActivation";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + active + ,inactive + } index_t; + +}; + +/* +PA-Values ::= ENUMERATED { + dB-6, + dB-4dot77, + dB-3, + dB-1dot77, + dB0, + dB1, + dB2, + dB3, + ... +} +*/ + +struct PA_Values : asn::enumerated<8, 0, true> +{ + static constexpr const char* name() {return "PA-Values";} + using parent_t = asn::enumerated<8, 0, true>; + typedef enum { + dB_6 + ,dB_4dot77 + ,dB_3 + ,dB_1dot77 + ,dB0 + ,dB1 + ,dB2 + ,dB3 + } index_t; + +}; + +/* +DynamicNAICSInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct DynamicNAICSInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +DynamicNAICSInformation ::= SEQUENCE { + transmissionModes BIT STRING (SIZE(8)) OPTIONAL, + pB-information INTEGER(0..3) OPTIONAL, + pA-list SEQUENCE (SIZE(0..maxnoofPA)) OF PA-Values, + iE-Extensions ProtocolExtensionContainer { {DynamicNAICSInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct DynamicNAICSInformation : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "DynamicNAICSInformation";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct transmissionModes_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "transmissionModes_t";} + using parent_t = asn::bstring<>; + static constexpr bool optional = true; + + }; + + transmissionModes_t& set_transmissionModes() { transmissionModes.setpresent(true); return transmissionModes;} + transmissionModes_t const* get_transmissionModes() const {return transmissionModes.is_valid() ? &transmissionModes : nullptr;} + struct pB_information_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "pB_information_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + pB_information_t& set_pB_information() { pB_information.setpresent(true); return pB_information;} + pB_information_t const* get_pB_information() const {return pB_information.is_valid() ? &pB_information : nullptr;} + struct pA_list_t_elm : PA_Values + { + static constexpr const char* name() {return "pA_list_t_elm";} + using parent_t = PA_Values; + + }; + struct pA_list_t : asn::sequenceof + { + static constexpr const char* name() {return "pA_list_t";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + + }; + pA_list_t& ref_pA_list() {return pA_list;} + pA_list_t const& ref_pA_list() const {return pA_list;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(transmissionModes); + v(pB_information); + v(pA_list); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(transmissionModes); + v(pB_information); + v(pA_list); + v(iE_Extensions); + + }; + void clear() + { + transmissionModes.clear(); + pB_information.clear(); + pA_list.clear(); + iE_Extensions.clear(); + + }; + private: + transmissionModes_t transmissionModes; + pB_information_t pB_information; + pA_list_t pA_list; + iE_Extensions_t iE_Extensions; + +}; +/* +DynamicDLTransmissionInformation ::= CHOICE { + naics-active DynamicNAICSInformation, + naics-inactive NULL, + ... +} +*/ + +struct DynamicDLTransmissionInformation : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "DynamicDLTransmissionInformation";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~DynamicDLTransmissionInformation() {clear();} + struct naics_active_t : DynamicNAICSInformation + { + static constexpr const char* name() {return "naics_active_t";} + using parent_t = DynamicNAICSInformation; + + }; + struct naics_inactive_t : asn::nulltype + { + static constexpr const char* name() {return "naics_inactive_t";} + using parent_t = asn::nulltype; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + naics_active_t& select_naics_active() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + naics_active_t const* get_naics_active() const { if(get_index() == 1) { return &var.as();} return nullptr; } + naics_inactive_t& select_naics_inactive() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + naics_inactive_t const* get_naics_inactive() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(naics_active_t)]; + char dummy2[sizeof(naics_inactive_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RAB-ID ::= INTEGER (0..15, ...) +*/ + +struct E_RAB_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "E-RAB-ID";} + using parent_t = asn::integer<>; + +}; + +/* +E-RAB-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RAB_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RAB-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RAB-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RAB_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RAB-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + cause.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + cause_t cause; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RAB-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RAB-Item CRITICALITY ignore TYPE E-RAB-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RAB_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RAB_Item() { set(id_E_RAB_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RAB_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RAB_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RAB_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RAB_Item& select_id_E_RAB_Item() { return set(1); } + E_RAB_Item const* get_id_E_RAB_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RAB_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RAB_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RAB_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +QCI ::= INTEGER (0..255) +*/ + +struct QCI : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "QCI";} + using parent_t = asn::integer<>; + +}; + +/* +ExtendedBitRate ::= INTEGER (10000000001..4000000000000,...) +*/ + +struct ExtendedBitRate : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ExtendedBitRate";} + using parent_t = asn::integer<>; + +}; + +/* +GBR-QosInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extension for maximum bitrate > 10Gbps -- + { ID id-extended-e-RAB-MaximumBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-MaximumBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateDL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-e-RAB-GuaranteedBitrateUL CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ... +} +*/ + +struct GBR_QosInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_extended_e_RAB_MaximumBitrateDL() { set(id_extended_e_RAB_MaximumBitrateDL); type=1;} + void select_id_extended_e_RAB_MaximumBitrateUL() { set(id_extended_e_RAB_MaximumBitrateUL); type=2;} + void select_id_extended_e_RAB_GuaranteedBitrateDL() { set(id_extended_e_RAB_GuaranteedBitrateDL); type=3;} + void select_id_extended_e_RAB_GuaranteedBitrateUL() { set(id_extended_e_RAB_GuaranteedBitrateUL); type=4;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_extended_e_RAB_MaximumBitrateDL)) { type = 1; return true; } + else if(equal(id_extended_e_RAB_MaximumBitrateUL)) { type = 2; return true; } + else if(equal(id_extended_e_RAB_GuaranteedBitrateDL)) { type = 3; return true; } + else if(equal(id_extended_e_RAB_GuaranteedBitrateUL)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_extended_e_RAB_MaximumBitrateDL);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_extended_e_RAB_MaximumBitrateUL);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_extended_e_RAB_GuaranteedBitrateDL);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_extended_e_RAB_GuaranteedBitrateUL);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_extended_e_RAB_MaximumBitrateDL() { set(ignore); type=1;} + void select_id_extended_e_RAB_MaximumBitrateUL() { set(ignore); type=2;} + void select_id_extended_e_RAB_GuaranteedBitrateDL() { set(ignore); type=3;} + void select_id_extended_e_RAB_GuaranteedBitrateUL() { set(ignore); type=4;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ExtendedBitRate& select_id_extended_e_RAB_MaximumBitrateDL() { return set(1); } + ExtendedBitRate const* get_id_extended_e_RAB_MaximumBitrateDL() const { return get(1); } + ExtendedBitRate& select_id_extended_e_RAB_MaximumBitrateUL() { return set(2); } + ExtendedBitRate const* get_id_extended_e_RAB_MaximumBitrateUL() const { return get(2); } + ExtendedBitRate& select_id_extended_e_RAB_GuaranteedBitrateDL() { return set(3); } + ExtendedBitRate const* get_id_extended_e_RAB_GuaranteedBitrateDL() const { return get(3); } + ExtendedBitRate& select_id_extended_e_RAB_GuaranteedBitrateUL() { return set(4); } + ExtendedBitRate const* get_id_extended_e_RAB_GuaranteedBitrateUL() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_extended_e_RAB_MaximumBitrateDL()); return true; + case 2: v(select_id_extended_e_RAB_MaximumBitrateUL()); return true; + case 3: v(select_id_extended_e_RAB_GuaranteedBitrateDL()); return true; + case 4: v(select_id_extended_e_RAB_GuaranteedBitrateUL()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ExtendedBitRate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_extended_e_RAB_MaximumBitrateDL() { set(optional); type=1;} + void select_id_extended_e_RAB_MaximumBitrateUL() { set(optional); type=2;} + void select_id_extended_e_RAB_GuaranteedBitrateDL() { set(optional); type=3;} + void select_id_extended_e_RAB_GuaranteedBitrateUL() { set(optional); type=4;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GBR-QosInformation ::= SEQUENCE { + e-RAB-MaximumBitrateDL BitRate, + e-RAB-MaximumBitrateUL BitRate, + e-RAB-GuaranteedBitrateDL BitRate, + e-RAB-GuaranteedBitrateUL BitRate, + iE-Extensions ProtocolExtensionContainer { {GBR-QosInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GBR_QosInformation : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "GBR-QosInformation";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct e_RAB_MaximumBitrateDL_t : BitRate + { + static constexpr const char* name() {return "e_RAB_MaximumBitrateDL_t";} + using parent_t = BitRate; + + }; + e_RAB_MaximumBitrateDL_t& ref_e_RAB_MaximumBitrateDL() {return e_RAB_MaximumBitrateDL;} + e_RAB_MaximumBitrateDL_t const& ref_e_RAB_MaximumBitrateDL() const {return e_RAB_MaximumBitrateDL;} + struct e_RAB_MaximumBitrateUL_t : BitRate + { + static constexpr const char* name() {return "e_RAB_MaximumBitrateUL_t";} + using parent_t = BitRate; + + }; + e_RAB_MaximumBitrateUL_t& ref_e_RAB_MaximumBitrateUL() {return e_RAB_MaximumBitrateUL;} + e_RAB_MaximumBitrateUL_t const& ref_e_RAB_MaximumBitrateUL() const {return e_RAB_MaximumBitrateUL;} + struct e_RAB_GuaranteedBitrateDL_t : BitRate + { + static constexpr const char* name() {return "e_RAB_GuaranteedBitrateDL_t";} + using parent_t = BitRate; + + }; + e_RAB_GuaranteedBitrateDL_t& ref_e_RAB_GuaranteedBitrateDL() {return e_RAB_GuaranteedBitrateDL;} + e_RAB_GuaranteedBitrateDL_t const& ref_e_RAB_GuaranteedBitrateDL() const {return e_RAB_GuaranteedBitrateDL;} + struct e_RAB_GuaranteedBitrateUL_t : BitRate + { + static constexpr const char* name() {return "e_RAB_GuaranteedBitrateUL_t";} + using parent_t = BitRate; + + }; + e_RAB_GuaranteedBitrateUL_t& ref_e_RAB_GuaranteedBitrateUL() {return e_RAB_GuaranteedBitrateUL;} + e_RAB_GuaranteedBitrateUL_t const& ref_e_RAB_GuaranteedBitrateUL() const {return e_RAB_GuaranteedBitrateUL;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_MaximumBitrateDL); + v(e_RAB_MaximumBitrateUL); + v(e_RAB_GuaranteedBitrateDL); + v(e_RAB_GuaranteedBitrateUL); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_MaximumBitrateDL); + v(e_RAB_MaximumBitrateUL); + v(e_RAB_GuaranteedBitrateDL); + v(e_RAB_GuaranteedBitrateUL); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_MaximumBitrateDL.clear(); + e_RAB_MaximumBitrateUL.clear(); + e_RAB_GuaranteedBitrateDL.clear(); + e_RAB_GuaranteedBitrateUL.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_MaximumBitrateDL_t e_RAB_MaximumBitrateDL; + e_RAB_MaximumBitrateUL_t e_RAB_MaximumBitrateUL; + e_RAB_GuaranteedBitrateDL_t e_RAB_GuaranteedBitrateDL; + e_RAB_GuaranteedBitrateUL_t e_RAB_GuaranteedBitrateUL; + iE_Extensions_t iE_Extensions; + +}; +/* +Packet-LossRate ::= INTEGER(0..1000) +*/ + +struct Packet_LossRate : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Packet-LossRate";} + using parent_t = asn::integer<>; + +}; + +/* +E-RAB-Level-QoS-Parameters-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extended for introduction of downlink and uplink packet loss rate for enhanced Voice performance – + { ID id-DownlinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}| + { ID id-UplinkPacketLossRate CRITICALITY ignore EXTENSION Packet-LossRate PRESENCE optional}, + ... +} +*/ + +struct E_RAB_Level_QoS_Parameters_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DownlinkPacketLossRate() { set(id_DownlinkPacketLossRate); type=1;} + void select_id_UplinkPacketLossRate() { set(id_UplinkPacketLossRate); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DownlinkPacketLossRate)) { type = 1; return true; } + else if(equal(id_UplinkPacketLossRate)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DownlinkPacketLossRate);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_UplinkPacketLossRate);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DownlinkPacketLossRate() { set(ignore); type=1;} + void select_id_UplinkPacketLossRate() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + Packet_LossRate& select_id_DownlinkPacketLossRate() { return set(1); } + Packet_LossRate const* get_id_DownlinkPacketLossRate() const { return get(1); } + Packet_LossRate& select_id_UplinkPacketLossRate() { return set(2); } + Packet_LossRate const* get_id_UplinkPacketLossRate() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DownlinkPacketLossRate()); return true; + case 2: v(select_id_UplinkPacketLossRate()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Packet_LossRate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DownlinkPacketLossRate() { set(optional); type=1;} + void select_id_UplinkPacketLossRate() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RAB-Level-QoS-Parameters ::= SEQUENCE { + qCI QCI, + allocationAndRetentionPriority AllocationAndRetentionPriority, + gbrQosInformation GBR-QosInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RAB-Level-QoS-Parameters-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RAB_Level_QoS_Parameters : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "E-RAB-Level-QoS-Parameters";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct qCI_t : QCI + { + static constexpr const char* name() {return "qCI_t";} + using parent_t = QCI; + + }; + qCI_t& ref_qCI() {return qCI;} + qCI_t const& ref_qCI() const {return qCI;} + struct allocationAndRetentionPriority_t : AllocationAndRetentionPriority + { + static constexpr const char* name() {return "allocationAndRetentionPriority_t";} + using parent_t = AllocationAndRetentionPriority; + + }; + allocationAndRetentionPriority_t& ref_allocationAndRetentionPriority() {return allocationAndRetentionPriority;} + allocationAndRetentionPriority_t const& ref_allocationAndRetentionPriority() const {return allocationAndRetentionPriority;} + struct gbrQosInformation_t : GBR_QosInformation + { + static constexpr const char* name() {return "gbrQosInformation_t";} + using parent_t = GBR_QosInformation; + static constexpr bool optional = true; + + }; + gbrQosInformation_t& set_gbrQosInformation() { gbrQosInformation.setpresent(true); return gbrQosInformation;} + gbrQosInformation_t const* get_gbrQosInformation() const {return gbrQosInformation.is_valid() ? &gbrQosInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(qCI); + v(allocationAndRetentionPriority); + v(gbrQosInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(qCI); + v(allocationAndRetentionPriority); + v(gbrQosInformation); + v(iE_Extensions); + + }; + void clear() + { + qCI.clear(); + allocationAndRetentionPriority.clear(); + gbrQosInformation.clear(); + iE_Extensions.clear(); + + }; + private: + qCI_t qCI; + allocationAndRetentionPriority_t allocationAndRetentionPriority; + gbrQosInformation_t gbrQosInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RAB-List ::= SEQUENCE (SIZE(1.. maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RAB-ItemIEs} } +*/ + +struct E_RAB_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RAB_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RAB_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RAB-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABUsageReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABUsageReport_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABUsageReport-Item ::= SEQUENCE { + startTimeStamp OCTET STRING (SIZE(4)), + endTimeStamp OCTET STRING (SIZE(4)), + usageCountUL INTEGER (0..4294967295), + usageCountDL INTEGER (0..4294967295), + iE-Extensions ProtocolExtensionContainer { {E-RABUsageReport-Item-ExtIEs} } OPTIONAL, +... +} +*/ + +struct E_RABUsageReport_Item : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABUsageReport-Item";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct startTimeStamp_t : asn::ostring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "startTimeStamp_t";} + using parent_t = asn::ostring<>; + + }; + + startTimeStamp_t& ref_startTimeStamp() {return startTimeStamp;} + startTimeStamp_t const& ref_startTimeStamp() const {return startTimeStamp;} + struct endTimeStamp_t : asn::ostring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "endTimeStamp_t";} + using parent_t = asn::ostring<>; + + }; + + endTimeStamp_t& ref_endTimeStamp() {return endTimeStamp;} + endTimeStamp_t const& ref_endTimeStamp() const {return endTimeStamp;} + struct usageCountUL_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "usageCountUL_t";} + using parent_t = asn::integer<>; + + }; + + usageCountUL_t& ref_usageCountUL() {return usageCountUL;} + usageCountUL_t const& ref_usageCountUL() const {return usageCountUL;} + struct usageCountDL_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "usageCountDL_t";} + using parent_t = asn::integer<>; + + }; + + usageCountDL_t& ref_usageCountDL() {return usageCountDL;} + usageCountDL_t const& ref_usageCountDL() const {return usageCountDL;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(startTimeStamp); + v(endTimeStamp); + v(usageCountUL); + v(usageCountDL); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(startTimeStamp); + v(endTimeStamp); + v(usageCountUL); + v(usageCountDL); + v(iE_Extensions); + + }; + void clear() + { + startTimeStamp.clear(); + endTimeStamp.clear(); + usageCountUL.clear(); + usageCountDL.clear(); + iE_Extensions.clear(); + + }; + private: + startTimeStamp_t startTimeStamp; + endTimeStamp_t endTimeStamp; + usageCountUL_t usageCountUL; + usageCountDL_t usageCountDL; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABUsageReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABUsageReport-Item CRITICALITY ignore TYPE E-RABUsageReport-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RABUsageReport_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABUsageReport_Item() { set(id_E_RABUsageReport_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABUsageReport_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABUsageReport_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABUsageReport_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABUsageReport_Item& select_id_E_RABUsageReport_Item() { return set(1); } + E_RABUsageReport_Item const* get_id_E_RABUsageReport_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABUsageReport_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABUsageReport_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABUsageReport_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABUsageReportList ::= SEQUENCE (SIZE(1..maxnooftimeperiods)) OF ProtocolIE-Single-Container { {E-RABUsageReport-ItemIEs} } +*/ + +struct E_RABUsageReportList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABUsageReportList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABUsageReportList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABUsageReportList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +EARFCN ::= INTEGER (0..maxEARFCN) +*/ + +struct EARFCN : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "EARFCN";} + using parent_t = asn::integer<>; + +}; + +/* +EARFCNExtension ::= INTEGER(maxEARFCNPlusOne..newmaxEARFCN, ...) +*/ + +struct EARFCNExtension : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "EARFCNExtension";} + using parent_t = asn::integer<>; + +}; + +/* +EN-DC-ResourceConfigurationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct EN_DC_ResourceConfigurationExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +EN-DC-ResourceConfiguration ::= SEQUENCE { + pDCPatSgNB ENUMERATED {present, not-present, ...}, + mCGresources ENUMERATED {present, not-present, ...}, + sCGresources ENUMERATED {present, not-present, ...}, + iE-Extensions ProtocolExtensionContainer { {EN-DC-ResourceConfigurationExtIEs} } OPTIONAL, + ... +} +*/ + +struct EN_DC_ResourceConfiguration : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "EN-DC-ResourceConfiguration";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct pDCPatSgNB_t : asn::enumerated<2, 0, true> + { + static constexpr const char* name() {return "pDCPatSgNB_t";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + present + ,not_present + } index_t; + + }; + + pDCPatSgNB_t& ref_pDCPatSgNB() {return pDCPatSgNB;} + pDCPatSgNB_t const& ref_pDCPatSgNB() const {return pDCPatSgNB;} + struct mCGresources_t : asn::enumerated<2, 0, true> + { + static constexpr const char* name() {return "mCGresources_t";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + present + ,not_present + } index_t; + + }; + + mCGresources_t& ref_mCGresources() {return mCGresources;} + mCGresources_t const& ref_mCGresources() const {return mCGresources;} + struct sCGresources_t : asn::enumerated<2, 0, true> + { + static constexpr const char* name() {return "sCGresources_t";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + present + ,not_present + } index_t; + + }; + + sCGresources_t& ref_sCGresources() {return sCGresources;} + sCGresources_t const& ref_sCGresources() const {return sCGresources;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pDCPatSgNB); + v(mCGresources); + v(sCGresources); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pDCPatSgNB); + v(mCGresources); + v(sCGresources); + v(iE_Extensions); + + }; + void clear() + { + pDCPatSgNB.clear(); + mCGresources.clear(); + sCGresources.clear(); + iE_Extensions.clear(); + + }; + private: + pDCPatSgNB_t pDCPatSgNB; + mCGresources_t mCGresources; + sCGresources_t sCGresources; + iE_Extensions_t iE_Extensions; + +}; +/* +ENB-ID ::= CHOICE { + macro-eNB-ID BIT STRING (SIZE (20)), + home-eNB-ID BIT STRING (SIZE (28)), + ... , + short-Macro-eNB-ID BIT STRING (SIZE(18)), + long-Macro-eNB-ID BIT STRING (SIZE(21)) +} +*/ + +struct ENB_ID : asn::choice<4, 2, true> +{ + static constexpr const char* name() {return "ENB-ID";} + using parent_t = asn::choice<4, 2, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~ENB_ID() {clear();} + struct macro_eNB_ID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "macro_eNB_ID_t";} + using parent_t = asn::bstring<>; + + }; + + struct home_eNB_ID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "home_eNB_ID_t";} + using parent_t = asn::bstring<>; + + }; + + struct short_Macro_eNB_ID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "short_Macro_eNB_ID_t";} + using parent_t = asn::bstring<>; + + }; + + struct long_Macro_eNB_ID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "long_Macro_eNB_ID_t";} + using parent_t = asn::bstring<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + macro_eNB_ID_t& select_macro_eNB_ID() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + macro_eNB_ID_t const* get_macro_eNB_ID() const { if(get_index() == 1) { return &var.as();} return nullptr; } + home_eNB_ID_t& select_home_eNB_ID() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + home_eNB_ID_t const* get_home_eNB_ID() const { if(get_index() == 2) { return &var.as();} return nullptr; } + short_Macro_eNB_ID_t& select_short_Macro_eNB_ID() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + short_Macro_eNB_ID_t const* get_short_Macro_eNB_ID() const { if(get_index() == 3) { return &var.as();} return nullptr; } + long_Macro_eNB_ID_t& select_long_Macro_eNB_ID() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + long_Macro_eNB_ID_t const* get_long_Macro_eNB_ID() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(macro_eNB_ID_t)]; + char dummy2[sizeof(home_eNB_ID_t)]; + char dummy3[sizeof(short_Macro_eNB_ID_t)]; + char dummy4[sizeof(long_Macro_eNB_ID_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMN-Identity +*/ + +struct EPLMNs_elm : PLMN_Identity +{ + static constexpr const char* name() {return "EPLMNs_elm";} + using parent_t = PLMN_Identity; + +}; +struct EPLMNs : asn::sequenceof +{ + static constexpr const char* name() {return "EPLMNs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +UserPlaneTrafficActivityReport ::= ENUMERATED {inactive, re-activated, ...} +*/ + +struct UserPlaneTrafficActivityReport : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "UserPlaneTrafficActivityReport";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + inactive + ,re_activated + } index_t; + +}; + +/* +ERABActivityNotifyItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ERABActivityNotifyItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ERABActivityNotifyItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + activityReport UserPlaneTrafficActivityReport, + iE-Extensions ProtocolExtensionContainer { {ERABActivityNotifyItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ERABActivityNotifyItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ERABActivityNotifyItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct activityReport_t : UserPlaneTrafficActivityReport + { + static constexpr const char* name() {return "activityReport_t";} + using parent_t = UserPlaneTrafficActivityReport; + + }; + activityReport_t& ref_activityReport() {return activityReport;} + activityReport_t const& ref_activityReport() const {return activityReport;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(activityReport); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(activityReport); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + activityReport.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + activityReport_t activityReport; + iE_Extensions_t iE_Extensions; + +}; +/* +ERABActivityNotifyItemList ::= SEQUENCE (SIZE (0..maxnoofBearers)) OF ERABActivityNotifyItem +*/ + +struct ERABActivityNotifyItemList_elm : ERABActivityNotifyItem +{ + static constexpr const char* name() {return "ERABActivityNotifyItemList_elm";} + using parent_t = ERABActivityNotifyItem; + +}; +struct ERABActivityNotifyItemList : asn::sequenceof +{ + static constexpr const char* name() {return "ERABActivityNotifyItemList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +Transmission-Bandwidth ::= ENUMERATED { + bw6, + bw15, + bw25, + bw50, + bw75, + bw100, + ..., + bw1 +} +*/ + +struct Transmission_Bandwidth : asn::enumerated<7, 1, true> +{ + static constexpr const char* name() {return "Transmission-Bandwidth";} + using parent_t = asn::enumerated<7, 1, true>; + typedef enum { + bw6 + ,bw15 + ,bw25 + ,bw50 + ,bw75 + ,bw100 + ,bw1 + } index_t; + +}; + +/* +OffsetOfNbiotChannelNumberToEARFCN ::= ENUMERATED { + minusTen, + minusNine, + minusEight, + minusSeven, + minusSix, + minusFive, + minusFour, + minusThree, + minusTwo, + minusOne, + minusZeroDotFive, + zero, + one, + two, + three, + four, + five, + six, + seven, + eight, + nine, + ... +} +*/ + +struct OffsetOfNbiotChannelNumberToEARFCN : asn::enumerated<21, 0, true> +{ + static constexpr const char* name() {return "OffsetOfNbiotChannelNumberToEARFCN";} + using parent_t = asn::enumerated<21, 0, true>; + typedef enum { + minusTen + ,minusNine + ,minusEight + ,minusSeven + ,minusSix + ,minusFive + ,minusFour + ,minusThree + ,minusTwo + ,minusOne + ,minusZeroDotFive + ,zero + ,one + ,two + ,three + ,four + ,five + ,six + ,seven + ,eight + ,nine + } index_t; + +}; + +/* +NRS-NSSS-PowerOffset ::= ENUMERATED { minusThree, zero, three, ...} +*/ + +struct NRS_NSSS_PowerOffset : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "NRS-NSSS-PowerOffset";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + minusThree + ,zero + ,three + } index_t; + +}; + +/* +NSSS-NumOccasionDifferentPrecoder ::= ENUMERATED { two, four, eight, ...} +*/ + +struct NSSS_NumOccasionDifferentPrecoder : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "NSSS-NumOccasionDifferentPrecoder";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + two + ,four + ,eight + } index_t; + +}; + +/* +FDD-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-UL-EARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-DL-EARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-OffsetOfNbiotChannelNumberToDL-EARFCN CRITICALITY reject EXTENSION OffsetOfNbiotChannelNumberToEARFCN PRESENCE optional}| + { ID id-OffsetOfNbiotChannelNumberToUL-EARFCN CRITICALITY reject EXTENSION OffsetOfNbiotChannelNumberToEARFCN PRESENCE optional}| + { ID id-NRS-NSSS-PowerOffset CRITICALITY ignore EXTENSION NRS-NSSS-PowerOffset PRESENCE optional}| + { ID id-NSSS-NumOccasionDifferentPrecoder CRITICALITY ignore EXTENSION NSSS-NumOccasionDifferentPrecoder PRESENCE optional}, + ... +} +*/ + +struct FDD_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_UL_EARFCNExtension() { set(id_UL_EARFCNExtension); type=1;} + void select_id_DL_EARFCNExtension() { set(id_DL_EARFCNExtension); type=2;} + void select_id_OffsetOfNbiotChannelNumberToDL_EARFCN() { set(id_OffsetOfNbiotChannelNumberToDL_EARFCN); type=3;} + void select_id_OffsetOfNbiotChannelNumberToUL_EARFCN() { set(id_OffsetOfNbiotChannelNumberToUL_EARFCN); type=4;} + void select_id_NRS_NSSS_PowerOffset() { set(id_NRS_NSSS_PowerOffset); type=5;} + void select_id_NSSS_NumOccasionDifferentPrecoder() { set(id_NSSS_NumOccasionDifferentPrecoder); type=6;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_UL_EARFCNExtension)) { type = 1; return true; } + else if(equal(id_DL_EARFCNExtension)) { type = 2; return true; } + else if(equal(id_OffsetOfNbiotChannelNumberToDL_EARFCN)) { type = 3; return true; } + else if(equal(id_OffsetOfNbiotChannelNumberToUL_EARFCN)) { type = 4; return true; } + else if(equal(id_NRS_NSSS_PowerOffset)) { type = 5; return true; } + else if(equal(id_NSSS_NumOccasionDifferentPrecoder)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_UL_EARFCNExtension);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_DL_EARFCNExtension);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_OffsetOfNbiotChannelNumberToDL_EARFCN);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_OffsetOfNbiotChannelNumberToUL_EARFCN);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_NRS_NSSS_PowerOffset);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_NSSS_NumOccasionDifferentPrecoder);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_UL_EARFCNExtension() { set(reject); type=1;} + void select_id_DL_EARFCNExtension() { set(reject); type=2;} + void select_id_OffsetOfNbiotChannelNumberToDL_EARFCN() { set(reject); type=3;} + void select_id_OffsetOfNbiotChannelNumberToUL_EARFCN() { set(reject); type=4;} + void select_id_NRS_NSSS_PowerOffset() { set(ignore); type=5;} + void select_id_NSSS_NumOccasionDifferentPrecoder() { set(ignore); type=6;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + EARFCNExtension& select_id_UL_EARFCNExtension() { return set(1); } + EARFCNExtension const* get_id_UL_EARFCNExtension() const { return get(1); } + EARFCNExtension& select_id_DL_EARFCNExtension() { return set(2); } + EARFCNExtension const* get_id_DL_EARFCNExtension() const { return get(2); } + OffsetOfNbiotChannelNumberToEARFCN& select_id_OffsetOfNbiotChannelNumberToDL_EARFCN() { return set(3); } + OffsetOfNbiotChannelNumberToEARFCN const* get_id_OffsetOfNbiotChannelNumberToDL_EARFCN() const { return get(3); } + OffsetOfNbiotChannelNumberToEARFCN& select_id_OffsetOfNbiotChannelNumberToUL_EARFCN() { return set(4); } + OffsetOfNbiotChannelNumberToEARFCN const* get_id_OffsetOfNbiotChannelNumberToUL_EARFCN() const { return get(4); } + NRS_NSSS_PowerOffset& select_id_NRS_NSSS_PowerOffset() { return set(5); } + NRS_NSSS_PowerOffset const* get_id_NRS_NSSS_PowerOffset() const { return get(5); } + NSSS_NumOccasionDifferentPrecoder& select_id_NSSS_NumOccasionDifferentPrecoder() { return set(6); } + NSSS_NumOccasionDifferentPrecoder const* get_id_NSSS_NumOccasionDifferentPrecoder() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_UL_EARFCNExtension()); return true; + case 2: v(select_id_DL_EARFCNExtension()); return true; + case 3: v(select_id_OffsetOfNbiotChannelNumberToDL_EARFCN()); return true; + case 4: v(select_id_OffsetOfNbiotChannelNumberToUL_EARFCN()); return true; + case 5: v(select_id_NRS_NSSS_PowerOffset()); return true; + case 6: v(select_id_NSSS_NumOccasionDifferentPrecoder()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(EARFCNExtension)]; + char dummy2[sizeof(NRS_NSSS_PowerOffset)]; + char dummy3[sizeof(NSSS_NumOccasionDifferentPrecoder)]; + char dummy4[sizeof(OffsetOfNbiotChannelNumberToEARFCN)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_UL_EARFCNExtension() { set(optional); type=1;} + void select_id_DL_EARFCNExtension() { set(optional); type=2;} + void select_id_OffsetOfNbiotChannelNumberToDL_EARFCN() { set(optional); type=3;} + void select_id_OffsetOfNbiotChannelNumberToUL_EARFCN() { set(optional); type=4;} + void select_id_NRS_NSSS_PowerOffset() { set(optional); type=5;} + void select_id_NSSS_NumOccasionDifferentPrecoder() { set(optional); type=6;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +FDD-Info ::= SEQUENCE { + uL-EARFCN EARFCN, + dL-EARFCN EARFCN, + uL-Transmission-Bandwidth Transmission-Bandwidth, + dL-Transmission-Bandwidth Transmission-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {FDD-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct FDD_Info : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "FDD-Info";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct uL_EARFCN_t : EARFCN + { + static constexpr const char* name() {return "uL_EARFCN_t";} + using parent_t = EARFCN; + + }; + uL_EARFCN_t& ref_uL_EARFCN() {return uL_EARFCN;} + uL_EARFCN_t const& ref_uL_EARFCN() const {return uL_EARFCN;} + struct dL_EARFCN_t : EARFCN + { + static constexpr const char* name() {return "dL_EARFCN_t";} + using parent_t = EARFCN; + + }; + dL_EARFCN_t& ref_dL_EARFCN() {return dL_EARFCN;} + dL_EARFCN_t const& ref_dL_EARFCN() const {return dL_EARFCN;} + struct uL_Transmission_Bandwidth_t : Transmission_Bandwidth + { + static constexpr const char* name() {return "uL_Transmission_Bandwidth_t";} + using parent_t = Transmission_Bandwidth; + + }; + uL_Transmission_Bandwidth_t& ref_uL_Transmission_Bandwidth() {return uL_Transmission_Bandwidth;} + uL_Transmission_Bandwidth_t const& ref_uL_Transmission_Bandwidth() const {return uL_Transmission_Bandwidth;} + struct dL_Transmission_Bandwidth_t : Transmission_Bandwidth + { + static constexpr const char* name() {return "dL_Transmission_Bandwidth_t";} + using parent_t = Transmission_Bandwidth; + + }; + dL_Transmission_Bandwidth_t& ref_dL_Transmission_Bandwidth() {return dL_Transmission_Bandwidth;} + dL_Transmission_Bandwidth_t const& ref_dL_Transmission_Bandwidth() const {return dL_Transmission_Bandwidth;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uL_EARFCN); + v(dL_EARFCN); + v(uL_Transmission_Bandwidth); + v(dL_Transmission_Bandwidth); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uL_EARFCN); + v(dL_EARFCN); + v(uL_Transmission_Bandwidth); + v(dL_Transmission_Bandwidth); + v(iE_Extensions); + + }; + void clear() + { + uL_EARFCN.clear(); + dL_EARFCN.clear(); + uL_Transmission_Bandwidth.clear(); + dL_Transmission_Bandwidth.clear(); + iE_Extensions.clear(); + + }; + private: + uL_EARFCN_t uL_EARFCN; + dL_EARFCN_t dL_EARFCN; + uL_Transmission_Bandwidth_t uL_Transmission_Bandwidth; + dL_Transmission_Bandwidth_t dL_Transmission_Bandwidth; + iE_Extensions_t iE_Extensions; + +}; +/* +SubframeAssignment ::= ENUMERATED { + sa0, + sa1, + sa2, + sa3, + sa4, + sa5, + sa6, + ... +} +*/ + +struct SubframeAssignment : asn::enumerated<7, 0, true> +{ + static constexpr const char* name() {return "SubframeAssignment";} + using parent_t = asn::enumerated<7, 0, true>; + typedef enum { + sa0 + ,sa1 + ,sa2 + ,sa3 + ,sa4 + ,sa5 + ,sa6 + } index_t; + +}; + +/* +SpecialSubframePatterns ::= ENUMERATED { + ssp0, + ssp1, + ssp2, + ssp3, + ssp4, + ssp5, + ssp6, + ssp7, + ssp8, + ... +} +*/ + +struct SpecialSubframePatterns : asn::enumerated<9, 0, true> +{ + static constexpr const char* name() {return "SpecialSubframePatterns";} + using parent_t = asn::enumerated<9, 0, true>; + typedef enum { + ssp0 + ,ssp1 + ,ssp2 + ,ssp3 + ,ssp4 + ,ssp5 + ,ssp6 + ,ssp7 + ,ssp8 + } index_t; + +}; + +/* +SpecialSubframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SpecialSubframe_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SpecialSubframe-Info ::= SEQUENCE { + specialSubframePatterns SpecialSubframePatterns, + cyclicPrefixDL CyclicPrefixDL, + cyclicPrefixUL CyclicPrefixUL, + iE-Extensions ProtocolExtensionContainer { {SpecialSubframe-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SpecialSubframe_Info : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "SpecialSubframe-Info";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct specialSubframePatterns_t : SpecialSubframePatterns + { + static constexpr const char* name() {return "specialSubframePatterns_t";} + using parent_t = SpecialSubframePatterns; + + }; + specialSubframePatterns_t& ref_specialSubframePatterns() {return specialSubframePatterns;} + specialSubframePatterns_t const& ref_specialSubframePatterns() const {return specialSubframePatterns;} + struct cyclicPrefixDL_t : CyclicPrefixDL + { + static constexpr const char* name() {return "cyclicPrefixDL_t";} + using parent_t = CyclicPrefixDL; + + }; + cyclicPrefixDL_t& ref_cyclicPrefixDL() {return cyclicPrefixDL;} + cyclicPrefixDL_t const& ref_cyclicPrefixDL() const {return cyclicPrefixDL;} + struct cyclicPrefixUL_t : CyclicPrefixUL + { + static constexpr const char* name() {return "cyclicPrefixUL_t";} + using parent_t = CyclicPrefixUL; + + }; + cyclicPrefixUL_t& ref_cyclicPrefixUL() {return cyclicPrefixUL;} + cyclicPrefixUL_t const& ref_cyclicPrefixUL() const {return cyclicPrefixUL;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(specialSubframePatterns); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(specialSubframePatterns); + v(cyclicPrefixDL); + v(cyclicPrefixUL); + v(iE_Extensions); + + }; + void clear() + { + specialSubframePatterns.clear(); + cyclicPrefixDL.clear(); + cyclicPrefixUL.clear(); + iE_Extensions.clear(); + + }; + private: + specialSubframePatterns_t specialSubframePatterns; + cyclicPrefixDL_t cyclicPrefixDL; + cyclicPrefixUL_t cyclicPrefixUL; + iE_Extensions_t iE_Extensions; + +}; +/* +TDD-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-AdditionalSpecialSubframe-Info CRITICALITY ignore EXTENSION AdditionalSpecialSubframe-Info PRESENCE optional}| + { ID id-eARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}| + { ID id-AdditionalSpecialSubframeExtension-Info CRITICALITY ignore EXTENSION AdditionalSpecialSubframeExtension-Info PRESENCE optional}, + ... +} +*/ + +struct TDD_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_AdditionalSpecialSubframe_Info() { set(id_AdditionalSpecialSubframe_Info); type=1;} + void select_id_eARFCNExtension() { set(id_eARFCNExtension); type=2;} + void select_id_AdditionalSpecialSubframeExtension_Info() { set(id_AdditionalSpecialSubframeExtension_Info); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_AdditionalSpecialSubframe_Info)) { type = 1; return true; } + else if(equal(id_eARFCNExtension)) { type = 2; return true; } + else if(equal(id_AdditionalSpecialSubframeExtension_Info)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_AdditionalSpecialSubframe_Info);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_eARFCNExtension);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_AdditionalSpecialSubframeExtension_Info);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_AdditionalSpecialSubframe_Info() { set(ignore); type=1;} + void select_id_eARFCNExtension() { set(reject); type=2;} + void select_id_AdditionalSpecialSubframeExtension_Info() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + AdditionalSpecialSubframe_Info& select_id_AdditionalSpecialSubframe_Info() { return set(1); } + AdditionalSpecialSubframe_Info const* get_id_AdditionalSpecialSubframe_Info() const { return get(1); } + EARFCNExtension& select_id_eARFCNExtension() { return set(2); } + EARFCNExtension const* get_id_eARFCNExtension() const { return get(2); } + AdditionalSpecialSubframeExtension_Info& select_id_AdditionalSpecialSubframeExtension_Info() { return set(3); } + AdditionalSpecialSubframeExtension_Info const* get_id_AdditionalSpecialSubframeExtension_Info() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_AdditionalSpecialSubframe_Info()); return true; + case 2: v(select_id_eARFCNExtension()); return true; + case 3: v(select_id_AdditionalSpecialSubframeExtension_Info()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(AdditionalSpecialSubframeExtension_Info)]; + char dummy2[sizeof(AdditionalSpecialSubframe_Info)]; + char dummy3[sizeof(EARFCNExtension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_AdditionalSpecialSubframe_Info() { set(optional); type=1;} + void select_id_eARFCNExtension() { set(optional); type=2;} + void select_id_AdditionalSpecialSubframeExtension_Info() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TDD-Info ::= SEQUENCE { + eARFCN EARFCN, + transmission-Bandwidth Transmission-Bandwidth, + subframeAssignment SubframeAssignment, + specialSubframe-Info SpecialSubframe-Info, + iE-Extensions ProtocolExtensionContainer { {TDD-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TDD_Info : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "TDD-Info";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct eARFCN_t : EARFCN + { + static constexpr const char* name() {return "eARFCN_t";} + using parent_t = EARFCN; + + }; + eARFCN_t& ref_eARFCN() {return eARFCN;} + eARFCN_t const& ref_eARFCN() const {return eARFCN;} + struct transmission_Bandwidth_t : Transmission_Bandwidth + { + static constexpr const char* name() {return "transmission_Bandwidth_t";} + using parent_t = Transmission_Bandwidth; + + }; + transmission_Bandwidth_t& ref_transmission_Bandwidth() {return transmission_Bandwidth;} + transmission_Bandwidth_t const& ref_transmission_Bandwidth() const {return transmission_Bandwidth;} + struct subframeAssignment_t : SubframeAssignment + { + static constexpr const char* name() {return "subframeAssignment_t";} + using parent_t = SubframeAssignment; + + }; + subframeAssignment_t& ref_subframeAssignment() {return subframeAssignment;} + subframeAssignment_t const& ref_subframeAssignment() const {return subframeAssignment;} + struct specialSubframe_Info_t : SpecialSubframe_Info + { + static constexpr const char* name() {return "specialSubframe_Info_t";} + using parent_t = SpecialSubframe_Info; + + }; + specialSubframe_Info_t& ref_specialSubframe_Info() {return specialSubframe_Info;} + specialSubframe_Info_t const& ref_specialSubframe_Info() const {return specialSubframe_Info;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(eARFCN); + v(transmission_Bandwidth); + v(subframeAssignment); + v(specialSubframe_Info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(eARFCN); + v(transmission_Bandwidth); + v(subframeAssignment); + v(specialSubframe_Info); + v(iE_Extensions); + + }; + void clear() + { + eARFCN.clear(); + transmission_Bandwidth.clear(); + subframeAssignment.clear(); + specialSubframe_Info.clear(); + iE_Extensions.clear(); + + }; + private: + eARFCN_t eARFCN; + transmission_Bandwidth_t transmission_Bandwidth; + subframeAssignment_t subframeAssignment; + specialSubframe_Info_t specialSubframe_Info; + iE_Extensions_t iE_Extensions; + +}; +/* +EUTRA-Mode-Info ::= CHOICE { + fDD FDD-Info, + tDD TDD-Info, + ... +} +*/ + +struct EUTRA_Mode_Info : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "EUTRA-Mode-Info";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~EUTRA_Mode_Info() {clear();} + struct fDD_t : FDD_Info + { + static constexpr const char* name() {return "fDD_t";} + using parent_t = FDD_Info; + + }; + struct tDD_t : TDD_Info + { + static constexpr const char* name() {return "tDD_t";} + using parent_t = TDD_Info; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + fDD_t& select_fDD() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + fDD_t const* get_fDD() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tDD_t& select_tDD() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tDD_t const* get_tDD() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(fDD_t)]; + char dummy2[sizeof(tDD_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +EUTRANTraceID ::= OCTET STRING (SIZE (8)) +*/ + +struct EUTRANTraceID : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "EUTRANTraceID";} + using parent_t = asn::ostring<>; + +}; + +/* +EncryptionAlgorithms ::= BIT STRING (SIZE (16, ...)) +*/ + +struct EncryptionAlgorithms : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "EncryptionAlgorithms";} + using parent_t = asn::bstring<>; + +}; + +/* +RNTP-Threshold ::= ENUMERATED { + minusInfinity, + minusEleven, + minusTen, + minusNine, + minusEight, + minusSeven, + minusSix, + minusFive, + minusFour, + minusThree, + minusTwo, + minusOne, + zero, + one, + two, + three, + ... +} +*/ + +struct RNTP_Threshold : asn::enumerated<16, 0, true> +{ + static constexpr const char* name() {return "RNTP-Threshold";} + using parent_t = asn::enumerated<16, 0, true>; + typedef enum { + minusInfinity + ,minusEleven + ,minusTen + ,minusNine + ,minusEight + ,minusSeven + ,minusSix + ,minusFive + ,minusFour + ,minusThree + ,minusTwo + ,minusOne + ,zero + ,one + ,two + ,three + } index_t; + +}; + +/* +EnhancedRNTPStartTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct EnhancedRNTPStartTime_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +EnhancedRNTPStartTime ::= SEQUENCE { + startSFN INTEGER (0..1023, ...), + startSubframeNumber INTEGER (0..9, ...), + iE-Extensions ProtocolExtensionContainer { {EnhancedRNTPStartTime-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct EnhancedRNTPStartTime : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "EnhancedRNTPStartTime";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct startSFN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "startSFN_t";} + using parent_t = asn::integer<>; + + }; + + startSFN_t& ref_startSFN() {return startSFN;} + startSFN_t const& ref_startSFN() const {return startSFN;} + struct startSubframeNumber_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "startSubframeNumber_t";} + using parent_t = asn::integer<>; + + }; + + startSubframeNumber_t& ref_startSubframeNumber() {return startSubframeNumber;} + startSubframeNumber_t const& ref_startSubframeNumber() const {return startSubframeNumber;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(startSFN); + v(startSubframeNumber); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(startSFN); + v(startSubframeNumber); + v(iE_Extensions); + + }; + void clear() + { + startSFN.clear(); + startSubframeNumber.clear(); + iE_Extensions.clear(); + + }; + private: + startSFN_t startSFN; + startSubframeNumber_t startSubframeNumber; + iE_Extensions_t iE_Extensions; + +}; +/* +EnhancedRNTP-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct EnhancedRNTP_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +EnhancedRNTP ::= SEQUENCE { + enhancedRNTPBitmap BIT STRING (SIZE(12..8800, ...)), + rNTP-High-Power-Threshold RNTP-Threshold, + enhancedRNTPStartTime EnhancedRNTPStartTime OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {EnhancedRNTP-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct EnhancedRNTP : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "EnhancedRNTP";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct enhancedRNTPBitmap_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "enhancedRNTPBitmap_t";} + using parent_t = asn::bstring<>; + + }; + + enhancedRNTPBitmap_t& ref_enhancedRNTPBitmap() {return enhancedRNTPBitmap;} + enhancedRNTPBitmap_t const& ref_enhancedRNTPBitmap() const {return enhancedRNTPBitmap;} + struct rNTP_High_Power_Threshold_t : RNTP_Threshold + { + static constexpr const char* name() {return "rNTP_High_Power_Threshold_t";} + using parent_t = RNTP_Threshold; + + }; + rNTP_High_Power_Threshold_t& ref_rNTP_High_Power_Threshold() {return rNTP_High_Power_Threshold;} + rNTP_High_Power_Threshold_t const& ref_rNTP_High_Power_Threshold() const {return rNTP_High_Power_Threshold;} + struct enhancedRNTPStartTime_t : EnhancedRNTPStartTime + { + static constexpr const char* name() {return "enhancedRNTPStartTime_t";} + using parent_t = EnhancedRNTPStartTime; + static constexpr bool optional = true; + + }; + enhancedRNTPStartTime_t& set_enhancedRNTPStartTime() { enhancedRNTPStartTime.setpresent(true); return enhancedRNTPStartTime;} + enhancedRNTPStartTime_t const* get_enhancedRNTPStartTime() const {return enhancedRNTPStartTime.is_valid() ? &enhancedRNTPStartTime : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(enhancedRNTPBitmap); + v(rNTP_High_Power_Threshold); + v(enhancedRNTPStartTime); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(enhancedRNTPBitmap); + v(rNTP_High_Power_Threshold); + v(enhancedRNTPStartTime); + v(iE_Extensions); + + }; + void clear() + { + enhancedRNTPBitmap.clear(); + rNTP_High_Power_Threshold.clear(); + enhancedRNTPStartTime.clear(); + iE_Extensions.clear(); + + }; + private: + enhancedRNTPBitmap_t enhancedRNTPBitmap; + rNTP_High_Power_Threshold_t rNTP_High_Power_Threshold; + enhancedRNTPStartTime_t enhancedRNTPStartTime; + iE_Extensions_t iE_Extensions; + +}; +/* +EventType ::= ENUMERATED{ + change-of-serving-cell, + ... +} +*/ + +struct EventType : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "EventType";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + change_of_serving_cell + } index_t; + +}; + +/* +ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) +*/ + +struct ExpectedActivityPeriod : asn::integer<> +{ + using constraint_t = asn::constraints,asn::one<40>,asn::one<50>,asn::one<60>,asn::one<80>,asn::one<100>,asn::one<120>,asn::one<150>,asn::one<180>,asn::one<181>>; + static constexpr const char* name() {return "ExpectedActivityPeriod";} + using parent_t = asn::integer<>; + +}; + +/* +ExpectedHOInterval ::= ENUMERATED { + sec15, sec30, sec60, sec90, sec120, sec180, long-time, + ... +} +*/ + +struct ExpectedHOInterval : asn::enumerated<7, 0, true> +{ + static constexpr const char* name() {return "ExpectedHOInterval";} + using parent_t = asn::enumerated<7, 0, true>; + typedef enum { + sec15 + ,sec30 + ,sec60 + ,sec90 + ,sec120 + ,sec180 + ,long_time + } index_t; + +}; + +/* +ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) +*/ + +struct ExpectedIdlePeriod : asn::integer<> +{ + using constraint_t = asn::constraints,asn::one<40>,asn::one<50>,asn::one<60>,asn::one<80>,asn::one<100>,asn::one<120>,asn::one<150>,asn::one<180>,asn::one<181>>; + static constexpr const char* name() {return "ExpectedIdlePeriod";} + using parent_t = asn::integer<>; + +}; + +/* +SourceOfUEActivityBehaviourInformation ::= ENUMERATED { + subscription-information, + statistics, + ... +} +*/ + +struct SourceOfUEActivityBehaviourInformation : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "SourceOfUEActivityBehaviourInformation";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + subscription_information + ,statistics + } index_t; + +}; + +/* +ExpectedUEActivityBehaviour-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ExpectedUEActivityBehaviour_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ExpectedUEActivityBehaviour ::= SEQUENCE { + expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, + expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, + sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ExpectedUEActivityBehaviour : asn::sequence<4, 0, true, 4> +{ + static constexpr const char* name() {return "ExpectedUEActivityBehaviour";} + using parent_t = asn::sequence<4, 0, true, 4>; + struct expectedActivityPeriod_t : ExpectedActivityPeriod + { + static constexpr const char* name() {return "expectedActivityPeriod_t";} + using parent_t = ExpectedActivityPeriod; + static constexpr bool optional = true; + + }; + expectedActivityPeriod_t& set_expectedActivityPeriod() { expectedActivityPeriod.setpresent(true); return expectedActivityPeriod;} + expectedActivityPeriod_t const* get_expectedActivityPeriod() const {return expectedActivityPeriod.is_valid() ? &expectedActivityPeriod : nullptr;} + struct expectedIdlePeriod_t : ExpectedIdlePeriod + { + static constexpr const char* name() {return "expectedIdlePeriod_t";} + using parent_t = ExpectedIdlePeriod; + static constexpr bool optional = true; + + }; + expectedIdlePeriod_t& set_expectedIdlePeriod() { expectedIdlePeriod.setpresent(true); return expectedIdlePeriod;} + expectedIdlePeriod_t const* get_expectedIdlePeriod() const {return expectedIdlePeriod.is_valid() ? &expectedIdlePeriod : nullptr;} + struct sourceofUEActivityBehaviourInformation_t : SourceOfUEActivityBehaviourInformation + { + static constexpr const char* name() {return "sourceofUEActivityBehaviourInformation_t";} + using parent_t = SourceOfUEActivityBehaviourInformation; + static constexpr bool optional = true; + + }; + sourceofUEActivityBehaviourInformation_t& set_sourceofUEActivityBehaviourInformation() { sourceofUEActivityBehaviourInformation.setpresent(true); return sourceofUEActivityBehaviourInformation;} + sourceofUEActivityBehaviourInformation_t const* get_sourceofUEActivityBehaviourInformation() const {return sourceofUEActivityBehaviourInformation.is_valid() ? &sourceofUEActivityBehaviourInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(expectedActivityPeriod); + v(expectedIdlePeriod); + v(sourceofUEActivityBehaviourInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(expectedActivityPeriod); + v(expectedIdlePeriod); + v(sourceofUEActivityBehaviourInformation); + v(iE_Extensions); + + }; + void clear() + { + expectedActivityPeriod.clear(); + expectedIdlePeriod.clear(); + sourceofUEActivityBehaviourInformation.clear(); + iE_Extensions.clear(); + + }; + private: + expectedActivityPeriod_t expectedActivityPeriod; + expectedIdlePeriod_t expectedIdlePeriod; + sourceofUEActivityBehaviourInformation_t sourceofUEActivityBehaviourInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +ExpectedUEBehaviour-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ExpectedUEBehaviour_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ExpectedUEBehaviour ::= SEQUENCE { + expectedActivity ExpectedUEActivityBehaviour OPTIONAL, + expectedHOInterval ExpectedHOInterval OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ExpectedUEBehaviour-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ExpectedUEBehaviour : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "ExpectedUEBehaviour";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct expectedActivity_t : ExpectedUEActivityBehaviour + { + static constexpr const char* name() {return "expectedActivity_t";} + using parent_t = ExpectedUEActivityBehaviour; + static constexpr bool optional = true; + + }; + expectedActivity_t& set_expectedActivity() { expectedActivity.setpresent(true); return expectedActivity;} + expectedActivity_t const* get_expectedActivity() const {return expectedActivity.is_valid() ? &expectedActivity : nullptr;} + struct expectedHOInterval_t : ExpectedHOInterval + { + static constexpr const char* name() {return "expectedHOInterval_t";} + using parent_t = ExpectedHOInterval; + static constexpr bool optional = true; + + }; + expectedHOInterval_t& set_expectedHOInterval() { expectedHOInterval.setpresent(true); return expectedHOInterval;} + expectedHOInterval_t const* get_expectedHOInterval() const {return expectedHOInterval.is_valid() ? &expectedHOInterval : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(expectedActivity); + v(expectedHOInterval); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(expectedActivity); + v(expectedHOInterval); + v(iE_Extensions); + + }; + void clear() + { + expectedActivity.clear(); + expectedHOInterval.clear(); + iE_Extensions.clear(); + + }; + private: + expectedActivity_t expectedActivity; + expectedHOInterval_t expectedHOInterval; + iE_Extensions_t iE_Extensions; + +}; +/* +UL-InterferenceOverloadIndication-Item ::= ENUMERATED { + high-interference, + medium-interference, + low-interference, + ... +} +*/ + +struct UL_InterferenceOverloadIndication_Item : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "UL-InterferenceOverloadIndication-Item";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + high_interference + ,medium_interference + ,low_interference + } index_t; + +}; + +/* +UL-InterferenceOverloadIndication ::= SEQUENCE (SIZE(1..maxnoofPRBs)) OF UL-InterferenceOverloadIndication-Item +*/ + +struct UL_InterferenceOverloadIndication_elm : UL_InterferenceOverloadIndication_Item +{ + static constexpr const char* name() {return "UL_InterferenceOverloadIndication_elm";} + using parent_t = UL_InterferenceOverloadIndication_Item; + +}; +struct UL_InterferenceOverloadIndication : asn::sequenceof +{ + static constexpr const char* name() {return "UL-InterferenceOverloadIndication";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ExtendedULInterferenceOverloadInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ExtendedULInterferenceOverloadInfo_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ExtendedULInterferenceOverloadInfo ::= SEQUENCE { + associatedSubframes BIT STRING (SIZE (5)), + extended-ul-InterferenceOverloadIndication UL-InterferenceOverloadIndication, + iE-Extensions ProtocolExtensionContainer { {ExtendedULInterferenceOverloadInfo-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ExtendedULInterferenceOverloadInfo : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ExtendedULInterferenceOverloadInfo";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct associatedSubframes_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "associatedSubframes_t";} + using parent_t = asn::bstring<>; + + }; + + associatedSubframes_t& ref_associatedSubframes() {return associatedSubframes;} + associatedSubframes_t const& ref_associatedSubframes() const {return associatedSubframes;} + struct extended_ul_InterferenceOverloadIndication_t : UL_InterferenceOverloadIndication + { + static constexpr const char* name() {return "extended_ul_InterferenceOverloadIndication_t";} + using parent_t = UL_InterferenceOverloadIndication; + + }; + extended_ul_InterferenceOverloadIndication_t& ref_extended_ul_InterferenceOverloadIndication() {return extended_ul_InterferenceOverloadIndication;} + extended_ul_InterferenceOverloadIndication_t const& ref_extended_ul_InterferenceOverloadIndication() const {return extended_ul_InterferenceOverloadIndication;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(associatedSubframes); + v(extended_ul_InterferenceOverloadIndication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(associatedSubframes); + v(extended_ul_InterferenceOverloadIndication); + v(iE_Extensions); + + }; + void clear() + { + associatedSubframes.clear(); + extended_ul_InterferenceOverloadIndication.clear(); + iE_Extensions.clear(); + + }; + private: + associatedSubframes_t associatedSubframes; + extended_ul_InterferenceOverloadIndication_t extended_ul_InterferenceOverloadIndication; + iE_Extensions_t iE_Extensions; + +}; +/* +FiveGS-TAC ::= OCTET STRING (SIZE (3)) +*/ + +struct FiveGS_TAC : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "FiveGS-TAC";} + using parent_t = asn::ostring<>; + +}; + +/* +ForbiddenInterRATs ::= ENUMERATED { + all, + geran, + utran, + cdma2000, + ..., + geranandutran, + cdma2000andutran + +} +*/ + +struct ForbiddenInterRATs : asn::enumerated<6, 2, true> +{ + static constexpr const char* name() {return "ForbiddenInterRATs";} + using parent_t = asn::enumerated<6, 2, true>; + typedef enum { + all + ,geran + ,utran + ,cdma2000 + ,geranandutran + ,cdma2000andutran + } index_t; + +}; + +/* +LAC ::= OCTET STRING (SIZE (2)) --(EXCEPT ('0000'H|'FFFE'H)) +*/ + +struct LAC : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "LAC";} + using parent_t = asn::ostring<>; + +}; + +/* +ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC +*/ + +struct ForbiddenLACs_elm : LAC +{ + static constexpr const char* name() {return "ForbiddenLACs_elm";} + using parent_t = LAC; + +}; +struct ForbiddenLACs : asn::sequenceof +{ + static constexpr const char* name() {return "ForbiddenLACs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ForbiddenLAs-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ForbiddenLAs_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ForbiddenLAs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + forbiddenLACs ForbiddenLACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ForbiddenLAs_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ForbiddenLAs-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct forbiddenLACs_t : ForbiddenLACs + { + static constexpr const char* name() {return "forbiddenLACs_t";} + using parent_t = ForbiddenLACs; + + }; + forbiddenLACs_t& ref_forbiddenLACs() {return forbiddenLACs;} + forbiddenLACs_t const& ref_forbiddenLACs() const {return forbiddenLACs;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(forbiddenLACs); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(forbiddenLACs); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + forbiddenLACs.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + forbiddenLACs_t forbiddenLACs; + iE_Extensions_t iE_Extensions; + +}; +/* +ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item +*/ + +struct ForbiddenLAs_elm : ForbiddenLAs_Item +{ + static constexpr const char* name() {return "ForbiddenLAs_elm";} + using parent_t = ForbiddenLAs_Item; + +}; +struct ForbiddenLAs : asn::sequenceof +{ + static constexpr const char* name() {return "ForbiddenLAs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC +*/ + +struct ForbiddenTACs_elm : TAC +{ + static constexpr const char* name() {return "ForbiddenTACs_elm";} + using parent_t = TAC; + +}; +struct ForbiddenTACs : asn::sequenceof +{ + static constexpr const char* name() {return "ForbiddenTACs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ForbiddenTAs-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ForbiddenTAs_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ForbiddenTAs-Item ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + forbiddenTACs ForbiddenTACs, + iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ForbiddenTAs_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ForbiddenTAs-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct forbiddenTACs_t : ForbiddenTACs + { + static constexpr const char* name() {return "forbiddenTACs_t";} + using parent_t = ForbiddenTACs; + + }; + forbiddenTACs_t& ref_forbiddenTACs() {return forbiddenTACs;} + forbiddenTACs_t const& ref_forbiddenTACs() const {return forbiddenTACs;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(forbiddenTACs); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(forbiddenTACs); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + forbiddenTACs.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + forbiddenTACs_t forbiddenTACs; + iE_Extensions_t iE_Extensions; + +}; +/* +ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item +*/ + +struct ForbiddenTAs_elm : ForbiddenTAs_Item +{ + static constexpr const char* name() {return "ForbiddenTAs_elm";} + using parent_t = ForbiddenTAs_Item; + +}; +struct ForbiddenTAs : asn::sequenceof +{ + static constexpr const char* name() {return "ForbiddenTAs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +Fourframes ::= BIT STRING (SIZE (24)) +*/ + +struct Fourframes : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Fourframes";} + using parent_t = asn::bstring<>; + +}; + +/* +FreqBandIndicatorPriority ::= ENUMERATED { + not-broadcasted, + broadcasted, + ... +} +*/ + +struct FreqBandIndicatorPriority : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "FreqBandIndicatorPriority";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + not_broadcasted + ,broadcasted + } index_t; + +}; + +/* +SupportedSULFreqBandItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SupportedSULFreqBandItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { {SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SupportedSULFreqBandItem : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "SupportedSULFreqBandItem";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct freqBandIndicatorNr_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "freqBandIndicatorNr_t";} + using parent_t = asn::integer<>; + + }; + + freqBandIndicatorNr_t& ref_freqBandIndicatorNr() {return freqBandIndicatorNr;} + freqBandIndicatorNr_t const& ref_freqBandIndicatorNr() const {return freqBandIndicatorNr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(freqBandIndicatorNr); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(freqBandIndicatorNr); + v(iE_Extensions); + + }; + void clear() + { + freqBandIndicatorNr.clear(); + iE_Extensions.clear(); + + }; + private: + freqBandIndicatorNr_t freqBandIndicatorNr; + iE_Extensions_t iE_Extensions; + +}; +/* +FreqBandNrItem-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct FreqBandNrItem_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + supportedSULBandList SEQUENCE (SIZE(0..maxnoofNrCellBands)) OF SupportedSULFreqBandItem, + iE-Extensions ProtocolExtensionContainer { {FreqBandNrItem-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct FreqBandNrItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "FreqBandNrItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct freqBandIndicatorNr_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "freqBandIndicatorNr_t";} + using parent_t = asn::integer<>; + + }; + + freqBandIndicatorNr_t& ref_freqBandIndicatorNr() {return freqBandIndicatorNr;} + freqBandIndicatorNr_t const& ref_freqBandIndicatorNr() const {return freqBandIndicatorNr;} + struct supportedSULBandList_t_elm : SupportedSULFreqBandItem + { + static constexpr const char* name() {return "supportedSULBandList_t_elm";} + using parent_t = SupportedSULFreqBandItem; + + }; + struct supportedSULBandList_t : asn::sequenceof + { + static constexpr const char* name() {return "supportedSULBandList_t";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + + }; + supportedSULBandList_t& ref_supportedSULBandList() {return supportedSULBandList;} + supportedSULBandList_t const& ref_supportedSULBandList() const {return supportedSULBandList;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(freqBandIndicatorNr); + v(supportedSULBandList); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(freqBandIndicatorNr); + v(supportedSULBandList); + v(iE_Extensions); + + }; + void clear() + { + freqBandIndicatorNr.clear(); + supportedSULBandList.clear(); + iE_Extensions.clear(); + + }; + private: + freqBandIndicatorNr_t freqBandIndicatorNr; + supportedSULBandList_t supportedSULBandList; + iE_Extensions_t iE_Extensions; + +}; +/* +GNB-ID ::= CHOICE { + gNB-ID BIT STRING (SIZE (22..32)), + ... +} +*/ + +struct GNB_ID : asn::choice<1, 0, true> +{ + static constexpr const char* name() {return "GNB-ID";} + using parent_t = asn::choice<1, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 2;} + void set_unknown() { set_index(2); } + ~GNB_ID() {clear();} + struct gNB_ID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "gNB_ID_t";} + using parent_t = asn::bstring<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + gNB_ID_t& select_gNB_ID() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + gNB_ID_t const* get_gNB_ID() const { if(get_index() == 1) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(gNB_ID_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +GNBOverloadInformation ::= ENUMERATED {overloaded, not-overloaded, ...} +*/ + +struct GNBOverloadInformation : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "GNBOverloadInformation";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + overloaded + ,not_overloaded + } index_t; + +}; + +/* +GTP-TEI ::= OCTET STRING (SIZE (4)) +*/ + +struct GTP_TEI : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "GTP-TEI";} + using parent_t = asn::ostring<>; + +}; + +/* +TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) +*/ + +struct TransportLayerAddress : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "TransportLayerAddress";} + using parent_t = asn::bstring<>; + +}; + +/* +GTPtunnelEndpoint-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct GTPtunnelEndpoint_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GTPtunnelEndpoint ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + gTP-TEID GTP-TEI, + iE-Extensions ProtocolExtensionContainer { {GTPtunnelEndpoint-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GTPtunnelEndpoint : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "GTPtunnelEndpoint";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct transportLayerAddress_t : TransportLayerAddress + { + static constexpr const char* name() {return "transportLayerAddress_t";} + using parent_t = TransportLayerAddress; + + }; + transportLayerAddress_t& ref_transportLayerAddress() {return transportLayerAddress;} + transportLayerAddress_t const& ref_transportLayerAddress() const {return transportLayerAddress;} + struct gTP_TEID_t : GTP_TEI + { + static constexpr const char* name() {return "gTP_TEID_t";} + using parent_t = GTP_TEI; + + }; + gTP_TEID_t& ref_gTP_TEID() {return gTP_TEID;} + gTP_TEID_t const& ref_gTP_TEID() const {return gTP_TEID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(transportLayerAddress); + v(gTP_TEID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(transportLayerAddress); + v(gTP_TEID); + v(iE_Extensions); + + }; + void clear() + { + transportLayerAddress.clear(); + gTP_TEID.clear(); + iE_Extensions.clear(); + + }; + private: + transportLayerAddress_t transportLayerAddress; + gTP_TEID_t gTP_TEID; + iE_Extensions_t iE_Extensions; + +}; +/* +MME-Group-ID ::= OCTET STRING (SIZE (2)) +*/ + +struct MME_Group_ID : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MME-Group-ID";} + using parent_t = asn::ostring<>; + +}; + +/* +GU-Group-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct GU_Group_ID_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GU-Group-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + mME-Group-ID MME-Group-ID, + iE-Extensions ProtocolExtensionContainer { {GU-Group-ID-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GU_Group_ID : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "GU-Group-ID";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct mME_Group_ID_t : MME_Group_ID + { + static constexpr const char* name() {return "mME_Group_ID_t";} + using parent_t = MME_Group_ID; + + }; + mME_Group_ID_t& ref_mME_Group_ID() {return mME_Group_ID;} + mME_Group_ID_t const& ref_mME_Group_ID() const {return mME_Group_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(mME_Group_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(mME_Group_ID); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + mME_Group_ID.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + mME_Group_ID_t mME_Group_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +GUGroupIDList ::= SEQUENCE (SIZE (1..maxPools)) OF GU-Group-ID +*/ + +struct GUGroupIDList_elm : GU_Group_ID +{ + static constexpr const char* name() {return "GUGroupIDList_elm";} + using parent_t = GU_Group_ID; + +}; +struct GUGroupIDList : asn::sequenceof +{ + static constexpr const char* name() {return "GUGroupIDList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +MME-Code ::= OCTET STRING (SIZE (1)) +*/ + +struct MME_Code : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MME-Code";} + using parent_t = asn::ostring<>; + +}; + +/* +GUMMEI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct GUMMEI_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GUMMEI ::= SEQUENCE { + + gU-Group-ID GU-Group-ID, + mME-Code MME-Code, + iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GUMMEI : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "GUMMEI";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct gU_Group_ID_t : GU_Group_ID + { + static constexpr const char* name() {return "gU_Group_ID_t";} + using parent_t = GU_Group_ID; + + }; + gU_Group_ID_t& ref_gU_Group_ID() {return gU_Group_ID;} + gU_Group_ID_t const& ref_gU_Group_ID() const {return gU_Group_ID;} + struct mME_Code_t : MME_Code + { + static constexpr const char* name() {return "mME_Code_t";} + using parent_t = MME_Code; + + }; + mME_Code_t& ref_mME_Code() {return mME_Code;} + mME_Code_t const& ref_mME_Code() const {return mME_Code;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(gU_Group_ID); + v(mME_Code); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(gU_Group_ID); + v(mME_Code); + v(iE_Extensions); + + }; + void clear() + { + gU_Group_ID.clear(); + mME_Code.clear(); + iE_Extensions.clear(); + + }; + private: + gU_Group_ID_t gU_Group_ID; + mME_Code_t mME_Code; + iE_Extensions_t iE_Extensions; + +}; +/* +GlobalENB-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct GlobalENB_ID_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GlobalENB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + eNB-ID ENB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GlobalENB_ID : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "GlobalENB-ID";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct eNB_ID_t : ENB_ID + { + static constexpr const char* name() {return "eNB_ID_t";} + using parent_t = ENB_ID; + + }; + eNB_ID_t& ref_eNB_ID() {return eNB_ID;} + eNB_ID_t const& ref_eNB_ID() const {return eNB_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(eNB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(eNB_ID); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + eNB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + eNB_ID_t eNB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +GlobalGNB-ID-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct GlobalGNB_ID_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GlobalGNB-ID ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + gNB-ID GNB-ID, + iE-Extensions ProtocolExtensionContainer { {GlobalGNB-ID-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct GlobalGNB_ID : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "GlobalGNB-ID";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct gNB_ID_t : GNB_ID + { + static constexpr const char* name() {return "gNB_ID_t";} + using parent_t = GNB_ID; + + }; + gNB_ID_t& ref_gNB_ID() {return gNB_ID;} + gNB_ID_t const& ref_gNB_ID() const {return gNB_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(gNB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(gNB_ID); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + gNB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + gNB_ID_t gNB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +LoadIndicator ::= ENUMERATED { + lowLoad, + mediumLoad, + highLoad, + overLoad, + ... +} +*/ + +struct LoadIndicator : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "LoadIndicator";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + lowLoad + ,mediumLoad + ,highLoad + ,overLoad + } index_t; + +}; + +/* +HWLoadIndicator-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct HWLoadIndicator_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HWLoadIndicator ::= SEQUENCE { + dLHWLoadIndicator LoadIndicator, + uLHWLoadIndicator LoadIndicator, + iE-Extensions ProtocolExtensionContainer { {HWLoadIndicator-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct HWLoadIndicator : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "HWLoadIndicator";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct dLHWLoadIndicator_t : LoadIndicator + { + static constexpr const char* name() {return "dLHWLoadIndicator_t";} + using parent_t = LoadIndicator; + + }; + dLHWLoadIndicator_t& ref_dLHWLoadIndicator() {return dLHWLoadIndicator;} + dLHWLoadIndicator_t const& ref_dLHWLoadIndicator() const {return dLHWLoadIndicator;} + struct uLHWLoadIndicator_t : LoadIndicator + { + static constexpr const char* name() {return "uLHWLoadIndicator_t";} + using parent_t = LoadIndicator; + + }; + uLHWLoadIndicator_t& ref_uLHWLoadIndicator() {return uLHWLoadIndicator;} + uLHWLoadIndicator_t const& ref_uLHWLoadIndicator() const {return uLHWLoadIndicator;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dLHWLoadIndicator); + v(uLHWLoadIndicator); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dLHWLoadIndicator); + v(uLHWLoadIndicator); + v(iE_Extensions); + + }; + void clear() + { + dLHWLoadIndicator.clear(); + uLHWLoadIndicator.clear(); + iE_Extensions.clear(); + + }; + private: + dLHWLoadIndicator_t dLHWLoadIndicator; + uLHWLoadIndicator_t uLHWLoadIndicator; + iE_Extensions_t iE_Extensions; + +}; +/* +HandoverReportType ::= ENUMERATED { + hoTooEarly, + hoToWrongCell, + ..., + interRATpingpong +} +*/ + +struct HandoverReportType : asn::enumerated<3, 1, true> +{ + static constexpr const char* name() {return "HandoverReportType";} + using parent_t = asn::enumerated<3, 1, true>; + typedef enum { + hoTooEarly + ,hoToWrongCell + ,interRATpingpong + } index_t; + +}; + +/* +NRrestrictioninEPSasSecondaryRAT ::= ENUMERATED { + nRrestrictedinEPSasSecondaryRAT, + ... +} +*/ + +struct NRrestrictioninEPSasSecondaryRAT : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "NRrestrictioninEPSasSecondaryRAT";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + nRrestrictedinEPSasSecondaryRAT + } index_t; + +}; + +/* +NRrestrictionin5GS ::= ENUMERATED { + nRrestrictedin5GS, + ... +} +*/ + +struct NRrestrictionin5GS : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "NRrestrictionin5GS";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + nRrestrictedin5GS + } index_t; + +}; + +/* +HandoverRestrictionList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-NRrestrictioninEPSasSecondaryRAT CRITICALITY ignore EXTENSION NRrestrictioninEPSasSecondaryRAT PRESENCE optional}| + { ID id-CNTypeRestrictions CRITICALITY ignore EXTENSION CNTypeRestrictions PRESENCE optional}| + { ID id-NRrestrictionin5GS CRITICALITY ignore EXTENSION NRrestrictionin5GS PRESENCE optional}, + ... +} +*/ + +struct HandoverRestrictionList_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_NRrestrictioninEPSasSecondaryRAT() { set(id_NRrestrictioninEPSasSecondaryRAT); type=1;} + void select_id_CNTypeRestrictions() { set(id_CNTypeRestrictions); type=2;} + void select_id_NRrestrictionin5GS() { set(id_NRrestrictionin5GS); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_NRrestrictioninEPSasSecondaryRAT)) { type = 1; return true; } + else if(equal(id_CNTypeRestrictions)) { type = 2; return true; } + else if(equal(id_NRrestrictionin5GS)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_NRrestrictioninEPSasSecondaryRAT);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CNTypeRestrictions);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_NRrestrictionin5GS);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_NRrestrictioninEPSasSecondaryRAT() { set(ignore); type=1;} + void select_id_CNTypeRestrictions() { set(ignore); type=2;} + void select_id_NRrestrictionin5GS() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + NRrestrictioninEPSasSecondaryRAT& select_id_NRrestrictioninEPSasSecondaryRAT() { return set(1); } + NRrestrictioninEPSasSecondaryRAT const* get_id_NRrestrictioninEPSasSecondaryRAT() const { return get(1); } + CNTypeRestrictions& select_id_CNTypeRestrictions() { return set(2); } + CNTypeRestrictions const* get_id_CNTypeRestrictions() const { return get(2); } + NRrestrictionin5GS& select_id_NRrestrictionin5GS() { return set(3); } + NRrestrictionin5GS const* get_id_NRrestrictionin5GS() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_NRrestrictioninEPSasSecondaryRAT()); return true; + case 2: v(select_id_CNTypeRestrictions()); return true; + case 3: v(select_id_NRrestrictionin5GS()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CNTypeRestrictions)]; + char dummy2[sizeof(NRrestrictionin5GS)]; + char dummy3[sizeof(NRrestrictioninEPSasSecondaryRAT)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_NRrestrictioninEPSasSecondaryRAT() { set(optional); type=1;} + void select_id_CNTypeRestrictions() { set(optional); type=2;} + void select_id_NRrestrictionin5GS() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverRestrictionList ::= SEQUENCE { + servingPLMN PLMN-Identity, + equivalentPLMNs EPLMNs OPTIONAL, + forbiddenTAs ForbiddenTAs OPTIONAL, + forbiddenLAs ForbiddenLAs OPTIONAL, + forbiddenInterRATs ForbiddenInterRATs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct HandoverRestrictionList : asn::sequence<6, 0, true, 5> +{ + static constexpr const char* name() {return "HandoverRestrictionList";} + using parent_t = asn::sequence<6, 0, true, 5>; + struct servingPLMN_t : PLMN_Identity + { + static constexpr const char* name() {return "servingPLMN_t";} + using parent_t = PLMN_Identity; + + }; + servingPLMN_t& ref_servingPLMN() {return servingPLMN;} + servingPLMN_t const& ref_servingPLMN() const {return servingPLMN;} + struct equivalentPLMNs_t : EPLMNs + { + static constexpr const char* name() {return "equivalentPLMNs_t";} + using parent_t = EPLMNs; + static constexpr bool optional = true; + + }; + equivalentPLMNs_t& set_equivalentPLMNs() { equivalentPLMNs.setpresent(true); return equivalentPLMNs;} + equivalentPLMNs_t const* get_equivalentPLMNs() const {return equivalentPLMNs.is_valid() ? &equivalentPLMNs : nullptr;} + struct forbiddenTAs_t : ForbiddenTAs + { + static constexpr const char* name() {return "forbiddenTAs_t";} + using parent_t = ForbiddenTAs; + static constexpr bool optional = true; + + }; + forbiddenTAs_t& set_forbiddenTAs() { forbiddenTAs.setpresent(true); return forbiddenTAs;} + forbiddenTAs_t const* get_forbiddenTAs() const {return forbiddenTAs.is_valid() ? &forbiddenTAs : nullptr;} + struct forbiddenLAs_t : ForbiddenLAs + { + static constexpr const char* name() {return "forbiddenLAs_t";} + using parent_t = ForbiddenLAs; + static constexpr bool optional = true; + + }; + forbiddenLAs_t& set_forbiddenLAs() { forbiddenLAs.setpresent(true); return forbiddenLAs;} + forbiddenLAs_t const* get_forbiddenLAs() const {return forbiddenLAs.is_valid() ? &forbiddenLAs : nullptr;} + struct forbiddenInterRATs_t : ForbiddenInterRATs + { + static constexpr const char* name() {return "forbiddenInterRATs_t";} + using parent_t = ForbiddenInterRATs; + static constexpr bool optional = true; + + }; + forbiddenInterRATs_t& set_forbiddenInterRATs() { forbiddenInterRATs.setpresent(true); return forbiddenInterRATs;} + forbiddenInterRATs_t const* get_forbiddenInterRATs() const {return forbiddenInterRATs.is_valid() ? &forbiddenInterRATs : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(servingPLMN); + v(equivalentPLMNs); + v(forbiddenTAs); + v(forbiddenLAs); + v(forbiddenInterRATs); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(servingPLMN); + v(equivalentPLMNs); + v(forbiddenTAs); + v(forbiddenLAs); + v(forbiddenInterRATs); + v(iE_Extensions); + + }; + void clear() + { + servingPLMN.clear(); + equivalentPLMNs.clear(); + forbiddenTAs.clear(); + forbiddenLAs.clear(); + forbiddenInterRATs.clear(); + iE_Extensions.clear(); + + }; + private: + servingPLMN_t servingPLMN; + equivalentPLMNs_t equivalentPLMNs; + forbiddenTAs_t forbiddenTAs; + forbiddenLAs_t forbiddenLAs; + forbiddenInterRATs_t forbiddenInterRATs; + iE_Extensions_t iE_Extensions; + +}; +/* +IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16, ...)) +*/ + +struct IntegrityProtectionAlgorithms : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "IntegrityProtectionAlgorithms";} + using parent_t = asn::bstring<>; + +}; + +/* +InterfacesToTrace ::= BIT STRING (SIZE (8)) +*/ + +struct InterfacesToTrace : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "InterfacesToTrace";} + using parent_t = asn::bstring<>; + +}; + +/* +InvokeIndication ::= ENUMERATED{ + abs-information, + ..., + naics-information-start, + naics-information-stop +} +*/ + +struct InvokeIndication : asn::enumerated<3, 2, true> +{ + static constexpr const char* name() {return "InvokeIndication";} + using parent_t = asn::enumerated<3, 2, true>; + typedef enum { + abs_information + ,naics_information_start + ,naics_information_stop + } index_t; + +}; + +/* +LCID ::= INTEGER(1..32, ...) +*/ + +struct LCID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "LCID";} + using parent_t = asn::integer<>; + +}; + +/* +LHN-ID ::= OCTET STRING(SIZE (32..256)) +*/ + +struct LHN_ID : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "LHN-ID";} + using parent_t = asn::ostring<>; + +}; + +/* +Time-UE-StayedInCell ::= INTEGER (0..4095) +*/ + +struct Time_UE_StayedInCell : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Time-UE-StayedInCell";} + using parent_t = asn::integer<>; + +}; + +/* +Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) +*/ + +struct Time_UE_StayedInCell_EnhancedGranularity : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Time-UE-StayedInCell-EnhancedGranularity";} + using parent_t = asn::integer<>; + +}; + +/* +LastVisitedEUTRANCellInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +-- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- + { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| + { ID id-HO-cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, + ... +} +*/ + +struct LastVisitedEUTRANCellInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Time_UE_StayedInCell_EnhancedGranularity() { set(id_Time_UE_StayedInCell_EnhancedGranularity); type=1;} + void select_id_HO_cause() { set(id_HO_cause); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Time_UE_StayedInCell_EnhancedGranularity)) { type = 1; return true; } + else if(equal(id_HO_cause)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Time_UE_StayedInCell_EnhancedGranularity);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_HO_cause);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Time_UE_StayedInCell_EnhancedGranularity() { set(ignore); type=1;} + void select_id_HO_cause() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + Time_UE_StayedInCell_EnhancedGranularity& select_id_Time_UE_StayedInCell_EnhancedGranularity() { return set(1); } + Time_UE_StayedInCell_EnhancedGranularity const* get_id_Time_UE_StayedInCell_EnhancedGranularity() const { return get(1); } + Cause& select_id_HO_cause() { return set(2); } + Cause const* get_id_HO_cause() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Time_UE_StayedInCell_EnhancedGranularity()); return true; + case 2: v(select_id_HO_cause()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(Time_UE_StayedInCell_EnhancedGranularity)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Time_UE_StayedInCell_EnhancedGranularity() { set(optional); type=1;} + void select_id_HO_cause() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +LastVisitedEUTRANCellInformation ::= SEQUENCE { + global-Cell-ID ECGI, + cellType CellType, + time-UE-StayedInCell Time-UE-StayedInCell, + iE-Extensions ProtocolExtensionContainer { {LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct LastVisitedEUTRANCellInformation : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "LastVisitedEUTRANCellInformation";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct global_Cell_ID_t : ECGI + { + static constexpr const char* name() {return "global_Cell_ID_t";} + using parent_t = ECGI; + + }; + global_Cell_ID_t& ref_global_Cell_ID() {return global_Cell_ID;} + global_Cell_ID_t const& ref_global_Cell_ID() const {return global_Cell_ID;} + struct cellType_t : CellType + { + static constexpr const char* name() {return "cellType_t";} + using parent_t = CellType; + + }; + cellType_t& ref_cellType() {return cellType;} + cellType_t const& ref_cellType() const {return cellType;} + struct time_UE_StayedInCell_t : Time_UE_StayedInCell + { + static constexpr const char* name() {return "time_UE_StayedInCell_t";} + using parent_t = Time_UE_StayedInCell; + + }; + time_UE_StayedInCell_t& ref_time_UE_StayedInCell() {return time_UE_StayedInCell;} + time_UE_StayedInCell_t const& ref_time_UE_StayedInCell() const {return time_UE_StayedInCell;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(global_Cell_ID); + v(cellType); + v(time_UE_StayedInCell); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(global_Cell_ID); + v(cellType); + v(time_UE_StayedInCell); + v(iE_Extensions); + + }; + void clear() + { + global_Cell_ID.clear(); + cellType.clear(); + time_UE_StayedInCell.clear(); + iE_Extensions.clear(); + + }; + private: + global_Cell_ID_t global_Cell_ID; + cellType_t cellType; + time_UE_StayedInCell_t time_UE_StayedInCell; + iE_Extensions_t iE_Extensions; + +}; +/* +LastVisitedUTRANCellInformation ::= OCTET STRING +*/ + +struct LastVisitedUTRANCellInformation : asn::ostring<> +{ + static constexpr const char* name() {return "LastVisitedUTRANCellInformation";} + using parent_t = asn::ostring<>; + +}; + +/* +LastVisitedGERANCellInformation ::= CHOICE { + undefined NULL, + ... +} +*/ + +struct LastVisitedGERANCellInformation : asn::choice<1, 0, true> +{ + static constexpr const char* name() {return "LastVisitedGERANCellInformation";} + using parent_t = asn::choice<1, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 2;} + void set_unknown() { set_index(2); } + ~LastVisitedGERANCellInformation() {clear();} + struct undefined_t : asn::nulltype + { + static constexpr const char* name() {return "undefined_t";} + using parent_t = asn::nulltype; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + undefined_t& select_undefined() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + undefined_t const* get_undefined() const { if(get_index() == 1) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(undefined_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +LastVisitedNGRANCellInformation ::= OCTET STRING +*/ + +struct LastVisitedNGRANCellInformation : asn::ostring<> +{ + static constexpr const char* name() {return "LastVisitedNGRANCellInformation";} + using parent_t = asn::ostring<>; + +}; + +/* +LastVisitedCell-Item ::= CHOICE { + e-UTRAN-Cell LastVisitedEUTRANCellInformation, + uTRAN-Cell LastVisitedUTRANCellInformation, + gERAN-Cell LastVisitedGERANCellInformation, + ..., + nG-RAN-Cell LastVisitedNGRANCellInformation +} +*/ + +struct LastVisitedCell_Item : asn::choice<4, 1, true> +{ + static constexpr const char* name() {return "LastVisitedCell-Item";} + using parent_t = asn::choice<4, 1, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 5;} + void set_unknown() { set_index(5); } + ~LastVisitedCell_Item() {clear();} + struct e_UTRAN_Cell_t : LastVisitedEUTRANCellInformation + { + static constexpr const char* name() {return "e_UTRAN_Cell_t";} + using parent_t = LastVisitedEUTRANCellInformation; + + }; + struct uTRAN_Cell_t : LastVisitedUTRANCellInformation + { + static constexpr const char* name() {return "uTRAN_Cell_t";} + using parent_t = LastVisitedUTRANCellInformation; + + }; + struct gERAN_Cell_t : LastVisitedGERANCellInformation + { + static constexpr const char* name() {return "gERAN_Cell_t";} + using parent_t = LastVisitedGERANCellInformation; + + }; + struct nG_RAN_Cell_t : LastVisitedNGRANCellInformation + { + static constexpr const char* name() {return "nG_RAN_Cell_t";} + using parent_t = LastVisitedNGRANCellInformation; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + case 4: set_index(4); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + case 4: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + e_UTRAN_Cell_t& select_e_UTRAN_Cell() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + e_UTRAN_Cell_t const* get_e_UTRAN_Cell() const { if(get_index() == 1) { return &var.as();} return nullptr; } + uTRAN_Cell_t& select_uTRAN_Cell() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + uTRAN_Cell_t const* get_uTRAN_Cell() const { if(get_index() == 2) { return &var.as();} return nullptr; } + gERAN_Cell_t& select_gERAN_Cell() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + gERAN_Cell_t const* get_gERAN_Cell() const { if(get_index() == 3) { return &var.as();} return nullptr; } + nG_RAN_Cell_t& select_nG_RAN_Cell() { if(get_index() != 4) { clear(); set_index(4); return var.build();} return var.as();} + nG_RAN_Cell_t const* get_nG_RAN_Cell() const { if(get_index() == 4) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(e_UTRAN_Cell_t)]; + char dummy2[sizeof(uTRAN_Cell_t)]; + char dummy3[sizeof(gERAN_Cell_t)]; + char dummy4[sizeof(nG_RAN_Cell_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} +*/ + +struct Links_to_log : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "Links-to-log";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + uplink + ,downlink + ,both_uplink_and_downlink + } index_t; + +}; + +/* +ReportArea ::= ENUMERATED{ + ecgi, + ... +} +*/ + +struct ReportArea : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "ReportArea";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + ecgi + } index_t; + +}; + +/* +LocationReportingInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::={ + ... +} +*/ + +struct LocationReportingInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +LocationReportingInformation ::= SEQUENCE { + eventType EventType, + reportArea ReportArea, + iE-Extensions ProtocolExtensionContainer { {LocationReportingInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct LocationReportingInformation : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "LocationReportingInformation";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct eventType_t : EventType + { + static constexpr const char* name() {return "eventType_t";} + using parent_t = EventType; + + }; + eventType_t& ref_eventType() {return eventType;} + eventType_t const& ref_eventType() const {return eventType;} + struct reportArea_t : ReportArea + { + static constexpr const char* name() {return "reportArea_t";} + using parent_t = ReportArea; + + }; + reportArea_t& ref_reportArea() {return reportArea;} + reportArea_t const& ref_reportArea() const {return reportArea;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(eventType); + v(reportArea); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(eventType); + v(reportArea); + v(iE_Extensions); + + }; + void clear() + { + eventType.clear(); + reportArea.clear(); + iE_Extensions.clear(); + + }; + private: + eventType_t eventType; + reportArea_t reportArea; + iE_Extensions_t iE_Extensions; + +}; +/* +ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} +*/ + +struct ReportIntervalMDT : asn::enumerated<13, 0, false> +{ + static constexpr const char* name() {return "ReportIntervalMDT";} + using parent_t = asn::enumerated<13, 0, false>; + typedef enum { + ms120 + ,ms240 + ,ms480 + ,ms640 + ,ms1024 + ,ms2048 + ,ms5120 + ,ms10240 + ,min1 + ,min6 + ,min12 + ,min30 + ,min60 + } index_t; + +}; + +/* +ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} +*/ + +struct ReportAmountMDT : asn::enumerated<8, 0, false> +{ + static constexpr const char* name() {return "ReportAmountMDT";} + using parent_t = asn::enumerated<8, 0, false>; + typedef enum { + r1 + ,r2 + ,r4 + ,r8 + ,r16 + ,r32 + ,r64 + ,rinfinity + } index_t; + +}; + +/* +M1PeriodicReporting-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M1PeriodicReporting_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M1PeriodicReporting ::= SEQUENCE { + reportInterval ReportIntervalMDT, + reportAmount ReportAmountMDT, + iE-Extensions ProtocolExtensionContainer { {M1PeriodicReporting-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M1PeriodicReporting : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "M1PeriodicReporting";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct reportInterval_t : ReportIntervalMDT + { + static constexpr const char* name() {return "reportInterval_t";} + using parent_t = ReportIntervalMDT; + + }; + reportInterval_t& ref_reportInterval() {return reportInterval;} + reportInterval_t const& ref_reportInterval() const {return reportInterval;} + struct reportAmount_t : ReportAmountMDT + { + static constexpr const char* name() {return "reportAmount_t";} + using parent_t = ReportAmountMDT; + + }; + reportAmount_t& ref_reportAmount() {return reportAmount;} + reportAmount_t const& ref_reportAmount() const {return reportAmount;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(reportInterval); + v(reportAmount); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(reportInterval); + v(reportAmount); + v(iE_Extensions); + + }; + void clear() + { + reportInterval.clear(); + reportAmount.clear(); + iE_Extensions.clear(); + + }; + private: + reportInterval_t reportInterval; + reportAmount_t reportAmount; + iE_Extensions_t iE_Extensions; + +}; +/* +M1ReportingTrigger::= ENUMERATED{ + periodic, + a2eventtriggered, + ..., + a2eventtriggered-periodic +} +*/ + +struct M1ReportingTrigger : asn::enumerated<3, 1, true> +{ + static constexpr const char* name() {return "M1ReportingTrigger";} + using parent_t = asn::enumerated<3, 1, true>; + typedef enum { + periodic + ,a2eventtriggered + ,a2eventtriggered_periodic + } index_t; + +}; + +/* +Threshold-RSRP ::= INTEGER(0..97) +*/ + +struct Threshold_RSRP : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Threshold-RSRP";} + using parent_t = asn::integer<>; + +}; + +/* +Threshold-RSRQ ::= INTEGER(0..34) +*/ + +struct Threshold_RSRQ : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Threshold-RSRQ";} + using parent_t = asn::integer<>; + +}; + +/* +MeasurementThresholdA2 ::= CHOICE { + threshold-RSRP Threshold-RSRP, + threshold-RSRQ Threshold-RSRQ, + ... +} +*/ + +struct MeasurementThresholdA2 : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "MeasurementThresholdA2";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~MeasurementThresholdA2() {clear();} + struct threshold_RSRP_t : Threshold_RSRP + { + static constexpr const char* name() {return "threshold_RSRP_t";} + using parent_t = Threshold_RSRP; + + }; + struct threshold_RSRQ_t : Threshold_RSRQ + { + static constexpr const char* name() {return "threshold_RSRQ_t";} + using parent_t = Threshold_RSRQ; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + threshold_RSRP_t& select_threshold_RSRP() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + threshold_RSRP_t const* get_threshold_RSRP() const { if(get_index() == 1) { return &var.as();} return nullptr; } + threshold_RSRQ_t& select_threshold_RSRQ() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + threshold_RSRQ_t const* get_threshold_RSRQ() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(threshold_RSRP_t)]; + char dummy2[sizeof(threshold_RSRQ_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +M1ThresholdEventA2-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M1ThresholdEventA2_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M1ThresholdEventA2 ::= SEQUENCE { + measurementThreshold MeasurementThresholdA2, + iE-Extensions ProtocolExtensionContainer { {M1ThresholdEventA2-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M1ThresholdEventA2 : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "M1ThresholdEventA2";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct measurementThreshold_t : MeasurementThresholdA2 + { + static constexpr const char* name() {return "measurementThreshold_t";} + using parent_t = MeasurementThresholdA2; + + }; + measurementThreshold_t& ref_measurementThreshold() {return measurementThreshold;} + measurementThreshold_t const& ref_measurementThreshold() const {return measurementThreshold;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(measurementThreshold); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(measurementThreshold); + v(iE_Extensions); + + }; + void clear() + { + measurementThreshold.clear(); + iE_Extensions.clear(); + + }; + private: + measurementThreshold_t measurementThreshold; + iE_Extensions_t iE_Extensions; + +}; +/* +M3period ::= ENUMERATED {ms100, ms1000, ms10000, ... } +*/ + +struct M3period : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "M3period";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + ms100 + ,ms1000 + ,ms10000 + } index_t; + +}; + +/* +M3Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M3Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M3Configuration ::= SEQUENCE { + m3period M3period, + iE-Extensions ProtocolExtensionContainer { {M3Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M3Configuration : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "M3Configuration";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct m3period_t : M3period + { + static constexpr const char* name() {return "m3period_t";} + using parent_t = M3period; + + }; + m3period_t& ref_m3period() {return m3period;} + m3period_t const& ref_m3period() const {return m3period;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(m3period); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(m3period); + v(iE_Extensions); + + }; + void clear() + { + m3period.clear(); + iE_Extensions.clear(); + + }; + private: + m3period_t m3period; + iE_Extensions_t iE_Extensions; + +}; +/* +M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } +*/ + +struct M4period : asn::enumerated<5, 0, true> +{ + static constexpr const char* name() {return "M4period";} + using parent_t = asn::enumerated<5, 0, true>; + typedef enum { + ms1024 + ,ms2048 + ,ms5120 + ,ms10240 + ,min1 + } index_t; + +}; + +/* +M4Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M4Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M4Configuration ::= SEQUENCE { + m4period M4period, + m4-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M4Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M4Configuration : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "M4Configuration";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct m4period_t : M4period + { + static constexpr const char* name() {return "m4period_t";} + using parent_t = M4period; + + }; + m4period_t& ref_m4period() {return m4period;} + m4period_t const& ref_m4period() const {return m4period;} + struct m4_links_to_log_t : Links_to_log + { + static constexpr const char* name() {return "m4_links_to_log_t";} + using parent_t = Links_to_log; + + }; + m4_links_to_log_t& ref_m4_links_to_log() {return m4_links_to_log;} + m4_links_to_log_t const& ref_m4_links_to_log() const {return m4_links_to_log;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(m4period); + v(m4_links_to_log); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(m4period); + v(m4_links_to_log); + v(iE_Extensions); + + }; + void clear() + { + m4period.clear(); + m4_links_to_log.clear(); + iE_Extensions.clear(); + + }; + private: + m4period_t m4period; + m4_links_to_log_t m4_links_to_log; + iE_Extensions_t iE_Extensions; + +}; +/* +M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } +*/ + +struct M5period : asn::enumerated<5, 0, true> +{ + static constexpr const char* name() {return "M5period";} + using parent_t = asn::enumerated<5, 0, true>; + typedef enum { + ms1024 + ,ms2048 + ,ms5120 + ,ms10240 + ,min1 + } index_t; + +}; + +/* +M5Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M5Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M5Configuration ::= SEQUENCE { + m5period M5period, + m5-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M5Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M5Configuration : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "M5Configuration";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct m5period_t : M5period + { + static constexpr const char* name() {return "m5period_t";} + using parent_t = M5period; + + }; + m5period_t& ref_m5period() {return m5period;} + m5period_t const& ref_m5period() const {return m5period;} + struct m5_links_to_log_t : Links_to_log + { + static constexpr const char* name() {return "m5_links_to_log_t";} + using parent_t = Links_to_log; + + }; + m5_links_to_log_t& ref_m5_links_to_log() {return m5_links_to_log;} + m5_links_to_log_t const& ref_m5_links_to_log() const {return m5_links_to_log;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(m5period); + v(m5_links_to_log); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(m5period); + v(m5_links_to_log); + v(iE_Extensions); + + }; + void clear() + { + m5period.clear(); + m5_links_to_log.clear(); + iE_Extensions.clear(); + + }; + private: + m5period_t m5period; + m5_links_to_log_t m5_links_to_log; + iE_Extensions_t iE_Extensions; + +}; +/* +M6report-interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } +*/ + +struct M6report_interval : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "M6report-interval";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + ms1024 + ,ms2048 + ,ms5120 + ,ms10240 + } index_t; + +}; + +/* +M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } +*/ + +struct M6delay_threshold : asn::enumerated<12, 0, true> +{ + static constexpr const char* name() {return "M6delay-threshold";} + using parent_t = asn::enumerated<12, 0, true>; + typedef enum { + ms30 + ,ms40 + ,ms50 + ,ms60 + ,ms70 + ,ms80 + ,ms90 + ,ms100 + ,ms150 + ,ms300 + ,ms500 + ,ms750 + } index_t; + +}; + +/* +M6Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M6Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M6Configuration ::= SEQUENCE { + m6report-interval M6report-interval, + m6delay-threshold M6delay-threshold OPTIONAL, +-- This IE shall be present if the M6 Links to log IE is set to “uplink” or to “both-uplink-and-downlink” -- + m6-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M6Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M6Configuration : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "M6Configuration";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct m6report_interval_t : M6report_interval + { + static constexpr const char* name() {return "m6report_interval_t";} + using parent_t = M6report_interval; + + }; + m6report_interval_t& ref_m6report_interval() {return m6report_interval;} + m6report_interval_t const& ref_m6report_interval() const {return m6report_interval;} + struct m6delay_threshold_t : M6delay_threshold + { + static constexpr const char* name() {return "m6delay_threshold_t";} + using parent_t = M6delay_threshold; + static constexpr bool optional = true; + + }; + m6delay_threshold_t& set_m6delay_threshold() { m6delay_threshold.setpresent(true); return m6delay_threshold;} + m6delay_threshold_t const* get_m6delay_threshold() const {return m6delay_threshold.is_valid() ? &m6delay_threshold : nullptr;} + struct m6_links_to_log_t : Links_to_log + { + static constexpr const char* name() {return "m6_links_to_log_t";} + using parent_t = Links_to_log; + + }; + m6_links_to_log_t& ref_m6_links_to_log() {return m6_links_to_log;} + m6_links_to_log_t const& ref_m6_links_to_log() const {return m6_links_to_log;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(m6report_interval); + v(m6delay_threshold); + v(m6_links_to_log); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(m6report_interval); + v(m6delay_threshold); + v(m6_links_to_log); + v(iE_Extensions); + + }; + void clear() + { + m6report_interval.clear(); + m6delay_threshold.clear(); + m6_links_to_log.clear(); + iE_Extensions.clear(); + + }; + private: + m6report_interval_t m6report_interval; + m6delay_threshold_t m6delay_threshold; + m6_links_to_log_t m6_links_to_log; + iE_Extensions_t iE_Extensions; + +}; +/* +M7period ::= INTEGER(1..60, ...) +*/ + +struct M7period : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "M7period";} + using parent_t = asn::integer<>; + +}; + +/* +M7Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct M7Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +M7Configuration ::= SEQUENCE { + m7period M7period, + m7-links-to-log Links-to-log, + iE-Extensions ProtocolExtensionContainer { {M7Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct M7Configuration : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "M7Configuration";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct m7period_t : M7period + { + static constexpr const char* name() {return "m7period_t";} + using parent_t = M7period; + + }; + m7period_t& ref_m7period() {return m7period;} + m7period_t const& ref_m7period() const {return m7period;} + struct m7_links_to_log_t : Links_to_log + { + static constexpr const char* name() {return "m7_links_to_log_t";} + using parent_t = Links_to_log; + + }; + m7_links_to_log_t& ref_m7_links_to_log() {return m7_links_to_log;} + m7_links_to_log_t const& ref_m7_links_to_log() const {return m7_links_to_log;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(m7period); + v(m7_links_to_log); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(m7period); + v(m7_links_to_log); + v(iE_Extensions); + + }; + void clear() + { + m7period.clear(); + m7_links_to_log.clear(); + iE_Extensions.clear(); + + }; + private: + m7period_t m7period; + m7_links_to_log_t m7_links_to_log; + iE_Extensions_t iE_Extensions; + +}; +/* +MBMS-Service-Area-Identity ::= OCTET STRING (SIZE (2)) +*/ + +struct MBMS_Service_Area_Identity : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MBMS-Service-Area-Identity";} + using parent_t = asn::ostring<>; + +}; + +/* +MBMS-Service-Area-Identity-List ::= SEQUENCE (SIZE(1.. maxnoofMBMSServiceAreaIdentities)) OF MBMS-Service-Area-Identity +*/ + +struct MBMS_Service_Area_Identity_List_elm : MBMS_Service_Area_Identity +{ + static constexpr const char* name() {return "MBMS_Service_Area_Identity_List_elm";} + using parent_t = MBMS_Service_Area_Identity; + +}; +struct MBMS_Service_Area_Identity_List : asn::sequenceof +{ + static constexpr const char* name() {return "MBMS-Service-Area-Identity-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RadioframeAllocationPeriod ::= ENUMERATED{ + n1, + n2, + n4, + n8, + n16, + n32, + ... +} +*/ + +struct RadioframeAllocationPeriod : asn::enumerated<6, 0, true> +{ + static constexpr const char* name() {return "RadioframeAllocationPeriod";} + using parent_t = asn::enumerated<6, 0, true>; + typedef enum { + n1 + ,n2 + ,n4 + ,n8 + ,n16 + ,n32 + } index_t; + +}; + +/* +RadioframeAllocationOffset ::= INTEGER (0..7, ...) +*/ + +struct RadioframeAllocationOffset : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "RadioframeAllocationOffset";} + using parent_t = asn::integer<>; + +}; + +/* +Oneframe ::= BIT STRING (SIZE (6)) +*/ + +struct Oneframe : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Oneframe";} + using parent_t = asn::bstring<>; + +}; + +/* +SubframeAllocation ::= CHOICE { + oneframe Oneframe, + fourframes Fourframes, + ... +} +*/ + +struct SubframeAllocation : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "SubframeAllocation";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~SubframeAllocation() {clear();} + struct oneframe_t : Oneframe + { + static constexpr const char* name() {return "oneframe_t";} + using parent_t = Oneframe; + + }; + struct fourframes_t : Fourframes + { + static constexpr const char* name() {return "fourframes_t";} + using parent_t = Fourframes; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + oneframe_t& select_oneframe() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + oneframe_t const* get_oneframe() const { if(get_index() == 1) { return &var.as();} return nullptr; } + fourframes_t& select_fourframes() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + fourframes_t const* get_fourframes() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(oneframe_t)]; + char dummy2[sizeof(fourframes_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +MBSFN-Subframe-Info-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct MBSFN_Subframe_Info_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MBSFN-Subframe-Info ::= SEQUENCE { + radioframeAllocationPeriod RadioframeAllocationPeriod, + radioframeAllocationOffset RadioframeAllocationOffset, + subframeAllocation SubframeAllocation, + iE-Extensions ProtocolExtensionContainer { {MBSFN-Subframe-Info-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct MBSFN_Subframe_Info : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "MBSFN-Subframe-Info";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct radioframeAllocationPeriod_t : RadioframeAllocationPeriod + { + static constexpr const char* name() {return "radioframeAllocationPeriod_t";} + using parent_t = RadioframeAllocationPeriod; + + }; + radioframeAllocationPeriod_t& ref_radioframeAllocationPeriod() {return radioframeAllocationPeriod;} + radioframeAllocationPeriod_t const& ref_radioframeAllocationPeriod() const {return radioframeAllocationPeriod;} + struct radioframeAllocationOffset_t : RadioframeAllocationOffset + { + static constexpr const char* name() {return "radioframeAllocationOffset_t";} + using parent_t = RadioframeAllocationOffset; + + }; + radioframeAllocationOffset_t& ref_radioframeAllocationOffset() {return radioframeAllocationOffset;} + radioframeAllocationOffset_t const& ref_radioframeAllocationOffset() const {return radioframeAllocationOffset;} + struct subframeAllocation_t : SubframeAllocation + { + static constexpr const char* name() {return "subframeAllocation_t";} + using parent_t = SubframeAllocation; + + }; + subframeAllocation_t& ref_subframeAllocation() {return subframeAllocation;} + subframeAllocation_t const& ref_subframeAllocation() const {return subframeAllocation;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(radioframeAllocationPeriod); + v(radioframeAllocationOffset); + v(subframeAllocation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(radioframeAllocationPeriod); + v(radioframeAllocationOffset); + v(subframeAllocation); + v(iE_Extensions); + + }; + void clear() + { + radioframeAllocationPeriod.clear(); + radioframeAllocationOffset.clear(); + subframeAllocation.clear(); + iE_Extensions.clear(); + + }; + private: + radioframeAllocationPeriod_t radioframeAllocationPeriod; + radioframeAllocationOffset_t radioframeAllocationOffset; + subframeAllocation_t subframeAllocation; + iE_Extensions_t iE_Extensions; + +}; +/* +MBSFN-Subframe-Infolist::= SEQUENCE (SIZE(1.. maxnoofMBSFN)) OF MBSFN-Subframe-Info +*/ + +struct MBSFN_Subframe_Infolist_elm : MBSFN_Subframe_Info +{ + static constexpr const char* name() {return "MBSFN_Subframe_Infolist_elm";} + using parent_t = MBSFN_Subframe_Info; + +}; +struct MBSFN_Subframe_Infolist : asn::sequenceof +{ + static constexpr const char* name() {return "MBSFN-Subframe-Infolist";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +MDT-Activation ::= ENUMERATED { + immediate-MDT-only, + immediate-MDT-and-Trace, + ... +} +*/ + +struct MDT_Activation : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "MDT-Activation";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + immediate_MDT_only + ,immediate_MDT_and_Trace + } index_t; + +}; + +/* +MeasurementsToActivate::= BIT STRING (SIZE (8)) +*/ + +struct MeasurementsToActivate : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MeasurementsToActivate";} + using parent_t = asn::bstring<>; + +}; + +/* +MDT-Location-Info ::= BIT STRING (SIZE (8)) +*/ + +struct MDT_Location_Info : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MDT-Location-Info";} + using parent_t = asn::bstring<>; + +}; + +/* +MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMN-Identity +*/ + +struct MDTPLMNList_elm : PLMN_Identity +{ + static constexpr const char* name() {return "MDTPLMNList_elm";} + using parent_t = PLMN_Identity; + +}; +struct MDTPLMNList : asn::sequenceof +{ + static constexpr const char* name() {return "MDTPLMNList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +WLANMeasConfig::= ENUMERATED {setup,...} +*/ + +struct WLANMeasConfig : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "WLANMeasConfig";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + setup + } index_t; + +}; + +/* +WLANName ::= OCTET STRING (SIZE (1..32)) +*/ + +struct WLANName : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "WLANName";} + using parent_t = asn::ostring<>; + +}; + +/* +WLANMeasConfigNameList ::= SEQUENCE (SIZE(1..maxnoofWLANName)) OF WLANName +*/ + +struct WLANMeasConfigNameList_elm : WLANName +{ + static constexpr const char* name() {return "WLANMeasConfigNameList_elm";} + using parent_t = WLANName; + +}; +struct WLANMeasConfigNameList : asn::sequenceof +{ + static constexpr const char* name() {return "WLANMeasConfigNameList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +WLANMeasurementConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct WLANMeasurementConfiguration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +WLANMeasurementConfiguration ::= SEQUENCE { + wlanMeasConfig WLANMeasConfig, + wlanMeasConfigNameList WLANMeasConfigNameList OPTIONAL, + wlan-rssi ENUMERATED {true, ...} OPTIONAL, + wlan-rtt ENUMERATED {true, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {WLANMeasurementConfiguration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct WLANMeasurementConfiguration : asn::sequence<5, 0, true, 4> +{ + static constexpr const char* name() {return "WLANMeasurementConfiguration";} + using parent_t = asn::sequence<5, 0, true, 4>; + struct wlanMeasConfig_t : WLANMeasConfig + { + static constexpr const char* name() {return "wlanMeasConfig_t";} + using parent_t = WLANMeasConfig; + + }; + wlanMeasConfig_t& ref_wlanMeasConfig() {return wlanMeasConfig;} + wlanMeasConfig_t const& ref_wlanMeasConfig() const {return wlanMeasConfig;} + struct wlanMeasConfigNameList_t : WLANMeasConfigNameList + { + static constexpr const char* name() {return "wlanMeasConfigNameList_t";} + using parent_t = WLANMeasConfigNameList; + static constexpr bool optional = true; + + }; + wlanMeasConfigNameList_t& set_wlanMeasConfigNameList() { wlanMeasConfigNameList.setpresent(true); return wlanMeasConfigNameList;} + wlanMeasConfigNameList_t const* get_wlanMeasConfigNameList() const {return wlanMeasConfigNameList.is_valid() ? &wlanMeasConfigNameList : nullptr;} + struct wlan_rssi_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "wlan_rssi_t";} + using parent_t = asn::enumerated<1, 0, true>; + static constexpr bool optional = true; + typedef enum { + True + } index_t; + + }; + + wlan_rssi_t& set_wlan_rssi() { wlan_rssi.setpresent(true); return wlan_rssi;} + wlan_rssi_t const* get_wlan_rssi() const {return wlan_rssi.is_valid() ? &wlan_rssi : nullptr;} + struct wlan_rtt_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "wlan_rtt_t";} + using parent_t = asn::enumerated<1, 0, true>; + static constexpr bool optional = true; + typedef enum { + True + } index_t; + + }; + + wlan_rtt_t& set_wlan_rtt() { wlan_rtt.setpresent(true); return wlan_rtt;} + wlan_rtt_t const* get_wlan_rtt() const {return wlan_rtt.is_valid() ? &wlan_rtt : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(wlanMeasConfig); + v(wlanMeasConfigNameList); + v(wlan_rssi); + v(wlan_rtt); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(wlanMeasConfig); + v(wlanMeasConfigNameList); + v(wlan_rssi); + v(wlan_rtt); + v(iE_Extensions); + + }; + void clear() + { + wlanMeasConfig.clear(); + wlanMeasConfigNameList.clear(); + wlan_rssi.clear(); + wlan_rtt.clear(); + iE_Extensions.clear(); + + }; + private: + wlanMeasConfig_t wlanMeasConfig; + wlanMeasConfigNameList_t wlanMeasConfigNameList; + wlan_rssi_t wlan_rssi; + wlan_rtt_t wlan_rtt; + iE_Extensions_t iE_Extensions; + +}; +/* +MDT-Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| + {ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| + {ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| + {ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| + {ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional}| + {ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| + {ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}| + { ID id-BluetoothMeasurementConfiguration CRITICALITY ignore EXTENSION BluetoothMeasurementConfiguration PRESENCE optional}| + { ID id-WLANMeasurementConfiguration CRITICALITY ignore EXTENSION WLANMeasurementConfiguration PRESENCE optional}, + ... +} +*/ + +struct MDT_Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_M3Configuration() { set(id_M3Configuration); type=1;} + void select_id_M4Configuration() { set(id_M4Configuration); type=2;} + void select_id_M5Configuration() { set(id_M5Configuration); type=3;} + void select_id_MDT_Location_Info() { set(id_MDT_Location_Info); type=4;} + void select_id_SignallingBasedMDTPLMNList() { set(id_SignallingBasedMDTPLMNList); type=5;} + void select_id_M6Configuration() { set(id_M6Configuration); type=6;} + void select_id_M7Configuration() { set(id_M7Configuration); type=7;} + void select_id_BluetoothMeasurementConfiguration() { set(id_BluetoothMeasurementConfiguration); type=8;} + void select_id_WLANMeasurementConfiguration() { set(id_WLANMeasurementConfiguration); type=9;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_M3Configuration)) { type = 1; return true; } + else if(equal(id_M4Configuration)) { type = 2; return true; } + else if(equal(id_M5Configuration)) { type = 3; return true; } + else if(equal(id_MDT_Location_Info)) { type = 4; return true; } + else if(equal(id_SignallingBasedMDTPLMNList)) { type = 5; return true; } + else if(equal(id_M6Configuration)) { type = 6; return true; } + else if(equal(id_M7Configuration)) { type = 7; return true; } + else if(equal(id_BluetoothMeasurementConfiguration)) { type = 8; return true; } + else if(equal(id_WLANMeasurementConfiguration)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_M3Configuration);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_M4Configuration);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_M5Configuration);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MDT_Location_Info);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SignallingBasedMDTPLMNList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_M6Configuration);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_M7Configuration);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_BluetoothMeasurementConfiguration);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_WLANMeasurementConfiguration);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_M3Configuration() { set(ignore); type=1;} + void select_id_M4Configuration() { set(ignore); type=2;} + void select_id_M5Configuration() { set(ignore); type=3;} + void select_id_MDT_Location_Info() { set(ignore); type=4;} + void select_id_SignallingBasedMDTPLMNList() { set(ignore); type=5;} + void select_id_M6Configuration() { set(ignore); type=6;} + void select_id_M7Configuration() { set(ignore); type=7;} + void select_id_BluetoothMeasurementConfiguration() { set(ignore); type=8;} + void select_id_WLANMeasurementConfiguration() { set(ignore); type=9;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + M3Configuration& select_id_M3Configuration() { return set(1); } + M3Configuration const* get_id_M3Configuration() const { return get(1); } + M4Configuration& select_id_M4Configuration() { return set(2); } + M4Configuration const* get_id_M4Configuration() const { return get(2); } + M5Configuration& select_id_M5Configuration() { return set(3); } + M5Configuration const* get_id_M5Configuration() const { return get(3); } + MDT_Location_Info& select_id_MDT_Location_Info() { return set(4); } + MDT_Location_Info const* get_id_MDT_Location_Info() const { return get(4); } + MDTPLMNList& select_id_SignallingBasedMDTPLMNList() { return set(5); } + MDTPLMNList const* get_id_SignallingBasedMDTPLMNList() const { return get(5); } + M6Configuration& select_id_M6Configuration() { return set(6); } + M6Configuration const* get_id_M6Configuration() const { return get(6); } + M7Configuration& select_id_M7Configuration() { return set(7); } + M7Configuration const* get_id_M7Configuration() const { return get(7); } + BluetoothMeasurementConfiguration& select_id_BluetoothMeasurementConfiguration() { return set(8); } + BluetoothMeasurementConfiguration const* get_id_BluetoothMeasurementConfiguration() const { return get(8); } + WLANMeasurementConfiguration& select_id_WLANMeasurementConfiguration() { return set(9); } + WLANMeasurementConfiguration const* get_id_WLANMeasurementConfiguration() const { return get(9); } + bool is_unknown() const { return type == 10; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_M3Configuration()); return true; + case 2: v(select_id_M4Configuration()); return true; + case 3: v(select_id_M5Configuration()); return true; + case 4: v(select_id_MDT_Location_Info()); return true; + case 5: v(select_id_SignallingBasedMDTPLMNList()); return true; + case 6: v(select_id_M6Configuration()); return true; + case 7: v(select_id_M7Configuration()); return true; + case 8: v(select_id_BluetoothMeasurementConfiguration()); return true; + case 9: v(select_id_WLANMeasurementConfiguration()); return true; + case 10: if(type != 10) {clear(); asn::base::set();} type = 10; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(BluetoothMeasurementConfiguration)]; + char dummy2[sizeof(M3Configuration)]; + char dummy3[sizeof(M4Configuration)]; + char dummy4[sizeof(M5Configuration)]; + char dummy5[sizeof(M6Configuration)]; + char dummy6[sizeof(M7Configuration)]; + char dummy7[sizeof(MDTPLMNList)]; + char dummy8[sizeof(MDT_Location_Info)]; + char dummy9[sizeof(WLANMeasurementConfiguration)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_M3Configuration() { set(conditional); type=1;} + void select_id_M4Configuration() { set(conditional); type=2;} + void select_id_M5Configuration() { set(conditional); type=3;} + void select_id_MDT_Location_Info() { set(optional); type=4;} + void select_id_SignallingBasedMDTPLMNList() { set(optional); type=5;} + void select_id_M6Configuration() { set(conditional); type=6;} + void select_id_M7Configuration() { set(conditional); type=7;} + void select_id_BluetoothMeasurementConfiguration() { set(optional); type=8;} + void select_id_WLANMeasurementConfiguration() { set(optional); type=9;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(conditional)) { type = 1; return true; } + else if(equal(conditional)) { type = 2; return true; } + else if(equal(conditional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(conditional)) { type = 6; return true; } + else if(equal(conditional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(conditional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(conditional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(conditional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(conditional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(conditional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MDT-Configuration ::= SEQUENCE { + mdt-Activation MDT-Activation, + areaScopeOfMDT AreaScopeOfMDT, + measurementsToActivate MeasurementsToActivate, + m1reportingTrigger M1ReportingTrigger, + m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, +-- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 + m1periodicReporting M1PeriodicReporting OPTIONAL, +-- Included in case of periodic, or event-triggered periodic reporting for measurement M1 + iE-Extensions ProtocolExtensionContainer { {MDT-Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct MDT_Configuration : asn::sequence<7, 0, true, 3> +{ + static constexpr const char* name() {return "MDT-Configuration";} + using parent_t = asn::sequence<7, 0, true, 3>; + struct mdt_Activation_t : MDT_Activation + { + static constexpr const char* name() {return "mdt_Activation_t";} + using parent_t = MDT_Activation; + + }; + mdt_Activation_t& ref_mdt_Activation() {return mdt_Activation;} + mdt_Activation_t const& ref_mdt_Activation() const {return mdt_Activation;} + struct areaScopeOfMDT_t : AreaScopeOfMDT + { + static constexpr const char* name() {return "areaScopeOfMDT_t";} + using parent_t = AreaScopeOfMDT; + + }; + areaScopeOfMDT_t& ref_areaScopeOfMDT() {return areaScopeOfMDT;} + areaScopeOfMDT_t const& ref_areaScopeOfMDT() const {return areaScopeOfMDT;} + struct measurementsToActivate_t : MeasurementsToActivate + { + static constexpr const char* name() {return "measurementsToActivate_t";} + using parent_t = MeasurementsToActivate; + + }; + measurementsToActivate_t& ref_measurementsToActivate() {return measurementsToActivate;} + measurementsToActivate_t const& ref_measurementsToActivate() const {return measurementsToActivate;} + struct m1reportingTrigger_t : M1ReportingTrigger + { + static constexpr const char* name() {return "m1reportingTrigger_t";} + using parent_t = M1ReportingTrigger; + + }; + m1reportingTrigger_t& ref_m1reportingTrigger() {return m1reportingTrigger;} + m1reportingTrigger_t const& ref_m1reportingTrigger() const {return m1reportingTrigger;} + struct m1thresholdeventA2_t : M1ThresholdEventA2 + { + static constexpr const char* name() {return "m1thresholdeventA2_t";} + using parent_t = M1ThresholdEventA2; + static constexpr bool optional = true; + + }; + m1thresholdeventA2_t& set_m1thresholdeventA2() { m1thresholdeventA2.setpresent(true); return m1thresholdeventA2;} + m1thresholdeventA2_t const* get_m1thresholdeventA2() const {return m1thresholdeventA2.is_valid() ? &m1thresholdeventA2 : nullptr;} + struct m1periodicReporting_t : M1PeriodicReporting + { + static constexpr const char* name() {return "m1periodicReporting_t";} + using parent_t = M1PeriodicReporting; + static constexpr bool optional = true; + + }; + m1periodicReporting_t& set_m1periodicReporting() { m1periodicReporting.setpresent(true); return m1periodicReporting;} + m1periodicReporting_t const* get_m1periodicReporting() const {return m1periodicReporting.is_valid() ? &m1periodicReporting : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(mdt_Activation); + v(areaScopeOfMDT); + v(measurementsToActivate); + v(m1reportingTrigger); + v(m1thresholdeventA2); + v(m1periodicReporting); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(mdt_Activation); + v(areaScopeOfMDT); + v(measurementsToActivate); + v(m1reportingTrigger); + v(m1thresholdeventA2); + v(m1periodicReporting); + v(iE_Extensions); + + }; + void clear() + { + mdt_Activation.clear(); + areaScopeOfMDT.clear(); + measurementsToActivate.clear(); + m1reportingTrigger.clear(); + m1thresholdeventA2.clear(); + m1periodicReporting.clear(); + iE_Extensions.clear(); + + }; + private: + mdt_Activation_t mdt_Activation; + areaScopeOfMDT_t areaScopeOfMDT; + measurementsToActivate_t measurementsToActivate; + m1reportingTrigger_t m1reportingTrigger; + m1thresholdeventA2_t m1thresholdeventA2; + m1periodicReporting_t m1periodicReporting; + iE_Extensions_t iE_Extensions; + +}; +/* +MakeBeforeBreakIndicator::= ENUMERATED {true, ...} +*/ + +struct MakeBeforeBreakIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "MakeBeforeBreakIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + True + } index_t; + +}; + +/* +ManagementBasedMDTallowed ::= ENUMERATED {allowed, ...} +*/ + +struct ManagementBasedMDTallowed : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "ManagementBasedMDTallowed";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + allowed + } index_t; + +}; + +/* +Masked-IMEISV ::= BIT STRING (SIZE (64)) +*/ + +struct Masked_IMEISV : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Masked-IMEISV";} + using parent_t = asn::bstring<>; + +}; + +/* +MeNBCoordinationAssistanceInformation ::= ENUMERATED{ + coordination-not-required, + ... +} +*/ + +struct MeNBCoordinationAssistanceInformation : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "MeNBCoordinationAssistanceInformation";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + coordination_not_required + } index_t; + +}; + +/* +NRCellIdentifier ::= BIT STRING (SIZE (36)) +*/ + +struct NRCellIdentifier : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "NRCellIdentifier";} + using parent_t = asn::bstring<>; + +}; + +/* +NRCGI-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct NRCGI_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +NRCGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + nRcellIdentifier NRCellIdentifier, + iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct NRCGI : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "NRCGI";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct nRcellIdentifier_t : NRCellIdentifier + { + static constexpr const char* name() {return "nRcellIdentifier_t";} + using parent_t = NRCellIdentifier; + + }; + nRcellIdentifier_t& ref_nRcellIdentifier() {return nRcellIdentifier;} + nRcellIdentifier_t const& ref_nRcellIdentifier() const {return nRcellIdentifier;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pLMN_Identity); + v(nRcellIdentifier); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(nRcellIdentifier); + v(iE_Extensions); + + }; + void clear() + { + pLMN_Identity.clear(); + nRcellIdentifier.clear(); + iE_Extensions.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + nRcellIdentifier_t nRcellIdentifier; + iE_Extensions_t iE_Extensions; + +}; +/* +MeNBResourceCoordinationInformationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-NRCGI CRITICALITY ignore EXTENSION NRCGI PRESENCE optional}| + { ID id-MeNBCoordinationAssistanceInformation CRITICALITY reject EXTENSION MeNBCoordinationAssistanceInformation PRESENCE optional}, + ... +} +*/ + +struct MeNBResourceCoordinationInformationExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NRCGI() { set(id_NRCGI); type=1;} + void select_id_MeNBCoordinationAssistanceInformation() { set(id_MeNBCoordinationAssistanceInformation); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_NRCGI)) { type = 1; return true; } + else if(equal(id_MeNBCoordinationAssistanceInformation)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_NRCGI);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_MeNBCoordinationAssistanceInformation);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NRCGI() { set(ignore); type=1;} + void select_id_MeNBCoordinationAssistanceInformation() { set(reject); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + NRCGI& select_id_NRCGI() { return set(1); } + NRCGI const* get_id_NRCGI() const { return get(1); } + MeNBCoordinationAssistanceInformation& select_id_MeNBCoordinationAssistanceInformation() { return set(2); } + MeNBCoordinationAssistanceInformation const* get_id_MeNBCoordinationAssistanceInformation() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_NRCGI()); return true; + case 2: v(select_id_MeNBCoordinationAssistanceInformation()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(MeNBCoordinationAssistanceInformation)]; + char dummy2[sizeof(NRCGI)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NRCGI() { set(optional); type=1;} + void select_id_MeNBCoordinationAssistanceInformation() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MeNBResourceCoordinationInformation ::= SEQUENCE { + eUTRA-Cell-ID ECGI, + uLCoordinationInformation BIT STRING (SIZE(6..4400, ...)), + dLCoordinationInformation BIT STRING (SIZE(6..4400, ...)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MeNBResourceCoordinationInformationExtIEs} } OPTIONAL, + ... +} +*/ + +struct MeNBResourceCoordinationInformation : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "MeNBResourceCoordinationInformation";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct eUTRA_Cell_ID_t : ECGI + { + static constexpr const char* name() {return "eUTRA_Cell_ID_t";} + using parent_t = ECGI; + + }; + eUTRA_Cell_ID_t& ref_eUTRA_Cell_ID() {return eUTRA_Cell_ID;} + eUTRA_Cell_ID_t const& ref_eUTRA_Cell_ID() const {return eUTRA_Cell_ID;} + struct uLCoordinationInformation_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "uLCoordinationInformation_t";} + using parent_t = asn::bstring<>; + + }; + + uLCoordinationInformation_t& ref_uLCoordinationInformation() {return uLCoordinationInformation;} + uLCoordinationInformation_t const& ref_uLCoordinationInformation() const {return uLCoordinationInformation;} + struct dLCoordinationInformation_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "dLCoordinationInformation_t";} + using parent_t = asn::bstring<>; + static constexpr bool optional = true; + + }; + + dLCoordinationInformation_t& set_dLCoordinationInformation() { dLCoordinationInformation.setpresent(true); return dLCoordinationInformation;} + dLCoordinationInformation_t const* get_dLCoordinationInformation() const {return dLCoordinationInformation.is_valid() ? &dLCoordinationInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(eUTRA_Cell_ID); + v(uLCoordinationInformation); + v(dLCoordinationInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(eUTRA_Cell_ID); + v(uLCoordinationInformation); + v(dLCoordinationInformation); + v(iE_Extensions); + + }; + void clear() + { + eUTRA_Cell_ID.clear(); + uLCoordinationInformation.clear(); + dLCoordinationInformation.clear(); + iE_Extensions.clear(); + + }; + private: + eUTRA_Cell_ID_t eUTRA_Cell_ID; + uLCoordinationInformation_t uLCoordinationInformation; + dLCoordinationInformation_t dLCoordinationInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +MeNBtoSeNBContainer ::= OCTET STRING +*/ + +struct MeNBtoSeNBContainer : asn::ostring<> +{ + static constexpr const char* name() {return "MeNBtoSeNBContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +MeNBtoSgNBContainer ::= OCTET STRING +*/ + +struct MeNBtoSgNBContainer : asn::ostring<> +{ + static constexpr const char* name() {return "MeNBtoSgNBContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +Measurement-ID ::= INTEGER (1..4095, ...) +*/ + +struct Measurement_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Measurement-ID";} + using parent_t = asn::integer<>; + +}; + +/* +MobilityParametersInformation ::= SEQUENCE { + handoverTriggerChange INTEGER (-20..20), + ... +} +*/ + +struct MobilityParametersInformation : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "MobilityParametersInformation";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct handoverTriggerChange_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "handoverTriggerChange_t";} + using parent_t = asn::integer<>; + + }; + + handoverTriggerChange_t& ref_handoverTriggerChange() {return handoverTriggerChange;} + handoverTriggerChange_t const& ref_handoverTriggerChange() const {return handoverTriggerChange;} + template void decode(V& v) + { + v(handoverTriggerChange); + + }; + template void encode(V& v) const + { + v(handoverTriggerChange); + + }; + void clear() + { + handoverTriggerChange.clear(); + + }; + private: + handoverTriggerChange_t handoverTriggerChange; + +}; +/* +MobilityParametersModificationRange ::= SEQUENCE { + handoverTriggerChangeLowerLimit INTEGER (-20..20), + handoverTriggerChangeUpperLimit INTEGER (-20..20), + ... +} +*/ + +struct MobilityParametersModificationRange : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "MobilityParametersModificationRange";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct handoverTriggerChangeLowerLimit_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "handoverTriggerChangeLowerLimit_t";} + using parent_t = asn::integer<>; + + }; + + handoverTriggerChangeLowerLimit_t& ref_handoverTriggerChangeLowerLimit() {return handoverTriggerChangeLowerLimit;} + handoverTriggerChangeLowerLimit_t const& ref_handoverTriggerChangeLowerLimit() const {return handoverTriggerChangeLowerLimit;} + struct handoverTriggerChangeUpperLimit_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "handoverTriggerChangeUpperLimit_t";} + using parent_t = asn::integer<>; + + }; + + handoverTriggerChangeUpperLimit_t& ref_handoverTriggerChangeUpperLimit() {return handoverTriggerChangeUpperLimit;} + handoverTriggerChangeUpperLimit_t const& ref_handoverTriggerChangeUpperLimit() const {return handoverTriggerChangeUpperLimit;} + template void decode(V& v) + { + v(handoverTriggerChangeLowerLimit); + v(handoverTriggerChangeUpperLimit); + + }; + template void encode(V& v) const + { + v(handoverTriggerChangeLowerLimit); + v(handoverTriggerChangeUpperLimit); + + }; + void clear() + { + handoverTriggerChangeLowerLimit.clear(); + handoverTriggerChangeUpperLimit.clear(); + + }; + private: + handoverTriggerChangeLowerLimit_t handoverTriggerChangeLowerLimit; + handoverTriggerChangeUpperLimit_t handoverTriggerChangeUpperLimit; + +}; +/* +MultibandInfoList ::= SEQUENCE (SIZE(1..maxnoofBands)) OF BandInfo +*/ + +struct MultibandInfoList_elm : BandInfo +{ + static constexpr const char* name() {return "MultibandInfoList_elm";} + using parent_t = BandInfo; + +}; +struct MultibandInfoList : asn::sequenceof +{ + static constexpr const char* name() {return "MultibandInfoList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +NRSCS ::= ENUMERATED { scs15, scs30, scs60, scs120, ...} +*/ + +struct NRSCS : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "NRSCS";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + scs15 + ,scs30 + ,scs60 + ,scs120 + } index_t; + +}; + +/* +NRNRB ::= ENUMERATED { nrb11, nrb18, nrb24, nrb25, nrb31, nrb32, nrb38, nrb51, nrb52, nrb65, nrb66, nrb78, nrb79, nrb93, nrb106, nrb107, nrb121, nrb132, nrb133, nrb135, nrb160, nrb162, nrb189, nrb216, nrb217, nrb245, nrb264, nrb270, nrb273, ...} +*/ + +struct NRNRB : asn::enumerated<29, 0, true> +{ + static constexpr const char* name() {return "NRNRB";} + using parent_t = asn::enumerated<29, 0, true>; + typedef enum { + nrb11 + ,nrb18 + ,nrb24 + ,nrb25 + ,nrb31 + ,nrb32 + ,nrb38 + ,nrb51 + ,nrb52 + ,nrb65 + ,nrb66 + ,nrb78 + ,nrb79 + ,nrb93 + ,nrb106 + ,nrb107 + ,nrb121 + ,nrb132 + ,nrb133 + ,nrb135 + ,nrb160 + ,nrb162 + ,nrb189 + ,nrb216 + ,nrb217 + ,nrb245 + ,nrb264 + ,nrb270 + ,nrb273 + } index_t; + +}; + +/* +NR-TxBW-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct NR_TxBW_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +NR-TxBW ::= SEQUENCE { + nRSCS NRSCS, + nRNRB NRNRB, + iE-Extensions ProtocolExtensionContainer { {NR-TxBW-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct NR_TxBW : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "NR-TxBW";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct nRSCS_t : NRSCS + { + static constexpr const char* name() {return "nRSCS_t";} + using parent_t = NRSCS; + + }; + nRSCS_t& ref_nRSCS() {return nRSCS;} + nRSCS_t const& ref_nRSCS() const {return nRSCS;} + struct nRNRB_t : NRNRB + { + static constexpr const char* name() {return "nRNRB_t";} + using parent_t = NRNRB; + + }; + nRNRB_t& ref_nRNRB() {return nRNRB;} + nRNRB_t const& ref_nRNRB() const {return nRNRB;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRSCS); + v(nRNRB); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRSCS); + v(nRNRB); + v(iE_Extensions); + + }; + void clear() + { + nRSCS.clear(); + nRNRB.clear(); + iE_Extensions.clear(); + + }; + private: + nRSCS_t nRSCS; + nRNRB_t nRNRB; + iE_Extensions_t iE_Extensions; + +}; +/* +SULInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SULInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SULInformation ::= SEQUENCE { + sUL-ARFCN INTEGER (0.. 3279165), + sUL-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {SULInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SULInformation : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "SULInformation";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct sUL_ARFCN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "sUL_ARFCN_t";} + using parent_t = asn::integer<>; + + }; + + sUL_ARFCN_t& ref_sUL_ARFCN() {return sUL_ARFCN;} + sUL_ARFCN_t const& ref_sUL_ARFCN() const {return sUL_ARFCN;} + struct sUL_TxBW_t : NR_TxBW + { + static constexpr const char* name() {return "sUL_TxBW_t";} + using parent_t = NR_TxBW; + + }; + sUL_TxBW_t& ref_sUL_TxBW() {return sUL_TxBW;} + sUL_TxBW_t const& ref_sUL_TxBW() const {return sUL_TxBW;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(sUL_ARFCN); + v(sUL_TxBW); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(sUL_ARFCN); + v(sUL_TxBW); + v(iE_Extensions); + + }; + void clear() + { + sUL_ARFCN.clear(); + sUL_TxBW.clear(); + iE_Extensions.clear(); + + }; + private: + sUL_ARFCN_t sUL_ARFCN; + sUL_TxBW_t sUL_TxBW; + iE_Extensions_t iE_Extensions; + +}; +/* +NRFreqInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct NRFreqInfo_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +NRFreqInfo ::= SEQUENCE{ + nRARFCN INTEGER (0.. 3279165), + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + sULInformation SULInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NRFreqInfo-ExtIEs} } OPTIONAL, + + ... +} +*/ + +struct NRFreqInfo : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "NRFreqInfo";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct nRARFCN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "nRARFCN_t";} + using parent_t = asn::integer<>; + + }; + + nRARFCN_t& ref_nRARFCN() {return nRARFCN;} + nRARFCN_t const& ref_nRARFCN() const {return nRARFCN;} + struct freqBandListNr_t_elm : FreqBandNrItem + { + static constexpr const char* name() {return "freqBandListNr_t_elm";} + using parent_t = FreqBandNrItem; + + }; + struct freqBandListNr_t : asn::sequenceof + { + static constexpr const char* name() {return "freqBandListNr_t";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + + }; + freqBandListNr_t& ref_freqBandListNr() {return freqBandListNr;} + freqBandListNr_t const& ref_freqBandListNr() const {return freqBandListNr;} + struct sULInformation_t : SULInformation + { + static constexpr const char* name() {return "sULInformation_t";} + using parent_t = SULInformation; + static constexpr bool optional = true; + + }; + sULInformation_t& set_sULInformation() { sULInformation.setpresent(true); return sULInformation;} + sULInformation_t const* get_sULInformation() const {return sULInformation.is_valid() ? &sULInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRARFCN); + v(freqBandListNr); + v(sULInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRARFCN); + v(freqBandListNr); + v(sULInformation); + v(iE_Extensions); + + }; + void clear() + { + nRARFCN.clear(); + freqBandListNr.clear(); + sULInformation.clear(); + iE_Extensions.clear(); + + }; + private: + nRARFCN_t nRARFCN; + freqBandListNr_t freqBandListNr; + sULInformation_t sULInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +NRPCI ::= INTEGER (0..1007) +*/ + +struct NRPCI : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "NRPCI";} + using parent_t = asn::integer<>; + +}; + +/* +NRencryptionAlgorithms ::= BIT STRING (SIZE (16,...)) +*/ + +struct NRencryptionAlgorithms : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "NRencryptionAlgorithms";} + using parent_t = asn::bstring<>; + +}; + +/* +NRintegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) +*/ + +struct NRintegrityProtectionAlgorithms : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "NRintegrityProtectionAlgorithms";} + using parent_t = asn::bstring<>; + +}; + +/* +NRUESecurityCapabilities-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct NRUESecurityCapabilities_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +NRUESecurityCapabilities ::= SEQUENCE { + nRencryptionAlgorithms NRencryptionAlgorithms, + nRintegrityProtectionAlgorithms NRintegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { {NRUESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} +*/ + +struct NRUESecurityCapabilities : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "NRUESecurityCapabilities";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct nRencryptionAlgorithms_t : NRencryptionAlgorithms + { + static constexpr const char* name() {return "nRencryptionAlgorithms_t";} + using parent_t = NRencryptionAlgorithms; + + }; + nRencryptionAlgorithms_t& ref_nRencryptionAlgorithms() {return nRencryptionAlgorithms;} + nRencryptionAlgorithms_t const& ref_nRencryptionAlgorithms() const {return nRencryptionAlgorithms;} + struct nRintegrityProtectionAlgorithms_t : NRintegrityProtectionAlgorithms + { + static constexpr const char* name() {return "nRintegrityProtectionAlgorithms_t";} + using parent_t = NRintegrityProtectionAlgorithms; + + }; + nRintegrityProtectionAlgorithms_t& ref_nRintegrityProtectionAlgorithms() {return nRintegrityProtectionAlgorithms;} + nRintegrityProtectionAlgorithms_t const& ref_nRintegrityProtectionAlgorithms() const {return nRintegrityProtectionAlgorithms;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRencryptionAlgorithms); + v(nRintegrityProtectionAlgorithms); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRencryptionAlgorithms); + v(nRintegrityProtectionAlgorithms); + v(iE_Extensions); + + }; + void clear() + { + nRencryptionAlgorithms.clear(); + nRintegrityProtectionAlgorithms.clear(); + iE_Extensions.clear(); + + }; + private: + nRencryptionAlgorithms_t nRencryptionAlgorithms; + nRintegrityProtectionAlgorithms_t nRintegrityProtectionAlgorithms; + iE_Extensions_t iE_Extensions; + +}; +/* +PCI ::= INTEGER (0..503, ...) +*/ + +struct PCI : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "PCI";} + using parent_t = asn::integer<>; + +}; + +/* +Neighbour-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-NeighbourTAC CRITICALITY ignore EXTENSION TAC PRESENCE optional}| + { ID id-eARFCNExtension CRITICALITY reject EXTENSION EARFCNExtension PRESENCE optional}, + ... +} +*/ + +struct Neighbour_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NeighbourTAC() { set(id_NeighbourTAC); type=1;} + void select_id_eARFCNExtension() { set(id_eARFCNExtension); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_NeighbourTAC)) { type = 1; return true; } + else if(equal(id_eARFCNExtension)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_NeighbourTAC);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_eARFCNExtension);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NeighbourTAC() { set(ignore); type=1;} + void select_id_eARFCNExtension() { set(reject); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + TAC& select_id_NeighbourTAC() { return set(1); } + TAC const* get_id_NeighbourTAC() const { return get(1); } + EARFCNExtension& select_id_eARFCNExtension() { return set(2); } + EARFCNExtension const* get_id_eARFCNExtension() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_NeighbourTAC()); return true; + case 2: v(select_id_eARFCNExtension()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(EARFCNExtension)]; + char dummy2[sizeof(TAC)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_NeighbourTAC() { set(optional); type=1;} + void select_id_eARFCNExtension() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +Neighbour-Information ::= SEQUENCE (SIZE (0..maxnoofNeighbours)) OF SEQUENCE { + eCGI ECGI, + pCI PCI, + eARFCN EARFCN, + iE-Extensions ProtocolExtensionContainer { {Neighbour-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct Neighbour_Information_elm : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "Neighbour_Information_elm";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct eCGI_t : ECGI + { + static constexpr const char* name() {return "eCGI_t";} + using parent_t = ECGI; + + }; + eCGI_t& ref_eCGI() {return eCGI;} + eCGI_t const& ref_eCGI() const {return eCGI;} + struct pCI_t : PCI + { + static constexpr const char* name() {return "pCI_t";} + using parent_t = PCI; + + }; + pCI_t& ref_pCI() {return pCI;} + pCI_t const& ref_pCI() const {return pCI;} + struct eARFCN_t : EARFCN + { + static constexpr const char* name() {return "eARFCN_t";} + using parent_t = EARFCN; + + }; + eARFCN_t& ref_eARFCN() {return eARFCN;} + eARFCN_t const& ref_eARFCN() const {return eARFCN;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(eCGI); + v(pCI); + v(eARFCN); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(eCGI); + v(pCI); + v(eARFCN); + v(iE_Extensions); + + }; + void clear() + { + eCGI.clear(); + pCI.clear(); + eARFCN.clear(); + iE_Extensions.clear(); + + }; + private: + eCGI_t eCGI; + pCI_t pCI; + eARFCN_t eARFCN; + iE_Extensions_t iE_Extensions; + +}; +struct Neighbour_Information : asn::sequenceof +{ + static constexpr const char* name() {return "Neighbour-Information";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +NewDRBIDrequest::= ENUMERATED {true, ...} +*/ + +struct NewDRBIDrequest : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "NewDRBIDrequest";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + True + } index_t; + +}; + +/* +Number-of-Antennaports ::= ENUMERATED { + an1, + an2, + an4, + ... +} +*/ + +struct Number_of_Antennaports : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "Number-of-Antennaports";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + an1 + ,an2 + ,an4 + } index_t; + +}; + +/* +PDCPChangeIndication ::= ENUMERATED {s-KgNB-update-required, pDCP-data-recovery-required,...} +*/ + +struct PDCPChangeIndication : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "PDCPChangeIndication";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + s_KgNB_update_required + ,pDCP_data_recovery_required + } index_t; + +}; + +/* +PDCPSnLength ::= ENUMERATED {twelve-bits,eighteen-bits,...} +*/ + +struct PDCPSnLength : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "PDCPSnLength";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + twelve_bits + ,eighteen_bits + } index_t; + +}; + +/* +PRACH-Configuration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct PRACH_Configuration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +PRACH-Configuration ::= SEQUENCE { + rootSequenceIndex INTEGER (0..837), + zeroCorrelationIndex INTEGER (0..15), + highSpeedFlag BOOLEAN, + prach-FreqOffset INTEGER (0..94), + prach-ConfigIndex INTEGER (0..63) OPTIONAL, -- present for TDD -- + iE-Extensions ProtocolExtensionContainer { {PRACH-Configuration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct PRACH_Configuration : asn::sequence<6, 0, true, 2> +{ + static constexpr const char* name() {return "PRACH-Configuration";} + using parent_t = asn::sequence<6, 0, true, 2>; + struct rootSequenceIndex_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "rootSequenceIndex_t";} + using parent_t = asn::integer<>; + + }; + + rootSequenceIndex_t& ref_rootSequenceIndex() {return rootSequenceIndex;} + rootSequenceIndex_t const& ref_rootSequenceIndex() const {return rootSequenceIndex;} + struct zeroCorrelationIndex_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "zeroCorrelationIndex_t";} + using parent_t = asn::integer<>; + + }; + + zeroCorrelationIndex_t& ref_zeroCorrelationIndex() {return zeroCorrelationIndex;} + zeroCorrelationIndex_t const& ref_zeroCorrelationIndex() const {return zeroCorrelationIndex;} + struct highSpeedFlag_t : asn::boolean + { + static constexpr const char* name() {return "highSpeedFlag_t";} + using parent_t = asn::boolean; + + }; + highSpeedFlag_t& ref_highSpeedFlag() {return highSpeedFlag;} + highSpeedFlag_t const& ref_highSpeedFlag() const {return highSpeedFlag;} + struct prach_FreqOffset_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "prach_FreqOffset_t";} + using parent_t = asn::integer<>; + + }; + + prach_FreqOffset_t& ref_prach_FreqOffset() {return prach_FreqOffset;} + prach_FreqOffset_t const& ref_prach_FreqOffset() const {return prach_FreqOffset;} + struct prach_ConfigIndex_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "prach_ConfigIndex_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + prach_ConfigIndex_t& set_prach_ConfigIndex() { prach_ConfigIndex.setpresent(true); return prach_ConfigIndex;} + prach_ConfigIndex_t const* get_prach_ConfigIndex() const {return prach_ConfigIndex.is_valid() ? &prach_ConfigIndex : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rootSequenceIndex); + v(zeroCorrelationIndex); + v(highSpeedFlag); + v(prach_FreqOffset); + v(prach_ConfigIndex); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rootSequenceIndex); + v(zeroCorrelationIndex); + v(highSpeedFlag); + v(prach_FreqOffset); + v(prach_ConfigIndex); + v(iE_Extensions); + + }; + void clear() + { + rootSequenceIndex.clear(); + zeroCorrelationIndex.clear(); + highSpeedFlag.clear(); + prach_FreqOffset.clear(); + prach_ConfigIndex.clear(); + iE_Extensions.clear(); + + }; + private: + rootSequenceIndex_t rootSequenceIndex; + zeroCorrelationIndex_t zeroCorrelationIndex; + highSpeedFlag_t highSpeedFlag; + prach_FreqOffset_t prach_FreqOffset; + prach_ConfigIndex_t prach_ConfigIndex; + iE_Extensions_t iE_Extensions; + +}; +/* +PedestrianUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} +*/ + +struct PedestrianUE : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "PedestrianUE";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + authorized + ,not_authorized + } index_t; + +}; + +/* +Port-Number ::= OCTET STRING (SIZE (2)) +*/ + +struct Port_Number : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "Port-Number";} + using parent_t = asn::ostring<>; + +}; + +/* +ProSeDirectDiscovery ::= ENUMERATED { + authorized, + not-authorized, + ... +} +*/ + +struct ProSeDirectDiscovery : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "ProSeDirectDiscovery";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + authorized + ,not_authorized + } index_t; + +}; + +/* +ProSeDirectCommunication ::= ENUMERATED { + authorized, + not-authorized, + ... +} +*/ + +struct ProSeDirectCommunication : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "ProSeDirectCommunication";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + authorized + ,not_authorized + } index_t; + +}; + +/* +ProSeUEtoNetworkRelaying ::= ENUMERATED { + authorized, + not-authorized, + ... +} +*/ + +struct ProSeUEtoNetworkRelaying : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "ProSeUEtoNetworkRelaying";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + authorized + ,not_authorized + } index_t; + +}; + +/* +ProSeAuthorized-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, + ... +} +*/ + +struct ProSeAuthorized_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ProSeUEtoNetworkRelaying() { set(id_ProSeUEtoNetworkRelaying); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ProSeUEtoNetworkRelaying)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ProSeUEtoNetworkRelaying);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ProSeUEtoNetworkRelaying() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ProSeUEtoNetworkRelaying& select_id_ProSeUEtoNetworkRelaying() { return set(1); } + ProSeUEtoNetworkRelaying const* get_id_ProSeUEtoNetworkRelaying() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ProSeUEtoNetworkRelaying()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ProSeUEtoNetworkRelaying)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ProSeUEtoNetworkRelaying() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ProSeAuthorized ::= SEQUENCE { + proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, + proSeDirectCommunication ProSeDirectCommunication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ProSeAuthorized : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "ProSeAuthorized";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct proSeDirectDiscovery_t : ProSeDirectDiscovery + { + static constexpr const char* name() {return "proSeDirectDiscovery_t";} + using parent_t = ProSeDirectDiscovery; + static constexpr bool optional = true; + + }; + proSeDirectDiscovery_t& set_proSeDirectDiscovery() { proSeDirectDiscovery.setpresent(true); return proSeDirectDiscovery;} + proSeDirectDiscovery_t const* get_proSeDirectDiscovery() const {return proSeDirectDiscovery.is_valid() ? &proSeDirectDiscovery : nullptr;} + struct proSeDirectCommunication_t : ProSeDirectCommunication + { + static constexpr const char* name() {return "proSeDirectCommunication_t";} + using parent_t = ProSeDirectCommunication; + static constexpr bool optional = true; + + }; + proSeDirectCommunication_t& set_proSeDirectCommunication() { proSeDirectCommunication.setpresent(true); return proSeDirectCommunication;} + proSeDirectCommunication_t const* get_proSeDirectCommunication() const {return proSeDirectCommunication.is_valid() ? &proSeDirectCommunication : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(proSeDirectDiscovery); + v(proSeDirectCommunication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(proSeDirectDiscovery); + v(proSeDirectCommunication); + v(iE_Extensions); + + }; + void clear() + { + proSeDirectDiscovery.clear(); + proSeDirectCommunication.clear(); + iE_Extensions.clear(); + + }; + private: + proSeDirectDiscovery_t proSeDirectDiscovery; + proSeDirectCommunication_t proSeDirectCommunication; + iE_Extensions_t iE_Extensions; + +}; +/* +ResourceType ::= ENUMERATED { + downlinknonCRS, + cRS, + uplink, + ... +} +*/ + +struct ResourceType : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "ResourceType";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + downlinknonCRS + ,cRS + ,uplink + } index_t; + +}; + +/* +ProtectedFootprintTimePattern-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ProtectedFootprintTimePattern_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ProtectedFootprintTimePattern ::= SEQUENCE { + protectedFootprintTimePeriodicity INTEGER (1..320, ...), + protectedFootprintStartTime INTEGER (1..20, ...), + iE-Extensions ProtocolExtensionContainer { {ProtectedFootprintTimePattern-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ProtectedFootprintTimePattern : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "ProtectedFootprintTimePattern";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct protectedFootprintTimePeriodicity_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "protectedFootprintTimePeriodicity_t";} + using parent_t = asn::integer<>; + + }; + + protectedFootprintTimePeriodicity_t& ref_protectedFootprintTimePeriodicity() {return protectedFootprintTimePeriodicity;} + protectedFootprintTimePeriodicity_t const& ref_protectedFootprintTimePeriodicity() const {return protectedFootprintTimePeriodicity;} + struct protectedFootprintStartTime_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "protectedFootprintStartTime_t";} + using parent_t = asn::integer<>; + + }; + + protectedFootprintStartTime_t& ref_protectedFootprintStartTime() {return protectedFootprintStartTime;} + protectedFootprintStartTime_t const& ref_protectedFootprintStartTime() const {return protectedFootprintStartTime;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(protectedFootprintTimePeriodicity); + v(protectedFootprintStartTime); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(protectedFootprintTimePeriodicity); + v(protectedFootprintStartTime); + v(iE_Extensions); + + }; + void clear() + { + protectedFootprintTimePeriodicity.clear(); + protectedFootprintStartTime.clear(); + iE_Extensions.clear(); + + }; + private: + protectedFootprintTimePeriodicity_t protectedFootprintTimePeriodicity; + protectedFootprintStartTime_t protectedFootprintStartTime; + iE_Extensions_t iE_Extensions; + +}; +/* +ProtectedResourceList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ProtectedResourceList_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ProtectedResourceList-Item ::= SEQUENCE { + resourceType ResourceType, + intraPRBProtectedResourceFootprint BIT STRING (SIZE(84, ...)), + protectedFootprintFrequencyPattern BIT STRING (SIZE(6..110, ...)), + protectedFootprintTimePattern ProtectedFootprintTimePattern, + iE-Extensions ProtocolExtensionContainer { {ProtectedResourceList-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ProtectedResourceList_Item : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "ProtectedResourceList-Item";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct resourceType_t : ResourceType + { + static constexpr const char* name() {return "resourceType_t";} + using parent_t = ResourceType; + + }; + resourceType_t& ref_resourceType() {return resourceType;} + resourceType_t const& ref_resourceType() const {return resourceType;} + struct intraPRBProtectedResourceFootprint_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "intraPRBProtectedResourceFootprint_t";} + using parent_t = asn::bstring<>; + + }; + + intraPRBProtectedResourceFootprint_t& ref_intraPRBProtectedResourceFootprint() {return intraPRBProtectedResourceFootprint;} + intraPRBProtectedResourceFootprint_t const& ref_intraPRBProtectedResourceFootprint() const {return intraPRBProtectedResourceFootprint;} + struct protectedFootprintFrequencyPattern_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "protectedFootprintFrequencyPattern_t";} + using parent_t = asn::bstring<>; + + }; + + protectedFootprintFrequencyPattern_t& ref_protectedFootprintFrequencyPattern() {return protectedFootprintFrequencyPattern;} + protectedFootprintFrequencyPattern_t const& ref_protectedFootprintFrequencyPattern() const {return protectedFootprintFrequencyPattern;} + struct protectedFootprintTimePattern_t : ProtectedFootprintTimePattern + { + static constexpr const char* name() {return "protectedFootprintTimePattern_t";} + using parent_t = ProtectedFootprintTimePattern; + + }; + protectedFootprintTimePattern_t& ref_protectedFootprintTimePattern() {return protectedFootprintTimePattern;} + protectedFootprintTimePattern_t const& ref_protectedFootprintTimePattern() const {return protectedFootprintTimePattern;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(resourceType); + v(intraPRBProtectedResourceFootprint); + v(protectedFootprintFrequencyPattern); + v(protectedFootprintTimePattern); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(resourceType); + v(intraPRBProtectedResourceFootprint); + v(protectedFootprintFrequencyPattern); + v(protectedFootprintTimePattern); + v(iE_Extensions); + + }; + void clear() + { + resourceType.clear(); + intraPRBProtectedResourceFootprint.clear(); + protectedFootprintFrequencyPattern.clear(); + protectedFootprintTimePattern.clear(); + iE_Extensions.clear(); + + }; + private: + resourceType_t resourceType; + intraPRBProtectedResourceFootprint_t intraPRBProtectedResourceFootprint; + protectedFootprintFrequencyPattern_t protectedFootprintFrequencyPattern; + protectedFootprintTimePattern_t protectedFootprintTimePattern; + iE_Extensions_t iE_Extensions; + +}; +/* +ProtectedResourceList ::= SEQUENCE (SIZE(1.. maxnoofProtectedResourcePatterns)) OF ProtectedResourceList-Item +*/ + +struct ProtectedResourceList_elm : ProtectedResourceList_Item +{ + static constexpr const char* name() {return "ProtectedResourceList_elm";} + using parent_t = ProtectedResourceList_Item; + +}; +struct ProtectedResourceList : asn::sequenceof +{ + static constexpr const char* name() {return "ProtectedResourceList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ProtectedEUTRAResourceIndication-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} -- Rapporteur: missing extension -- +*/ + +struct ProtectedEUTRAResourceIndication_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ProtectedEUTRAResourceIndication::= SEQUENCE { + activationSFN INTEGER (0..1023), + protectedResourceList ProtectedResourceList, + mBSFNControlRegionLength INTEGER (0..3) OPTIONAL, + pDCCHRegionLength INTEGER (1..3) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ProtectedEUTRAResourceIndication-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ProtectedEUTRAResourceIndication : asn::sequence<5, 0, true, 3> +{ + static constexpr const char* name() {return "ProtectedEUTRAResourceIndication";} + using parent_t = asn::sequence<5, 0, true, 3>; + struct activationSFN_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "activationSFN_t";} + using parent_t = asn::integer<>; + + }; + + activationSFN_t& ref_activationSFN() {return activationSFN;} + activationSFN_t const& ref_activationSFN() const {return activationSFN;} + struct protectedResourceList_t : ProtectedResourceList + { + static constexpr const char* name() {return "protectedResourceList_t";} + using parent_t = ProtectedResourceList; + + }; + protectedResourceList_t& ref_protectedResourceList() {return protectedResourceList;} + protectedResourceList_t const& ref_protectedResourceList() const {return protectedResourceList;} + struct mBSFNControlRegionLength_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "mBSFNControlRegionLength_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + mBSFNControlRegionLength_t& set_mBSFNControlRegionLength() { mBSFNControlRegionLength.setpresent(true); return mBSFNControlRegionLength;} + mBSFNControlRegionLength_t const* get_mBSFNControlRegionLength() const {return mBSFNControlRegionLength.is_valid() ? &mBSFNControlRegionLength : nullptr;} + struct pDCCHRegionLength_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "pDCCHRegionLength_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + pDCCHRegionLength_t& set_pDCCHRegionLength() { pDCCHRegionLength.setpresent(true); return pDCCHRegionLength;} + pDCCHRegionLength_t const* get_pDCCHRegionLength() const {return pDCCHRegionLength.is_valid() ? &pDCCHRegionLength : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(activationSFN); + v(protectedResourceList); + v(mBSFNControlRegionLength); + v(pDCCHRegionLength); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(activationSFN); + v(protectedResourceList); + v(mBSFNControlRegionLength); + v(pDCCHRegionLength); + v(iE_Extensions); + + }; + void clear() + { + activationSFN.clear(); + protectedResourceList.clear(); + mBSFNControlRegionLength.clear(); + pDCCHRegionLength.clear(); + iE_Extensions.clear(); + + }; + private: + activationSFN_t activationSFN; + protectedResourceList_t protectedResourceList; + mBSFNControlRegionLength_t mBSFNControlRegionLength; + pDCCHRegionLength_t pDCCHRegionLength; + iE_Extensions_t iE_Extensions; + +}; +/* +Reestablishment-Indication ::= ENUMERATED { + reestablished, + ... +} +*/ + +struct Reestablishment_Indication : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "Reestablishment-Indication";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + reestablished + } index_t; + +}; + +/* +RLC-Status-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct RLC_Status_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RLC-Status ::= SEQUENCE { + reestablishment-Indication Reestablishment-Indication, + iE-Extensions ProtocolExtensionContainer { {RLC-Status-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct RLC_Status : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "RLC-Status";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct reestablishment_Indication_t : Reestablishment_Indication + { + static constexpr const char* name() {return "reestablishment_Indication_t";} + using parent_t = Reestablishment_Indication; + + }; + reestablishment_Indication_t& ref_reestablishment_Indication() {return reestablishment_Indication;} + reestablishment_Indication_t const& ref_reestablishment_Indication() const {return reestablishment_Indication;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(reestablishment_Indication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(reestablishment_Indication); + v(iE_Extensions); + + }; + void clear() + { + reestablishment_Indication.clear(); + iE_Extensions.clear(); + + }; + private: + reestablishment_Indication_t reestablishment_Indication; + iE_Extensions_t iE_Extensions; + +}; +/* +RLCMode ::= ENUMERATED { + rlc-am, + rlc-um-bidirectional, + rlc-um-unidirectional-ul, + rlc-um-unidirectional-dl, + ... +} +*/ + +struct RLCMode : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "RLCMode";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + rlc_am + ,rlc_um_bidirectional + ,rlc_um_unidirectional_ul + ,rlc_um_unidirectional_dl + } index_t; + +}; + +/* +RRC-Config-Ind ::= ENUMERATED { + full-config, + delta-config, + ... +} +*/ + +struct RRC_Config_Ind : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "RRC-Config-Ind";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + full_config + ,delta_config + } index_t; + +}; + +/* +RRC-Context ::= OCTET STRING +*/ + +struct RRC_Context : asn::ostring<> +{ + static constexpr const char* name() {return "RRC-Context";} + using parent_t = asn::ostring<>; + +}; + +/* +RRCConnReestabIndicator ::= ENUMERATED { + reconfigurationFailure, handoverFailure, otherFailure, ... +} +*/ + +struct RRCConnReestabIndicator : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "RRCConnReestabIndicator";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + reconfigurationFailure + ,handoverFailure + ,otherFailure + } index_t; + +}; + +/* +RRCConnSetupIndicator::= ENUMERATED { + rrcConnSetup, + ... +} +*/ + +struct RRCConnSetupIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "RRCConnSetupIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + rrcConnSetup + } index_t; + +}; + +/* +RRCContainer ::= OCTET STRING +*/ + +struct RRCContainer : asn::ostring<> +{ + static constexpr const char* name() {return "RRCContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +RSRPMeasurementResult-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct RSRPMeasurementResult_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RSRPMeasurementResult ::= SEQUENCE (SIZE(1..maxCellReport)) OF + SEQUENCE { + rSRPCellID ECGI, + rSRPMeasured INTEGER (0..97, ...), + iE-Extensions ProtocolExtensionContainer { {RSRPMeasurementResult-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct RSRPMeasurementResult_elm : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "RSRPMeasurementResult_elm";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct rSRPCellID_t : ECGI + { + static constexpr const char* name() {return "rSRPCellID_t";} + using parent_t = ECGI; + + }; + rSRPCellID_t& ref_rSRPCellID() {return rSRPCellID;} + rSRPCellID_t const& ref_rSRPCellID() const {return rSRPCellID;} + struct rSRPMeasured_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "rSRPMeasured_t";} + using parent_t = asn::integer<>; + + }; + + rSRPMeasured_t& ref_rSRPMeasured() {return rSRPMeasured;} + rSRPMeasured_t const& ref_rSRPMeasured() const {return rSRPMeasured;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rSRPCellID); + v(rSRPMeasured); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rSRPCellID); + v(rSRPMeasured); + v(iE_Extensions); + + }; + void clear() + { + rSRPCellID.clear(); + rSRPMeasured.clear(); + iE_Extensions.clear(); + + }; + private: + rSRPCellID_t rSRPCellID; + rSRPMeasured_t rSRPMeasured; + iE_Extensions_t iE_Extensions; + +}; +struct RSRPMeasurementResult : asn::sequenceof +{ + static constexpr const char* name() {return "RSRPMeasurementResult";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +RSRPMRList-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-UEID CRITICALITY ignore EXTENSION UEID PRESENCE optional}, + ... +} +*/ + +struct RSRPMRList_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEID() { set(id_UEID); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_UEID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_UEID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEID() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + UEID& select_id_UEID() { return set(1); } + UEID const* get_id_UEID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_UEID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(UEID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEID() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RSRPMRList ::= SEQUENCE (SIZE(1..maxUEReport)) OF + SEQUENCE { + rSRPMeasurementResult RSRPMeasurementResult, + iE-Extensions ProtocolExtensionContainer { {RSRPMRList-ExtIEs} } OPTIONAL, + ... + } +*/ + +struct RSRPMRList_elm : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "RSRPMRList_elm";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct rSRPMeasurementResult_t : RSRPMeasurementResult + { + static constexpr const char* name() {return "rSRPMeasurementResult_t";} + using parent_t = RSRPMeasurementResult; + + }; + rSRPMeasurementResult_t& ref_rSRPMeasurementResult() {return rSRPMeasurementResult;} + rSRPMeasurementResult_t const& ref_rSRPMeasurementResult() const {return rSRPMeasurementResult;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rSRPMeasurementResult); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rSRPMeasurementResult); + v(iE_Extensions); + + }; + void clear() + { + rSRPMeasurementResult.clear(); + iE_Extensions.clear(); + + }; + private: + rSRPMeasurementResult_t rSRPMeasurementResult; + iE_Extensions_t iE_Extensions; + +}; +struct RSRPMRList : asn::sequenceof +{ + static constexpr const char* name() {return "RSRPMRList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +UL-GBR-PRB-usage::= INTEGER (0..100) +*/ + +struct UL_GBR_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UL-GBR-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +UL-non-GBR-PRB-usage::= INTEGER (0..100) +*/ + +struct UL_non_GBR_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UL-non-GBR-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +UL-Total-PRB-usage::= INTEGER (0..100) +*/ + +struct UL_Total_PRB_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UL-Total-PRB-usage";} + using parent_t = asn::integer<>; + +}; + +/* +UL-scheduling-PDCCH-CCE-usage::= INTEGER (0..100) +*/ + +struct UL_scheduling_PDCCH_CCE_usage : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UL-scheduling-PDCCH-CCE-usage";} + using parent_t = asn::integer<>; + +}; + +/* +RadioResourceStatus-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-DL-scheduling-PDCCH-CCE-usage CRITICALITY ignore EXTENSION DL-scheduling-PDCCH-CCE-usage PRESENCE optional}| + + {ID id-UL-scheduling-PDCCH-CCE-usage CRITICALITY ignore EXTENSION UL-scheduling-PDCCH-CCE-usage PRESENCE optional}, + ... +} +*/ + +struct RadioResourceStatus_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DL_scheduling_PDCCH_CCE_usage() { set(id_DL_scheduling_PDCCH_CCE_usage); type=1;} + void select_id_UL_scheduling_PDCCH_CCE_usage() { set(id_UL_scheduling_PDCCH_CCE_usage); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DL_scheduling_PDCCH_CCE_usage)) { type = 1; return true; } + else if(equal(id_UL_scheduling_PDCCH_CCE_usage)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DL_scheduling_PDCCH_CCE_usage);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_UL_scheduling_PDCCH_CCE_usage);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DL_scheduling_PDCCH_CCE_usage() { set(ignore); type=1;} + void select_id_UL_scheduling_PDCCH_CCE_usage() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + DL_scheduling_PDCCH_CCE_usage& select_id_DL_scheduling_PDCCH_CCE_usage() { return set(1); } + DL_scheduling_PDCCH_CCE_usage const* get_id_DL_scheduling_PDCCH_CCE_usage() const { return get(1); } + UL_scheduling_PDCCH_CCE_usage& select_id_UL_scheduling_PDCCH_CCE_usage() { return set(2); } + UL_scheduling_PDCCH_CCE_usage const* get_id_UL_scheduling_PDCCH_CCE_usage() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DL_scheduling_PDCCH_CCE_usage()); return true; + case 2: v(select_id_UL_scheduling_PDCCH_CCE_usage()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DL_scheduling_PDCCH_CCE_usage)]; + char dummy2[sizeof(UL_scheduling_PDCCH_CCE_usage)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_DL_scheduling_PDCCH_CCE_usage() { set(optional); type=1;} + void select_id_UL_scheduling_PDCCH_CCE_usage() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RadioResourceStatus ::= SEQUENCE { + dL-GBR-PRB-usage DL-GBR-PRB-usage, + uL-GBR-PRB-usage UL-GBR-PRB-usage, + dL-non-GBR-PRB-usage DL-non-GBR-PRB-usage, + uL-non-GBR-PRB-usage UL-non-GBR-PRB-usage, + dL-Total-PRB-usage DL-Total-PRB-usage, + uL-Total-PRB-usage UL-Total-PRB-usage, + iE-Extensions ProtocolExtensionContainer { {RadioResourceStatus-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct RadioResourceStatus : asn::sequence<7, 0, true, 1> +{ + static constexpr const char* name() {return "RadioResourceStatus";} + using parent_t = asn::sequence<7, 0, true, 1>; + struct dL_GBR_PRB_usage_t : DL_GBR_PRB_usage + { + static constexpr const char* name() {return "dL_GBR_PRB_usage_t";} + using parent_t = DL_GBR_PRB_usage; + + }; + dL_GBR_PRB_usage_t& ref_dL_GBR_PRB_usage() {return dL_GBR_PRB_usage;} + dL_GBR_PRB_usage_t const& ref_dL_GBR_PRB_usage() const {return dL_GBR_PRB_usage;} + struct uL_GBR_PRB_usage_t : UL_GBR_PRB_usage + { + static constexpr const char* name() {return "uL_GBR_PRB_usage_t";} + using parent_t = UL_GBR_PRB_usage; + + }; + uL_GBR_PRB_usage_t& ref_uL_GBR_PRB_usage() {return uL_GBR_PRB_usage;} + uL_GBR_PRB_usage_t const& ref_uL_GBR_PRB_usage() const {return uL_GBR_PRB_usage;} + struct dL_non_GBR_PRB_usage_t : DL_non_GBR_PRB_usage + { + static constexpr const char* name() {return "dL_non_GBR_PRB_usage_t";} + using parent_t = DL_non_GBR_PRB_usage; + + }; + dL_non_GBR_PRB_usage_t& ref_dL_non_GBR_PRB_usage() {return dL_non_GBR_PRB_usage;} + dL_non_GBR_PRB_usage_t const& ref_dL_non_GBR_PRB_usage() const {return dL_non_GBR_PRB_usage;} + struct uL_non_GBR_PRB_usage_t : UL_non_GBR_PRB_usage + { + static constexpr const char* name() {return "uL_non_GBR_PRB_usage_t";} + using parent_t = UL_non_GBR_PRB_usage; + + }; + uL_non_GBR_PRB_usage_t& ref_uL_non_GBR_PRB_usage() {return uL_non_GBR_PRB_usage;} + uL_non_GBR_PRB_usage_t const& ref_uL_non_GBR_PRB_usage() const {return uL_non_GBR_PRB_usage;} + struct dL_Total_PRB_usage_t : DL_Total_PRB_usage + { + static constexpr const char* name() {return "dL_Total_PRB_usage_t";} + using parent_t = DL_Total_PRB_usage; + + }; + dL_Total_PRB_usage_t& ref_dL_Total_PRB_usage() {return dL_Total_PRB_usage;} + dL_Total_PRB_usage_t const& ref_dL_Total_PRB_usage() const {return dL_Total_PRB_usage;} + struct uL_Total_PRB_usage_t : UL_Total_PRB_usage + { + static constexpr const char* name() {return "uL_Total_PRB_usage_t";} + using parent_t = UL_Total_PRB_usage; + + }; + uL_Total_PRB_usage_t& ref_uL_Total_PRB_usage() {return uL_Total_PRB_usage;} + uL_Total_PRB_usage_t const& ref_uL_Total_PRB_usage() const {return uL_Total_PRB_usage;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dL_GBR_PRB_usage); + v(uL_GBR_PRB_usage); + v(dL_non_GBR_PRB_usage); + v(uL_non_GBR_PRB_usage); + v(dL_Total_PRB_usage); + v(uL_Total_PRB_usage); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dL_GBR_PRB_usage); + v(uL_GBR_PRB_usage); + v(dL_non_GBR_PRB_usage); + v(uL_non_GBR_PRB_usage); + v(dL_Total_PRB_usage); + v(uL_Total_PRB_usage); + v(iE_Extensions); + + }; + void clear() + { + dL_GBR_PRB_usage.clear(); + uL_GBR_PRB_usage.clear(); + dL_non_GBR_PRB_usage.clear(); + uL_non_GBR_PRB_usage.clear(); + dL_Total_PRB_usage.clear(); + uL_Total_PRB_usage.clear(); + iE_Extensions.clear(); + + }; + private: + dL_GBR_PRB_usage_t dL_GBR_PRB_usage; + uL_GBR_PRB_usage_t uL_GBR_PRB_usage; + dL_non_GBR_PRB_usage_t dL_non_GBR_PRB_usage; + uL_non_GBR_PRB_usage_t uL_non_GBR_PRB_usage; + dL_Total_PRB_usage_t dL_Total_PRB_usage; + uL_Total_PRB_usage_t uL_Total_PRB_usage; + iE_Extensions_t iE_Extensions; + +}; +/* +ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) +*/ + +struct ReceiveStatusOfULPDCPSDUsExtended : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ReceiveStatusOfULPDCPSDUsExtended";} + using parent_t = asn::bstring<>; + +}; + +/* +ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) +*/ + +struct ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ReceiveStatusOfULPDCPSDUsPDCP-SNlength18";} + using parent_t = asn::bstring<>; + +}; + +/* +ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) +*/ + +struct ReceiveStatusofULPDCPSDUs : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ReceiveStatusofULPDCPSDUs";} + using parent_t = asn::bstring<>; + +}; + +/* +Registration-Request ::= ENUMERATED { + start, + stop, + ..., + partial-stop, + add +} +*/ + +struct Registration_Request : asn::enumerated<4, 2, true> +{ + static constexpr const char* name() {return "Registration-Request";} + using parent_t = asn::enumerated<4, 2, true>; + typedef enum { + start + ,stop + ,partial_stop + ,add + } index_t; + +}; + +/* +RelativeNarrowbandTxPower-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-enhancedRNTP CRITICALITY ignore EXTENSION EnhancedRNTP PRESENCE optional }, + ... +} +*/ + +struct RelativeNarrowbandTxPower_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_enhancedRNTP() { set(id_enhancedRNTP); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_enhancedRNTP)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_enhancedRNTP);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_enhancedRNTP() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + EnhancedRNTP& select_id_enhancedRNTP() { return set(1); } + EnhancedRNTP const* get_id_enhancedRNTP() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_enhancedRNTP()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(EnhancedRNTP)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_enhancedRNTP() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RelativeNarrowbandTxPower ::= SEQUENCE { + + rNTP-PerPRB BIT STRING (SIZE(6..110, ...)), + rNTP-Threshold RNTP-Threshold, + numberOfCellSpecificAntennaPorts ENUMERATED {one, two, four, ...}, + p-B INTEGER (0..3,...), + pDCCH-InterferenceImpact INTEGER (0..4,...), + iE-Extensions ProtocolExtensionContainer { {RelativeNarrowbandTxPower-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct RelativeNarrowbandTxPower : asn::sequence<6, 0, true, 1> +{ + static constexpr const char* name() {return "RelativeNarrowbandTxPower";} + using parent_t = asn::sequence<6, 0, true, 1>; + struct rNTP_PerPRB_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "rNTP_PerPRB_t";} + using parent_t = asn::bstring<>; + + }; + + rNTP_PerPRB_t& ref_rNTP_PerPRB() {return rNTP_PerPRB;} + rNTP_PerPRB_t const& ref_rNTP_PerPRB() const {return rNTP_PerPRB;} + struct rNTP_Threshold_t : RNTP_Threshold + { + static constexpr const char* name() {return "rNTP_Threshold_t";} + using parent_t = RNTP_Threshold; + + }; + rNTP_Threshold_t& ref_rNTP_Threshold() {return rNTP_Threshold;} + rNTP_Threshold_t const& ref_rNTP_Threshold() const {return rNTP_Threshold;} + struct numberOfCellSpecificAntennaPorts_t : asn::enumerated<3, 0, true> + { + static constexpr const char* name() {return "numberOfCellSpecificAntennaPorts_t";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + one + ,two + ,four + } index_t; + + }; + + numberOfCellSpecificAntennaPorts_t& ref_numberOfCellSpecificAntennaPorts() {return numberOfCellSpecificAntennaPorts;} + numberOfCellSpecificAntennaPorts_t const& ref_numberOfCellSpecificAntennaPorts() const {return numberOfCellSpecificAntennaPorts;} + struct p_B_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "p_B_t";} + using parent_t = asn::integer<>; + + }; + + p_B_t& ref_p_B() {return p_B;} + p_B_t const& ref_p_B() const {return p_B;} + struct pDCCH_InterferenceImpact_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "pDCCH_InterferenceImpact_t";} + using parent_t = asn::integer<>; + + }; + + pDCCH_InterferenceImpact_t& ref_pDCCH_InterferenceImpact() {return pDCCH_InterferenceImpact;} + pDCCH_InterferenceImpact_t const& ref_pDCCH_InterferenceImpact() const {return pDCCH_InterferenceImpact;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rNTP_PerPRB); + v(rNTP_Threshold); + v(numberOfCellSpecificAntennaPorts); + v(p_B); + v(pDCCH_InterferenceImpact); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rNTP_PerPRB); + v(rNTP_Threshold); + v(numberOfCellSpecificAntennaPorts); + v(p_B); + v(pDCCH_InterferenceImpact); + v(iE_Extensions); + + }; + void clear() + { + rNTP_PerPRB.clear(); + rNTP_Threshold.clear(); + numberOfCellSpecificAntennaPorts.clear(); + p_B.clear(); + pDCCH_InterferenceImpact.clear(); + iE_Extensions.clear(); + + }; + private: + rNTP_PerPRB_t rNTP_PerPRB; + rNTP_Threshold_t rNTP_Threshold; + numberOfCellSpecificAntennaPorts_t numberOfCellSpecificAntennaPorts; + p_B_t p_B; + pDCCH_InterferenceImpact_t pDCCH_InterferenceImpact; + iE_Extensions_t iE_Extensions; + +}; +/* +ReportCharacteristics ::= BIT STRING (SIZE (32)) +*/ + +struct ReportCharacteristics : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ReportCharacteristics";} + using parent_t = asn::bstring<>; + +}; + +/* +ReportingPeriodicityCSIR ::= ENUMERATED { + ms5, + ms10, + ms20, + ms40, + ms80, +... +} +*/ + +struct ReportingPeriodicityCSIR : asn::enumerated<5, 0, true> +{ + static constexpr const char* name() {return "ReportingPeriodicityCSIR";} + using parent_t = asn::enumerated<5, 0, true>; + typedef enum { + ms5 + ,ms10 + ,ms20 + ,ms40 + ,ms80 + } index_t; + +}; + +/* +ReportingPeriodicityRSRPMR ::= ENUMERATED { + one-hundred-20-ms, + two-hundred-40-ms, + four-hundred-80-ms, + six-hundred-40-ms, +... +} +*/ + +struct ReportingPeriodicityRSRPMR : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "ReportingPeriodicityRSRPMR";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + one_hundred_20_ms + ,two_hundred_40_ms + ,four_hundred_80_ms + ,six_hundred_40_ms + } index_t; + +}; + +/* +ResumeID ::= CHOICE { + non-truncated BIT STRING(SIZE(40)), + truncated BIT STRING(SIZE(24)), + ... +} +*/ + +struct ResumeID : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "ResumeID";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~ResumeID() {clear();} + struct non_truncated_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "non_truncated_t";} + using parent_t = asn::bstring<>; + + }; + + struct truncated_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "truncated_t";} + using parent_t = asn::bstring<>; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + non_truncated_t& select_non_truncated() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + non_truncated_t const* get_non_truncated() const { if(get_index() == 1) { return &var.as();} return nullptr; } + truncated_t& select_truncated() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + truncated_t const* get_truncated() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(non_truncated_t)]; + char dummy2[sizeof(truncated_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +S1TNLLoadIndicator-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct S1TNLLoadIndicator_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +S1TNLLoadIndicator ::= SEQUENCE { + dLS1TNLLoadIndicator LoadIndicator, + uLS1TNLLoadIndicator LoadIndicator, + iE-Extensions ProtocolExtensionContainer { {S1TNLLoadIndicator-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct S1TNLLoadIndicator : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "S1TNLLoadIndicator";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct dLS1TNLLoadIndicator_t : LoadIndicator + { + static constexpr const char* name() {return "dLS1TNLLoadIndicator_t";} + using parent_t = LoadIndicator; + + }; + dLS1TNLLoadIndicator_t& ref_dLS1TNLLoadIndicator() {return dLS1TNLLoadIndicator;} + dLS1TNLLoadIndicator_t const& ref_dLS1TNLLoadIndicator() const {return dLS1TNLLoadIndicator;} + struct uLS1TNLLoadIndicator_t : LoadIndicator + { + static constexpr const char* name() {return "uLS1TNLLoadIndicator_t";} + using parent_t = LoadIndicator; + + }; + uLS1TNLLoadIndicator_t& ref_uLS1TNLLoadIndicator() {return uLS1TNLLoadIndicator;} + uLS1TNLLoadIndicator_t const& ref_uLS1TNLLoadIndicator() const {return uLS1TNLLoadIndicator;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dLS1TNLLoadIndicator); + v(uLS1TNLLoadIndicator); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dLS1TNLLoadIndicator); + v(uLS1TNLLoadIndicator); + v(iE_Extensions); + + }; + void clear() + { + dLS1TNLLoadIndicator.clear(); + uLS1TNLLoadIndicator.clear(); + iE_Extensions.clear(); + + }; + private: + dLS1TNLLoadIndicator_t dLS1TNLLoadIndicator; + uLS1TNLLoadIndicator_t uLS1TNLLoadIndicator; + iE_Extensions_t iE_Extensions; + +}; +/* +SCGChangeIndication ::= ENUMERATED {pDCPCountWrapAround, pSCellChange, other, ...} +*/ + +struct SCGChangeIndication : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "SCGChangeIndication";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + pDCPCountWrapAround + ,pSCellChange + ,other + } index_t; + +}; + +/* +SCGConfigurationQuery ::= ENUMERATED {true,...} +*/ + +struct SCGConfigurationQuery : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "SCGConfigurationQuery";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + True + } index_t; + +}; + +/* +SGNB-Addition-Trigger-Ind ::= ENUMERATED { + sn-change, + inter-eNB-HO, + intra-eNB-HO, + ... +} +*/ + +struct SGNB_Addition_Trigger_Ind : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "SGNB-Addition-Trigger-Ind";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + sn_change + ,inter_eNB_HO + ,intra_eNB_HO + } index_t; + +}; + +/* +SIPTOBearerDeactivationIndication ::= ENUMERATED { + true, + ... +} +*/ + +struct SIPTOBearerDeactivationIndication : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "SIPTOBearerDeactivationIndication";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + True + } index_t; + +}; + +/* +SRBType ::= ENUMERATED {srb1, srb2, ...} +*/ + +struct SRBType : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "SRBType";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + srb1 + ,srb2 + } index_t; + +}; + +/* +SRVCCOperationPossible ::= ENUMERATED { + possible, + ... +} +*/ + +struct SRVCCOperationPossible : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "SRVCCOperationPossible";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + possible + } index_t; + +}; + +/* +ScheduledCommunicationTime-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ScheduledCommunicationTime_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ScheduledCommunicationTime ::= SEQUENCE { + dayofWeek BIT STRING (SIZE(7)) OPTIONAL, + timeofDayStart INTEGER (0..86399, ...) OPTIONAL, + timeofDayEnd INTEGER (0..86399, ...) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { ScheduledCommunicationTime-ExtIEs}} OPTIONAL, + ... +} +*/ + +struct ScheduledCommunicationTime : asn::sequence<4, 0, true, 4> +{ + static constexpr const char* name() {return "ScheduledCommunicationTime";} + using parent_t = asn::sequence<4, 0, true, 4>; + struct dayofWeek_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "dayofWeek_t";} + using parent_t = asn::bstring<>; + static constexpr bool optional = true; + + }; + + dayofWeek_t& set_dayofWeek() { dayofWeek.setpresent(true); return dayofWeek;} + dayofWeek_t const* get_dayofWeek() const {return dayofWeek.is_valid() ? &dayofWeek : nullptr;} + struct timeofDayStart_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "timeofDayStart_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + timeofDayStart_t& set_timeofDayStart() { timeofDayStart.setpresent(true); return timeofDayStart;} + timeofDayStart_t const* get_timeofDayStart() const {return timeofDayStart.is_valid() ? &timeofDayStart : nullptr;} + struct timeofDayEnd_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "timeofDayEnd_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + timeofDayEnd_t& set_timeofDayEnd() { timeofDayEnd.setpresent(true); return timeofDayEnd;} + timeofDayEnd_t const* get_timeofDayEnd() const {return timeofDayEnd.is_valid() ? &timeofDayEnd : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dayofWeek); + v(timeofDayStart); + v(timeofDayEnd); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dayofWeek); + v(timeofDayStart); + v(timeofDayEnd); + v(iE_Extensions); + + }; + void clear() + { + dayofWeek.clear(); + timeofDayStart.clear(); + timeofDayEnd.clear(); + iE_Extensions.clear(); + + }; + private: + dayofWeek_t dayofWeek; + timeofDayStart_t timeofDayStart; + timeofDayEnd_t timeofDayEnd; + iE_Extensions_t iE_Extensions; + +}; +/* +SeNBSecurityKey ::= BIT STRING (SIZE(256)) +*/ + +struct SeNBSecurityKey : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "SeNBSecurityKey";} + using parent_t = asn::bstring<>; + +}; + +/* +SeNBtoMeNBContainer ::= OCTET STRING +*/ + +struct SeNBtoMeNBContainer : asn::ostring<> +{ + static constexpr const char* name() {return "SeNBtoMeNBContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +SecondaryRATUsageReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SecondaryRATUsageReport_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SecondaryRATUsageReport-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + secondaryRATType ENUMERATED {nr, ...}, + e-RABUsageReportList E-RABUsageReportList, + iE-Extensions ProtocolExtensionContainer { {SecondaryRATUsageReport-Item-ExtIEs} } OPTIONAL, +... +} +*/ + +struct SecondaryRATUsageReport_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "SecondaryRATUsageReport-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct secondaryRATType_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "secondaryRATType_t";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + nr + } index_t; + + }; + + secondaryRATType_t& ref_secondaryRATType() {return secondaryRATType;} + secondaryRATType_t const& ref_secondaryRATType() const {return secondaryRATType;} + struct e_RABUsageReportList_t : E_RABUsageReportList + { + static constexpr const char* name() {return "e_RABUsageReportList_t";} + using parent_t = E_RABUsageReportList; + + }; + e_RABUsageReportList_t& ref_e_RABUsageReportList() {return e_RABUsageReportList;} + e_RABUsageReportList_t const& ref_e_RABUsageReportList() const {return e_RABUsageReportList;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(secondaryRATType); + v(e_RABUsageReportList); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(secondaryRATType); + v(e_RABUsageReportList); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + secondaryRATType.clear(); + e_RABUsageReportList.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + secondaryRATType_t secondaryRATType; + e_RABUsageReportList_t e_RABUsageReportList; + iE_Extensions_t iE_Extensions; + +}; +/* +SecondaryRATUsageReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-SecondaryRATUsageReport-Item CRITICALITY reject TYPE SecondaryRATUsageReport-Item PRESENCE mandatory}, + ... +} +*/ + +struct SecondaryRATUsageReport_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SecondaryRATUsageReport_Item() { set(id_SecondaryRATUsageReport_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_SecondaryRATUsageReport_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_SecondaryRATUsageReport_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SecondaryRATUsageReport_Item() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + SecondaryRATUsageReport_Item& select_id_SecondaryRATUsageReport_Item() { return set(1); } + SecondaryRATUsageReport_Item const* get_id_SecondaryRATUsageReport_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_SecondaryRATUsageReport_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(SecondaryRATUsageReport_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SecondaryRATUsageReport_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SecondaryRATUsageReportList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container {{SecondaryRATUsageReport-ItemIEs}} +*/ + +struct SecondaryRATUsageReportList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "SecondaryRATUsageReportList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct SecondaryRATUsageReportList : asn::sequenceof +{ + static constexpr const char* name() {return "SecondaryRATUsageReportList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedCell-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedCell_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Number-of-Antennaports CRITICALITY ignore EXTENSION Number-of-Antennaports PRESENCE optional}| + { ID id-PRACH-Configuration CRITICALITY ignore EXTENSION PRACH-Configuration PRESENCE optional}| + { ID id-MBSFN-Subframe-Info CRITICALITY ignore EXTENSION MBSFN-Subframe-Infolist PRESENCE optional}| + { ID id-CSG-Id CRITICALITY ignore EXTENSION CSG-Id PRESENCE optional}| + { ID id-MBMS-Service-Area-List CRITICALITY ignore EXTENSION MBMS-Service-Area-Identity-List PRESENCE optional}| + { ID id-MultibandInfoList CRITICALITY ignore EXTENSION MultibandInfoList PRESENCE optional}| + { ID id-FreqBandIndicatorPriority CRITICALITY ignore EXTENSION FreqBandIndicatorPriority PRESENCE optional}| + { ID id-BandwidthReducedSI CRITICALITY ignore EXTENSION BandwidthReducedSI PRESENCE optional}| + { ID id-ProtectedEUTRAResourceIndication CRITICALITY ignore EXTENSION ProtectedEUTRAResourceIndication PRESENCE optional}, + ... +} +*/ + +struct ServedCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_Number_of_Antennaports() { set(id_Number_of_Antennaports); type=1;} + void select_id_PRACH_Configuration() { set(id_PRACH_Configuration); type=2;} + void select_id_MBSFN_Subframe_Info() { set(id_MBSFN_Subframe_Info); type=3;} + void select_id_CSG_Id() { set(id_CSG_Id); type=4;} + void select_id_MBMS_Service_Area_List() { set(id_MBMS_Service_Area_List); type=5;} + void select_id_MultibandInfoList() { set(id_MultibandInfoList); type=6;} + void select_id_FreqBandIndicatorPriority() { set(id_FreqBandIndicatorPriority); type=7;} + void select_id_BandwidthReducedSI() { set(id_BandwidthReducedSI); type=8;} + void select_id_ProtectedEUTRAResourceIndication() { set(id_ProtectedEUTRAResourceIndication); type=9;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Number_of_Antennaports)) { type = 1; return true; } + else if(equal(id_PRACH_Configuration)) { type = 2; return true; } + else if(equal(id_MBSFN_Subframe_Info)) { type = 3; return true; } + else if(equal(id_CSG_Id)) { type = 4; return true; } + else if(equal(id_MBMS_Service_Area_List)) { type = 5; return true; } + else if(equal(id_MultibandInfoList)) { type = 6; return true; } + else if(equal(id_FreqBandIndicatorPriority)) { type = 7; return true; } + else if(equal(id_BandwidthReducedSI)) { type = 8; return true; } + else if(equal(id_ProtectedEUTRAResourceIndication)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Number_of_Antennaports);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_PRACH_Configuration);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_MBSFN_Subframe_Info);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CSG_Id);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MBMS_Service_Area_List);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MultibandInfoList);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_FreqBandIndicatorPriority);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_BandwidthReducedSI);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_ProtectedEUTRAResourceIndication);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_Number_of_Antennaports() { set(ignore); type=1;} + void select_id_PRACH_Configuration() { set(ignore); type=2;} + void select_id_MBSFN_Subframe_Info() { set(ignore); type=3;} + void select_id_CSG_Id() { set(ignore); type=4;} + void select_id_MBMS_Service_Area_List() { set(ignore); type=5;} + void select_id_MultibandInfoList() { set(ignore); type=6;} + void select_id_FreqBandIndicatorPriority() { set(ignore); type=7;} + void select_id_BandwidthReducedSI() { set(ignore); type=8;} + void select_id_ProtectedEUTRAResourceIndication() { set(ignore); type=9;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + Number_of_Antennaports& select_id_Number_of_Antennaports() { return set(1); } + Number_of_Antennaports const* get_id_Number_of_Antennaports() const { return get(1); } + PRACH_Configuration& select_id_PRACH_Configuration() { return set(2); } + PRACH_Configuration const* get_id_PRACH_Configuration() const { return get(2); } + MBSFN_Subframe_Infolist& select_id_MBSFN_Subframe_Info() { return set(3); } + MBSFN_Subframe_Infolist const* get_id_MBSFN_Subframe_Info() const { return get(3); } + CSG_Id& select_id_CSG_Id() { return set(4); } + CSG_Id const* get_id_CSG_Id() const { return get(4); } + MBMS_Service_Area_Identity_List& select_id_MBMS_Service_Area_List() { return set(5); } + MBMS_Service_Area_Identity_List const* get_id_MBMS_Service_Area_List() const { return get(5); } + MultibandInfoList& select_id_MultibandInfoList() { return set(6); } + MultibandInfoList const* get_id_MultibandInfoList() const { return get(6); } + FreqBandIndicatorPriority& select_id_FreqBandIndicatorPriority() { return set(7); } + FreqBandIndicatorPriority const* get_id_FreqBandIndicatorPriority() const { return get(7); } + BandwidthReducedSI& select_id_BandwidthReducedSI() { return set(8); } + BandwidthReducedSI const* get_id_BandwidthReducedSI() const { return get(8); } + ProtectedEUTRAResourceIndication& select_id_ProtectedEUTRAResourceIndication() { return set(9); } + ProtectedEUTRAResourceIndication const* get_id_ProtectedEUTRAResourceIndication() const { return get(9); } + bool is_unknown() const { return type == 10; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Number_of_Antennaports()); return true; + case 2: v(select_id_PRACH_Configuration()); return true; + case 3: v(select_id_MBSFN_Subframe_Info()); return true; + case 4: v(select_id_CSG_Id()); return true; + case 5: v(select_id_MBMS_Service_Area_List()); return true; + case 6: v(select_id_MultibandInfoList()); return true; + case 7: v(select_id_FreqBandIndicatorPriority()); return true; + case 8: v(select_id_BandwidthReducedSI()); return true; + case 9: v(select_id_ProtectedEUTRAResourceIndication()); return true; + case 10: if(type != 10) {clear(); asn::base::set();} type = 10; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(BandwidthReducedSI)]; + char dummy2[sizeof(CSG_Id)]; + char dummy3[sizeof(FreqBandIndicatorPriority)]; + char dummy4[sizeof(MBMS_Service_Area_Identity_List)]; + char dummy5[sizeof(MBSFN_Subframe_Infolist)]; + char dummy6[sizeof(MultibandInfoList)]; + char dummy7[sizeof(Number_of_Antennaports)]; + char dummy8[sizeof(PRACH_Configuration)]; + char dummy9[sizeof(ProtectedEUTRAResourceIndication)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_Number_of_Antennaports() { set(optional); type=1;} + void select_id_PRACH_Configuration() { set(optional); type=2;} + void select_id_MBSFN_Subframe_Info() { set(optional); type=3;} + void select_id_CSG_Id() { set(optional); type=4;} + void select_id_MBMS_Service_Area_List() { set(optional); type=5;} + void select_id_MultibandInfoList() { set(optional); type=6;} + void select_id_FreqBandIndicatorPriority() { set(optional); type=7;} + void select_id_BandwidthReducedSI() { set(optional); type=8;} + void select_id_ProtectedEUTRAResourceIndication() { set(optional); type=9;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedCell-Information ::= SEQUENCE { + pCI PCI, + cellId ECGI, + tAC TAC, + broadcastPLMNs BroadcastPLMNs-Item, + eUTRA-Mode-Info EUTRA-Mode-Info, + iE-Extensions ProtocolExtensionContainer { {ServedCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedCell_Information : asn::sequence<6, 0, true, 1> +{ + static constexpr const char* name() {return "ServedCell-Information";} + using parent_t = asn::sequence<6, 0, true, 1>; + struct pCI_t : PCI + { + static constexpr const char* name() {return "pCI_t";} + using parent_t = PCI; + + }; + pCI_t& ref_pCI() {return pCI;} + pCI_t const& ref_pCI() const {return pCI;} + struct cellId_t : ECGI + { + static constexpr const char* name() {return "cellId_t";} + using parent_t = ECGI; + + }; + cellId_t& ref_cellId() {return cellId;} + cellId_t const& ref_cellId() const {return cellId;} + struct tAC_t : TAC + { + static constexpr const char* name() {return "tAC_t";} + using parent_t = TAC; + + }; + tAC_t& ref_tAC() {return tAC;} + tAC_t const& ref_tAC() const {return tAC;} + struct broadcastPLMNs_t : BroadcastPLMNs_Item + { + static constexpr const char* name() {return "broadcastPLMNs_t";} + using parent_t = BroadcastPLMNs_Item; + + }; + broadcastPLMNs_t& ref_broadcastPLMNs() {return broadcastPLMNs;} + broadcastPLMNs_t const& ref_broadcastPLMNs() const {return broadcastPLMNs;} + struct eUTRA_Mode_Info_t : EUTRA_Mode_Info + { + static constexpr const char* name() {return "eUTRA_Mode_Info_t";} + using parent_t = EUTRA_Mode_Info; + + }; + eUTRA_Mode_Info_t& ref_eUTRA_Mode_Info() {return eUTRA_Mode_Info;} + eUTRA_Mode_Info_t const& ref_eUTRA_Mode_Info() const {return eUTRA_Mode_Info;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(pCI); + v(cellId); + v(tAC); + v(broadcastPLMNs); + v(eUTRA_Mode_Info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(pCI); + v(cellId); + v(tAC); + v(broadcastPLMNs); + v(eUTRA_Mode_Info); + v(iE_Extensions); + + }; + void clear() + { + pCI.clear(); + cellId.clear(); + tAC.clear(); + broadcastPLMNs.clear(); + eUTRA_Mode_Info.clear(); + iE_Extensions.clear(); + + }; + private: + pCI_t pCI; + cellId_t cellId; + tAC_t tAC; + broadcastPLMNs_t broadcastPLMNs; + eUTRA_Mode_Info_t eUTRA_Mode_Info; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedCells ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + servedCellInfo ServedCell-Information, + neighbour-Info Neighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedCell-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedCells_elm : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "ServedCells_elm";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct servedCellInfo_t : ServedCell_Information + { + static constexpr const char* name() {return "servedCellInfo_t";} + using parent_t = ServedCell_Information; + + }; + servedCellInfo_t& ref_servedCellInfo() {return servedCellInfo;} + servedCellInfo_t const& ref_servedCellInfo() const {return servedCellInfo;} + struct neighbour_Info_t : Neighbour_Information + { + static constexpr const char* name() {return "neighbour_Info_t";} + using parent_t = Neighbour_Information; + static constexpr bool optional = true; + + }; + neighbour_Info_t& set_neighbour_Info() { neighbour_Info.setpresent(true); return neighbour_Info;} + neighbour_Info_t const* get_neighbour_Info() const {return neighbour_Info.is_valid() ? &neighbour_Info : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(servedCellInfo); + v(neighbour_Info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(servedCellInfo); + v(neighbour_Info); + v(iE_Extensions); + + }; + void clear() + { + servedCellInfo.clear(); + neighbour_Info.clear(); + iE_Extensions.clear(); + + }; + private: + servedCellInfo_t servedCellInfo; + neighbour_Info_t neighbour_Info; + iE_Extensions_t iE_Extensions; + +}; +struct ServedCells : asn::sequenceof +{ + static constexpr const char* name() {return "ServedCells";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServiceType ::= ENUMERATED{ + qMC-for-streaming-service, + qMC-for-MTSI-service, + ... +} +*/ + +struct ServiceType : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "ServiceType";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + qMC_for_streaming_service + ,qMC_for_MTSI_service + } index_t; + +}; + +/* +SgNB-UE-X2AP-ID ::= INTEGER (0..4294967295) +*/ + +struct SgNB_UE_X2AP_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "SgNB-UE-X2AP-ID";} + using parent_t = asn::integer<>; + +}; + +/* +SgNBCoordinationAssistanceInformation ::= ENUMERATED{ + coordination-not-required, + ... +} +*/ + +struct SgNBCoordinationAssistanceInformation : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "SgNBCoordinationAssistanceInformation";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + coordination_not_required + } index_t; + +}; + +/* +SgNBResourceCoordinationInformationExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-ECGI CRITICALITY ignore EXTENSION ECGI PRESENCE optional}| + { ID id-SgNBCoordinationAssistanceInformation CRITICALITY reject EXTENSION SgNBCoordinationAssistanceInformation PRESENCE optional}, + ... +} +*/ + +struct SgNBResourceCoordinationInformationExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ECGI() { set(id_ECGI); type=1;} + void select_id_SgNBCoordinationAssistanceInformation() { set(id_SgNBCoordinationAssistanceInformation); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ECGI)) { type = 1; return true; } + else if(equal(id_SgNBCoordinationAssistanceInformation)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ECGI);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNBCoordinationAssistanceInformation);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ECGI() { set(ignore); type=1;} + void select_id_SgNBCoordinationAssistanceInformation() { set(reject); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ECGI& select_id_ECGI() { return set(1); } + ECGI const* get_id_ECGI() const { return get(1); } + SgNBCoordinationAssistanceInformation& select_id_SgNBCoordinationAssistanceInformation() { return set(2); } + SgNBCoordinationAssistanceInformation const* get_id_SgNBCoordinationAssistanceInformation() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ECGI()); return true; + case 2: v(select_id_SgNBCoordinationAssistanceInformation()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ECGI)]; + char dummy2[sizeof(SgNBCoordinationAssistanceInformation)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ECGI() { set(optional); type=1;} + void select_id_SgNBCoordinationAssistanceInformation() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBResourceCoordinationInformation ::= SEQUENCE { + nR-CGI NRCGI, + uLCoordinationInformation BIT STRING (SIZE(6..4400, ...)), + dLCoordinationInformation BIT STRING (SIZE(6..4400, ...)) OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SgNBResourceCoordinationInformationExtIEs} } OPTIONAL, + ... +} +*/ + +struct SgNBResourceCoordinationInformation : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "SgNBResourceCoordinationInformation";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct nR_CGI_t : NRCGI + { + static constexpr const char* name() {return "nR_CGI_t";} + using parent_t = NRCGI; + + }; + nR_CGI_t& ref_nR_CGI() {return nR_CGI;} + nR_CGI_t const& ref_nR_CGI() const {return nR_CGI;} + struct uLCoordinationInformation_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "uLCoordinationInformation_t";} + using parent_t = asn::bstring<>; + + }; + + uLCoordinationInformation_t& ref_uLCoordinationInformation() {return uLCoordinationInformation;} + uLCoordinationInformation_t const& ref_uLCoordinationInformation() const {return uLCoordinationInformation;} + struct dLCoordinationInformation_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "dLCoordinationInformation_t";} + using parent_t = asn::bstring<>; + static constexpr bool optional = true; + + }; + + dLCoordinationInformation_t& set_dLCoordinationInformation() { dLCoordinationInformation.setpresent(true); return dLCoordinationInformation;} + dLCoordinationInformation_t const* get_dLCoordinationInformation() const {return dLCoordinationInformation.is_valid() ? &dLCoordinationInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nR_CGI); + v(uLCoordinationInformation); + v(dLCoordinationInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nR_CGI); + v(uLCoordinationInformation); + v(dLCoordinationInformation); + v(iE_Extensions); + + }; + void clear() + { + nR_CGI.clear(); + uLCoordinationInformation.clear(); + dLCoordinationInformation.clear(); + iE_Extensions.clear(); + + }; + private: + nR_CGI_t nR_CGI; + uLCoordinationInformation_t uLCoordinationInformation; + dLCoordinationInformation_t dLCoordinationInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +SgNBSecurityKey ::= BIT STRING (SIZE(256)) +*/ + +struct SgNBSecurityKey : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "SgNBSecurityKey";} + using parent_t = asn::bstring<>; + +}; + +/* +SgNBtoMeNBContainer ::= OCTET STRING +*/ + +struct SgNBtoMeNBContainer : asn::ostring<> +{ + static constexpr const char* name() {return "SgNBtoMeNBContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +ShortMAC-I ::= BIT STRING (SIZE(16)) +*/ + +struct ShortMAC_I : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "ShortMAC-I";} + using parent_t = asn::bstring<>; + +}; + +/* +SpectrumSharingGroupID ::= INTEGER (1..maxCellineNB) +*/ + +struct SpectrumSharingGroupID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "SpectrumSharingGroupID";} + using parent_t = asn::integer<>; + +}; + +/* +SplitSRB-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct SplitSRB_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SplitSRB ::= SEQUENCE { + rrcContainer RRCContainer OPTIONAL, + srbType SRBType, + deliveryStatus DeliveryStatus OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {SplitSRB-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct SplitSRB : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "SplitSRB";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct rrcContainer_t : RRCContainer + { + static constexpr const char* name() {return "rrcContainer_t";} + using parent_t = RRCContainer; + static constexpr bool optional = true; + + }; + rrcContainer_t& set_rrcContainer() { rrcContainer.setpresent(true); return rrcContainer;} + rrcContainer_t const* get_rrcContainer() const {return rrcContainer.is_valid() ? &rrcContainer : nullptr;} + struct srbType_t : SRBType + { + static constexpr const char* name() {return "srbType_t";} + using parent_t = SRBType; + + }; + srbType_t& ref_srbType() {return srbType;} + srbType_t const& ref_srbType() const {return srbType;} + struct deliveryStatus_t : DeliveryStatus + { + static constexpr const char* name() {return "deliveryStatus_t";} + using parent_t = DeliveryStatus; + static constexpr bool optional = true; + + }; + deliveryStatus_t& set_deliveryStatus() { deliveryStatus.setpresent(true); return deliveryStatus;} + deliveryStatus_t const* get_deliveryStatus() const {return deliveryStatus.is_valid() ? &deliveryStatus : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(rrcContainer); + v(srbType); + v(deliveryStatus); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(rrcContainer); + v(srbType); + v(deliveryStatus); + v(iE_Extensions); + + }; + void clear() + { + rrcContainer.clear(); + srbType.clear(); + deliveryStatus.clear(); + iE_Extensions.clear(); + + }; + private: + rrcContainer_t rrcContainer; + srbType_t srbType; + deliveryStatus_t deliveryStatus; + iE_Extensions_t iE_Extensions; + +}; +/* +SplitSRBs ::= ENUMERATED {srb1, srb2, srb1and2, ...} +*/ + +struct SplitSRBs : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "SplitSRBs";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + srb1 + ,srb2 + ,srb1and2 + } index_t; + +}; + +/* +SubscriberProfileIDforRFP ::= INTEGER (1..256) +*/ + +struct SubscriberProfileIDforRFP : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "SubscriberProfileIDforRFP";} + using parent_t = asn::integer<>; + +}; + +/* +Subscription-Based-UE-DifferentiationInfo-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct Subscription_Based_UE_DifferentiationInfo_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +Subscription-Based-UE-DifferentiationInfo ::= SEQUENCE { + periodicCommunicationIndicator ENUMERATED {periodically, ondemand, ...} OPTIONAL, + periodicTime INTEGER (1..3600, ...) OPTIONAL, + scheduledCommunicationTime ScheduledCommunicationTime OPTIONAL, + stationaryIndication ENUMERATED {stationary, mobile, ...} OPTIONAL, + trafficProfile ENUMERATED {single-packet, dual-packets, multiple-packets, ...} OPTIONAL, + batteryIndication ENUMERATED {battery-powered, battery-powered-not-rechargeable-or-replaceable, not-battery-powered, ...} OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Subscription-Based-UE-DifferentiationInfo-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct Subscription_Based_UE_DifferentiationInfo : asn::sequence<7, 0, true, 7> +{ + static constexpr const char* name() {return "Subscription-Based-UE-DifferentiationInfo";} + using parent_t = asn::sequence<7, 0, true, 7>; + struct periodicCommunicationIndicator_t : asn::enumerated<2, 0, true> + { + static constexpr const char* name() {return "periodicCommunicationIndicator_t";} + using parent_t = asn::enumerated<2, 0, true>; + static constexpr bool optional = true; + typedef enum { + periodically + ,ondemand + } index_t; + + }; + + periodicCommunicationIndicator_t& set_periodicCommunicationIndicator() { periodicCommunicationIndicator.setpresent(true); return periodicCommunicationIndicator;} + periodicCommunicationIndicator_t const* get_periodicCommunicationIndicator() const {return periodicCommunicationIndicator.is_valid() ? &periodicCommunicationIndicator : nullptr;} + struct periodicTime_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "periodicTime_t";} + using parent_t = asn::integer<>; + static constexpr bool optional = true; + + }; + + periodicTime_t& set_periodicTime() { periodicTime.setpresent(true); return periodicTime;} + periodicTime_t const* get_periodicTime() const {return periodicTime.is_valid() ? &periodicTime : nullptr;} + struct scheduledCommunicationTime_t : ScheduledCommunicationTime + { + static constexpr const char* name() {return "scheduledCommunicationTime_t";} + using parent_t = ScheduledCommunicationTime; + static constexpr bool optional = true; + + }; + scheduledCommunicationTime_t& set_scheduledCommunicationTime() { scheduledCommunicationTime.setpresent(true); return scheduledCommunicationTime;} + scheduledCommunicationTime_t const* get_scheduledCommunicationTime() const {return scheduledCommunicationTime.is_valid() ? &scheduledCommunicationTime : nullptr;} + struct stationaryIndication_t : asn::enumerated<2, 0, true> + { + static constexpr const char* name() {return "stationaryIndication_t";} + using parent_t = asn::enumerated<2, 0, true>; + static constexpr bool optional = true; + typedef enum { + stationary + ,mobile + } index_t; + + }; + + stationaryIndication_t& set_stationaryIndication() { stationaryIndication.setpresent(true); return stationaryIndication;} + stationaryIndication_t const* get_stationaryIndication() const {return stationaryIndication.is_valid() ? &stationaryIndication : nullptr;} + struct trafficProfile_t : asn::enumerated<3, 0, true> + { + static constexpr const char* name() {return "trafficProfile_t";} + using parent_t = asn::enumerated<3, 0, true>; + static constexpr bool optional = true; + typedef enum { + single_packet + ,dual_packets + ,multiple_packets + } index_t; + + }; + + trafficProfile_t& set_trafficProfile() { trafficProfile.setpresent(true); return trafficProfile;} + trafficProfile_t const* get_trafficProfile() const {return trafficProfile.is_valid() ? &trafficProfile : nullptr;} + struct batteryIndication_t : asn::enumerated<3, 0, true> + { + static constexpr const char* name() {return "batteryIndication_t";} + using parent_t = asn::enumerated<3, 0, true>; + static constexpr bool optional = true; + typedef enum { + battery_powered + ,battery_powered_not_rechargeable_or_replaceable + ,not_battery_powered + } index_t; + + }; + + batteryIndication_t& set_batteryIndication() { batteryIndication.setpresent(true); return batteryIndication;} + batteryIndication_t const* get_batteryIndication() const {return batteryIndication.is_valid() ? &batteryIndication : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(periodicCommunicationIndicator); + v(periodicTime); + v(scheduledCommunicationTime); + v(stationaryIndication); + v(trafficProfile); + v(batteryIndication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(periodicCommunicationIndicator); + v(periodicTime); + v(scheduledCommunicationTime); + v(stationaryIndication); + v(trafficProfile); + v(batteryIndication); + v(iE_Extensions); + + }; + void clear() + { + periodicCommunicationIndicator.clear(); + periodicTime.clear(); + scheduledCommunicationTime.clear(); + stationaryIndication.clear(); + trafficProfile.clear(); + batteryIndication.clear(); + iE_Extensions.clear(); + + }; + private: + periodicCommunicationIndicator_t periodicCommunicationIndicator; + periodicTime_t periodicTime; + scheduledCommunicationTime_t scheduledCommunicationTime; + stationaryIndication_t stationaryIndication; + trafficProfile_t trafficProfile; + batteryIndication_t batteryIndication; + iE_Extensions_t iE_Extensions; + +}; +/* +TargetCellInUTRAN ::= OCTET STRING -- This IE is to be encoded according to the UTRAN Cell ID in the Last Visited UTRAN Cell Information IE in TS 25.413 [24] +*/ + +struct TargetCellInUTRAN : asn::ostring<> +{ + static constexpr const char* name() {return "TargetCellInUTRAN";} + using parent_t = asn::ostring<>; + +}; + +/* +TargeteNBtoSource-eNBTransparentContainer ::= OCTET STRING +*/ + +struct TargeteNBtoSource_eNBTransparentContainer : asn::ostring<> +{ + static constexpr const char* name() {return "TargeteNBtoSource-eNBTransparentContainer";} + using parent_t = asn::ostring<>; + +}; + +/* +TimeToWait ::= ENUMERATED { + v1s, + v2s, + v5s, + v10s, + v20s, + v60s, + ... +} +*/ + +struct TimeToWait : asn::enumerated<6, 0, true> +{ + static constexpr const char* name() {return "TimeToWait";} + using parent_t = asn::enumerated<6, 0, true>; + typedef enum { + v1s + ,v2s + ,v5s + ,v10s + ,v20s + ,v60s + } index_t; + +}; + +/* +TraceDepth ::= ENUMERATED { + minimum, + medium, + maximum, + minimumWithoutVendorSpecificExtension, + mediumWithoutVendorSpecificExtension, + maximumWithoutVendorSpecificExtension, + ... +} +*/ + +struct TraceDepth : asn::enumerated<6, 0, true> +{ + static constexpr const char* name() {return "TraceDepth";} + using parent_t = asn::enumerated<6, 0, true>; + typedef enum { + minimum + ,medium + ,maximum + ,minimumWithoutVendorSpecificExtension + ,mediumWithoutVendorSpecificExtension + ,maximumWithoutVendorSpecificExtension + } index_t; + +}; + +/* +TraceCollectionEntityIPAddress ::= BIT STRING (SIZE(1..160, ...)) +*/ + +struct TraceCollectionEntityIPAddress : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "TraceCollectionEntityIPAddress";} + using parent_t = asn::bstring<>; + +}; + +/* +UEAppLayerMeasConfig-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-serviceType CRITICALITY ignore EXTENSION ServiceType PRESENCE optional}, + ... +} +*/ + +struct UEAppLayerMeasConfig_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_serviceType() { set(id_serviceType); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_serviceType)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_serviceType);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_serviceType() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ServiceType& select_id_serviceType() { return set(1); } + ServiceType const* get_id_serviceType() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_serviceType()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ServiceType)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_serviceType() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UEAppLayerMeasConfig ::= SEQUENCE { + containerForAppLayerMeasConfig OCTET STRING (SIZE(1..1000)), + areaScopeOfQMC AreaScopeOfQMC, + iE-Extensions ProtocolExtensionContainer { {UEAppLayerMeasConfig-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UEAppLayerMeasConfig : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UEAppLayerMeasConfig";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct containerForAppLayerMeasConfig_t : asn::ostring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "containerForAppLayerMeasConfig_t";} + using parent_t = asn::ostring<>; + + }; + + containerForAppLayerMeasConfig_t& ref_containerForAppLayerMeasConfig() {return containerForAppLayerMeasConfig;} + containerForAppLayerMeasConfig_t const& ref_containerForAppLayerMeasConfig() const {return containerForAppLayerMeasConfig;} + struct areaScopeOfQMC_t : AreaScopeOfQMC + { + static constexpr const char* name() {return "areaScopeOfQMC_t";} + using parent_t = AreaScopeOfQMC; + + }; + areaScopeOfQMC_t& ref_areaScopeOfQMC() {return areaScopeOfQMC;} + areaScopeOfQMC_t const& ref_areaScopeOfQMC() const {return areaScopeOfQMC;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(containerForAppLayerMeasConfig); + v(areaScopeOfQMC); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(containerForAppLayerMeasConfig); + v(areaScopeOfQMC); + v(iE_Extensions); + + }; + void clear() + { + containerForAppLayerMeasConfig.clear(); + areaScopeOfQMC.clear(); + iE_Extensions.clear(); + + }; + private: + containerForAppLayerMeasConfig_t containerForAppLayerMeasConfig; + areaScopeOfQMC_t areaScopeOfQMC; + iE_Extensions_t iE_Extensions; + +}; +/* +TraceActivation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional}| + { ID id-UEAppLayerMeasConfig CRITICALITY ignore EXTENSION UEAppLayerMeasConfig PRESENCE optional}, + ... +} +*/ + +struct TraceActivation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_MDTConfiguration() { set(id_MDTConfiguration); type=1;} + void select_id_UEAppLayerMeasConfig() { set(id_UEAppLayerMeasConfig); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MDTConfiguration)) { type = 1; return true; } + else if(equal(id_UEAppLayerMeasConfig)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MDTConfiguration);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_UEAppLayerMeasConfig);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_MDTConfiguration() { set(ignore); type=1;} + void select_id_UEAppLayerMeasConfig() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + MDT_Configuration& select_id_MDTConfiguration() { return set(1); } + MDT_Configuration const* get_id_MDTConfiguration() const { return get(1); } + UEAppLayerMeasConfig& select_id_UEAppLayerMeasConfig() { return set(2); } + UEAppLayerMeasConfig const* get_id_UEAppLayerMeasConfig() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MDTConfiguration()); return true; + case 2: v(select_id_UEAppLayerMeasConfig()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(MDT_Configuration)]; + char dummy2[sizeof(UEAppLayerMeasConfig)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_MDTConfiguration() { set(optional); type=1;} + void select_id_UEAppLayerMeasConfig() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TraceActivation ::= SEQUENCE { + eUTRANTraceID EUTRANTraceID, + interfacesToTrace InterfacesToTrace, +traceDepth TraceDepth, +traceCollectionEntityIPAddress TraceCollectionEntityIPAddress, + iE-Extensions ProtocolExtensionContainer { {TraceActivation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TraceActivation : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "TraceActivation";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct eUTRANTraceID_t : EUTRANTraceID + { + static constexpr const char* name() {return "eUTRANTraceID_t";} + using parent_t = EUTRANTraceID; + + }; + eUTRANTraceID_t& ref_eUTRANTraceID() {return eUTRANTraceID;} + eUTRANTraceID_t const& ref_eUTRANTraceID() const {return eUTRANTraceID;} + struct interfacesToTrace_t : InterfacesToTrace + { + static constexpr const char* name() {return "interfacesToTrace_t";} + using parent_t = InterfacesToTrace; + + }; + interfacesToTrace_t& ref_interfacesToTrace() {return interfacesToTrace;} + interfacesToTrace_t const& ref_interfacesToTrace() const {return interfacesToTrace;} + struct traceDepth_t : TraceDepth + { + static constexpr const char* name() {return "traceDepth_t";} + using parent_t = TraceDepth; + + }; + traceDepth_t& ref_traceDepth() {return traceDepth;} + traceDepth_t const& ref_traceDepth() const {return traceDepth;} + struct traceCollectionEntityIPAddress_t : TraceCollectionEntityIPAddress + { + static constexpr const char* name() {return "traceCollectionEntityIPAddress_t";} + using parent_t = TraceCollectionEntityIPAddress; + + }; + traceCollectionEntityIPAddress_t& ref_traceCollectionEntityIPAddress() {return traceCollectionEntityIPAddress;} + traceCollectionEntityIPAddress_t const& ref_traceCollectionEntityIPAddress() const {return traceCollectionEntityIPAddress;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(eUTRANTraceID); + v(interfacesToTrace); + v(traceDepth); + v(traceCollectionEntityIPAddress); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(eUTRANTraceID); + v(interfacesToTrace); + v(traceDepth); + v(traceCollectionEntityIPAddress); + v(iE_Extensions); + + }; + void clear() + { + eUTRANTraceID.clear(); + interfacesToTrace.clear(); + traceDepth.clear(); + traceCollectionEntityIPAddress.clear(); + iE_Extensions.clear(); + + }; + private: + eUTRANTraceID_t eUTRANTraceID; + interfacesToTrace_t interfacesToTrace; + traceDepth_t traceDepth; + traceCollectionEntityIPAddress_t traceCollectionEntityIPAddress; + iE_Extensions_t iE_Extensions; + +}; +/* +Tunnel-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct Tunnel_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TunnelInformation ::= SEQUENCE { + transportLayerAddress TransportLayerAddress, + uDP-Port-Number Port-Number OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TunnelInformation : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "TunnelInformation";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct transportLayerAddress_t : TransportLayerAddress + { + static constexpr const char* name() {return "transportLayerAddress_t";} + using parent_t = TransportLayerAddress; + + }; + transportLayerAddress_t& ref_transportLayerAddress() {return transportLayerAddress;} + transportLayerAddress_t const& ref_transportLayerAddress() const {return transportLayerAddress;} + struct uDP_Port_Number_t : Port_Number + { + static constexpr const char* name() {return "uDP_Port_Number_t";} + using parent_t = Port_Number; + static constexpr bool optional = true; + + }; + uDP_Port_Number_t& set_uDP_Port_Number() { uDP_Port_Number.setpresent(true); return uDP_Port_Number;} + uDP_Port_Number_t const* get_uDP_Port_Number() const {return uDP_Port_Number.is_valid() ? &uDP_Port_Number : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(transportLayerAddress); + v(uDP_Port_Number); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(transportLayerAddress); + v(uDP_Port_Number); + v(iE_Extensions); + + }; + void clear() + { + transportLayerAddress.clear(); + uDP_Port_Number.clear(); + iE_Extensions.clear(); + + }; + private: + transportLayerAddress_t transportLayerAddress; + uDP_Port_Number_t uDP_Port_Number; + iE_Extensions_t iE_Extensions; + +}; +/* +UE-ContextKeptIndicator ::= ENUMERATED { + true, + ... +} +*/ + +struct UE_ContextKeptIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "UE-ContextKeptIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + True + } index_t; + +}; + +/* +UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCells)) OF LastVisitedCell-Item +*/ + +struct UE_HistoryInformation_elm : LastVisitedCell_Item +{ + static constexpr const char* name() {return "UE_HistoryInformation_elm";} + using parent_t = LastVisitedCell_Item; + +}; +struct UE_HistoryInformation : asn::sequenceof +{ + static constexpr const char* name() {return "UE-HistoryInformation";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +UE-HistoryInformationFromTheUE ::= OCTET STRING +*/ + +struct UE_HistoryInformationFromTheUE : asn::ostring<> +{ + static constexpr const char* name() {return "UE-HistoryInformationFromTheUE";} + using parent_t = asn::ostring<>; + +}; + +/* +UE-RLF-Report-Container::= OCTET STRING +*/ + +struct UE_RLF_Report_Container : asn::ostring<> +{ + static constexpr const char* name() {return "UE-RLF-Report-Container";} + using parent_t = asn::ostring<>; + +}; + +/* +UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING +*/ + +struct UE_RLF_Report_Container_for_extended_bands : asn::ostring<> +{ + static constexpr const char* name() {return "UE-RLF-Report-Container-for-extended-bands";} + using parent_t = asn::ostring<>; + +}; + +/* +UE-S1AP-ID ::= INTEGER (0.. 4294967295) +*/ + +struct UE_S1AP_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UE-S1AP-ID";} + using parent_t = asn::integer<>; + +}; + +/* +UE-Sidelink-Aggregate-MaximumBitRate-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UE_Sidelink_Aggregate_MaximumBitRate_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-X2AP-ID ::= INTEGER (0..4095) +*/ + +struct UE_X2AP_ID : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UE-X2AP-ID";} + using parent_t = asn::integer<>; + +}; + +/* +UE-X2AP-ID-Extension ::= INTEGER (0..4095, ...) +*/ + +struct UE_X2AP_ID_Extension : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UE-X2AP-ID-Extension";} + using parent_t = asn::integer<>; + +}; + +/* +UEAggregate-MaximumBitrate-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-extended-uEaggregateMaximumBitRateDownlink CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}| + { ID id-extended-uEaggregateMaximumBitRateUplink CRITICALITY ignore EXTENSION ExtendedBitRate PRESENCE optional}, + ... +} +*/ + +struct UEAggregate_MaximumBitrate_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_extended_uEaggregateMaximumBitRateDownlink() { set(id_extended_uEaggregateMaximumBitRateDownlink); type=1;} + void select_id_extended_uEaggregateMaximumBitRateUplink() { set(id_extended_uEaggregateMaximumBitRateUplink); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_extended_uEaggregateMaximumBitRateDownlink)) { type = 1; return true; } + else if(equal(id_extended_uEaggregateMaximumBitRateUplink)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_extended_uEaggregateMaximumBitRateDownlink);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_extended_uEaggregateMaximumBitRateUplink);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_extended_uEaggregateMaximumBitRateDownlink() { set(ignore); type=1;} + void select_id_extended_uEaggregateMaximumBitRateUplink() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ExtendedBitRate& select_id_extended_uEaggregateMaximumBitRateDownlink() { return set(1); } + ExtendedBitRate const* get_id_extended_uEaggregateMaximumBitRateDownlink() const { return get(1); } + ExtendedBitRate& select_id_extended_uEaggregateMaximumBitRateUplink() { return set(2); } + ExtendedBitRate const* get_id_extended_uEaggregateMaximumBitRateUplink() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_extended_uEaggregateMaximumBitRateDownlink()); return true; + case 2: v(select_id_extended_uEaggregateMaximumBitRateUplink()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ExtendedBitRate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_extended_uEaggregateMaximumBitRateDownlink() { set(optional); type=1;} + void select_id_extended_uEaggregateMaximumBitRateUplink() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UEAggregateMaximumBitRate ::= SEQUENCE { + uEaggregateMaximumBitRateDownlink BitRate, + uEaggregateMaximumBitRateUplink BitRate, + iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrate-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UEAggregateMaximumBitRate : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UEAggregateMaximumBitRate";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct uEaggregateMaximumBitRateDownlink_t : BitRate + { + static constexpr const char* name() {return "uEaggregateMaximumBitRateDownlink_t";} + using parent_t = BitRate; + + }; + uEaggregateMaximumBitRateDownlink_t& ref_uEaggregateMaximumBitRateDownlink() {return uEaggregateMaximumBitRateDownlink;} + uEaggregateMaximumBitRateDownlink_t const& ref_uEaggregateMaximumBitRateDownlink() const {return uEaggregateMaximumBitRateDownlink;} + struct uEaggregateMaximumBitRateUplink_t : BitRate + { + static constexpr const char* name() {return "uEaggregateMaximumBitRateUplink_t";} + using parent_t = BitRate; + + }; + uEaggregateMaximumBitRateUplink_t& ref_uEaggregateMaximumBitRateUplink() {return uEaggregateMaximumBitRateUplink;} + uEaggregateMaximumBitRateUplink_t const& ref_uEaggregateMaximumBitRateUplink() const {return uEaggregateMaximumBitRateUplink;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uEaggregateMaximumBitRateDownlink); + v(uEaggregateMaximumBitRateUplink); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uEaggregateMaximumBitRateDownlink); + v(uEaggregateMaximumBitRateUplink); + v(iE_Extensions); + + }; + void clear() + { + uEaggregateMaximumBitRateDownlink.clear(); + uEaggregateMaximumBitRateUplink.clear(); + iE_Extensions.clear(); + + }; + private: + uEaggregateMaximumBitRateDownlink_t uEaggregateMaximumBitRateDownlink; + uEaggregateMaximumBitRateUplink_t uEaggregateMaximumBitRateUplink; + iE_Extensions_t iE_Extensions; + +}; +/* +UENRMeasurement-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UENRMeasurement_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UENRMeasurement ::= SEQUENCE { + uENRMeasurements RRCContainer, + iE-Extensions ProtocolExtensionContainer { {UENRMeasurement-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UENRMeasurement : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "UENRMeasurement";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct uENRMeasurements_t : RRCContainer + { + static constexpr const char* name() {return "uENRMeasurements_t";} + using parent_t = RRCContainer; + + }; + uENRMeasurements_t& ref_uENRMeasurements() {return uENRMeasurements;} + uENRMeasurements_t const& ref_uENRMeasurements() const {return uENRMeasurements;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uENRMeasurements); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uENRMeasurements); + v(iE_Extensions); + + }; + void clear() + { + uENRMeasurements.clear(); + iE_Extensions.clear(); + + }; + private: + uENRMeasurements_t uENRMeasurements; + iE_Extensions_t iE_Extensions; + +}; +/* +UESecurityCapabilities-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UESecurityCapabilities_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UESecurityCapabilities ::= SEQUENCE { + encryptionAlgorithms EncryptionAlgorithms, + integrityProtectionAlgorithms IntegrityProtectionAlgorithms, + iE-Extensions ProtocolExtensionContainer { {UESecurityCapabilities-ExtIEs} } OPTIONAL, +... +} +*/ + +struct UESecurityCapabilities : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UESecurityCapabilities";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct encryptionAlgorithms_t : EncryptionAlgorithms + { + static constexpr const char* name() {return "encryptionAlgorithms_t";} + using parent_t = EncryptionAlgorithms; + + }; + encryptionAlgorithms_t& ref_encryptionAlgorithms() {return encryptionAlgorithms;} + encryptionAlgorithms_t const& ref_encryptionAlgorithms() const {return encryptionAlgorithms;} + struct integrityProtectionAlgorithms_t : IntegrityProtectionAlgorithms + { + static constexpr const char* name() {return "integrityProtectionAlgorithms_t";} + using parent_t = IntegrityProtectionAlgorithms; + + }; + integrityProtectionAlgorithms_t& ref_integrityProtectionAlgorithms() {return integrityProtectionAlgorithms;} + integrityProtectionAlgorithms_t const& ref_integrityProtectionAlgorithms() const {return integrityProtectionAlgorithms;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(encryptionAlgorithms); + v(integrityProtectionAlgorithms); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(encryptionAlgorithms); + v(integrityProtectionAlgorithms); + v(iE_Extensions); + + }; + void clear() + { + encryptionAlgorithms.clear(); + integrityProtectionAlgorithms.clear(); + iE_Extensions.clear(); + + }; + private: + encryptionAlgorithms_t encryptionAlgorithms; + integrityProtectionAlgorithms_t integrityProtectionAlgorithms; + iE_Extensions_t iE_Extensions; + +}; +/* +UESidelinkAggregateMaximumBitRate ::= SEQUENCE { + uESidelinkAggregateMaximumBitRate BitRate, + iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitRate-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UESidelinkAggregateMaximumBitRate : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "UESidelinkAggregateMaximumBitRate";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct uESidelinkAggregateMaximumBitRate_t : BitRate + { + static constexpr const char* name() {return "uESidelinkAggregateMaximumBitRate_t";} + using parent_t = BitRate; + + }; + uESidelinkAggregateMaximumBitRate_t& ref_uESidelinkAggregateMaximumBitRate() {return uESidelinkAggregateMaximumBitRate;} + uESidelinkAggregateMaximumBitRate_t const& ref_uESidelinkAggregateMaximumBitRate() const {return uESidelinkAggregateMaximumBitRate;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uESidelinkAggregateMaximumBitRate); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uESidelinkAggregateMaximumBitRate); + v(iE_Extensions); + + }; + void clear() + { + uESidelinkAggregateMaximumBitRate.clear(); + iE_Extensions.clear(); + + }; + private: + uESidelinkAggregateMaximumBitRate_t uESidelinkAggregateMaximumBitRate; + iE_Extensions_t iE_Extensions; + +}; +/* +UEsToBeResetList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UEsToBeResetList_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UEsToBeResetList-Item::= SEQUENCE { + meNB-ID UE-X2AP-ID, + meNB-ID-ext UE-X2AP-ID-Extension OPTIONAL, + sgNB-ID SgNB-UE-X2AP-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UEsToBeResetList-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UEsToBeResetList_Item : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "UEsToBeResetList-Item";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct meNB_ID_t : UE_X2AP_ID + { + static constexpr const char* name() {return "meNB_ID_t";} + using parent_t = UE_X2AP_ID; + + }; + meNB_ID_t& ref_meNB_ID() {return meNB_ID;} + meNB_ID_t const& ref_meNB_ID() const {return meNB_ID;} + struct meNB_ID_ext_t : UE_X2AP_ID_Extension + { + static constexpr const char* name() {return "meNB_ID_ext_t";} + using parent_t = UE_X2AP_ID_Extension; + static constexpr bool optional = true; + + }; + meNB_ID_ext_t& set_meNB_ID_ext() { meNB_ID_ext.setpresent(true); return meNB_ID_ext;} + meNB_ID_ext_t const* get_meNB_ID_ext() const {return meNB_ID_ext.is_valid() ? &meNB_ID_ext : nullptr;} + struct sgNB_ID_t : SgNB_UE_X2AP_ID + { + static constexpr const char* name() {return "sgNB_ID_t";} + using parent_t = SgNB_UE_X2AP_ID; + static constexpr bool optional = true; + + }; + sgNB_ID_t& set_sgNB_ID() { sgNB_ID.setpresent(true); return sgNB_ID;} + sgNB_ID_t const* get_sgNB_ID() const {return sgNB_ID.is_valid() ? &sgNB_ID : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(meNB_ID); + v(meNB_ID_ext); + v(sgNB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(meNB_ID); + v(meNB_ID_ext); + v(sgNB_ID); + v(iE_Extensions); + + }; + void clear() + { + meNB_ID.clear(); + meNB_ID_ext.clear(); + sgNB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + meNB_ID_t meNB_ID; + meNB_ID_ext_t meNB_ID_ext; + sgNB_ID_t sgNB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +UEsToBeResetList ::= SEQUENCE (SIZE (1.. maxUEsinengNBDU)) OF UEsToBeResetList-Item +*/ + +struct UEsToBeResetList_elm : UEsToBeResetList_Item +{ + static constexpr const char* name() {return "UEsToBeResetList_elm";} + using parent_t = UEsToBeResetList_Item; + +}; +struct UEsToBeResetList : asn::sequenceof +{ + static constexpr const char* name() {return "UEsToBeResetList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +UL-HighInterferenceIndication ::= BIT STRING (SIZE(1..110, ...)) +*/ + +struct UL_HighInterferenceIndication : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "UL-HighInterferenceIndication";} + using parent_t = asn::bstring<>; + +}; + +/* +UL-HighInterferenceIndicationInfo-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UL_HighInterferenceIndicationInfo_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UL-HighInterferenceIndicationInfo-Item ::= SEQUENCE { + target-Cell-ID ECGI, + ul-interferenceindication UL-HighInterferenceIndication, + iE-Extensions ProtocolExtensionContainer { {UL-HighInterferenceIndicationInfo-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UL_HighInterferenceIndicationInfo_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UL-HighInterferenceIndicationInfo-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct target_Cell_ID_t : ECGI + { + static constexpr const char* name() {return "target_Cell_ID_t";} + using parent_t = ECGI; + + }; + target_Cell_ID_t& ref_target_Cell_ID() {return target_Cell_ID;} + target_Cell_ID_t const& ref_target_Cell_ID() const {return target_Cell_ID;} + struct ul_interferenceindication_t : UL_HighInterferenceIndication + { + static constexpr const char* name() {return "ul_interferenceindication_t";} + using parent_t = UL_HighInterferenceIndication; + + }; + ul_interferenceindication_t& ref_ul_interferenceindication() {return ul_interferenceindication;} + ul_interferenceindication_t const& ref_ul_interferenceindication() const {return ul_interferenceindication;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(target_Cell_ID); + v(ul_interferenceindication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(target_Cell_ID); + v(ul_interferenceindication); + v(iE_Extensions); + + }; + void clear() + { + target_Cell_ID.clear(); + ul_interferenceindication.clear(); + iE_Extensions.clear(); + + }; + private: + target_Cell_ID_t target_Cell_ID; + ul_interferenceindication_t ul_interferenceindication; + iE_Extensions_t iE_Extensions; + +}; +/* +UL-HighInterferenceIndicationInfo ::= SEQUENCE (SIZE(1..maxCellineNB)) OF UL-HighInterferenceIndicationInfo-Item +*/ + +struct UL_HighInterferenceIndicationInfo_elm : UL_HighInterferenceIndicationInfo_Item +{ + static constexpr const char* name() {return "UL_HighInterferenceIndicationInfo_elm";} + using parent_t = UL_HighInterferenceIndicationInfo_Item; + +}; +struct UL_HighInterferenceIndicationInfo : asn::sequenceof +{ + static constexpr const char* name() {return "UL-HighInterferenceIndicationInfo";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +UL-UE-Configuration::= ENUMERATED { no-data, shared, only, ... } +*/ + +struct UL_UE_Configuration : asn::enumerated<3, 0, true> +{ + static constexpr const char* name() {return "UL-UE-Configuration";} + using parent_t = asn::enumerated<3, 0, true>; + typedef enum { + no_data + ,shared + ,only + } index_t; + +}; + +/* +ULConfiguration-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ULConfiguration_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ULConfiguration::= SEQUENCE { + uL-PDCP UL-UE-Configuration, + iE-Extensions ProtocolExtensionContainer { {ULConfiguration-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ULConfiguration : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ULConfiguration";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct uL_PDCP_t : UL_UE_Configuration + { + static constexpr const char* name() {return "uL_PDCP_t";} + using parent_t = UL_UE_Configuration; + + }; + uL_PDCP_t& ref_uL_PDCP() {return uL_PDCP;} + uL_PDCP_t const& ref_uL_PDCP() const {return uL_PDCP;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uL_PDCP); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uL_PDCP); + v(iE_Extensions); + + }; + void clear() + { + uL_PDCP.clear(); + iE_Extensions.clear(); + + }; + private: + uL_PDCP_t uL_PDCP; + iE_Extensions_t iE_Extensions; + +}; +/* +VehicleUE ::= ENUMERATED { + authorized, + not-authorized, + ... +} +*/ + +struct VehicleUE : asn::enumerated<2, 0, true> +{ + static constexpr const char* name() {return "VehicleUE";} + using parent_t = asn::enumerated<2, 0, true>; + typedef enum { + authorized + ,not_authorized + } index_t; + +}; + +/* +V2XServicesAuthorized-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct V2XServicesAuthorized_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +V2XServicesAuthorized ::= SEQUENCE { + vehicleUE VehicleUE OPTIONAL, +pedestrianUE PedestrianUE OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct V2XServicesAuthorized : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "V2XServicesAuthorized";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct vehicleUE_t : VehicleUE + { + static constexpr const char* name() {return "vehicleUE_t";} + using parent_t = VehicleUE; + static constexpr bool optional = true; + + }; + vehicleUE_t& set_vehicleUE() { vehicleUE.setpresent(true); return vehicleUE;} + vehicleUE_t const* get_vehicleUE() const {return vehicleUE.is_valid() ? &vehicleUE : nullptr;} + struct pedestrianUE_t : PedestrianUE + { + static constexpr const char* name() {return "pedestrianUE_t";} + using parent_t = PedestrianUE; + static constexpr bool optional = true; + + }; + pedestrianUE_t& set_pedestrianUE() { pedestrianUE.setpresent(true); return pedestrianUE;} + pedestrianUE_t const* get_pedestrianUE() const {return pedestrianUE.is_valid() ? &pedestrianUE : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(vehicleUE); + v(pedestrianUE); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(vehicleUE); + v(pedestrianUE); + v(iE_Extensions); + + }; + void clear() + { + vehicleUE.clear(); + pedestrianUE.clear(); + iE_Extensions.clear(); + + }; + private: + vehicleUE_t vehicleUE; + pedestrianUE_t pedestrianUE; + iE_Extensions_t iE_Extensions; + +}; +/* +WT-UE-XwAP-ID ::= OCTET STRING (SIZE (3)) +*/ + +struct WT_UE_XwAP_ID : asn::ostring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "WT-UE-XwAP-ID";} + using parent_t = asn::ostring<>; + +}; + +/* +WTID-Type1 ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + shortWTID BIT STRING (SIZE(24)), + ... +} +*/ + +struct WTID_Type1 : asn::sequence<2, 0, true, 0> +{ + static constexpr const char* name() {return "WTID-Type1";} + using parent_t = asn::sequence<2, 0, true, 0>; + struct pLMN_Identity_t : PLMN_Identity + { + static constexpr const char* name() {return "pLMN_Identity_t";} + using parent_t = PLMN_Identity; + + }; + pLMN_Identity_t& ref_pLMN_Identity() {return pLMN_Identity;} + pLMN_Identity_t const& ref_pLMN_Identity() const {return pLMN_Identity;} + struct shortWTID_t : asn::bstring<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "shortWTID_t";} + using parent_t = asn::bstring<>; + + }; + + shortWTID_t& ref_shortWTID() {return shortWTID;} + shortWTID_t const& ref_shortWTID() const {return shortWTID;} + template void decode(V& v) + { + v(pLMN_Identity); + v(shortWTID); + + }; + template void encode(V& v) const + { + v(pLMN_Identity); + v(shortWTID); + + }; + void clear() + { + pLMN_Identity.clear(); + shortWTID.clear(); + + }; + private: + pLMN_Identity_t pLMN_Identity; + shortWTID_t shortWTID; + +}; +/* +WTID-Long-Type2 ::= BIT STRING (SIZE(48)) +*/ + +struct WTID_Long_Type2 : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "WTID-Long-Type2";} + using parent_t = asn::bstring<>; + +}; + +/* +WTID ::= CHOICE { + wTID-Type1 WTID-Type1, + wTID-Type2 WTID-Long-Type2, + ... +} +*/ + +struct WTID : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "WTID";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~WTID() {clear();} + struct wTID_Type1_t : WTID_Type1 + { + static constexpr const char* name() {return "wTID_Type1_t";} + using parent_t = WTID_Type1; + + }; + struct wTID_Type2_t : WTID_Long_Type2 + { + static constexpr const char* name() {return "wTID_Type2_t";} + using parent_t = WTID_Long_Type2; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + wTID_Type1_t& select_wTID_Type1() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + wTID_Type1_t const* get_wTID_Type1() const { if(get_index() == 1) { return &var.as();} return nullptr; } + wTID_Type2_t& select_wTID_Type2() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + wTID_Type2_t const* get_wTID_Type2() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(wTID_Type1_t)]; + char dummy2[sizeof(wTID_Type2_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +X2BenefitValue ::= INTEGER (1..8, ...) +*/ + +struct X2BenefitValue : asn::integer<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "X2BenefitValue";} + using parent_t = asn::integer<>; + +}; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Contents.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Contents.hpp new file mode 100644 index 0000000..dd85f97 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Contents.hpp @@ -0,0 +1,68476 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-IEs.hpp" +#include "X2AP-Containers.hpp" +#include "X2AP-Constants.hpp" + +/* +ActivatedCellList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ActivatedCellList_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ActivatedCellList-Item::= SEQUENCE { + ecgi ECGI, + iE-Extensions ProtocolExtensionContainer { {ActivatedCellList-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ActivatedCellList_Item : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ActivatedCellList-Item";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct ecgi_t : ECGI + { + static constexpr const char* name() {return "ecgi_t";} + using parent_t = ECGI; + + }; + ecgi_t& ref_ecgi() {return ecgi;} + ecgi_t const& ref_ecgi() const {return ecgi;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(ecgi); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(ecgi); + v(iE_Extensions); + + }; + void clear() + { + ecgi.clear(); + iE_Extensions.clear(); + + }; + private: + ecgi_t ecgi; + iE_Extensions_t iE_Extensions; + +}; +/* +ActivatedCellList ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ActivatedCellList-Item +*/ + +struct ActivatedCellList_elm : ActivatedCellList_Item +{ + static constexpr const char* name() {return "ActivatedCellList_elm";} + using parent_t = ActivatedCellList_Item; + +}; +struct ActivatedCellList : asn::sequenceof +{ + static constexpr const char* name() {return "ActivatedCellList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ActivatedNRCellList-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ActivatedNRCellList_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ActivatedNRCellList-Item::= SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {ActivatedNRCellList-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ActivatedNRCellList_Item : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ActivatedNRCellList-Item";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct nrCellID_t : NRCGI + { + static constexpr const char* name() {return "nrCellID_t";} + using parent_t = NRCGI; + + }; + nrCellID_t& ref_nrCellID() {return nrCellID;} + nrCellID_t const& ref_nrCellID() const {return nrCellID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nrCellID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nrCellID); + v(iE_Extensions); + + }; + void clear() + { + nrCellID.clear(); + iE_Extensions.clear(); + + }; + private: + nrCellID_t nrCellID; + iE_Extensions_t iE_Extensions; + +}; +/* +ActivatedNRCellList ::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF ActivatedNRCellList-Item +*/ + +struct ActivatedNRCellList_elm : ActivatedNRCellList_Item +{ + static constexpr const char* name() {return "ActivatedNRCellList_elm";} + using parent_t = ActivatedNRCellList_Item; + +}; +struct ActivatedNRCellList : asn::sequenceof +{ + static constexpr const char* name() {return "ActivatedNRCellList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellActivationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +*/ + +struct CellActivationFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationFailure-IEs}}, + ... +} +*/ + +struct CellActivationFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "CellActivationFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ServedCellsToActivate-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedCellsToActivate_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedCellsToActivate-Item::= SEQUENCE { + ecgi ECGI, + iE-Extensions ProtocolExtensionContainer { {ServedCellsToActivate-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedCellsToActivate_Item : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ServedCellsToActivate-Item";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct ecgi_t : ECGI + { + static constexpr const char* name() {return "ecgi_t";} + using parent_t = ECGI; + + }; + ecgi_t& ref_ecgi() {return ecgi;} + ecgi_t const& ref_ecgi() const {return ecgi;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(ecgi); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(ecgi); + v(iE_Extensions); + + }; + void clear() + { + ecgi.clear(); + iE_Extensions.clear(); + + }; + private: + ecgi_t ecgi; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedCellsToActivate::= SEQUENCE (SIZE (1..maxCellineNB)) OF ServedCellsToActivate-Item +*/ + +struct ServedCellsToActivate_elm : ServedCellsToActivate_Item +{ + static constexpr const char* name() {return "ServedCellsToActivate_elm";} + using parent_t = ServedCellsToActivate_Item; + +}; +struct ServedCellsToActivate : asn::sequenceof +{ + static constexpr const char* name() {return "ServedCellsToActivate";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellActivationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedCellsToActivate CRITICALITY reject TYPE ServedCellsToActivate PRESENCE mandatory}, + ... +} +*/ + +struct CellActivationRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedCellsToActivate() { set(id_ServedCellsToActivate); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ServedCellsToActivate)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ServedCellsToActivate);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedCellsToActivate() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ServedCellsToActivate& select_id_ServedCellsToActivate() { return set(1); } + ServedCellsToActivate const* get_id_ServedCellsToActivate() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ServedCellsToActivate()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ServedCellsToActivate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedCellsToActivate() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationRequest-IEs}}, + ... +} +*/ + +struct CellActivationRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "CellActivationRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +CellActivationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivatedCellList CRITICALITY ignore TYPE ActivatedCellList PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct CellActivationResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ActivatedCellList() { set(id_ActivatedCellList); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ActivatedCellList)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ActivatedCellList);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ActivatedCellList() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ActivatedCellList& select_id_ActivatedCellList() { return set(1); } + ActivatedCellList const* get_id_ActivatedCellList() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ActivatedCellList()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ActivatedCellList)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ActivatedCellList() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{CellActivationResponse-IEs}}, + ... +} +*/ + +struct CellActivationResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "CellActivationResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +Limited-list-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct Limited_list_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +Limited-list ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {Limited-list-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct Limited_list_elm : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "Limited_list_elm";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct nrCellID_t : NRCGI + { + static constexpr const char* name() {return "nrCellID_t";} + using parent_t = NRCGI; + + }; + nrCellID_t& ref_nrCellID() {return nrCellID;} + nrCellID_t const& ref_nrCellID() const {return nrCellID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nrCellID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nrCellID); + v(iE_Extensions); + + }; + void clear() + { + nrCellID.clear(); + iE_Extensions.clear(); + + }; + private: + nrCellID_t nrCellID; + iE_Extensions_t iE_Extensions; + +}; +struct Limited_list : asn::sequenceof +{ + static constexpr const char* name() {return "Limited-list";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellAssistanceInformation ::= CHOICE { + limited-list Limited-list, + full-list ENUMERATED {allServedNRcells, ...}, + ... +} +*/ + +struct CellAssistanceInformation : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "CellAssistanceInformation";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~CellAssistanceInformation() {clear();} + struct limited_list_t : Limited_list + { + static constexpr const char* name() {return "limited_list_t";} + using parent_t = Limited_list; + + }; + struct full_list_t : asn::enumerated<1, 0, true> + { + static constexpr const char* name() {return "full_list_t";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + allServedNRcells + } index_t; + + }; + + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + limited_list_t& select_limited_list() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + limited_list_t const* get_limited_list() const { if(get_index() == 1) { return &var.as();} return nullptr; } + full_list_t& select_full_list() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + full_list_t const* get_full_list() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(limited_list_t)]; + char dummy2[sizeof(full_list_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +CellInformation-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-ABSInformation CRITICALITY ignore EXTENSION ABSInformation PRESENCE optional }| +{ ID id-InvokeIndication CRITICALITY ignore EXTENSION InvokeIndication PRESENCE optional }| +{ ID id-IntendedULDLConfiguration CRITICALITY ignore EXTENSION SubframeAssignment PRESENCE optional }| +{ ID id-ExtendedULInterferenceOverloadInfo CRITICALITY ignore EXTENSION ExtendedULInterferenceOverloadInfo PRESENCE optional }| +{ ID id-CoMPInformation CRITICALITY ignore EXTENSION CoMPInformation PRESENCE optional }| +{ ID id-DynamicDLTransmissionInformation CRITICALITY ignore EXTENSION DynamicDLTransmissionInformation PRESENCE optional }, + ... +} +*/ + +struct CellInformation_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ABSInformation() { set(id_ABSInformation); type=1;} + void select_id_InvokeIndication() { set(id_InvokeIndication); type=2;} + void select_id_IntendedULDLConfiguration() { set(id_IntendedULDLConfiguration); type=3;} + void select_id_ExtendedULInterferenceOverloadInfo() { set(id_ExtendedULInterferenceOverloadInfo); type=4;} + void select_id_CoMPInformation() { set(id_CoMPInformation); type=5;} + void select_id_DynamicDLTransmissionInformation() { set(id_DynamicDLTransmissionInformation); type=6;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ABSInformation)) { type = 1; return true; } + else if(equal(id_InvokeIndication)) { type = 2; return true; } + else if(equal(id_IntendedULDLConfiguration)) { type = 3; return true; } + else if(equal(id_ExtendedULInterferenceOverloadInfo)) { type = 4; return true; } + else if(equal(id_CoMPInformation)) { type = 5; return true; } + else if(equal(id_DynamicDLTransmissionInformation)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ABSInformation);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_InvokeIndication);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_IntendedULDLConfiguration);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ExtendedULInterferenceOverloadInfo);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CoMPInformation);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_DynamicDLTransmissionInformation);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ABSInformation() { set(ignore); type=1;} + void select_id_InvokeIndication() { set(ignore); type=2;} + void select_id_IntendedULDLConfiguration() { set(ignore); type=3;} + void select_id_ExtendedULInterferenceOverloadInfo() { set(ignore); type=4;} + void select_id_CoMPInformation() { set(ignore); type=5;} + void select_id_DynamicDLTransmissionInformation() { set(ignore); type=6;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ABSInformation& select_id_ABSInformation() { return set(1); } + ABSInformation const* get_id_ABSInformation() const { return get(1); } + InvokeIndication& select_id_InvokeIndication() { return set(2); } + InvokeIndication const* get_id_InvokeIndication() const { return get(2); } + SubframeAssignment& select_id_IntendedULDLConfiguration() { return set(3); } + SubframeAssignment const* get_id_IntendedULDLConfiguration() const { return get(3); } + ExtendedULInterferenceOverloadInfo& select_id_ExtendedULInterferenceOverloadInfo() { return set(4); } + ExtendedULInterferenceOverloadInfo const* get_id_ExtendedULInterferenceOverloadInfo() const { return get(4); } + CoMPInformation& select_id_CoMPInformation() { return set(5); } + CoMPInformation const* get_id_CoMPInformation() const { return get(5); } + DynamicDLTransmissionInformation& select_id_DynamicDLTransmissionInformation() { return set(6); } + DynamicDLTransmissionInformation const* get_id_DynamicDLTransmissionInformation() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ABSInformation()); return true; + case 2: v(select_id_InvokeIndication()); return true; + case 3: v(select_id_IntendedULDLConfiguration()); return true; + case 4: v(select_id_ExtendedULInterferenceOverloadInfo()); return true; + case 5: v(select_id_CoMPInformation()); return true; + case 6: v(select_id_DynamicDLTransmissionInformation()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ABSInformation)]; + char dummy2[sizeof(CoMPInformation)]; + char dummy3[sizeof(DynamicDLTransmissionInformation)]; + char dummy4[sizeof(ExtendedULInterferenceOverloadInfo)]; + char dummy5[sizeof(InvokeIndication)]; + char dummy6[sizeof(SubframeAssignment)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ABSInformation() { set(optional); type=1;} + void select_id_InvokeIndication() { set(optional); type=2;} + void select_id_IntendedULDLConfiguration() { set(optional); type=3;} + void select_id_ExtendedULInterferenceOverloadInfo() { set(optional); type=4;} + void select_id_CoMPInformation() { set(optional); type=5;} + void select_id_DynamicDLTransmissionInformation() { set(optional); type=6;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellInformation-Item ::= SEQUENCE { + cell-ID ECGI, + ul-InterferenceOverloadIndication UL-InterferenceOverloadIndication OPTIONAL, + ul-HighInterferenceIndicationInfo UL-HighInterferenceIndicationInfo OPTIONAL, + relativeNarrowbandTxPower RelativeNarrowbandTxPower OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CellInformation-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CellInformation_Item : asn::sequence<5, 0, true, 4> +{ + static constexpr const char* name() {return "CellInformation-Item";} + using parent_t = asn::sequence<5, 0, true, 4>; + struct cell_ID_t : ECGI + { + static constexpr const char* name() {return "cell_ID_t";} + using parent_t = ECGI; + + }; + cell_ID_t& ref_cell_ID() {return cell_ID;} + cell_ID_t const& ref_cell_ID() const {return cell_ID;} + struct ul_InterferenceOverloadIndication_t : UL_InterferenceOverloadIndication + { + static constexpr const char* name() {return "ul_InterferenceOverloadIndication_t";} + using parent_t = UL_InterferenceOverloadIndication; + static constexpr bool optional = true; + + }; + ul_InterferenceOverloadIndication_t& set_ul_InterferenceOverloadIndication() { ul_InterferenceOverloadIndication.setpresent(true); return ul_InterferenceOverloadIndication;} + ul_InterferenceOverloadIndication_t const* get_ul_InterferenceOverloadIndication() const {return ul_InterferenceOverloadIndication.is_valid() ? &ul_InterferenceOverloadIndication : nullptr;} + struct ul_HighInterferenceIndicationInfo_t : UL_HighInterferenceIndicationInfo + { + static constexpr const char* name() {return "ul_HighInterferenceIndicationInfo_t";} + using parent_t = UL_HighInterferenceIndicationInfo; + static constexpr bool optional = true; + + }; + ul_HighInterferenceIndicationInfo_t& set_ul_HighInterferenceIndicationInfo() { ul_HighInterferenceIndicationInfo.setpresent(true); return ul_HighInterferenceIndicationInfo;} + ul_HighInterferenceIndicationInfo_t const* get_ul_HighInterferenceIndicationInfo() const {return ul_HighInterferenceIndicationInfo.is_valid() ? &ul_HighInterferenceIndicationInfo : nullptr;} + struct relativeNarrowbandTxPower_t : RelativeNarrowbandTxPower + { + static constexpr const char* name() {return "relativeNarrowbandTxPower_t";} + using parent_t = RelativeNarrowbandTxPower; + static constexpr bool optional = true; + + }; + relativeNarrowbandTxPower_t& set_relativeNarrowbandTxPower() { relativeNarrowbandTxPower.setpresent(true); return relativeNarrowbandTxPower;} + relativeNarrowbandTxPower_t const* get_relativeNarrowbandTxPower() const {return relativeNarrowbandTxPower.is_valid() ? &relativeNarrowbandTxPower : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_ID); + v(ul_InterferenceOverloadIndication); + v(ul_HighInterferenceIndicationInfo); + v(relativeNarrowbandTxPower); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_ID); + v(ul_InterferenceOverloadIndication); + v(ul_HighInterferenceIndicationInfo); + v(relativeNarrowbandTxPower); + v(iE_Extensions); + + }; + void clear() + { + cell_ID.clear(); + ul_InterferenceOverloadIndication.clear(); + ul_HighInterferenceIndicationInfo.clear(); + relativeNarrowbandTxPower.clear(); + iE_Extensions.clear(); + + }; + private: + cell_ID_t cell_ID; + ul_InterferenceOverloadIndication_t ul_InterferenceOverloadIndication; + ul_HighInterferenceIndicationInfo_t ul_HighInterferenceIndicationInfo; + relativeNarrowbandTxPower_t relativeNarrowbandTxPower; + iE_Extensions_t iE_Extensions; + +}; +/* +CellInformation-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellInformation-Item CRITICALITY ignore TYPE CellInformation-Item PRESENCE mandatory } +} +*/ + +struct CellInformation_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellInformation_Item() { set(id_CellInformation_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CellInformation_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CellInformation_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellInformation_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CellInformation_Item& select_id_CellInformation_Item() { return set(1); } + CellInformation_Item const* get_id_CellInformation_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CellInformation_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellInformation_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellInformation_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellInformation-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellInformation-ItemIEs} } +*/ + +struct CellInformation_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "CellInformation_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct CellInformation_List : asn::sequenceof +{ + static constexpr const char* name() {return "CellInformation-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellMeasurementResult-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-CompositeAvailableCapacityGroup CRITICALITY ignore EXTENSION CompositeAvailableCapacityGroup PRESENCE optional}| + { ID id-ABS-Status CRITICALITY ignore EXTENSION ABS-Status PRESENCE optional}| + { ID id-RSRPMRList CRITICALITY ignore EXTENSION RSRPMRList PRESENCE optional}| + { ID id-CSIReportList CRITICALITY ignore EXTENSION CSIReportList PRESENCE optional}| + { ID id-CellReportingIndicator CRITICALITY ignore EXTENSION CellReportingIndicator PRESENCE optional}, + ... +} +*/ + +struct CellMeasurementResult_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_CompositeAvailableCapacityGroup() { set(id_CompositeAvailableCapacityGroup); type=1;} + void select_id_ABS_Status() { set(id_ABS_Status); type=2;} + void select_id_RSRPMRList() { set(id_RSRPMRList); type=3;} + void select_id_CSIReportList() { set(id_CSIReportList); type=4;} + void select_id_CellReportingIndicator() { set(id_CellReportingIndicator); type=5;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CompositeAvailableCapacityGroup)) { type = 1; return true; } + else if(equal(id_ABS_Status)) { type = 2; return true; } + else if(equal(id_RSRPMRList)) { type = 3; return true; } + else if(equal(id_CSIReportList)) { type = 4; return true; } + else if(equal(id_CellReportingIndicator)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CompositeAvailableCapacityGroup);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ABS_Status);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_RSRPMRList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CSIReportList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CellReportingIndicator);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_CompositeAvailableCapacityGroup() { set(ignore); type=1;} + void select_id_ABS_Status() { set(ignore); type=2;} + void select_id_RSRPMRList() { set(ignore); type=3;} + void select_id_CSIReportList() { set(ignore); type=4;} + void select_id_CellReportingIndicator() { set(ignore); type=5;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + CompositeAvailableCapacityGroup& select_id_CompositeAvailableCapacityGroup() { return set(1); } + CompositeAvailableCapacityGroup const* get_id_CompositeAvailableCapacityGroup() const { return get(1); } + ABS_Status& select_id_ABS_Status() { return set(2); } + ABS_Status const* get_id_ABS_Status() const { return get(2); } + RSRPMRList& select_id_RSRPMRList() { return set(3); } + RSRPMRList const* get_id_RSRPMRList() const { return get(3); } + CSIReportList& select_id_CSIReportList() { return set(4); } + CSIReportList const* get_id_CSIReportList() const { return get(4); } + CellReportingIndicator& select_id_CellReportingIndicator() { return set(5); } + CellReportingIndicator const* get_id_CellReportingIndicator() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CompositeAvailableCapacityGroup()); return true; + case 2: v(select_id_ABS_Status()); return true; + case 3: v(select_id_RSRPMRList()); return true; + case 4: v(select_id_CSIReportList()); return true; + case 5: v(select_id_CellReportingIndicator()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ABS_Status)]; + char dummy2[sizeof(CSIReportList)]; + char dummy3[sizeof(CellReportingIndicator)]; + char dummy4[sizeof(CompositeAvailableCapacityGroup)]; + char dummy5[sizeof(RSRPMRList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_CompositeAvailableCapacityGroup() { set(optional); type=1;} + void select_id_ABS_Status() { set(optional); type=2;} + void select_id_RSRPMRList() { set(optional); type=3;} + void select_id_CSIReportList() { set(optional); type=4;} + void select_id_CellReportingIndicator() { set(optional); type=5;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellMeasurementResult-Item ::= SEQUENCE { + cell-ID ECGI, + hWLoadIndicator HWLoadIndicator OPTIONAL, + s1TNLLoadIndicator S1TNLLoadIndicator OPTIONAL, + radioResourceStatus RadioResourceStatus OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CellMeasurementResult-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CellMeasurementResult_Item : asn::sequence<5, 0, true, 4> +{ + static constexpr const char* name() {return "CellMeasurementResult-Item";} + using parent_t = asn::sequence<5, 0, true, 4>; + struct cell_ID_t : ECGI + { + static constexpr const char* name() {return "cell_ID_t";} + using parent_t = ECGI; + + }; + cell_ID_t& ref_cell_ID() {return cell_ID;} + cell_ID_t const& ref_cell_ID() const {return cell_ID;} + struct hWLoadIndicator_t : HWLoadIndicator + { + static constexpr const char* name() {return "hWLoadIndicator_t";} + using parent_t = HWLoadIndicator; + static constexpr bool optional = true; + + }; + hWLoadIndicator_t& set_hWLoadIndicator() { hWLoadIndicator.setpresent(true); return hWLoadIndicator;} + hWLoadIndicator_t const* get_hWLoadIndicator() const {return hWLoadIndicator.is_valid() ? &hWLoadIndicator : nullptr;} + struct s1TNLLoadIndicator_t : S1TNLLoadIndicator + { + static constexpr const char* name() {return "s1TNLLoadIndicator_t";} + using parent_t = S1TNLLoadIndicator; + static constexpr bool optional = true; + + }; + s1TNLLoadIndicator_t& set_s1TNLLoadIndicator() { s1TNLLoadIndicator.setpresent(true); return s1TNLLoadIndicator;} + s1TNLLoadIndicator_t const* get_s1TNLLoadIndicator() const {return s1TNLLoadIndicator.is_valid() ? &s1TNLLoadIndicator : nullptr;} + struct radioResourceStatus_t : RadioResourceStatus + { + static constexpr const char* name() {return "radioResourceStatus_t";} + using parent_t = RadioResourceStatus; + static constexpr bool optional = true; + + }; + radioResourceStatus_t& set_radioResourceStatus() { radioResourceStatus.setpresent(true); return radioResourceStatus;} + radioResourceStatus_t const* get_radioResourceStatus() const {return radioResourceStatus.is_valid() ? &radioResourceStatus : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_ID); + v(hWLoadIndicator); + v(s1TNLLoadIndicator); + v(radioResourceStatus); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_ID); + v(hWLoadIndicator); + v(s1TNLLoadIndicator); + v(radioResourceStatus); + v(iE_Extensions); + + }; + void clear() + { + cell_ID.clear(); + hWLoadIndicator.clear(); + s1TNLLoadIndicator.clear(); + radioResourceStatus.clear(); + iE_Extensions.clear(); + + }; + private: + cell_ID_t cell_ID; + hWLoadIndicator_t hWLoadIndicator; + s1TNLLoadIndicator_t s1TNLLoadIndicator; + radioResourceStatus_t radioResourceStatus; + iE_Extensions_t iE_Extensions; + +}; +/* +CellMeasurementResult-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellMeasurementResult-Item CRITICALITY ignore TYPE CellMeasurementResult-Item PRESENCE mandatory} +} +*/ + +struct CellMeasurementResult_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellMeasurementResult_Item() { set(id_CellMeasurementResult_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CellMeasurementResult_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CellMeasurementResult_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellMeasurementResult_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CellMeasurementResult_Item& select_id_CellMeasurementResult_Item() { return set(1); } + CellMeasurementResult_Item const* get_id_CellMeasurementResult_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CellMeasurementResult_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellMeasurementResult_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellMeasurementResult_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellMeasurementResult-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellMeasurementResult-ItemIEs} } +*/ + +struct CellMeasurementResult_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "CellMeasurementResult_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct CellMeasurementResult_List : asn::sequenceof +{ + static constexpr const char* name() {return "CellMeasurementResult-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CellToReport-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CellToReport_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellToReport-Item ::= SEQUENCE { + cell-ID ECGI, + iE-Extensions ProtocolExtensionContainer { {CellToReport-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CellToReport_Item : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "CellToReport-Item";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct cell_ID_t : ECGI + { + static constexpr const char* name() {return "cell_ID_t";} + using parent_t = ECGI; + + }; + cell_ID_t& ref_cell_ID() {return cell_ID;} + cell_ID_t const& ref_cell_ID() const {return cell_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_ID); + v(iE_Extensions); + + }; + void clear() + { + cell_ID.clear(); + iE_Extensions.clear(); + + }; + private: + cell_ID_t cell_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +CellToReport-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellToReport-Item CRITICALITY ignore TYPE CellToReport-Item PRESENCE mandatory} +} +*/ + +struct CellToReport_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellToReport_Item() { set(id_CellToReport_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CellToReport_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CellToReport_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellToReport_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CellToReport_Item& select_id_CellToReport_Item() { return set(1); } + CellToReport_Item const* get_id_CellToReport_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CellToReport_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellToReport_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CellToReport_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CellToReport-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CellToReport-ItemIEs} } +*/ + +struct CellToReport_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "CellToReport_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct CellToReport_List : asn::sequenceof +{ + static constexpr const char* name() {return "CellToReport-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +MeasurementFailureCause-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct MeasurementFailureCause_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MeasurementFailureCause-Item ::= SEQUENCE { + measurementFailedReportCharacteristics ReportCharacteristics, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {MeasurementFailureCause-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct MeasurementFailureCause_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "MeasurementFailureCause-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct measurementFailedReportCharacteristics_t : ReportCharacteristics + { + static constexpr const char* name() {return "measurementFailedReportCharacteristics_t";} + using parent_t = ReportCharacteristics; + + }; + measurementFailedReportCharacteristics_t& ref_measurementFailedReportCharacteristics() {return measurementFailedReportCharacteristics;} + measurementFailedReportCharacteristics_t const& ref_measurementFailedReportCharacteristics() const {return measurementFailedReportCharacteristics;} + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(measurementFailedReportCharacteristics); + v(cause); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(measurementFailedReportCharacteristics); + v(cause); + v(iE_Extensions); + + }; + void clear() + { + measurementFailedReportCharacteristics.clear(); + cause.clear(); + iE_Extensions.clear(); + + }; + private: + measurementFailedReportCharacteristics_t measurementFailedReportCharacteristics; + cause_t cause; + iE_Extensions_t iE_Extensions; + +}; +/* +MeasurementFailureCause-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-MeasurementFailureCause-Item CRITICALITY ignore TYPE MeasurementFailureCause-Item PRESENCE mandatory} +} +*/ + +struct MeasurementFailureCause_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementFailureCause_Item() { set(id_MeasurementFailureCause_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeasurementFailureCause_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeasurementFailureCause_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementFailureCause_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + MeasurementFailureCause_Item& select_id_MeasurementFailureCause_Item() { return set(1); } + MeasurementFailureCause_Item const* get_id_MeasurementFailureCause_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeasurementFailureCause_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(MeasurementFailureCause_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementFailureCause_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MeasurementFailureCause-List ::= SEQUENCE (SIZE (1..maxFailedMeasObjects)) OF ProtocolIE-Single-Container { {MeasurementFailureCause-ItemIEs} } +*/ + +struct MeasurementFailureCause_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "MeasurementFailureCause_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct MeasurementFailureCause_List : asn::sequenceof +{ + static constexpr const char* name() {return "MeasurementFailureCause-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +CompleteFailureCauseInformation-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct CompleteFailureCauseInformation_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CompleteFailureCauseInformation-Item ::= SEQUENCE { + cell-ID ECGI, + measurementFailureCause-List MeasurementFailureCause-List, + iE-Extensions ProtocolExtensionContainer { {CompleteFailureCauseInformation-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct CompleteFailureCauseInformation_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "CompleteFailureCauseInformation-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct cell_ID_t : ECGI + { + static constexpr const char* name() {return "cell_ID_t";} + using parent_t = ECGI; + + }; + cell_ID_t& ref_cell_ID() {return cell_ID;} + cell_ID_t const& ref_cell_ID() const {return cell_ID;} + struct measurementFailureCause_List_t : MeasurementFailureCause_List + { + static constexpr const char* name() {return "measurementFailureCause_List_t";} + using parent_t = MeasurementFailureCause_List; + + }; + measurementFailureCause_List_t& ref_measurementFailureCause_List() {return measurementFailureCause_List;} + measurementFailureCause_List_t const& ref_measurementFailureCause_List() const {return measurementFailureCause_List;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_ID); + v(measurementFailureCause_List); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_ID); + v(measurementFailureCause_List); + v(iE_Extensions); + + }; + void clear() + { + cell_ID.clear(); + measurementFailureCause_List.clear(); + iE_Extensions.clear(); + + }; + private: + cell_ID_t cell_ID; + measurementFailureCause_List_t measurementFailureCause_List; + iE_Extensions_t iE_Extensions; + +}; +/* +CompleteFailureCauseInformation-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-CompleteFailureCauseInformation-Item CRITICALITY ignore TYPE CompleteFailureCauseInformation-Item PRESENCE mandatory} +} +*/ + +struct CompleteFailureCauseInformation_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CompleteFailureCauseInformation_Item() { set(id_CompleteFailureCauseInformation_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CompleteFailureCauseInformation_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CompleteFailureCauseInformation_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CompleteFailureCauseInformation_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CompleteFailureCauseInformation_Item& select_id_CompleteFailureCauseInformation_Item() { return set(1); } + CompleteFailureCauseInformation_Item const* get_id_CompleteFailureCauseInformation_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CompleteFailureCauseInformation_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CompleteFailureCauseInformation_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_CompleteFailureCauseInformation_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +CompleteFailureCauseInformation-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {CompleteFailureCauseInformation-ItemIEs} } +*/ + +struct CompleteFailureCauseInformation_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "CompleteFailureCauseInformation_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct CompleteFailureCauseInformation_List : asn::sequenceof +{ + static constexpr const char* name() {return "CompleteFailureCauseInformation-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-DataForwardingAddress-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_DataForwardingAddress_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-DataForwardingAddress-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dl-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-DataForwardingAddress-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_DataForwardingAddress_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-DataForwardingAddress-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct dl_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dl_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + dl_GTPtunnelEndpoint_t& ref_dl_GTPtunnelEndpoint() {return dl_GTPtunnelEndpoint;} + dl_GTPtunnelEndpoint_t const& ref_dl_GTPtunnelEndpoint() const {return dl_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(dl_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(dl_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + dl_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + dl_GTPtunnelEndpoint_t dl_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-DataForwardingAddress-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-DataForwardingAddress-Item CRITICALITY ignore TYPE E-RABs-DataForwardingAddress-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_DataForwardingAddress_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_DataForwardingAddress_Item() { set(id_E_RABs_DataForwardingAddress_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_DataForwardingAddress_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_DataForwardingAddress_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_DataForwardingAddress_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_DataForwardingAddress_Item& select_id_E_RABs_DataForwardingAddress_Item() { return set(1); } + E_RABs_DataForwardingAddress_Item const* get_id_E_RABs_DataForwardingAddress_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_DataForwardingAddress_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_DataForwardingAddress_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_DataForwardingAddress_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-DataForwardingAddress-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-DataForwardingAddress-ItemIEs} } +*/ + +struct E_RABs_DataForwardingAddress_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_DataForwardingAddress_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_DataForwardingAddress_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-DataForwardingAddress-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +DataForwardingAddressIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-E-RABs-DataForwardingAddress-List CRITICALITY ignore TYPE E-RABs-DataForwardingAddress-List PRESENCE mandatory}, + ... +} +*/ + +struct DataForwardingAddressIndication_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=1;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=3;} + void select_id_E_RABs_DataForwardingAddress_List() { set(id_E_RABs_DataForwardingAddress_List); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 1; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 3; return true; } + else if(equal(id_E_RABs_DataForwardingAddress_List)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_DataForwardingAddress_List);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(ignore); type=1;} + void select_id_Old_eNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(ignore); type=3;} + void select_id_E_RABs_DataForwardingAddress_List() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(1); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(1); } + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(2); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(3); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(3); } + E_RABs_DataForwardingAddress_List& select_id_E_RABs_DataForwardingAddress_List() { return set(4); } + E_RABs_DataForwardingAddress_List const* get_id_E_RABs_DataForwardingAddress_List() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 2: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 4: v(select_id_E_RABs_DataForwardingAddress_List()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_DataForwardingAddress_List)]; + char dummy2[sizeof(UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=1;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=3;} + void select_id_E_RABs_DataForwardingAddress_List() { set(mandatory); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +DataForwardingAddressIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{DataForwardingAddressIndication-IEs}}, + ... +} +*/ + +struct DataForwardingAddressIndication : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "DataForwardingAddressIndication";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +E-RABs-Admitted-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-GTP-TunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTP-TunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_Item : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-Admitted-Item";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct uL_GTP_TunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTP_TunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_GTP_TunnelEndpoint_t& set_uL_GTP_TunnelEndpoint() { uL_GTP_TunnelEndpoint.setpresent(true); return uL_GTP_TunnelEndpoint;} + uL_GTP_TunnelEndpoint_t const* get_uL_GTP_TunnelEndpoint() const {return uL_GTP_TunnelEndpoint.is_valid() ? &uL_GTP_TunnelEndpoint : nullptr;} + struct dL_GTP_TunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_GTP_TunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_GTP_TunnelEndpoint_t& set_dL_GTP_TunnelEndpoint() { dL_GTP_TunnelEndpoint.setpresent(true); return dL_GTP_TunnelEndpoint;} + dL_GTP_TunnelEndpoint_t const* get_dL_GTP_TunnelEndpoint() const {return dL_GTP_TunnelEndpoint.is_valid() ? &dL_GTP_TunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(uL_GTP_TunnelEndpoint); + v(dL_GTP_TunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(uL_GTP_TunnelEndpoint); + v(dL_GTP_TunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + uL_GTP_TunnelEndpoint.clear(); + dL_GTP_TunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + uL_GTP_TunnelEndpoint_t uL_GTP_TunnelEndpoint; + dL_GTP_TunnelEndpoint_t dL_GTP_TunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-Item CRITICALITY ignore TYPE E-RABs-Admitted-Item PRESENCE mandatory } +} +*/ + +struct E_RABs_Admitted_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_Item() { set(id_E_RABs_Admitted_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_Item& select_id_E_RABs_Admitted_Item() { return set(1); } + E_RABs_Admitted_Item const* get_id_E_RABs_Admitted_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ItemIEs} } +*/ + +struct E_RABs_Admitted_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeAdded-Item-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_Item_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-Item-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-Item-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_Item_SCG_Bearer : asn::sequence<5, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-Item-SCG-Bearer";} + using parent_t = asn::sequence<5, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_DL_GTPtunnelEndpoint_t& ref_s1_DL_GTPtunnelEndpoint() {return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const& ref_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + s1_DL_GTPtunnelEndpoint.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-Item-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_Item_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-Item-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-Item-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_Item_Split_Bearer : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-Item-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct seNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "seNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + seNB_GTPtunnelEndpoint_t& ref_seNB_GTPtunnelEndpoint() {return seNB_GTPtunnelEndpoint;} + seNB_GTPtunnelEndpoint_t const& ref_seNB_GTPtunnelEndpoint() const {return seNB_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + seNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + seNB_GTPtunnelEndpoint_t seNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-Item ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeAdded-Item-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeAdded-Item-Split-Bearer, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_Item : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-Item";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_Admitted_ToBeAdded_Item() {clear();} + struct sCG_Bearer_t : E_RABs_Admitted_ToBeAdded_Item_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_Item_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_Admitted_ToBeAdded_Item_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_Item_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-Admitted-ToBeAdded-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-Item PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_Item() { set(id_E_RABs_Admitted_ToBeAdded_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeAdded_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeAdded_Item& select_id_E_RABs_Admitted_ToBeAdded_Item() { return set(1); } + E_RABs_Admitted_ToBeAdded_Item const* get_id_E_RABs_Admitted_ToBeAdded_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeAdded_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeAdded_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeAdded_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeAdded_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeAdded_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItem_SCG_Bearer : asn::sequence<5, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-Bearer";} + using parent_t = asn::sequence<5, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_DL_GTPtunnelEndpoint_t& ref_s1_DL_GTPtunnelEndpoint() {return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const& ref_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + s1_DL_GTPtunnelEndpoint.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItem_Split_Bearer : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-ModAckItem-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct seNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "seNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + seNB_GTPtunnelEndpoint_t& ref_seNB_GTPtunnelEndpoint() {return seNB_GTPtunnelEndpoint;} + seNB_GTPtunnelEndpoint_t const& ref_seNB_GTPtunnelEndpoint() const {return seNB_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + seNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + seNB_GTPtunnelEndpoint_t seNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeAdded-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeAdded-ModAckItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-ModAckItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_Admitted_ToBeAdded_ModAckItem() {clear();} + struct sCG_Bearer_t : E_RABs_Admitted_ToBeAdded_ModAckItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_ModAckItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_Admitted_ToBeAdded_ModAckItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_ModAckItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-ModAckItem PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckItem() { set(id_E_RABs_Admitted_ToBeAdded_ModAckItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeAdded_ModAckItem)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_ModAckItem);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeAdded_ModAckItem& select_id_E_RABs_Admitted_ToBeAdded_ModAckItem() { return set(1); } + E_RABs_Admitted_ToBeAdded_ModAckItem const* get_id_E_RABs_Admitted_ToBeAdded_ModAckItem() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeAdded_ModAckItem()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeAdded_ModAckItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-ModAckItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeAdded_ModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeAdded_ModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeAdded_ModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-ModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + rlc-Mode RLCMode OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, +-- This IE shall be present if MCG resource and SCG resource IEs in the the EN-DC Resource Configuration IE are set to “present” and the GBR QoS Information IE is present in the Requested MCG E-RAB Level QoS Parameters IE -- + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPpresent : asn::sequence<8, 0, true, 7> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<8, 0, true, 7>; + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_DL_GTPtunnelEndpoint_t& ref_s1_DL_GTPtunnelEndpoint() {return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const& ref_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint;} + struct sgNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_UL_GTP_TEIDatPDCP_t& set_sgNB_UL_GTP_TEIDatPDCP() { sgNB_UL_GTP_TEIDatPDCP.setpresent(true); return sgNB_UL_GTP_TEIDatPDCP;} + sgNB_UL_GTP_TEIDatPDCP_t const* get_sgNB_UL_GTP_TEIDatPDCP() const {return sgNB_UL_GTP_TEIDatPDCP.is_valid() ? &sgNB_UL_GTP_TEIDatPDCP : nullptr;} + struct rlc_Mode_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_t";} + using parent_t = RLCMode; + static constexpr bool optional = true; + + }; + rlc_Mode_t& set_rlc_Mode() { rlc_Mode.setpresent(true); return rlc_Mode;} + rlc_Mode_t const* get_rlc_Mode() const {return rlc_Mode.is_valid() ? &rlc_Mode : nullptr;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct mCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "mCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + mCG_E_RAB_Level_QoS_Parameters_t& set_mCG_E_RAB_Level_QoS_Parameters() { mCG_E_RAB_Level_QoS_Parameters.setpresent(true); return mCG_E_RAB_Level_QoS_Parameters;} + mCG_E_RAB_Level_QoS_Parameters_t const* get_mCG_E_RAB_Level_QoS_Parameters() const {return mCG_E_RAB_Level_QoS_Parameters.is_valid() ? &mCG_E_RAB_Level_QoS_Parameters : nullptr;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + s1_DL_GTPtunnelEndpoint.clear(); + sgNB_UL_GTP_TEIDatPDCP.clear(); + rlc_Mode.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + mCG_E_RAB_Level_QoS_Parameters.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + sgNB_UL_GTP_TEIDatPDCP_t sgNB_UL_GTP_TEIDatPDCP; + rlc_Mode_t rlc_Mode; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + mCG_E_RAB_Level_QoS_Parameters_t mCG_E_RAB_Level_QoS_Parameters; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-lCID CRITICALITY ignore EXTENSION LCID PRESENCE optional}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(id_lCID); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_lCID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_lCID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + LCID& select_id_lCID() { return set(1); } + LCID const* get_id_lCID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_lCID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(LCID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPnotpresent : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + + }; + sgNB_DL_GTP_TEIDatSCG_t& ref_sgNB_DL_GTP_TEIDatSCG() {return sgNB_DL_GTP_TEIDatSCG;} + sgNB_DL_GTP_TEIDatSCG_t const& ref_sgNB_DL_GTP_TEIDatSCG() const {return sgNB_DL_GTP_TEIDatSCG;} + struct secondary_sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_sgNB_DL_GTP_TEIDatSCG_t& set_secondary_sgNB_DL_GTP_TEIDatSCG() { secondary_sgNB_DL_GTP_TEIDatSCG.setpresent(true); return secondary_sgNB_DL_GTP_TEIDatSCG;} + secondary_sgNB_DL_GTP_TEIDatSCG_t const* get_secondary_sgNB_DL_GTP_TEIDatSCG() const {return secondary_sgNB_DL_GTP_TEIDatSCG.is_valid() ? &secondary_sgNB_DL_GTP_TEIDatSCG : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + void clear() + { + sgNB_DL_GTP_TEIDatSCG.clear(); + secondary_sgNB_DL_GTP_TEIDatSCG.clear(); + iE_Extensions.clear(); + + }; + private: + sgNB_DL_GTP_TEIDatSCG_t sgNB_DL_GTP_TEIDatSCG; + secondary_sgNB_DL_GTP_TEIDatSCG_t secondary_sgNB_DL_GTP_TEIDatSCG; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReqAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReqAck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReqAck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-Item PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item() { set(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item& select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item() { return set(1); } + E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item const* get_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-SgNBAddReqAck-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE are set to “present” -- + rlc-Mode RLCMode OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE are set to “present” -- + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, +-- This IE shall be present if MCG resource and SCG resource IEs in the the EN-DC Resource Configuration IE are set to “present” and the GBR QoS Information IE is present in the Requested MCG E-RAB Level QoS Parameters IE -- + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPpresent : asn::sequence<8, 0, true, 7> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<8, 0, true, 7>; + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_DL_GTPtunnelEndpoint_t& ref_s1_DL_GTPtunnelEndpoint() {return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const& ref_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint;} + struct sgNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_UL_GTP_TEIDatPDCP_t& set_sgNB_UL_GTP_TEIDatPDCP() { sgNB_UL_GTP_TEIDatPDCP.setpresent(true); return sgNB_UL_GTP_TEIDatPDCP;} + sgNB_UL_GTP_TEIDatPDCP_t const* get_sgNB_UL_GTP_TEIDatPDCP() const {return sgNB_UL_GTP_TEIDatPDCP.is_valid() ? &sgNB_UL_GTP_TEIDatPDCP : nullptr;} + struct rlc_Mode_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_t";} + using parent_t = RLCMode; + static constexpr bool optional = true; + + }; + rlc_Mode_t& set_rlc_Mode() { rlc_Mode.setpresent(true); return rlc_Mode;} + rlc_Mode_t const* get_rlc_Mode() const {return rlc_Mode.is_valid() ? &rlc_Mode : nullptr;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct mCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "mCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + mCG_E_RAB_Level_QoS_Parameters_t& set_mCG_E_RAB_Level_QoS_Parameters() { mCG_E_RAB_Level_QoS_Parameters.setpresent(true); return mCG_E_RAB_Level_QoS_Parameters;} + mCG_E_RAB_Level_QoS_Parameters_t const* get_mCG_E_RAB_Level_QoS_Parameters() const {return mCG_E_RAB_Level_QoS_Parameters.is_valid() ? &mCG_E_RAB_Level_QoS_Parameters : nullptr;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + s1_DL_GTPtunnelEndpoint.clear(); + sgNB_UL_GTP_TEIDatPDCP.clear(); + rlc_Mode.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + mCG_E_RAB_Level_QoS_Parameters.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + sgNB_UL_GTP_TEIDatPDCP_t sgNB_UL_GTP_TEIDatPDCP; + rlc_Mode_t rlc_Mode; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + mCG_E_RAB_Level_QoS_Parameters_t mCG_E_RAB_Level_QoS_Parameters; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + {ID id-lCID CRITICALITY ignore EXTENSION LCID PRESENCE optional}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(id_lCID); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_lCID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_lCID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + LCID& select_id_lCID() { return set(1); } + LCID const* get_id_lCID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_lCID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(LCID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_lCID() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPnotpresent : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + + }; + sgNB_DL_GTP_TEIDatSCG_t& ref_sgNB_DL_GTP_TEIDatSCG() {return sgNB_DL_GTP_TEIDatSCG;} + sgNB_DL_GTP_TEIDatSCG_t const& ref_sgNB_DL_GTP_TEIDatSCG() const {return sgNB_DL_GTP_TEIDatSCG;} + struct secondary_sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_sgNB_DL_GTP_TEIDatSCG_t& set_secondary_sgNB_DL_GTP_TEIDatSCG() { secondary_sgNB_DL_GTP_TEIDatSCG.setpresent(true); return secondary_sgNB_DL_GTP_TEIDatSCG;} + secondary_sgNB_DL_GTP_TEIDatSCG_t const* get_secondary_sgNB_DL_GTP_TEIDatSCG() const {return secondary_sgNB_DL_GTP_TEIDatSCG.is_valid() ? &secondary_sgNB_DL_GTP_TEIDatSCG : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + void clear() + { + sgNB_DL_GTP_TEIDatSCG.clear(); + secondary_sgNB_DL_GTP_TEIDatSCG.clear(); + iE_Extensions.clear(); + + }; + private: + sgNB_DL_GTP_TEIDatSCG_t sgNB_DL_GTP_TEIDatSCG; + secondary_sgNB_DL_GTP_TEIDatSCG_t secondary_sgNB_DL_GTP_TEIDatSCG; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeAdded-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBModAck-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_Admitted_ToBeAdded_SgNBModAck_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeAdded-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBModAck-Item PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item() { set(id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeAdded_SgNBModAck_Item& select_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item() { return set(1); } + E_RABs_Admitted_ToBeAdded_SgNBModAck_Item const* get_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeAdded_SgNBModAck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeAdded-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeAdded-SgNBModAck-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeAdded_SgNBModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeAdded_SgNBModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeAdded_SgNBModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeAdded-SgNBModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItem_SCG_Bearer : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-ModAckItem-SCG-Bearer";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + s1_DL_GTPtunnelEndpoint_t& set_s1_DL_GTPtunnelEndpoint() { s1_DL_GTPtunnelEndpoint.setpresent(true); return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const* get_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint.is_valid() ? &s1_DL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(s1_DL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + s1_DL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + seNB-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItem_Split_Bearer : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-ModAckItem-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct seNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "seNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + seNB_GTPtunnelEndpoint_t& set_seNB_GTPtunnelEndpoint() { seNB_GTPtunnelEndpoint.setpresent(true); return seNB_GTPtunnelEndpoint;} + seNB_GTPtunnelEndpoint_t const* get_seNB_GTPtunnelEndpoint() const {return seNB_GTPtunnelEndpoint.is_valid() ? &seNB_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(seNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + seNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + seNB_GTPtunnelEndpoint_t seNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeModified-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeModified-ModAckItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-ModAckItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_Admitted_ToBeModified_ModAckItem() {clear();} + struct sCG_Bearer_t : E_RABs_Admitted_ToBeModified_ModAckItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeModified_ModAckItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_Admitted_ToBeModified_ModAckItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeModified_ModAckItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-Admitted-ToBeModified-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeModified-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-ModAckItem PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckItem() { set(id_E_RABs_Admitted_ToBeModified_ModAckItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeModified_ModAckItem)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeModified_ModAckItem);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeModified_ModAckItem& select_id_E_RABs_Admitted_ToBeModified_ModAckItem() { return set(1); } + E_RABs_Admitted_ToBeModified_ModAckItem const* get_id_E_RABs_Admitted_ToBeModified_ModAckItem() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeModified_ModAckItem()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeModified_ModAckItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeModified-ModAckItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeModified_ModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeModified_ModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeModified_ModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-ModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + s1-DL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + mCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPpresent : asn::sequence<5, 0, true, 5> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<5, 0, true, 5>; + struct s1_DL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + s1_DL_GTPtunnelEndpoint_t& set_s1_DL_GTPtunnelEndpoint() { s1_DL_GTPtunnelEndpoint.setpresent(true); return s1_DL_GTPtunnelEndpoint;} + s1_DL_GTPtunnelEndpoint_t const* get_s1_DL_GTPtunnelEndpoint() const {return s1_DL_GTPtunnelEndpoint.is_valid() ? &s1_DL_GTPtunnelEndpoint : nullptr;} + struct sgNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_UL_GTP_TEIDatPDCP_t& set_sgNB_UL_GTP_TEIDatPDCP() { sgNB_UL_GTP_TEIDatPDCP.setpresent(true); return sgNB_UL_GTP_TEIDatPDCP;} + sgNB_UL_GTP_TEIDatPDCP_t const* get_sgNB_UL_GTP_TEIDatPDCP() const {return sgNB_UL_GTP_TEIDatPDCP.is_valid() ? &sgNB_UL_GTP_TEIDatPDCP : nullptr;} + struct mCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "mCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + mCG_E_RAB_Level_QoS_Parameters_t& set_mCG_E_RAB_Level_QoS_Parameters() { mCG_E_RAB_Level_QoS_Parameters.setpresent(true); return mCG_E_RAB_Level_QoS_Parameters;} + mCG_E_RAB_Level_QoS_Parameters_t const* get_mCG_E_RAB_Level_QoS_Parameters() const {return mCG_E_RAB_Level_QoS_Parameters.is_valid() ? &mCG_E_RAB_Level_QoS_Parameters : nullptr;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(s1_DL_GTPtunnelEndpoint); + v(sgNB_UL_GTP_TEIDatPDCP); + v(mCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + s1_DL_GTPtunnelEndpoint.clear(); + sgNB_UL_GTP_TEIDatPDCP.clear(); + mCG_E_RAB_Level_QoS_Parameters.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + s1_DL_GTPtunnelEndpoint_t s1_DL_GTPtunnelEndpoint; + sgNB_UL_GTP_TEIDatPDCP_t sgNB_UL_GTP_TEIDatPDCP; + mCG_E_RAB_Level_QoS_Parameters_t mCG_E_RAB_Level_QoS_Parameters; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-secondarysgNBDLGTPTEIDatPDCP CRITICALITY ignore EXTENSION GTPtunnelEndpoint PRESENCE optional}| + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_secondarysgNBDLGTPTEIDatPDCP() { set(id_secondarysgNBDLGTPTEIDatPDCP); type=1;} + void select_id_RLC_Status() { set(id_RLC_Status); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_secondarysgNBDLGTPTEIDatPDCP)) { type = 1; return true; } + else if(equal(id_RLC_Status)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_secondarysgNBDLGTPTEIDatPDCP);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_RLC_Status);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_secondarysgNBDLGTPTEIDatPDCP() { set(ignore); type=1;} + void select_id_RLC_Status() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + GTPtunnelEndpoint& select_id_secondarysgNBDLGTPTEIDatPDCP() { return set(1); } + GTPtunnelEndpoint const* get_id_secondarysgNBDLGTPTEIDatPDCP() const { return get(1); } + RLC_Status& select_id_RLC_Status() { return set(2); } + RLC_Status const* get_id_RLC_Status() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_secondarysgNBDLGTPTEIDatPDCP()); return true; + case 2: v(select_id_RLC_Status()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GTPtunnelEndpoint)]; + char dummy2[sizeof(RLC_Status)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_secondarysgNBDLGTPTEIDatPDCP() { set(optional); type=1;} + void select_id_RLC_Status() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPnotpresent : asn::sequence<2, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<2, 0, true, 2>; + struct sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_DL_GTP_TEIDatSCG_t& set_sgNB_DL_GTP_TEIDatSCG() { sgNB_DL_GTP_TEIDatSCG.setpresent(true); return sgNB_DL_GTP_TEIDatSCG;} + sgNB_DL_GTP_TEIDatSCG_t const* get_sgNB_DL_GTP_TEIDatSCG() const {return sgNB_DL_GTP_TEIDatSCG.is_valid() ? &sgNB_DL_GTP_TEIDatSCG : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + void clear() + { + sgNB_DL_GTP_TEIDatSCG.clear(); + iE_Extensions.clear(); + + }; + private: + sgNB_DL_GTP_TEIDatSCG_t sgNB_DL_GTP_TEIDatSCG; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModAck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeModified-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-SgNBModAck-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_Admitted_ToBeModified_SgNBModAck_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeModified-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-SgNBModAck-Item PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item() { set(id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeModified_SgNBModAck_Item& select_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item() { return set(1); } + E_RABs_Admitted_ToBeModified_SgNBModAck_Item const* get_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeModified_SgNBModAck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeModified-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeModified-SgNBModAck-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeModified_SgNBModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeModified_SgNBModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeModified_SgNBModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeModified-SgNBModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckItem_SCG_Bearer : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-Bearer";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-ModAckItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckItem_Split_Bearer : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-ModAckItem-Split-Bearer";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToReleased-ModAckItem ::= CHOICE { + sCG-Bearer E-RABs-Admitted-ToBeReleased-ModAckItem-SCG-Bearer, + split-Bearer E-RABs-Admitted-ToBeReleased-ModAckItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_Admitted_ToReleased_ModAckItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToReleased-ModAckItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_Admitted_ToReleased_ModAckItem() {clear();} + struct sCG_Bearer_t : E_RABs_Admitted_ToBeReleased_ModAckItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeReleased_ModAckItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_Admitted_ToBeReleased_ModAckItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_Admitted_ToBeReleased_ModAckItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeReleased-ModAckItem CRITICALITY ignore TYPE E-RABs-Admitted-ToReleased-ModAckItem PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckItem() { set(id_E_RABs_Admitted_ToBeReleased_ModAckItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeReleased_ModAckItem)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_ModAckItem);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToReleased_ModAckItem& select_id_E_RABs_Admitted_ToBeReleased_ModAckItem() { return set(1); } + E_RABs_Admitted_ToReleased_ModAckItem const* get_id_E_RABs_Admitted_ToBeReleased_ModAckItem() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeReleased_ModAckItem()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToReleased_ModAckItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-ModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeReleased-ModAckItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeReleased_ModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeReleased_ModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeReleased_ModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-ModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPnotpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBModAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModAck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToReleased-SgNBModAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-Admitted-ToBeReleased-SgNBModAck-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModAck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToReleased_SgNBModAck_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToReleased-SgNBModAck-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_Admitted_ToBeReleased_SgNBModAck_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeReleased-SgNBModAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToReleased-SgNBModAck-Item PRESENCE mandatory} +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item() { set(id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToReleased_SgNBModAck_Item& select_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item() { return set(1); } + E_RABs_Admitted_ToReleased_SgNBModAck_Item const* get_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToReleased_SgNBModAck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBModAckList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeReleased-SgNBModAck-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBModAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeReleased_SgNBModAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeReleased_SgNBModAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-SgNBModAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + rlc-Mode-transferred RLCMode, + iE-Extensions ProtocolExtensionContainer { {E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct rlc_Mode_transferred_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_transferred_t";} + using parent_t = RLCMode; + + }; + rlc_Mode_transferred_t& ref_rlc_Mode_transferred() {return rlc_Mode_transferred;} + rlc_Mode_transferred_t const& ref_rlc_Mode_transferred() const {return rlc_Mode_transferred;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(rlc_Mode_transferred); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(rlc_Mode_transferred); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + rlc_Mode_transferred.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + rlc_Mode_transferred_t rlc_Mode_transferred; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-Item CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item() { set(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item& select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item() { return set(1); } + E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item const* get_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-Admitted-ToBeReleased-SgNBRelReqAckList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF + ProtocolIE-Single-Container { {E-RABs-Admitted-ToBeReleased-SgNBRelReqAck-ItemIEs} } +*/ + +struct E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-Admitted-ToBeReleased-SgNBRelReqAckList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}, + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPnotpresent : asn::sequence<2, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<2, 0, true, 2>; + struct secondary_meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_meNB_UL_GTP_TEIDatPDCP_t& set_secondary_meNB_UL_GTP_TEIDatPDCP() { secondary_meNB_UL_GTP_TEIDatPDCP.setpresent(true); return secondary_meNB_UL_GTP_TEIDatPDCP;} + secondary_meNB_UL_GTP_TEIDatPDCP_t const* get_secondary_meNB_UL_GTP_TEIDatPDCP() const {return secondary_meNB_UL_GTP_TEIDatPDCP.is_valid() ? &secondary_meNB_UL_GTP_TEIDatPDCP : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(iE_Extensions); + + }; + void clear() + { + secondary_meNB_UL_GTP_TEIDatPDCP.clear(); + iE_Extensions.clear(); + + }; + private: + secondary_meNB_UL_GTP_TEIDatPDCP_t secondary_meNB_UL_GTP_TEIDatPDCP; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-AdmittedToBeModified-SgNBModConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-AdmittedToBeModified-SgNBModConf-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-AdmittedToBeModified-SgNBModConf-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_AdmittedToBeModified_SgNBModConf_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConf-ItemIEs X2AP-PROTOCOL-IES ::= { +{ ID id-E-RABs-AdmittedToBeModified-SgNBModConf-Item CRITICALITY ignore TYPE E-RABs-AdmittedToBeModified-SgNBModConf-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConf_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item() { set(id_E_RABs_AdmittedToBeModified_SgNBModConf_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_AdmittedToBeModified_SgNBModConf_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_AdmittedToBeModified_SgNBModConf_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_AdmittedToBeModified_SgNBModConf_Item& select_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item() { return set(1); } + E_RABs_AdmittedToBeModified_SgNBModConf_Item const* get_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_AdmittedToBeModified_SgNBModConf_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConf_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-AdmittedToBeModified-SgNBModConfList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container + { {E-RABs-AdmittedToBeModified-SgNBModConf-ItemIEs} } +*/ + +struct E_RABs_AdmittedToBeModified_SgNBModConfList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_AdmittedToBeModified_SgNBModConfList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_AdmittedToBeModified_SgNBModConfList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-AdmittedToBeModified-SgNBModConfList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-SubjectToCounterCheckItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_SubjectToCounterCheckItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToCounterCheckItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Count INTEGER (0..4294967295), + dL-Count INTEGER (0..4294967295), + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToCounterCheckItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_SubjectToCounterCheckItem : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-SubjectToCounterCheckItem";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct uL_Count_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "uL_Count_t";} + using parent_t = asn::integer<>; + + }; + + uL_Count_t& ref_uL_Count() {return uL_Count;} + uL_Count_t const& ref_uL_Count() const {return uL_Count;} + struct dL_Count_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "dL_Count_t";} + using parent_t = asn::integer<>; + + }; + + dL_Count_t& ref_dL_Count() {return dL_Count;} + dL_Count_t const& ref_dL_Count() const {return dL_Count;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(uL_Count); + v(dL_Count); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(uL_Count); + v(dL_Count); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + uL_Count.clear(); + dL_Count.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + uL_Count_t uL_Count; + dL_Count_t dL_Count; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-SubjectToCounterCheckItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToCounterCheckItem CRITICALITY ignore TYPE E-RABs-SubjectToCounterCheckItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_SubjectToCounterCheckItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToCounterCheckItem() { set(id_E_RABs_SubjectToCounterCheckItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_SubjectToCounterCheckItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToCounterCheckItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToCounterCheckItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_SubjectToCounterCheckItem& select_id_E_RABs_SubjectToCounterCheckItem() { return set(1); } + E_RABs_SubjectToCounterCheckItem const* get_id_E_RABs_SubjectToCounterCheckItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_SubjectToCounterCheckItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToCounterCheckItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToCounterCheckItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToCounterCheck-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToCounterCheckItemIEs} } +*/ + +struct E_RABs_SubjectToCounterCheck_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_SubjectToCounterCheck_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_SubjectToCounterCheck_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-SubjectToCounterCheck-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-SubjectToSgNBCounterCheck-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_SubjectToSgNBCounterCheck_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToSgNBCounterCheck-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Count INTEGER (0..4294967295), + dL-Count INTEGER (0..4294967295), + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToSgNBCounterCheck-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_SubjectToSgNBCounterCheck_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-SubjectToSgNBCounterCheck-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct uL_Count_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "uL_Count_t";} + using parent_t = asn::integer<>; + + }; + + uL_Count_t& ref_uL_Count() {return uL_Count;} + uL_Count_t const& ref_uL_Count() const {return uL_Count;} + struct dL_Count_t : asn::integer<> + { + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "dL_Count_t";} + using parent_t = asn::integer<>; + + }; + + dL_Count_t& ref_dL_Count() {return dL_Count;} + dL_Count_t const& ref_dL_Count() const {return dL_Count;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(uL_Count); + v(dL_Count); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(uL_Count); + v(dL_Count); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + uL_Count.clear(); + dL_Count.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + uL_Count_t uL_Count; + dL_Count_t dL_Count; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-SubjectToSgNBCounterCheck-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToSgNBCounterCheck-Item CRITICALITY ignore TYPE E-RABs-SubjectToSgNBCounterCheck-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_SubjectToSgNBCounterCheck_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_Item() { set(id_E_RABs_SubjectToSgNBCounterCheck_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_SubjectToSgNBCounterCheck_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToSgNBCounterCheck_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_SubjectToSgNBCounterCheck_Item& select_id_E_RABs_SubjectToSgNBCounterCheck_Item() { return set(1); } + E_RABs_SubjectToSgNBCounterCheck_Item const* get_id_E_RABs_SubjectToSgNBCounterCheck_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_SubjectToSgNBCounterCheck_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToSgNBCounterCheck_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToSgNBCounterCheck-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToSgNBCounterCheck-ItemIEs} } +*/ + +struct E_RABs_SubjectToSgNBCounterCheck_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_SubjectToSgNBCounterCheck_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_SubjectToSgNBCounterCheck_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-SubjectToSgNBCounterCheck-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-SubjectToStatusTransfer-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| + { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| + { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}| + { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| + { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}, + ... +} +*/ + +struct E_RABs_SubjectToStatusTransfer_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ReceiveStatusOfULPDCPSDUsExtended() { set(id_ReceiveStatusOfULPDCPSDUsExtended); type=1;} + void select_id_ULCOUNTValueExtended() { set(id_ULCOUNTValueExtended); type=2;} + void select_id_DLCOUNTValueExtended() { set(id_DLCOUNTValueExtended); type=3;} + void select_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18() { set(id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18); type=4;} + void select_id_ULCOUNTValuePDCP_SNlength18() { set(id_ULCOUNTValuePDCP_SNlength18); type=5;} + void select_id_DLCOUNTValuePDCP_SNlength18() { set(id_DLCOUNTValuePDCP_SNlength18); type=6;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ReceiveStatusOfULPDCPSDUsExtended)) { type = 1; return true; } + else if(equal(id_ULCOUNTValueExtended)) { type = 2; return true; } + else if(equal(id_DLCOUNTValueExtended)) { type = 3; return true; } + else if(equal(id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18)) { type = 4; return true; } + else if(equal(id_ULCOUNTValuePDCP_SNlength18)) { type = 5; return true; } + else if(equal(id_DLCOUNTValuePDCP_SNlength18)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ReceiveStatusOfULPDCPSDUsExtended);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ULCOUNTValueExtended);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_DLCOUNTValueExtended);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_ULCOUNTValuePDCP_SNlength18);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_DLCOUNTValuePDCP_SNlength18);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ReceiveStatusOfULPDCPSDUsExtended() { set(ignore); type=1;} + void select_id_ULCOUNTValueExtended() { set(ignore); type=2;} + void select_id_DLCOUNTValueExtended() { set(ignore); type=3;} + void select_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18() { set(ignore); type=4;} + void select_id_ULCOUNTValuePDCP_SNlength18() { set(ignore); type=5;} + void select_id_DLCOUNTValuePDCP_SNlength18() { set(ignore); type=6;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ReceiveStatusOfULPDCPSDUsExtended& select_id_ReceiveStatusOfULPDCPSDUsExtended() { return set(1); } + ReceiveStatusOfULPDCPSDUsExtended const* get_id_ReceiveStatusOfULPDCPSDUsExtended() const { return get(1); } + COUNTValueExtended& select_id_ULCOUNTValueExtended() { return set(2); } + COUNTValueExtended const* get_id_ULCOUNTValueExtended() const { return get(2); } + COUNTValueExtended& select_id_DLCOUNTValueExtended() { return set(3); } + COUNTValueExtended const* get_id_DLCOUNTValueExtended() const { return get(3); } + ReceiveStatusOfULPDCPSDUsPDCP_SNlength18& select_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18() { return set(4); } + ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 const* get_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18() const { return get(4); } + COUNTvaluePDCP_SNlength18& select_id_ULCOUNTValuePDCP_SNlength18() { return set(5); } + COUNTvaluePDCP_SNlength18 const* get_id_ULCOUNTValuePDCP_SNlength18() const { return get(5); } + COUNTvaluePDCP_SNlength18& select_id_DLCOUNTValuePDCP_SNlength18() { return set(6); } + COUNTvaluePDCP_SNlength18 const* get_id_DLCOUNTValuePDCP_SNlength18() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ReceiveStatusOfULPDCPSDUsExtended()); return true; + case 2: v(select_id_ULCOUNTValueExtended()); return true; + case 3: v(select_id_DLCOUNTValueExtended()); return true; + case 4: v(select_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18()); return true; + case 5: v(select_id_ULCOUNTValuePDCP_SNlength18()); return true; + case 6: v(select_id_DLCOUNTValuePDCP_SNlength18()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(COUNTValueExtended)]; + char dummy2[sizeof(COUNTvaluePDCP_SNlength18)]; + char dummy3[sizeof(ReceiveStatusOfULPDCPSDUsExtended)]; + char dummy4[sizeof(ReceiveStatusOfULPDCPSDUsPDCP_SNlength18)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ReceiveStatusOfULPDCPSDUsExtended() { set(optional); type=1;} + void select_id_ULCOUNTValueExtended() { set(optional); type=2;} + void select_id_DLCOUNTValueExtended() { set(optional); type=3;} + void select_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18() { set(optional); type=4;} + void select_id_ULCOUNTValuePDCP_SNlength18() { set(optional); type=5;} + void select_id_DLCOUNTValuePDCP_SNlength18() { set(optional); type=6;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToStatusTransfer-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + + receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, + uL-COUNTvalue COUNTvalue, + dL-COUNTvalue COUNTvalue, + iE-Extensions ProtocolExtensionContainer { {E-RABs-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_SubjectToStatusTransfer_Item : asn::sequence<5, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-SubjectToStatusTransfer-Item";} + using parent_t = asn::sequence<5, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct receiveStatusofULPDCPSDUs_t : ReceiveStatusofULPDCPSDUs + { + static constexpr const char* name() {return "receiveStatusofULPDCPSDUs_t";} + using parent_t = ReceiveStatusofULPDCPSDUs; + static constexpr bool optional = true; + + }; + receiveStatusofULPDCPSDUs_t& set_receiveStatusofULPDCPSDUs() { receiveStatusofULPDCPSDUs.setpresent(true); return receiveStatusofULPDCPSDUs;} + receiveStatusofULPDCPSDUs_t const* get_receiveStatusofULPDCPSDUs() const {return receiveStatusofULPDCPSDUs.is_valid() ? &receiveStatusofULPDCPSDUs : nullptr;} + struct uL_COUNTvalue_t : COUNTvalue + { + static constexpr const char* name() {return "uL_COUNTvalue_t";} + using parent_t = COUNTvalue; + + }; + uL_COUNTvalue_t& ref_uL_COUNTvalue() {return uL_COUNTvalue;} + uL_COUNTvalue_t const& ref_uL_COUNTvalue() const {return uL_COUNTvalue;} + struct dL_COUNTvalue_t : COUNTvalue + { + static constexpr const char* name() {return "dL_COUNTvalue_t";} + using parent_t = COUNTvalue; + + }; + dL_COUNTvalue_t& ref_dL_COUNTvalue() {return dL_COUNTvalue;} + dL_COUNTvalue_t const& ref_dL_COUNTvalue() const {return dL_COUNTvalue;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(receiveStatusofULPDCPSDUs); + v(uL_COUNTvalue); + v(dL_COUNTvalue); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(receiveStatusofULPDCPSDUs); + v(uL_COUNTvalue); + v(dL_COUNTvalue); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + receiveStatusofULPDCPSDUs.clear(); + uL_COUNTvalue.clear(); + dL_COUNTvalue.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + receiveStatusofULPDCPSDUs_t receiveStatusofULPDCPSDUs; + uL_COUNTvalue_t uL_COUNTvalue; + dL_COUNTvalue_t dL_COUNTvalue; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-SubjectToStatusTransfer-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE E-RABs-SubjectToStatusTransfer-Item PRESENCE mandatory } +} +*/ + +struct E_RABs_SubjectToStatusTransfer_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_SubjectToStatusTransfer_Item() { set(id_E_RABs_SubjectToStatusTransfer_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_SubjectToStatusTransfer_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToStatusTransfer_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_SubjectToStatusTransfer_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_SubjectToStatusTransfer_Item& select_id_E_RABs_SubjectToStatusTransfer_Item() { return set(1); } + E_RABs_SubjectToStatusTransfer_Item const* get_id_E_RABs_SubjectToStatusTransfer_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_SubjectToStatusTransfer_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToStatusTransfer_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_E_RABs_SubjectToStatusTransfer_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-SubjectToStatusTransfer-List ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-SubjectToStatusTransfer-ItemIEs} } +*/ + +struct E_RABs_SubjectToStatusTransfer_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_SubjectToStatusTransfer_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_SubjectToStatusTransfer_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-SubjectToStatusTransfer-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeAdded-Item-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_Item_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(id_Correlation_ID); type=1;} + void select_id_SIPTO_Correlation_ID() { set(id_SIPTO_Correlation_ID); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Correlation_ID)) { type = 1; return true; } + else if(equal(id_SIPTO_Correlation_ID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Correlation_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SIPTO_Correlation_ID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(ignore); type=1;} + void select_id_SIPTO_Correlation_ID() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + Correlation_ID& select_id_Correlation_ID() { return set(1); } + Correlation_ID const* get_id_Correlation_ID() const { return get(1); } + Correlation_ID& select_id_SIPTO_Correlation_ID() { return set(2); } + Correlation_ID const* get_id_SIPTO_Correlation_ID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Correlation_ID()); return true; + case 2: v(select_id_SIPTO_Correlation_ID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Correlation_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(optional); type=1;} + void select_id_SIPTO_Correlation_ID() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-Item-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-Item-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_Item_SCG_Bearer : asn::sequence<5, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-Item-SCG-Bearer";} + using parent_t = asn::sequence<5, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct dL_Forwarding_t : DL_Forwarding + { + static constexpr const char* name() {return "dL_Forwarding_t";} + using parent_t = DL_Forwarding; + static constexpr bool optional = true; + + }; + dL_Forwarding_t& set_dL_Forwarding() { dL_Forwarding.setpresent(true); return dL_Forwarding;} + dL_Forwarding_t const* get_dL_Forwarding() const {return dL_Forwarding.is_valid() ? &dL_Forwarding : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_UL_GTPtunnelEndpoint_t& ref_s1_UL_GTPtunnelEndpoint() {return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const& ref_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + dL_Forwarding.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + dL_Forwarding_t dL_Forwarding; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-Item-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_Item_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-Item-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-Item-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_Item_Split_Bearer : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-Item-Split-Bearer";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct meNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + meNB_GTPtunnelEndpoint_t& ref_meNB_GTPtunnelEndpoint() {return meNB_GTPtunnelEndpoint;} + meNB_GTPtunnelEndpoint_t const& ref_meNB_GTPtunnelEndpoint() const {return meNB_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + meNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + meNB_GTPtunnelEndpoint_t meNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-Item ::= CHOICE { + sCG-Bearer E-RABs-ToBeAdded-Item-SCG-Bearer, + split-Bearer E-RABs-ToBeAdded-Item-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeAdded_Item : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-Item";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeAdded_Item() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeAdded_Item_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeAdded_Item_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeAdded_Item_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeAdded_Item_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeAdded-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-Item CRITICALITY reject TYPE E-RABs-ToBeAdded-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeAdded_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_Item() { set(id_E_RABs_ToBeAdded_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeAdded_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_Item() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeAdded_Item& select_id_E_RABs_ToBeAdded_Item() { return set(1); } + E_RABs_ToBeAdded_Item const* get_id_E_RABs_ToBeAdded_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeAdded_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeAdded_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-ItemIEs} } +*/ + +struct E_RABs_ToBeAdded_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeAdded_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeAdded_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeAdded-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| + { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(id_Correlation_ID); type=1;} + void select_id_SIPTO_Correlation_ID() { set(id_SIPTO_Correlation_ID); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Correlation_ID)) { type = 1; return true; } + else if(equal(id_SIPTO_Correlation_ID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Correlation_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SIPTO_Correlation_ID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(ignore); type=1;} + void select_id_SIPTO_Correlation_ID() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + Correlation_ID& select_id_Correlation_ID() { return set(1); } + Correlation_ID const* get_id_Correlation_ID() const { return get(1); } + Correlation_ID& select_id_SIPTO_Correlation_ID() { return set(2); } + Correlation_ID const* get_id_SIPTO_Correlation_ID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Correlation_ID()); return true; + case 2: v(select_id_SIPTO_Correlation_ID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Correlation_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Correlation_ID() { set(optional); type=1;} + void select_id_SIPTO_Correlation_ID() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItem_SCG_Bearer : asn::sequence<5, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-ModReqItem-SCG-Bearer";} + using parent_t = asn::sequence<5, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct dL_Forwarding_t : DL_Forwarding + { + static constexpr const char* name() {return "dL_Forwarding_t";} + using parent_t = DL_Forwarding; + static constexpr bool optional = true; + + }; + dL_Forwarding_t& set_dL_Forwarding() { dL_Forwarding.setpresent(true); return dL_Forwarding;} + dL_Forwarding_t const* get_dL_Forwarding() const {return dL_Forwarding.is_valid() ? &dL_Forwarding : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_UL_GTPtunnelEndpoint_t& ref_s1_UL_GTPtunnelEndpoint() {return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const& ref_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + dL_Forwarding.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + dL_Forwarding_t dL_Forwarding; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItem_Split_Bearer : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-ModReqItem-Split-Bearer";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct meNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + meNB_GTPtunnelEndpoint_t& ref_meNB_GTPtunnelEndpoint() {return meNB_GTPtunnelEndpoint;} + meNB_GTPtunnelEndpoint_t const& ref_meNB_GTPtunnelEndpoint() const {return meNB_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + meNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + meNB_GTPtunnelEndpoint_t meNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeAdded-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeAdded-ModReqItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-ModReqItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeAdded_ModReqItem() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeAdded_ModReqItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeAdded_ModReqItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeAdded_ModReqItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeAdded_ModReqItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeAdded-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeAdded-ModReqItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeAdded_ModReqItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_ModReqItem() { set(id_E_RABs_ToBeAdded_ModReqItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeAdded_ModReqItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_ModReqItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_ModReqItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeAdded_ModReqItem& select_id_E_RABs_ToBeAdded_ModReqItem() { return set(1); } + E_RABs_ToBeAdded_ModReqItem const* get_id_E_RABs_ToBeAdded_ModReqItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeAdded_ModReqItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeAdded_ModReqItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_ModReqItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-ModReqItemIEs} } +*/ + +struct E_RABs_ToBeAdded_List_ModReq_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeAdded_List_ModReq_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeAdded_List_ModReq : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-List-ModReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLCMode-transferred CRITICALITY ignore EXTENSION RLCMode PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(id_RLCMode_transferred); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RLCMode_transferred)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RLCMode_transferred);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + RLCMode& select_id_RLCMode_transferred() { return set(1); } + RLCMode const* get_id_RLCMode_transferred() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RLCMode_transferred()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RLCMode)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + max-MCG-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” and GBR QoS Information IE is present in Full E-RAB Level QoS Parameters IE -- + dL-Forwarding DL-Forwarding OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPpresent : asn::sequence<6, 0, true, 4> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<6, 0, true, 4>; + struct full_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "full_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + full_E_RAB_Level_QoS_Parameters_t& ref_full_E_RAB_Level_QoS_Parameters() {return full_E_RAB_Level_QoS_Parameters;} + full_E_RAB_Level_QoS_Parameters_t const& ref_full_E_RAB_Level_QoS_Parameters() const {return full_E_RAB_Level_QoS_Parameters;} + struct max_MCG_admit_E_RAB_Level_QoS_Parameters_t : GBR_QosInformation + { + static constexpr const char* name() {return "max_MCG_admit_E_RAB_Level_QoS_Parameters_t";} + using parent_t = GBR_QosInformation; + static constexpr bool optional = true; + + }; + max_MCG_admit_E_RAB_Level_QoS_Parameters_t& set_max_MCG_admit_E_RAB_Level_QoS_Parameters() { max_MCG_admit_E_RAB_Level_QoS_Parameters.setpresent(true); return max_MCG_admit_E_RAB_Level_QoS_Parameters;} + max_MCG_admit_E_RAB_Level_QoS_Parameters_t const* get_max_MCG_admit_E_RAB_Level_QoS_Parameters() const {return max_MCG_admit_E_RAB_Level_QoS_Parameters.is_valid() ? &max_MCG_admit_E_RAB_Level_QoS_Parameters : nullptr;} + struct dL_Forwarding_t : DL_Forwarding + { + static constexpr const char* name() {return "dL_Forwarding_t";} + using parent_t = DL_Forwarding; + static constexpr bool optional = true; + + }; + dL_Forwarding_t& set_dL_Forwarding() { dL_Forwarding.setpresent(true); return dL_Forwarding;} + dL_Forwarding_t const* get_dL_Forwarding() const {return dL_Forwarding.is_valid() ? &dL_Forwarding : nullptr;} + struct meNB_DL_GTP_TEIDatMCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_DL_GTP_TEIDatMCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + meNB_DL_GTP_TEIDatMCG_t& set_meNB_DL_GTP_TEIDatMCG() { meNB_DL_GTP_TEIDatMCG.setpresent(true); return meNB_DL_GTP_TEIDatMCG;} + meNB_DL_GTP_TEIDatMCG_t const* get_meNB_DL_GTP_TEIDatMCG() const {return meNB_DL_GTP_TEIDatMCG.is_valid() ? &meNB_DL_GTP_TEIDatMCG : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_UL_GTPtunnelEndpoint_t& ref_s1_UL_GTPtunnelEndpoint() {return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const& ref_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MCG_admit_E_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MCG_admit_E_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + full_E_RAB_Level_QoS_Parameters.clear(); + max_MCG_admit_E_RAB_Level_QoS_Parameters.clear(); + dL_Forwarding.clear(); + meNB_DL_GTP_TEIDatMCG.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + full_E_RAB_Level_QoS_Parameters_t full_E_RAB_Level_QoS_Parameters; + max_MCG_admit_E_RAB_Level_QoS_Parameters_t max_MCG_admit_E_RAB_Level_QoS_Parameters; + dL_Forwarding_t dL_Forwarding; + meNB_DL_GTP_TEIDatMCG_t meNB_DL_GTP_TEIDatMCG; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-duplicationActivation CRITICALITY ignore EXTENSION DuplicationActivation PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + void select_id_duplicationActivation() { set(id_duplicationActivation); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else if(equal(id_duplicationActivation)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_duplicationActivation);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + void select_id_duplicationActivation() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + DuplicationActivation& select_id_duplicationActivation() { return set(3); } + DuplicationActivation const* get_id_duplicationActivation() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: v(select_id_duplicationActivation()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DuplicationActivation)]; + char dummy2[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + void select_id_duplicationActivation() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint, + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + rlc-Mode RLCMode, + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPnotpresent : asn::sequence<6, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<6, 0, true, 3>; + struct requested_SCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "requested_SCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + requested_SCG_E_RAB_Level_QoS_Parameters_t& ref_requested_SCG_E_RAB_Level_QoS_Parameters() {return requested_SCG_E_RAB_Level_QoS_Parameters;} + requested_SCG_E_RAB_Level_QoS_Parameters_t const& ref_requested_SCG_E_RAB_Level_QoS_Parameters() const {return requested_SCG_E_RAB_Level_QoS_Parameters;} + struct meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + + }; + meNB_UL_GTP_TEIDatPDCP_t& ref_meNB_UL_GTP_TEIDatPDCP() {return meNB_UL_GTP_TEIDatPDCP;} + meNB_UL_GTP_TEIDatPDCP_t const& ref_meNB_UL_GTP_TEIDatPDCP() const {return meNB_UL_GTP_TEIDatPDCP;} + struct secondary_meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_meNB_UL_GTP_TEIDatPDCP_t& set_secondary_meNB_UL_GTP_TEIDatPDCP() { secondary_meNB_UL_GTP_TEIDatPDCP.setpresent(true); return secondary_meNB_UL_GTP_TEIDatPDCP;} + secondary_meNB_UL_GTP_TEIDatPDCP_t const* get_secondary_meNB_UL_GTP_TEIDatPDCP() const {return secondary_meNB_UL_GTP_TEIDatPDCP.is_valid() ? &secondary_meNB_UL_GTP_TEIDatPDCP : nullptr;} + struct rlc_Mode_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_t";} + using parent_t = RLCMode; + + }; + rlc_Mode_t& ref_rlc_Mode() {return rlc_Mode;} + rlc_Mode_t const& ref_rlc_Mode() const {return rlc_Mode;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + requested_SCG_E_RAB_Level_QoS_Parameters.clear(); + meNB_UL_GTP_TEIDatPDCP.clear(); + secondary_meNB_UL_GTP_TEIDatPDCP.clear(); + rlc_Mode.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + requested_SCG_E_RAB_Level_QoS_Parameters_t requested_SCG_E_RAB_Level_QoS_Parameters; + meNB_UL_GTP_TEIDatPDCP_t meNB_UL_GTP_TEIDatPDCP; + secondary_meNB_UL_GTP_TEIDatPDCP_t secondary_meNB_UL_GTP_TEIDatPDCP; + rlc_Mode_t rlc_Mode; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + drb-ID DRB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeAdded-SgNBAddReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBAddReq-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_Item : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBAddReq-Item";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct drb_ID_t : DRB_ID + { + static constexpr const char* name() {return "drb_ID_t";} + using parent_t = DRB_ID; + + }; + drb_ID_t& ref_drb_ID() {return drb_ID;} + drb_ID_t const& ref_drb_ID() const {return drb_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeAdded_SgNBAddReq_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(drb_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(drb_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + drb_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + drb_ID_t drb_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-SgNBAddReq-Item CRITICALITY reject TYPE E-RABs-ToBeAdded-SgNBAddReq-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBAddReq_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBAddReq_Item() { set(id_E_RABs_ToBeAdded_SgNBAddReq_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeAdded_SgNBAddReq_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_SgNBAddReq_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBAddReq_Item() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeAdded_SgNBAddReq_Item& select_id_E_RABs_ToBeAdded_SgNBAddReq_Item() { return set(1); } + E_RABs_ToBeAdded_SgNBAddReq_Item const* get_id_E_RABs_ToBeAdded_SgNBAddReq_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeAdded_SgNBAddReq_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeAdded_SgNBAddReq_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBAddReq_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBAddReqList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-SgNBAddReq-ItemIEs} } +*/ + +struct E_RABs_ToBeAdded_SgNBAddReqList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeAdded_SgNBAddReqList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeAdded_SgNBAddReqList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBAddReqList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLCMode-transferred CRITICALITY ignore EXTENSION RLCMode PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(id_RLCMode_transferred); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RLCMode_transferred)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RLCMode_transferred);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + RLCMode& select_id_RLCMode_transferred() { return set(1); } + RLCMode const* get_id_RLCMode_transferred() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RLCMode_transferred()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RLCMode)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + max-MN-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” and GBR QoS Information IE is present in Full E-RAB Level QoS Parameters IE -- + dL-Forwarding DL-Forwarding OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, +-- This IE shall be present if MCG resource IE in the the EN-DC Resource Configuration IE is set to “present” -- + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPpresent : asn::sequence<6, 0, true, 4> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<6, 0, true, 4>; + struct full_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "full_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + full_E_RAB_Level_QoS_Parameters_t& ref_full_E_RAB_Level_QoS_Parameters() {return full_E_RAB_Level_QoS_Parameters;} + full_E_RAB_Level_QoS_Parameters_t const& ref_full_E_RAB_Level_QoS_Parameters() const {return full_E_RAB_Level_QoS_Parameters;} + struct max_MN_admit_E_RAB_Level_QoS_Parameters_t : GBR_QosInformation + { + static constexpr const char* name() {return "max_MN_admit_E_RAB_Level_QoS_Parameters_t";} + using parent_t = GBR_QosInformation; + static constexpr bool optional = true; + + }; + max_MN_admit_E_RAB_Level_QoS_Parameters_t& set_max_MN_admit_E_RAB_Level_QoS_Parameters() { max_MN_admit_E_RAB_Level_QoS_Parameters.setpresent(true); return max_MN_admit_E_RAB_Level_QoS_Parameters;} + max_MN_admit_E_RAB_Level_QoS_Parameters_t const* get_max_MN_admit_E_RAB_Level_QoS_Parameters() const {return max_MN_admit_E_RAB_Level_QoS_Parameters.is_valid() ? &max_MN_admit_E_RAB_Level_QoS_Parameters : nullptr;} + struct dL_Forwarding_t : DL_Forwarding + { + static constexpr const char* name() {return "dL_Forwarding_t";} + using parent_t = DL_Forwarding; + static constexpr bool optional = true; + + }; + dL_Forwarding_t& set_dL_Forwarding() { dL_Forwarding.setpresent(true); return dL_Forwarding;} + dL_Forwarding_t const* get_dL_Forwarding() const {return dL_Forwarding.is_valid() ? &dL_Forwarding : nullptr;} + struct meNB_DL_GTP_TEIDatMCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_DL_GTP_TEIDatMCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + meNB_DL_GTP_TEIDatMCG_t& set_meNB_DL_GTP_TEIDatMCG() { meNB_DL_GTP_TEIDatMCG.setpresent(true); return meNB_DL_GTP_TEIDatMCG;} + meNB_DL_GTP_TEIDatMCG_t const* get_meNB_DL_GTP_TEIDatMCG() const {return meNB_DL_GTP_TEIDatMCG.is_valid() ? &meNB_DL_GTP_TEIDatMCG : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + s1_UL_GTPtunnelEndpoint_t& ref_s1_UL_GTPtunnelEndpoint() {return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const& ref_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MN_admit_E_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MN_admit_E_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + full_E_RAB_Level_QoS_Parameters.clear(); + max_MN_admit_E_RAB_Level_QoS_Parameters.clear(); + dL_Forwarding.clear(); + meNB_DL_GTP_TEIDatMCG.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + full_E_RAB_Level_QoS_Parameters_t full_E_RAB_Level_QoS_Parameters; + max_MN_admit_E_RAB_Level_QoS_Parameters_t max_MN_admit_E_RAB_Level_QoS_Parameters; + dL_Forwarding_t dL_Forwarding; + meNB_DL_GTP_TEIDatMCG_t meNB_DL_GTP_TEIDatMCG; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-duplicationActivation CRITICALITY ignore EXTENSION DuplicationActivation PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + void select_id_duplicationActivation() { set(id_duplicationActivation); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else if(equal(id_duplicationActivation)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_duplicationActivation);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + void select_id_duplicationActivation() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + DuplicationActivation& select_id_duplicationActivation() { return set(3); } + DuplicationActivation const* get_id_duplicationActivation() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: v(select_id_duplicationActivation()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DuplicationActivation)]; + char dummy2[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + void select_id_duplicationActivation() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint, + secondary-meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + rlc-Mode RLCMode, + uL-Configuration ULConfiguration OPTIONAL, +-- This IE shall be present if MCG resource and SCG resources IEs in the the EN-DC Resource Configuration IE are set to “present” -- + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPnotpresent : asn::sequence<6, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<6, 0, true, 3>; + struct requested_SCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "requested_SCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + requested_SCG_E_RAB_Level_QoS_Parameters_t& ref_requested_SCG_E_RAB_Level_QoS_Parameters() {return requested_SCG_E_RAB_Level_QoS_Parameters;} + requested_SCG_E_RAB_Level_QoS_Parameters_t const& ref_requested_SCG_E_RAB_Level_QoS_Parameters() const {return requested_SCG_E_RAB_Level_QoS_Parameters;} + struct meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + + }; + meNB_UL_GTP_TEIDatPDCP_t& ref_meNB_UL_GTP_TEIDatPDCP() {return meNB_UL_GTP_TEIDatPDCP;} + meNB_UL_GTP_TEIDatPDCP_t const& ref_meNB_UL_GTP_TEIDatPDCP() const {return meNB_UL_GTP_TEIDatPDCP;} + struct secondary_meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_meNB_UL_GTP_TEIDatPDCP_t& set_secondary_meNB_UL_GTP_TEIDatPDCP() { secondary_meNB_UL_GTP_TEIDatPDCP.setpresent(true); return secondary_meNB_UL_GTP_TEIDatPDCP;} + secondary_meNB_UL_GTP_TEIDatPDCP_t const* get_secondary_meNB_UL_GTP_TEIDatPDCP() const {return secondary_meNB_UL_GTP_TEIDatPDCP.is_valid() ? &secondary_meNB_UL_GTP_TEIDatPDCP : nullptr;} + struct rlc_Mode_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_t";} + using parent_t = RLCMode; + + }; + rlc_Mode_t& ref_rlc_Mode() {return rlc_Mode;} + rlc_Mode_t const& ref_rlc_Mode() const {return rlc_Mode;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(secondary_meNB_UL_GTP_TEIDatPDCP); + v(rlc_Mode); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + requested_SCG_E_RAB_Level_QoS_Parameters.clear(); + meNB_UL_GTP_TEIDatPDCP.clear(); + secondary_meNB_UL_GTP_TEIDatPDCP.clear(); + rlc_Mode.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + requested_SCG_E_RAB_Level_QoS_Parameters_t requested_SCG_E_RAB_Level_QoS_Parameters; + meNB_UL_GTP_TEIDatPDCP_t meNB_UL_GTP_TEIDatPDCP; + secondary_meNB_UL_GTP_TEIDatPDCP_t secondary_meNB_UL_GTP_TEIDatPDCP; + rlc_Mode_t rlc_Mode; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + drb-ID DRB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeAdded-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeAdded-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_Item : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBModReq-Item";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct drb_ID_t : DRB_ID + { + static constexpr const char* name() {return "drb_ID_t";} + using parent_t = DRB_ID; + + }; + drb_ID_t& ref_drb_ID() {return drb_ID;} + drb_ID_t const& ref_drb_ID() const {return drb_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeAdded_SgNBModReq_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(drb_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(drb_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + drb_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + drb_ID_t drb_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeAdded-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeAdded-SgNBModReq-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBModReq_Item() { set(id_E_RABs_ToBeAdded_SgNBModReq_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeAdded_SgNBModReq_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_SgNBModReq_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBModReq_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeAdded_SgNBModReq_Item& select_id_E_RABs_ToBeAdded_SgNBModReq_Item() { return set(1); } + E_RABs_ToBeAdded_SgNBModReq_Item const* get_id_E_RABs_ToBeAdded_SgNBModReq_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeAdded_SgNBModReq_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeAdded_SgNBModReq_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeAdded_SgNBModReq_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeAdded-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeAdded-SgNBModReq-ItemIEs} } +*/ + +struct E_RABs_ToBeAdded_SgNBModReq_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeAdded_SgNBModReq_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeAdded_SgNBModReq_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeAdded-SgNBModReq-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeModified-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItem_SCG_Bearer : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-ModReqItem-SCG-Bearer";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + e_RAB_Level_QoS_Parameters_t& set_e_RAB_Level_QoS_Parameters() { e_RAB_Level_QoS_Parameters.setpresent(true); return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const* get_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters.is_valid() ? &e_RAB_Level_QoS_Parameters : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + s1_UL_GTPtunnelEndpoint_t& set_s1_UL_GTPtunnelEndpoint() { s1_UL_GTPtunnelEndpoint.setpresent(true); return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const* get_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint.is_valid() ? &s1_UL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + meNB-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItem_Split_Bearer : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-ModReqItem-Split-Bearer";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + e_RAB_Level_QoS_Parameters_t& set_e_RAB_Level_QoS_Parameters() { e_RAB_Level_QoS_Parameters.setpresent(true); return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const* get_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters.is_valid() ? &e_RAB_Level_QoS_Parameters : nullptr;} + struct meNB_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + meNB_GTPtunnelEndpoint_t& set_meNB_GTPtunnelEndpoint() { meNB_GTPtunnelEndpoint.setpresent(true); return meNB_GTPtunnelEndpoint;} + meNB_GTPtunnelEndpoint_t const* get_meNB_GTPtunnelEndpoint() const {return meNB_GTPtunnelEndpoint.is_valid() ? &meNB_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(meNB_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + meNB_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + meNB_GTPtunnelEndpoint_t meNB_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeModified-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeModified-ModReqItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-ModReqItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeModified_ModReqItem() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeModified_ModReqItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeModified_ModReqItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeModified_ModReqItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeModified_ModReqItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeModified-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeModified-ModReqItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeModified_ModReqItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_ModReqItem() { set(id_E_RABs_ToBeModified_ModReqItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeModified_ModReqItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeModified_ModReqItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_ModReqItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeModified_ModReqItem& select_id_E_RABs_ToBeModified_ModReqItem() { return set(1); } + E_RABs_ToBeModified_ModReqItem const* get_id_E_RABs_ToBeModified_ModReqItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeModified_ModReqItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeModified_ModReqItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_ModReqItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-ModReqItemIEs} } +*/ + +struct E_RABs_ToBeModified_List_ModReq_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeModified_List_ModReq_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeModified_List_ModReq : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-List-ModReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional }, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(id_RLC_Status); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RLC_Status)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RLC_Status);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + RLC_Status& select_id_RLC_Status() { return set(1); } + RLC_Status const* get_id_RLC_Status() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RLC_Status()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RLC_Status)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + full-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + max-MN-admit-E-RAB-Level-QoS-Parameters GBR-QosInformation OPTIONAL, + meNB-DL-GTP-TEIDatMCG GTPtunnelEndpoint OPTIONAL, + s1-UL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPpresent : asn::sequence<5, 0, true, 5> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<5, 0, true, 5>; + struct full_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "full_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + full_E_RAB_Level_QoS_Parameters_t& set_full_E_RAB_Level_QoS_Parameters() { full_E_RAB_Level_QoS_Parameters.setpresent(true); return full_E_RAB_Level_QoS_Parameters;} + full_E_RAB_Level_QoS_Parameters_t const* get_full_E_RAB_Level_QoS_Parameters() const {return full_E_RAB_Level_QoS_Parameters.is_valid() ? &full_E_RAB_Level_QoS_Parameters : nullptr;} + struct max_MN_admit_E_RAB_Level_QoS_Parameters_t : GBR_QosInformation + { + static constexpr const char* name() {return "max_MN_admit_E_RAB_Level_QoS_Parameters_t";} + using parent_t = GBR_QosInformation; + static constexpr bool optional = true; + + }; + max_MN_admit_E_RAB_Level_QoS_Parameters_t& set_max_MN_admit_E_RAB_Level_QoS_Parameters() { max_MN_admit_E_RAB_Level_QoS_Parameters.setpresent(true); return max_MN_admit_E_RAB_Level_QoS_Parameters;} + max_MN_admit_E_RAB_Level_QoS_Parameters_t const* get_max_MN_admit_E_RAB_Level_QoS_Parameters() const {return max_MN_admit_E_RAB_Level_QoS_Parameters.is_valid() ? &max_MN_admit_E_RAB_Level_QoS_Parameters : nullptr;} + struct meNB_DL_GTP_TEIDatMCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_DL_GTP_TEIDatMCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + meNB_DL_GTP_TEIDatMCG_t& set_meNB_DL_GTP_TEIDatMCG() { meNB_DL_GTP_TEIDatMCG.setpresent(true); return meNB_DL_GTP_TEIDatMCG;} + meNB_DL_GTP_TEIDatMCG_t const* get_meNB_DL_GTP_TEIDatMCG() const {return meNB_DL_GTP_TEIDatMCG.is_valid() ? &meNB_DL_GTP_TEIDatMCG : nullptr;} + struct s1_UL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_UL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + s1_UL_GTPtunnelEndpoint_t& set_s1_UL_GTPtunnelEndpoint() { s1_UL_GTPtunnelEndpoint.setpresent(true); return s1_UL_GTPtunnelEndpoint;} + s1_UL_GTPtunnelEndpoint_t const* get_s1_UL_GTPtunnelEndpoint() const {return s1_UL_GTPtunnelEndpoint.is_valid() ? &s1_UL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MN_admit_E_RAB_Level_QoS_Parameters); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(full_E_RAB_Level_QoS_Parameters); + v(max_MN_admit_E_RAB_Level_QoS_Parameters); + v(meNB_DL_GTP_TEIDatMCG); + v(s1_UL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + full_E_RAB_Level_QoS_Parameters.clear(); + max_MN_admit_E_RAB_Level_QoS_Parameters.clear(); + meNB_DL_GTP_TEIDatMCG.clear(); + s1_UL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + full_E_RAB_Level_QoS_Parameters_t full_E_RAB_Level_QoS_Parameters; + max_MN_admit_E_RAB_Level_QoS_Parameters_t max_MN_admit_E_RAB_Level_QoS_Parameters; + meNB_DL_GTP_TEIDatMCG_t meNB_DL_GTP_TEIDatMCG; + s1_UL_GTPtunnelEndpoint_t s1_UL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-secondarymeNBULGTPTEIDatPDCP CRITICALITY ignore EXTENSION GTPtunnelEndpoint PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + void select_id_secondarymeNBULGTPTEIDatPDCP() { set(id_secondarymeNBULGTPTEIDatPDCP); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else if(equal(id_secondarymeNBULGTPTEIDatPDCP)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_secondarymeNBULGTPTEIDatPDCP);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + void select_id_secondarymeNBULGTPTEIDatPDCP() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + GTPtunnelEndpoint& select_id_secondarymeNBULGTPTEIDatPDCP() { return set(3); } + GTPtunnelEndpoint const* get_id_secondarymeNBULGTPTEIDatPDCP() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: v(select_id_secondarymeNBULGTPTEIDatPDCP()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GTPtunnelEndpoint)]; + char dummy2[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + void select_id_secondarymeNBULGTPTEIDatPDCP() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + requested-SCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + meNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPnotpresent : asn::sequence<4, 0, true, 4> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<4, 0, true, 4>; + struct requested_SCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "requested_SCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + requested_SCG_E_RAB_Level_QoS_Parameters_t& set_requested_SCG_E_RAB_Level_QoS_Parameters() { requested_SCG_E_RAB_Level_QoS_Parameters.setpresent(true); return requested_SCG_E_RAB_Level_QoS_Parameters;} + requested_SCG_E_RAB_Level_QoS_Parameters_t const* get_requested_SCG_E_RAB_Level_QoS_Parameters() const {return requested_SCG_E_RAB_Level_QoS_Parameters.is_valid() ? &requested_SCG_E_RAB_Level_QoS_Parameters : nullptr;} + struct meNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "meNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + meNB_UL_GTP_TEIDatPDCP_t& set_meNB_UL_GTP_TEIDatPDCP() { meNB_UL_GTP_TEIDatPDCP.setpresent(true); return meNB_UL_GTP_TEIDatPDCP;} + meNB_UL_GTP_TEIDatPDCP_t const* get_meNB_UL_GTP_TEIDatPDCP() const {return meNB_UL_GTP_TEIDatPDCP.is_valid() ? &meNB_UL_GTP_TEIDatPDCP : nullptr;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(uL_Configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(requested_SCG_E_RAB_Level_QoS_Parameters); + v(meNB_UL_GTP_TEIDatPDCP); + v(uL_Configuration); + v(iE_Extensions); + + }; + void clear() + { + requested_SCG_E_RAB_Level_QoS_Parameters.clear(); + meNB_UL_GTP_TEIDatPDCP.clear(); + uL_Configuration.clear(); + iE_Extensions.clear(); + + }; + private: + requested_SCG_E_RAB_Level_QoS_Parameters_t requested_SCG_E_RAB_Level_QoS_Parameters; + meNB_UL_GTP_TEIDatPDCP_t meNB_UL_GTP_TEIDatPDCP; + uL_Configuration_t uL_Configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeModified-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReq-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeModified_SgNBModReq_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReq-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReq_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReq_Item() { set(id_E_RABs_ToBeModified_SgNBModReq_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeModified_SgNBModReq_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeModified_SgNBModReq_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReq_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeModified_SgNBModReq_Item& select_id_E_RABs_ToBeModified_SgNBModReq_Item() { return set(1); } + E_RABs_ToBeModified_SgNBModReq_Item const* get_id_E_RABs_ToBeModified_SgNBModReq_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeModified_SgNBModReq_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeModified_SgNBModReq_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReq_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-SgNBModReq-ItemIEs} } +*/ + +struct E_RABs_ToBeModified_SgNBModReq_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeModified_SgNBModReq_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeModified_SgNBModReq_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReq-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uLpDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-dLPDCPSnLength CRITICALITY ignore EXTENSION PDCPSnLength PRESENCE optional}| + { ID id-new-drb-ID-req CRITICALITY ignore EXTENSION NewDRBIDrequest PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(id_uLpDCPSnLength); type=1;} + void select_id_dLPDCPSnLength() { set(id_dLPDCPSnLength); type=2;} + void select_id_new_drb_ID_req() { set(id_new_drb_ID_req); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uLpDCPSnLength)) { type = 1; return true; } + else if(equal(id_dLPDCPSnLength)) { type = 2; return true; } + else if(equal(id_new_drb_ID_req)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uLpDCPSnLength);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dLPDCPSnLength);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_new_drb_ID_req);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(ignore); type=1;} + void select_id_dLPDCPSnLength() { set(ignore); type=2;} + void select_id_new_drb_ID_req() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + PDCPSnLength& select_id_uLpDCPSnLength() { return set(1); } + PDCPSnLength const* get_id_uLpDCPSnLength() const { return get(1); } + PDCPSnLength& select_id_dLPDCPSnLength() { return set(2); } + PDCPSnLength const* get_id_dLPDCPSnLength() const { return get(2); } + NewDRBIDrequest& select_id_new_drb_ID_req() { return set(3); } + NewDRBIDrequest const* get_id_new_drb_ID_req() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uLpDCPSnLength()); return true; + case 2: v(select_id_dLPDCPSnLength()); return true; + case 3: v(select_id_new_drb_ID_req()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(NewDRBIDrequest)]; + char dummy2[sizeof(PDCPSnLength)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_uLpDCPSnLength() { set(optional); type=1;} + void select_id_dLPDCPSnLength() { set(optional); type=2;} + void select_id_new_drb_ID_req() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent ::= SEQUENCE { + requested-MCG-E-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters OPTIONAL, + uL-Configuration ULConfiguration OPTIONAL, + sgNB-UL-GTP-TEIDatPDCP GTPtunnelEndpoint OPTIONAL, + s1-DL-GTP-TEIDatSgNB GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent : asn::sequence<5, 0, true, 5> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<5, 0, true, 5>; + struct requested_MCG_E_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "requested_MCG_E_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + static constexpr bool optional = true; + + }; + requested_MCG_E_RAB_Level_QoS_Parameters_t& set_requested_MCG_E_RAB_Level_QoS_Parameters() { requested_MCG_E_RAB_Level_QoS_Parameters.setpresent(true); return requested_MCG_E_RAB_Level_QoS_Parameters;} + requested_MCG_E_RAB_Level_QoS_Parameters_t const* get_requested_MCG_E_RAB_Level_QoS_Parameters() const {return requested_MCG_E_RAB_Level_QoS_Parameters.is_valid() ? &requested_MCG_E_RAB_Level_QoS_Parameters : nullptr;} + struct uL_Configuration_t : ULConfiguration + { + static constexpr const char* name() {return "uL_Configuration_t";} + using parent_t = ULConfiguration; + static constexpr bool optional = true; + + }; + uL_Configuration_t& set_uL_Configuration() { uL_Configuration.setpresent(true); return uL_Configuration;} + uL_Configuration_t const* get_uL_Configuration() const {return uL_Configuration.is_valid() ? &uL_Configuration : nullptr;} + struct sgNB_UL_GTP_TEIDatPDCP_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_UL_GTP_TEIDatPDCP_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_UL_GTP_TEIDatPDCP_t& set_sgNB_UL_GTP_TEIDatPDCP() { sgNB_UL_GTP_TEIDatPDCP.setpresent(true); return sgNB_UL_GTP_TEIDatPDCP;} + sgNB_UL_GTP_TEIDatPDCP_t const* get_sgNB_UL_GTP_TEIDatPDCP() const {return sgNB_UL_GTP_TEIDatPDCP.is_valid() ? &sgNB_UL_GTP_TEIDatPDCP : nullptr;} + struct s1_DL_GTP_TEIDatSgNB_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "s1_DL_GTP_TEIDatSgNB_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + s1_DL_GTP_TEIDatSgNB_t& set_s1_DL_GTP_TEIDatSgNB() { s1_DL_GTP_TEIDatSgNB.setpresent(true); return s1_DL_GTP_TEIDatSgNB;} + s1_DL_GTP_TEIDatSgNB_t const* get_s1_DL_GTP_TEIDatSgNB() const {return s1_DL_GTP_TEIDatSgNB.is_valid() ? &s1_DL_GTP_TEIDatSgNB : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(requested_MCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(sgNB_UL_GTP_TEIDatPDCP); + v(s1_DL_GTP_TEIDatSgNB); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(requested_MCG_E_RAB_Level_QoS_Parameters); + v(uL_Configuration); + v(sgNB_UL_GTP_TEIDatPDCP); + v(s1_DL_GTP_TEIDatSgNB); + v(iE_Extensions); + + }; + void clear() + { + requested_MCG_E_RAB_Level_QoS_Parameters.clear(); + uL_Configuration.clear(); + sgNB_UL_GTP_TEIDatPDCP.clear(); + s1_DL_GTP_TEIDatSgNB.clear(); + iE_Extensions.clear(); + + }; + private: + requested_MCG_E_RAB_Level_QoS_Parameters_t requested_MCG_E_RAB_Level_QoS_Parameters; + uL_Configuration_t uL_Configuration; + sgNB_UL_GTP_TEIDatPDCP_t sgNB_UL_GTP_TEIDatPDCP; + s1_DL_GTP_TEIDatSgNB_t s1_DL_GTP_TEIDatSgNB; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLC-Status CRITICALITY ignore EXTENSION RLC-Status PRESENCE optional}| + { ID id-lCID CRITICALITY ignore EXTENSION LCID PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(id_RLC_Status); type=1;} + void select_id_lCID() { set(id_lCID); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RLC_Status)) { type = 1; return true; } + else if(equal(id_lCID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RLC_Status);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_lCID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(ignore); type=1;} + void select_id_lCID() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + RLC_Status& select_id_RLC_Status() { return set(1); } + RLC_Status const* get_id_RLC_Status() const { return get(1); } + LCID& select_id_lCID() { return set(2); } + LCID const* get_id_lCID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RLC_Status()); return true; + case 2: v(select_id_lCID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(LCID)]; + char dummy2[sizeof(RLC_Status)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RLC_Status() { set(optional); type=1;} + void select_id_lCID() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresent ::= SEQUENCE { + sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + secondary-sgNB-DL-GTP-TEIDatSCG GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPnotpresent : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + sgNB_DL_GTP_TEIDatSCG_t& set_sgNB_DL_GTP_TEIDatSCG() { sgNB_DL_GTP_TEIDatSCG.setpresent(true); return sgNB_DL_GTP_TEIDatSCG;} + sgNB_DL_GTP_TEIDatSCG_t const* get_sgNB_DL_GTP_TEIDatSCG() const {return sgNB_DL_GTP_TEIDatSCG.is_valid() ? &sgNB_DL_GTP_TEIDatSCG : nullptr;} + struct secondary_sgNB_DL_GTP_TEIDatSCG_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "secondary_sgNB_DL_GTP_TEIDatSCG_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + secondary_sgNB_DL_GTP_TEIDatSCG_t& set_secondary_sgNB_DL_GTP_TEIDatSCG() { secondary_sgNB_DL_GTP_TEIDatSCG.setpresent(true); return secondary_sgNB_DL_GTP_TEIDatSCG;} + secondary_sgNB_DL_GTP_TEIDatSCG_t const* get_secondary_sgNB_DL_GTP_TEIDatSCG() const {return secondary_sgNB_DL_GTP_TEIDatSCG.is_valid() ? &secondary_sgNB_DL_GTP_TEIDatSCG : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(sgNB_DL_GTP_TEIDatSCG); + v(secondary_sgNB_DL_GTP_TEIDatSCG); + v(iE_Extensions); + + }; + void clear() + { + sgNB_DL_GTP_TEIDatSCG.clear(); + secondary_sgNB_DL_GTP_TEIDatSCG.clear(); + iE_Extensions.clear(); + + }; + private: + sgNB_DL_GTP_TEIDatSCG_t sgNB_DL_GTP_TEIDatSCG; + secondary_sgNB_DL_GTP_TEIDatSCG_t secondary_sgNB_DL_GTP_TEIDatSCG; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeModified-SgNBModReqd-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeModified-SgNBModReqd-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReqd-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeModified_SgNBModReqd_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeModified-SgNBModReqd-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeModified-SgNBModReqd-Item CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReqd-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RABs_ToBeModified_SgNBModReqd_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReqd_Item() { set(id_E_RABs_ToBeModified_SgNBModReqd_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeModified_SgNBModReqd_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeModified_SgNBModReqd_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReqd_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeModified_SgNBModReqd_Item& select_id_E_RABs_ToBeModified_SgNBModReqd_Item() { return set(1); } + E_RABs_ToBeModified_SgNBModReqd_Item const* get_id_E_RABs_ToBeModified_SgNBModReqd_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeModified_SgNBModReqd_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeModified_SgNBModReqd_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeModified_SgNBModReqd_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeModified-SgNBModReqdList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeModified-SgNBModReqd-ItemIEs} } +*/ + +struct E_RABs_ToBeModified_SgNBModReqdList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeModified_SgNBModReqdList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeModified_SgNBModReqdList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeModified-SgNBModReqdList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-ModReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-ModReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItem_SCG_Bearer : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-ModReqItem-SCG-Bearer";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(uL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-ModReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-ModReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItem_Split_Bearer : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-ModReqItem-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-ModReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-ModReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-ModReqItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-ModReqItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeReleased_ModReqItem() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeReleased_ModReqItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_ModReqItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeReleased_ModReqItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_ModReqItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeReleased-ModReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-ModReqItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqItem() { set(id_E_RABs_ToBeReleased_ModReqItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_ModReqItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_ModReqItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_ModReqItem& select_id_E_RABs_ToBeReleased_ModReqItem() { return set(1); } + E_RABs_ToBeReleased_ModReqItem const* get_id_E_RABs_ToBeReleased_ModReqItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_ModReqItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_ModReqItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-List-ModReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-ModReqItemIEs} } +*/ + +struct E_RABs_ToBeReleased_List_ModReq_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_List_ModReq_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_List_ModReq : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-List-ModReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-RelConfItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-RelConfItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelConfItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItem_SCG_Bearer : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelConfItem-SCG-Bearer";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(uL_Forwarding_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(uL_Forwarding_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-RelConfItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-RelConfItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelConfItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItem_Split_Bearer : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelConfItem-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-RelConfItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-RelConfItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-RelConfItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelConfItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeReleased_RelConfItem() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeReleased_RelConfItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_RelConfItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeReleased_RelConfItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_RelConfItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeReleased-RelConfItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-RelConfItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-RelConfItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelConfItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelConfItem() { set(id_E_RABs_ToBeReleased_RelConfItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_RelConfItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_RelConfItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelConfItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_RelConfItem& select_id_E_RABs_ToBeReleased_RelConfItem() { return set(1); } + E_RABs_ToBeReleased_RelConfItem const* get_id_E_RABs_ToBeReleased_RelConfItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_RelConfItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_RelConfItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelConfItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-List-RelConf ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-RelConfItemIEs} } +*/ + +struct E_RABs_ToBeReleased_List_RelConf_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_List_RelConf_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_List_RelConf : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-List-RelConf";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-RelReqItem-SCG-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItem_SCG_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-RelReqItem-SCG-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + uL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelReqItem-SCG-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItem_SCG_Bearer : asn::sequence<4, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelReqItem-SCG-Bearer";} + using parent_t = asn::sequence<4, 0, true, 3>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct uL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_Forwarding_GTPtunnelEndpoint_t& set_uL_Forwarding_GTPtunnelEndpoint() { uL_Forwarding_GTPtunnelEndpoint.setpresent(true); return uL_Forwarding_GTPtunnelEndpoint;} + uL_Forwarding_GTPtunnelEndpoint_t const* get_uL_Forwarding_GTPtunnelEndpoint() const {return uL_Forwarding_GTPtunnelEndpoint.is_valid() ? &uL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(uL_Forwarding_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(uL_Forwarding_GTPtunnelEndpoint); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + uL_Forwarding_GTPtunnelEndpoint.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + uL_Forwarding_GTPtunnelEndpoint_t uL_Forwarding_GTPtunnelEndpoint; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-RelReqItem-Split-BearerExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItem_Split_BearerExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-RelReqItem-Split-Bearer ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + dL-Forwarding-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-RelReqItem-Split-BearerExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItem_Split_Bearer : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelReqItem-Split-Bearer";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct dL_Forwarding_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_Forwarding_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_Forwarding_GTPtunnelEndpoint_t& set_dL_Forwarding_GTPtunnelEndpoint() { dL_Forwarding_GTPtunnelEndpoint.setpresent(true); return dL_Forwarding_GTPtunnelEndpoint;} + dL_Forwarding_GTPtunnelEndpoint_t const* get_dL_Forwarding_GTPtunnelEndpoint() const {return dL_Forwarding_GTPtunnelEndpoint.is_valid() ? &dL_Forwarding_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(dL_Forwarding_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + dL_Forwarding_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + dL_Forwarding_GTPtunnelEndpoint_t dL_Forwarding_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-RelReqItem ::= CHOICE { + sCG-Bearer E-RABs-ToBeReleased-RelReqItem-SCG-Bearer, + split-Bearer E-RABs-ToBeReleased-RelReqItem-Split-Bearer, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItem : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-RelReqItem";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~E_RABs_ToBeReleased_RelReqItem() {clear();} + struct sCG_Bearer_t : E_RABs_ToBeReleased_RelReqItem_SCG_Bearer + { + static constexpr const char* name() {return "sCG_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_RelReqItem_SCG_Bearer; + + }; + struct split_Bearer_t : E_RABs_ToBeReleased_RelReqItem_Split_Bearer + { + static constexpr const char* name() {return "split_Bearer_t";} + using parent_t = E_RABs_ToBeReleased_RelReqItem_Split_Bearer; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sCG_Bearer_t& select_sCG_Bearer() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sCG_Bearer_t const* get_sCG_Bearer() const { if(get_index() == 1) { return &var.as();} return nullptr; } + split_Bearer_t& select_split_Bearer() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + split_Bearer_t const* get_split_Bearer() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sCG_Bearer_t)]; + char dummy2[sizeof(split_Bearer_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +E-RABs-ToBeReleased-RelReqItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-RelReqItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-RelReqItem PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_RelReqItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelReqItem() { set(id_E_RABs_ToBeReleased_RelReqItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_RelReqItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_RelReqItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelReqItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_RelReqItem& select_id_E_RABs_ToBeReleased_RelReqItem() { return set(1); } + E_RABs_ToBeReleased_RelReqItem const* get_id_E_RABs_ToBeReleased_RelReqItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_RelReqItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_RelReqItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_RelReqItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-List-RelReq ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-RelReqItemIEs} } +*/ + +struct E_RABs_ToBeReleased_List_RelReq_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_List_RelReq_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_List_RelReq : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-List-RelReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-ModReqdItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqdItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-ModReqdItem ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-ModReqdItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqdItem : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-ModReqdItem";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + cause.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + cause_t cause; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-ModReqdItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-ModReqdItem CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqdItem PRESENCE mandatory }, + ... +} +*/ + +struct E_RABs_ToBeReleased_ModReqdItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqdItem() { set(id_E_RABs_ToBeReleased_ModReqdItem); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_ModReqdItem)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_ModReqdItem);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqdItem() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_ModReqdItem& select_id_E_RABs_ToBeReleased_ModReqdItem() { return set(1); } + E_RABs_ToBeReleased_ModReqdItem const* get_id_E_RABs_ToBeReleased_ModReqdItem() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_ModReqdItem()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_ModReqdItem)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_ModReqdItem() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-ModReqd ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-ModReqdItemIEs} } +*/ + +struct E_RABs_ToBeReleased_ModReqd_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_ModReqd_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_ModReqd : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-ModReqd";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPpresent : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct uL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_GTPtunnelEndpoint_t& set_uL_GTPtunnelEndpoint() { uL_GTPtunnelEndpoint.setpresent(true); return uL_GTPtunnelEndpoint;} + uL_GTPtunnelEndpoint_t const* get_uL_GTPtunnelEndpoint() const {return uL_GTPtunnelEndpoint.is_valid() ? &uL_GTPtunnelEndpoint : nullptr;} + struct dL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_GTPtunnelEndpoint_t& set_dL_GTPtunnelEndpoint() { dL_GTPtunnelEndpoint.setpresent(true); return dL_GTPtunnelEndpoint;} + dL_GTPtunnelEndpoint_t const* get_dL_GTPtunnelEndpoint() const {return dL_GTPtunnelEndpoint.is_valid() ? &dL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + uL_GTPtunnelEndpoint.clear(); + dL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + uL_GTPtunnelEndpoint_t uL_GTPtunnelEndpoint; + dL_GTPtunnelEndpoint_t dL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPnotpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBChaConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBChaConf-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBChaConf-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBChaConf_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConf-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBChaConf-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBChaConf-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBChaConf_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBChaConf_Item() { set(id_E_RABs_ToBeReleased_SgNBChaConf_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBChaConf_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBChaConf_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBChaConf_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBChaConf_Item& select_id_E_RABs_ToBeReleased_SgNBChaConf_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBChaConf_Item const* get_id_E_RABs_ToBeReleased_SgNBChaConf_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBChaConf_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBChaConf_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBChaConf_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBChaConfList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBChaConf-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBChaConfList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBChaConfList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBChaConfList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBChaConfList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresent ::= SEQUENCE { + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPpresent : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct dL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_GTPtunnelEndpoint_t& set_dL_GTPtunnelEndpoint() { dL_GTPtunnelEndpoint.setpresent(true); return dL_GTPtunnelEndpoint;} + dL_GTPtunnelEndpoint_t const* get_dL_GTPtunnelEndpoint() const {return dL_GTPtunnelEndpoint.is_valid() ? &dL_GTPtunnelEndpoint : nullptr;} + struct uL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_GTPtunnelEndpoint_t& set_uL_GTPtunnelEndpoint() { uL_GTPtunnelEndpoint.setpresent(true); return uL_GTPtunnelEndpoint;} + uL_GTPtunnelEndpoint_t const* get_uL_GTPtunnelEndpoint() const {return uL_GTPtunnelEndpoint.is_valid() ? &uL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(dL_GTPtunnelEndpoint); + v(uL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(dL_GTPtunnelEndpoint); + v(uL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + dL_GTPtunnelEndpoint.clear(); + uL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + dL_GTPtunnelEndpoint_t dL_GTPtunnelEndpoint; + uL_GTPtunnelEndpoint_t uL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPnotpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBModReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReq-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReq-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBModReq_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBModReq-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReq-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReq_Item() { set(id_E_RABs_ToBeReleased_SgNBModReq_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBModReq_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBModReq_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReq_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBModReq_Item& select_id_E_RABs_ToBeReleased_SgNBModReq_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBModReq_Item const* get_id_E_RABs_ToBeReleased_SgNBModReq_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBModReq_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBModReq_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReq_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReq-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBModReq-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBModReq_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBModReq_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBModReq_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReq-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBModReqd-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-RLCMode-transferred CRITICALITY ignore EXTENSION RLCMode PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReqd_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(id_RLCMode_transferred); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RLCMode_transferred)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RLCMode_transferred);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + RLCMode& select_id_RLCMode_transferred() { return set(1); } + RLCMode const* get_id_RLCMode_transferred() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RLCMode_transferred()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RLCMode)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RLCMode_transferred() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReqd-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBModReqd-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReqd_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReqd-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(cause); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + cause.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + cause_t cause; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBModReqd-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBModReqd-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReqd-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBModReqd_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReqd_Item() { set(id_E_RABs_ToBeReleased_SgNBModReqd_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBModReqd_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBModReqd_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReqd_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBModReqd_Item& select_id_E_RABs_ToBeReleased_SgNBModReqd_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBModReqd_Item const* get_id_E_RABs_ToBeReleased_SgNBModReqd_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBModReqd_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBModReqd_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBModReqd_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBModReqdList ::= SEQUENCE (SIZE (1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBModReqd-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBModReqdList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBModReqdList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBModReqdList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBModReqdList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPpresent : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct uL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_GTPtunnelEndpoint_t& set_uL_GTPtunnelEndpoint() { uL_GTPtunnelEndpoint.setpresent(true); return uL_GTPtunnelEndpoint;} + uL_GTPtunnelEndpoint_t const* get_uL_GTPtunnelEndpoint() const {return uL_GTPtunnelEndpoint.is_valid() ? &uL_GTPtunnelEndpoint : nullptr;} + struct dL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_GTPtunnelEndpoint_t& set_dL_GTPtunnelEndpoint() { dL_GTPtunnelEndpoint.setpresent(true); return dL_GTPtunnelEndpoint;} + dL_GTPtunnelEndpoint_t const* get_dL_GTPtunnelEndpoint() const {return dL_GTPtunnelEndpoint.is_valid() ? &dL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + uL_GTPtunnelEndpoint.clear(); + dL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + uL_GTPtunnelEndpoint_t uL_GTPtunnelEndpoint; + dL_GTPtunnelEndpoint_t dL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPnotpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBRelConf-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelConf-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelConf-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBRelConf_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConf-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBRelConf-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelConf-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelConf_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelConf_Item() { set(id_E_RABs_ToBeReleased_SgNBRelConf_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBRelConf_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelConf_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelConf_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBRelConf_Item& select_id_E_RABs_ToBeReleased_SgNBRelConf_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBRelConf_Item const* get_id_E_RABs_ToBeReleased_SgNBRelConf_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBRelConf_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBRelConf_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelConf_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelConfList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBRelConf-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBRelConfList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBRelConfList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBRelConfList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelConfList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresent ::= SEQUENCE { + uL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + dL-GTPtunnelEndpoint GTPtunnelEndpoint OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPpresent : asn::sequence<3, 0, true, 3> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresent";} + using parent_t = asn::sequence<3, 0, true, 3>; + struct uL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + uL_GTPtunnelEndpoint_t& set_uL_GTPtunnelEndpoint() { uL_GTPtunnelEndpoint.setpresent(true); return uL_GTPtunnelEndpoint;} + uL_GTPtunnelEndpoint_t const* get_uL_GTPtunnelEndpoint() const {return uL_GTPtunnelEndpoint.is_valid() ? &uL_GTPtunnelEndpoint : nullptr;} + struct dL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "dL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + static constexpr bool optional = true; + + }; + dL_GTPtunnelEndpoint_t& set_dL_GTPtunnelEndpoint() { dL_GTPtunnelEndpoint.setpresent(true); return dL_GTPtunnelEndpoint;} + dL_GTPtunnelEndpoint_t const* get_dL_GTPtunnelEndpoint() const {return dL_GTPtunnelEndpoint.is_valid() ? &dL_GTPtunnelEndpoint : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uL_GTPtunnelEndpoint); + v(dL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + uL_GTPtunnelEndpoint.clear(); + dL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + uL_GTPtunnelEndpoint_t uL_GTPtunnelEndpoint; + dL_GTPtunnelEndpoint_t dL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresentExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresentExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent ::= SEQUENCE { + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresentExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent : asn::sequence<1, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent";} + using parent_t = asn::sequence<1, 0, true, 1>; + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(iE_Extensions); + + }; + void clear() + { + iE_Extensions.clear(); + + }; + private: + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + en-DC-ResourceConfiguration EN-DC-ResourceConfiguration, + resource-configuration CHOICE { + sgNBPDCPpresent E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPpresent, + sgNBPDCPnotpresent E-RABs-ToBeReleased-SgNBRelReq-Item-SgNBPDCPnotpresent, + ... + }, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReq-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_Item : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReq-Item";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct en_DC_ResourceConfiguration_t : EN_DC_ResourceConfiguration + { + static constexpr const char* name() {return "en_DC_ResourceConfiguration_t";} + using parent_t = EN_DC_ResourceConfiguration; + + }; + en_DC_ResourceConfiguration_t& ref_en_DC_ResourceConfiguration() {return en_DC_ResourceConfiguration;} + en_DC_ResourceConfiguration_t const& ref_en_DC_ResourceConfiguration() const {return en_DC_ResourceConfiguration;} + struct resource_configuration_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "resource_configuration_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~resource_configuration_t() {clear();} + struct sgNBPDCPpresent_t : E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPpresent + { + static constexpr const char* name() {return "sgNBPDCPpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPpresent; + + }; + struct sgNBPDCPnotpresent_t : E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent + { + static constexpr const char* name() {return "sgNBPDCPnotpresent_t";} + using parent_t = E_RABs_ToBeReleased_SgNBRelReq_Item_SgNBPDCPnotpresent; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + sgNBPDCPpresent_t& select_sgNBPDCPpresent() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + sgNBPDCPpresent_t const* get_sgNBPDCPpresent() const { if(get_index() == 1) { return &var.as();} return nullptr; } + sgNBPDCPnotpresent_t& select_sgNBPDCPnotpresent() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + sgNBPDCPnotpresent_t const* get_sgNBPDCPnotpresent() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(sgNBPDCPpresent_t)]; + char dummy2[sizeof(sgNBPDCPnotpresent_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + resource_configuration_t& ref_resource_configuration() {return resource_configuration;} + resource_configuration_t const& ref_resource_configuration() const {return resource_configuration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(en_DC_ResourceConfiguration); + v(resource_configuration); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + en_DC_ResourceConfiguration.clear(); + resource_configuration.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + en_DC_ResourceConfiguration_t en_DC_ResourceConfiguration; + resource_configuration_t resource_configuration; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReq-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBRelReq-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReq-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReq_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReq_Item() { set(id_E_RABs_ToBeReleased_SgNBRelReq_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBRelReq_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelReq_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReq_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBRelReq_Item& select_id_E_RABs_ToBeReleased_SgNBRelReq_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBRelReq_Item const* get_id_E_RABs_ToBeReleased_SgNBRelReq_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBRelReq_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBRelReq_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReq_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReqList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBRelReq-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBRelReqList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBRelReqList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBRelReqList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReqList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReqd-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReqd_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReqd-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + rlc-Mode-transferred RLCMode, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeReleased-SgNBRelReqd-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReqd_Item : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReqd-Item";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct rlc_Mode_transferred_t : RLCMode + { + static constexpr const char* name() {return "rlc_Mode_transferred_t";} + using parent_t = RLCMode; + + }; + rlc_Mode_transferred_t& ref_rlc_Mode_transferred() {return rlc_Mode_transferred;} + rlc_Mode_transferred_t const& ref_rlc_Mode_transferred() const {return rlc_Mode_transferred;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(rlc_Mode_transferred); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(rlc_Mode_transferred); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + rlc_Mode_transferred.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + rlc_Mode_transferred_t rlc_Mode_transferred; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReqd-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeReleased-SgNBRelReqd-Item CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReqd-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeReleased_SgNBRelReqd_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqd_Item() { set(id_E_RABs_ToBeReleased_SgNBRelReqd_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeReleased_SgNBRelReqd_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelReqd_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqd_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeReleased_SgNBRelReqd_Item& select_id_E_RABs_ToBeReleased_SgNBRelReqd_Item() { return set(1); } + E_RABs_ToBeReleased_SgNBRelReqd_Item const* get_id_E_RABs_ToBeReleased_SgNBRelReqd_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeReleased_SgNBRelReqd_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeReleased_SgNBRelReqd_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqd_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeReleased-SgNBRelReqdList ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeReleased-SgNBRelReqd-ItemIEs} } +*/ + +struct E_RABs_ToBeReleased_SgNBRelReqdList_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeReleased_SgNBRelReqdList_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeReleased_SgNBRelReqdList : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeReleased-SgNBRelReqdList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeSetup-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, + ... +} +*/ + +struct E_RABs_ToBeSetup_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_BearerType() { set(id_BearerType); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_BearerType)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_BearerType);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_BearerType() { set(reject); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + BearerType& select_id_BearerType() { return set(1); } + BearerType const* get_id_BearerType() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_BearerType()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(BearerType)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_BearerType() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeSetup-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + dL-Forwarding DL-Forwarding OPTIONAL, + uL-GTPtunnelEndpoint GTPtunnelEndpoint, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeSetup-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeSetup_Item : asn::sequence<5, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeSetup-Item";} + using parent_t = asn::sequence<5, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct dL_Forwarding_t : DL_Forwarding + { + static constexpr const char* name() {return "dL_Forwarding_t";} + using parent_t = DL_Forwarding; + static constexpr bool optional = true; + + }; + dL_Forwarding_t& set_dL_Forwarding() { dL_Forwarding.setpresent(true); return dL_Forwarding;} + dL_Forwarding_t const* get_dL_Forwarding() const {return dL_Forwarding.is_valid() ? &dL_Forwarding : nullptr;} + struct uL_GTPtunnelEndpoint_t : GTPtunnelEndpoint + { + static constexpr const char* name() {return "uL_GTPtunnelEndpoint_t";} + using parent_t = GTPtunnelEndpoint; + + }; + uL_GTPtunnelEndpoint_t& ref_uL_GTPtunnelEndpoint() {return uL_GTPtunnelEndpoint;} + uL_GTPtunnelEndpoint_t const& ref_uL_GTPtunnelEndpoint() const {return uL_GTPtunnelEndpoint;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(uL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(dL_Forwarding); + v(uL_GTPtunnelEndpoint); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + dL_Forwarding.clear(); + uL_GTPtunnelEndpoint.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + dL_Forwarding_t dL_Forwarding; + uL_GTPtunnelEndpoint_t uL_GTPtunnelEndpoint; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeSetup-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeSetup-Item CRITICALITY ignore TYPE E-RABs-ToBeSetup-Item PRESENCE mandatory }, + ... +} +*/ + +struct E_RABs_ToBeSetup_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetup_Item() { set(id_E_RABs_ToBeSetup_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeSetup_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeSetup_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetup_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeSetup_Item& select_id_E_RABs_ToBeSetup_Item() { return set(1); } + E_RABs_ToBeSetup_Item const* get_id_E_RABs_ToBeSetup_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeSetup_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeSetup_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetup_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeSetup-ItemIEs} } +*/ + +struct E_RABs_ToBeSetup_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeSetup_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeSetup_List : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeSetup-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +E-RABs-ToBeSetupRetrieve-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-uL-GTPtunnelEndpoint CRITICALITY reject EXTENSION GTPtunnelEndpoint PRESENCE mandatory}| + { ID id-dL-Forwarding CRITICALITY ignore EXTENSION DL-Forwarding PRESENCE optional }, + ... +} +*/ + +struct E_RABs_ToBeSetupRetrieve_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uL_GTPtunnelEndpoint() { set(id_uL_GTPtunnelEndpoint); type=1;} + void select_id_dL_Forwarding() { set(id_dL_Forwarding); type=2;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_uL_GTPtunnelEndpoint)) { type = 1; return true; } + else if(equal(id_dL_Forwarding)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_uL_GTPtunnelEndpoint);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_dL_Forwarding);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uL_GTPtunnelEndpoint() { set(reject); type=1;} + void select_id_dL_Forwarding() { set(ignore); type=2;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + GTPtunnelEndpoint& select_id_uL_GTPtunnelEndpoint() { return set(1); } + GTPtunnelEndpoint const* get_id_uL_GTPtunnelEndpoint() const { return get(1); } + DL_Forwarding& select_id_dL_Forwarding() { return set(2); } + DL_Forwarding const* get_id_dL_Forwarding() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_uL_GTPtunnelEndpoint()); return true; + case 2: v(select_id_dL_Forwarding()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DL_Forwarding)]; + char dummy2[sizeof(GTPtunnelEndpoint)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_uL_GTPtunnelEndpoint() { set(mandatory); type=1;} + void select_id_dL_Forwarding() { set(optional); type=2;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeSetupRetrieve-Item ::= SEQUENCE { + e-RAB-ID E-RAB-ID, + e-RAB-Level-QoS-Parameters E-RAB-Level-QoS-Parameters, + bearerType BearerType OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {E-RABs-ToBeSetupRetrieve-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct E_RABs_ToBeSetupRetrieve_Item : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "E-RABs-ToBeSetupRetrieve-Item";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct e_RAB_ID_t : E_RAB_ID + { + static constexpr const char* name() {return "e_RAB_ID_t";} + using parent_t = E_RAB_ID; + + }; + e_RAB_ID_t& ref_e_RAB_ID() {return e_RAB_ID;} + e_RAB_ID_t const& ref_e_RAB_ID() const {return e_RAB_ID;} + struct e_RAB_Level_QoS_Parameters_t : E_RAB_Level_QoS_Parameters + { + static constexpr const char* name() {return "e_RAB_Level_QoS_Parameters_t";} + using parent_t = E_RAB_Level_QoS_Parameters; + + }; + e_RAB_Level_QoS_Parameters_t& ref_e_RAB_Level_QoS_Parameters() {return e_RAB_Level_QoS_Parameters;} + e_RAB_Level_QoS_Parameters_t const& ref_e_RAB_Level_QoS_Parameters() const {return e_RAB_Level_QoS_Parameters;} + struct bearerType_t : BearerType + { + static constexpr const char* name() {return "bearerType_t";} + using parent_t = BearerType; + static constexpr bool optional = true; + + }; + bearerType_t& set_bearerType() { bearerType.setpresent(true); return bearerType;} + bearerType_t const* get_bearerType() const {return bearerType.is_valid() ? &bearerType : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(bearerType); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(e_RAB_ID); + v(e_RAB_Level_QoS_Parameters); + v(bearerType); + v(iE_Extensions); + + }; + void clear() + { + e_RAB_ID.clear(); + e_RAB_Level_QoS_Parameters.clear(); + bearerType.clear(); + iE_Extensions.clear(); + + }; + private: + e_RAB_ID_t e_RAB_ID; + e_RAB_Level_QoS_Parameters_t e_RAB_Level_QoS_Parameters; + bearerType_t bearerType; + iE_Extensions_t iE_Extensions; + +}; +/* +E-RABs-ToBeSetupRetrieve-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-E-RABs-ToBeSetupRetrieve-Item CRITICALITY ignore TYPE E-RABs-ToBeSetupRetrieve-Item PRESENCE mandatory}, + ... +} +*/ + +struct E_RABs_ToBeSetupRetrieve_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetupRetrieve_Item() { set(id_E_RABs_ToBeSetupRetrieve_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_E_RABs_ToBeSetupRetrieve_Item)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_E_RABs_ToBeSetupRetrieve_Item);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetupRetrieve_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + E_RABs_ToBeSetupRetrieve_Item& select_id_E_RABs_ToBeSetupRetrieve_Item() { return set(1); } + E_RABs_ToBeSetupRetrieve_Item const* get_id_E_RABs_ToBeSetupRetrieve_Item() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_E_RABs_ToBeSetupRetrieve_Item()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_ToBeSetupRetrieve_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_E_RABs_ToBeSetupRetrieve_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +E-RABs-ToBeSetup-ListRetrieve ::= SEQUENCE (SIZE(1..maxnoofBearers)) OF ProtocolIE-Single-Container { {E-RABs-ToBeSetupRetrieve-ItemIEs} } +*/ + +struct E_RABs_ToBeSetup_ListRetrieve_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "E_RABs_ToBeSetup_ListRetrieve_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct E_RABs_ToBeSetup_ListRetrieve : asn::sequenceof +{ + static constexpr const char* name() {return "E-RABs-ToBeSetup-ListRetrieve";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENB-ENDCConfigUpdateAckIEs X2AP-PROTOCOL-IES ::= { + ... +} +*/ + +struct ENB_ENDCConfigUpdateAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +FDD-InfoNeighbourServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct FDD_InfoNeighbourServedNRCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +FDD-InfoNeighbourServedNRCell-Information ::= SEQUENCE { + ul-NRFreqInfo NRFreqInfo, + dl-NRFreqInfo NRFreqInfo, + iE-Extensions ProtocolExtensionContainer { {FDD-InfoNeighbourServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct FDD_InfoNeighbourServedNRCell_Information : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "FDD-InfoNeighbourServedNRCell-Information";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct ul_NRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "ul_NRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + ul_NRFreqInfo_t& ref_ul_NRFreqInfo() {return ul_NRFreqInfo;} + ul_NRFreqInfo_t const& ref_ul_NRFreqInfo() const {return ul_NRFreqInfo;} + struct dl_NRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "dl_NRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + dl_NRFreqInfo_t& ref_dl_NRFreqInfo() {return dl_NRFreqInfo;} + dl_NRFreqInfo_t const& ref_dl_NRFreqInfo() const {return dl_NRFreqInfo;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(ul_NRFreqInfo); + v(dl_NRFreqInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(ul_NRFreqInfo); + v(dl_NRFreqInfo); + v(iE_Extensions); + + }; + void clear() + { + ul_NRFreqInfo.clear(); + dl_NRFreqInfo.clear(); + iE_Extensions.clear(); + + }; + private: + ul_NRFreqInfo_t ul_NRFreqInfo; + dl_NRFreqInfo_t dl_NRFreqInfo; + iE_Extensions_t iE_Extensions; + +}; +/* +TDD-InfoNeighbourServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TDD_InfoNeighbourServedNRCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TDD-InfoNeighbourServedNRCell-Information ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + iE-Extensions ProtocolExtensionContainer { {TDD-InfoNeighbourServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TDD_InfoNeighbourServedNRCell_Information : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "TDD-InfoNeighbourServedNRCell-Information";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct nRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "nRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + nRFreqInfo_t& ref_nRFreqInfo() {return nRFreqInfo;} + nRFreqInfo_t const& ref_nRFreqInfo() const {return nRFreqInfo;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRFreqInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRFreqInfo); + v(iE_Extensions); + + }; + void clear() + { + nRFreqInfo.clear(); + iE_Extensions.clear(); + + }; + private: + nRFreqInfo_t nRFreqInfo; + iE_Extensions_t iE_Extensions; + +}; +/* +NRNeighbour-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct NRNeighbour_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +NRNeighbour-Information ::= SEQUENCE (SIZE (1.. maxofNRNeighbours))OF SEQUENCE { + nrpCI NRPCI, + nrCellID NRCGI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-TAC TAC OPTIONAL, + measurementTimingConfiguration OCTET STRING, + nRNeighbourModeInfo CHOICE { + fdd FDD-InfoNeighbourServedNRCell-Information, + tdd TDD-InfoNeighbourServedNRCell-Information, + ... + }, + iE-Extensions ProtocolExtensionContainer { {NRNeighbour-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct NRNeighbour_Information_elm : asn::sequence<7, 0, true, 3> +{ + static constexpr const char* name() {return "NRNeighbour_Information_elm";} + using parent_t = asn::sequence<7, 0, true, 3>; + struct nrpCI_t : NRPCI + { + static constexpr const char* name() {return "nrpCI_t";} + using parent_t = NRPCI; + + }; + nrpCI_t& ref_nrpCI() {return nrpCI;} + nrpCI_t const& ref_nrpCI() const {return nrpCI;} + struct nrCellID_t : NRCGI + { + static constexpr const char* name() {return "nrCellID_t";} + using parent_t = NRCGI; + + }; + nrCellID_t& ref_nrCellID() {return nrCellID;} + nrCellID_t const& ref_nrCellID() const {return nrCellID;} + struct fiveGS_TAC_t : FiveGS_TAC + { + static constexpr const char* name() {return "fiveGS_TAC_t";} + using parent_t = FiveGS_TAC; + static constexpr bool optional = true; + + }; + fiveGS_TAC_t& set_fiveGS_TAC() { fiveGS_TAC.setpresent(true); return fiveGS_TAC;} + fiveGS_TAC_t const* get_fiveGS_TAC() const {return fiveGS_TAC.is_valid() ? &fiveGS_TAC : nullptr;} + struct configured_TAC_t : TAC + { + static constexpr const char* name() {return "configured_TAC_t";} + using parent_t = TAC; + static constexpr bool optional = true; + + }; + configured_TAC_t& set_configured_TAC() { configured_TAC.setpresent(true); return configured_TAC;} + configured_TAC_t const* get_configured_TAC() const {return configured_TAC.is_valid() ? &configured_TAC : nullptr;} + struct measurementTimingConfiguration_t : asn::ostring<> + { + static constexpr const char* name() {return "measurementTimingConfiguration_t";} + using parent_t = asn::ostring<>; + + }; + + measurementTimingConfiguration_t& ref_measurementTimingConfiguration() {return measurementTimingConfiguration;} + measurementTimingConfiguration_t const& ref_measurementTimingConfiguration() const {return measurementTimingConfiguration;} + struct nRNeighbourModeInfo_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "nRNeighbourModeInfo_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~nRNeighbourModeInfo_t() {clear();} + struct fdd_t : FDD_InfoNeighbourServedNRCell_Information + { + static constexpr const char* name() {return "fdd_t";} + using parent_t = FDD_InfoNeighbourServedNRCell_Information; + + }; + struct tdd_t : TDD_InfoNeighbourServedNRCell_Information + { + static constexpr const char* name() {return "tdd_t";} + using parent_t = TDD_InfoNeighbourServedNRCell_Information; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + fdd_t& select_fdd() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + fdd_t const* get_fdd() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tdd_t& select_tdd() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tdd_t const* get_tdd() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(fdd_t)]; + char dummy2[sizeof(tdd_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + nRNeighbourModeInfo_t& ref_nRNeighbourModeInfo() {return nRNeighbourModeInfo;} + nRNeighbourModeInfo_t const& ref_nRNeighbourModeInfo() const {return nRNeighbourModeInfo;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nrpCI); + v(nrCellID); + v(fiveGS_TAC); + v(configured_TAC); + v(measurementTimingConfiguration); + v(nRNeighbourModeInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nrpCI); + v(nrCellID); + v(fiveGS_TAC); + v(configured_TAC); + v(measurementTimingConfiguration); + v(nRNeighbourModeInfo); + v(iE_Extensions); + + }; + void clear() + { + nrpCI.clear(); + nrCellID.clear(); + fiveGS_TAC.clear(); + configured_TAC.clear(); + measurementTimingConfiguration.clear(); + nRNeighbourModeInfo.clear(); + iE_Extensions.clear(); + + }; + private: + nrpCI_t nrpCI; + nrCellID_t nrCellID; + fiveGS_TAC_t fiveGS_TAC; + configured_TAC_t configured_TAC; + measurementTimingConfiguration_t measurementTimingConfiguration; + nRNeighbourModeInfo_t nRNeighbourModeInfo; + iE_Extensions_t iE_Extensions; + +}; +struct NRNeighbour_Information : asn::sequenceof +{ + static constexpr const char* name() {return "NRNeighbour-Information";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedEUTRAcellsENDCX2Management-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedEUTRAcellsENDCX2Management_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedEUTRAcellsENDCX2ManagementList ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + servedEUTRACellInfo ServedCell-Information, + nrNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedEUTRAcellsENDCX2Management-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedEUTRAcellsENDCX2ManagementList_elm : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "ServedEUTRAcellsENDCX2ManagementList_elm";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct servedEUTRACellInfo_t : ServedCell_Information + { + static constexpr const char* name() {return "servedEUTRACellInfo_t";} + using parent_t = ServedCell_Information; + + }; + servedEUTRACellInfo_t& ref_servedEUTRACellInfo() {return servedEUTRACellInfo;} + servedEUTRACellInfo_t const& ref_servedEUTRACellInfo() const {return servedEUTRACellInfo;} + struct nrNeighbourInfo_t : NRNeighbour_Information + { + static constexpr const char* name() {return "nrNeighbourInfo_t";} + using parent_t = NRNeighbour_Information; + static constexpr bool optional = true; + + }; + nrNeighbourInfo_t& set_nrNeighbourInfo() { nrNeighbourInfo.setpresent(true); return nrNeighbourInfo;} + nrNeighbourInfo_t const* get_nrNeighbourInfo() const {return nrNeighbourInfo.is_valid() ? &nrNeighbourInfo : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(servedEUTRACellInfo); + v(nrNeighbourInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(servedEUTRACellInfo); + v(nrNeighbourInfo); + v(iE_Extensions); + + }; + void clear() + { + servedEUTRACellInfo.clear(); + nrNeighbourInfo.clear(); + iE_Extensions.clear(); + + }; + private: + servedEUTRACellInfo_t servedEUTRACellInfo; + nrNeighbourInfo_t nrNeighbourInfo; + iE_Extensions_t iE_Extensions; + +}; +struct ServedEUTRAcellsENDCX2ManagementList : asn::sequenceof +{ + static constexpr const char* name() {return "ServedEUTRAcellsENDCX2ManagementList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedEUTRAcellsToModifyListENDCConfUpd-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedEUTRAcellsToModifyListENDCConfUpd_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedEUTRAcellsToModifyListENDCConfUpd ::= SEQUENCE (SIZE (1.. maxCellineNB)) OF SEQUENCE { + old-ECGI ECGI, + servedEUTRACellInfo ServedCell-Information, + nrNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedEUTRAcellsToModifyListENDCConfUpd-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedEUTRAcellsToModifyListENDCConfUpd_elm : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "ServedEUTRAcellsToModifyListENDCConfUpd_elm";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct old_ECGI_t : ECGI + { + static constexpr const char* name() {return "old_ECGI_t";} + using parent_t = ECGI; + + }; + old_ECGI_t& ref_old_ECGI() {return old_ECGI;} + old_ECGI_t const& ref_old_ECGI() const {return old_ECGI;} + struct servedEUTRACellInfo_t : ServedCell_Information + { + static constexpr const char* name() {return "servedEUTRACellInfo_t";} + using parent_t = ServedCell_Information; + + }; + servedEUTRACellInfo_t& ref_servedEUTRACellInfo() {return servedEUTRACellInfo;} + servedEUTRACellInfo_t const& ref_servedEUTRACellInfo() const {return servedEUTRACellInfo;} + struct nrNeighbourInfo_t : NRNeighbour_Information + { + static constexpr const char* name() {return "nrNeighbourInfo_t";} + using parent_t = NRNeighbour_Information; + static constexpr bool optional = true; + + }; + nrNeighbourInfo_t& set_nrNeighbourInfo() { nrNeighbourInfo.setpresent(true); return nrNeighbourInfo;} + nrNeighbourInfo_t const* get_nrNeighbourInfo() const {return nrNeighbourInfo.is_valid() ? &nrNeighbourInfo : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(old_ECGI); + v(servedEUTRACellInfo); + v(nrNeighbourInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(old_ECGI); + v(servedEUTRACellInfo); + v(nrNeighbourInfo); + v(iE_Extensions); + + }; + void clear() + { + old_ECGI.clear(); + servedEUTRACellInfo.clear(); + nrNeighbourInfo.clear(); + iE_Extensions.clear(); + + }; + private: + old_ECGI_t old_ECGI; + servedEUTRACellInfo_t servedEUTRACellInfo; + nrNeighbourInfo_t nrNeighbourInfo; + iE_Extensions_t iE_Extensions; + +}; +struct ServedEUTRAcellsToModifyListENDCConfUpd : asn::sequenceof +{ + static constexpr const char* name() {return "ServedEUTRAcellsToModifyListENDCConfUpd";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedEUTRAcellsToDeleteListENDCConfUpd ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI +*/ + +struct ServedEUTRAcellsToDeleteListENDCConfUpd_elm : ECGI +{ + static constexpr const char* name() {return "ServedEUTRAcellsToDeleteListENDCConfUpd_elm";} + using parent_t = ECGI; + +}; +struct ServedEUTRAcellsToDeleteListENDCConfUpd : asn::sequenceof +{ + static constexpr const char* name() {return "ServedEUTRAcellsToDeleteListENDCConfUpd";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENB-ENDCConfigUpdateIEs X2AP-PROTOCOL-IES ::= { + { ID id-CellAssistanceInformation CRITICALITY reject TYPE CellAssistanceInformation PRESENCE optional }| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE optional }| + { ID id-ServedEUTRAcellsToModifyListENDCConfUpd CRITICALITY reject TYPE ServedEUTRAcellsToModifyListENDCConfUpd PRESENCE optional }| + { ID id-ServedEUTRAcellsToDeleteListENDCConfUpd CRITICALITY reject TYPE ServedEUTRAcellsToDeleteListENDCConfUpd PRESENCE optional }, + ... +} +*/ + +struct ENB_ENDCConfigUpdateIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_CellAssistanceInformation() { set(id_CellAssistanceInformation); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(id_ServedEUTRAcellsENDCX2ManagementList); type=2;} + void select_id_ServedEUTRAcellsToModifyListENDCConfUpd() { set(id_ServedEUTRAcellsToModifyListENDCConfUpd); type=3;} + void select_id_ServedEUTRAcellsToDeleteListENDCConfUpd() { set(id_ServedEUTRAcellsToDeleteListENDCConfUpd); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CellAssistanceInformation)) { type = 1; return true; } + else if(equal(id_ServedEUTRAcellsENDCX2ManagementList)) { type = 2; return true; } + else if(equal(id_ServedEUTRAcellsToModifyListENDCConfUpd)) { type = 3; return true; } + else if(equal(id_ServedEUTRAcellsToDeleteListENDCConfUpd)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CellAssistanceInformation);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedEUTRAcellsENDCX2ManagementList);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ServedEUTRAcellsToModifyListENDCConfUpd);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ServedEUTRAcellsToDeleteListENDCConfUpd);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_CellAssistanceInformation() { set(reject); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(reject); type=2;} + void select_id_ServedEUTRAcellsToModifyListENDCConfUpd() { set(reject); type=3;} + void select_id_ServedEUTRAcellsToDeleteListENDCConfUpd() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CellAssistanceInformation& select_id_CellAssistanceInformation() { return set(1); } + CellAssistanceInformation const* get_id_CellAssistanceInformation() const { return get(1); } + ServedEUTRAcellsENDCX2ManagementList& select_id_ServedEUTRAcellsENDCX2ManagementList() { return set(2); } + ServedEUTRAcellsENDCX2ManagementList const* get_id_ServedEUTRAcellsENDCX2ManagementList() const { return get(2); } + ServedEUTRAcellsToModifyListENDCConfUpd& select_id_ServedEUTRAcellsToModifyListENDCConfUpd() { return set(3); } + ServedEUTRAcellsToModifyListENDCConfUpd const* get_id_ServedEUTRAcellsToModifyListENDCConfUpd() const { return get(3); } + ServedEUTRAcellsToDeleteListENDCConfUpd& select_id_ServedEUTRAcellsToDeleteListENDCConfUpd() { return set(4); } + ServedEUTRAcellsToDeleteListENDCConfUpd const* get_id_ServedEUTRAcellsToDeleteListENDCConfUpd() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CellAssistanceInformation()); return true; + case 2: v(select_id_ServedEUTRAcellsENDCX2ManagementList()); return true; + case 3: v(select_id_ServedEUTRAcellsToModifyListENDCConfUpd()); return true; + case 4: v(select_id_ServedEUTRAcellsToDeleteListENDCConfUpd()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellAssistanceInformation)]; + char dummy2[sizeof(ServedEUTRAcellsENDCX2ManagementList)]; + char dummy3[sizeof(ServedEUTRAcellsToDeleteListENDCConfUpd)]; + char dummy4[sizeof(ServedEUTRAcellsToModifyListENDCConfUpd)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_CellAssistanceInformation() { set(optional); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(optional); type=2;} + void select_id_ServedEUTRAcellsToModifyListENDCConfUpd() { set(optional); type=3;} + void select_id_ServedEUTRAcellsToDeleteListENDCConfUpd() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENB-ENDCX2RemovalReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, + ... +} +*/ + +struct ENB_ENDCX2RemovalReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENB-ENDCX2RemovalReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, + ... +} +*/ + +struct ENB_ENDCX2RemovalReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENB-ENDCX2SetupReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} +*/ + +struct ENB_ENDCX2SetupReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(id_ServedEUTRAcellsENDCX2ManagementList); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_ServedEUTRAcellsENDCX2ManagementList)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedEUTRAcellsENDCX2ManagementList);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + ServedEUTRAcellsENDCX2ManagementList& select_id_ServedEUTRAcellsENDCX2ManagementList() { return set(2); } + ServedEUTRAcellsENDCX2ManagementList const* get_id_ServedEUTRAcellsENDCX2ManagementList() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_ServedEUTRAcellsENDCX2ManagementList()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + char dummy2[sizeof(ServedEUTRAcellsENDCX2ManagementList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENB-ENDCX2SetupReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedEUTRAcellsENDCX2ManagementList CRITICALITY reject TYPE ServedEUTRAcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} +*/ + +struct ENB_ENDCX2SetupReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(id_ServedEUTRAcellsENDCX2ManagementList); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_ServedEUTRAcellsENDCX2ManagementList)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedEUTRAcellsENDCX2ManagementList);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + ServedEUTRAcellsENDCX2ManagementList& select_id_ServedEUTRAcellsENDCX2ManagementList() { return set(2); } + ServedEUTRAcellsENDCX2ManagementList const* get_id_ServedEUTRAcellsENDCX2ManagementList() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_ServedEUTRAcellsENDCX2ManagementList()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + char dummy2[sizeof(ServedEUTRAcellsENDCX2ManagementList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_ServedEUTRAcellsENDCX2ManagementList() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ListofEUTRACellsinEUTRACoordinationResp ::= SEQUENCE (SIZE (0..maxCellineNB)) OF ECGI +*/ + +struct ListofEUTRACellsinEUTRACoordinationResp_elm : ECGI +{ + static constexpr const char* name() {return "ListofEUTRACellsinEUTRACoordinationResp_elm";} + using parent_t = ECGI; + +}; +struct ListofEUTRACellsinEUTRACoordinationResp : asn::sequenceof +{ + static constexpr const char* name() {return "ListofEUTRACellsinEUTRACoordinationResp";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENB-EUTRA-NRCellResourceCoordinationReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofEUTRACellsinEUTRACoordinationResp CRITICALITY reject TYPE ListofEUTRACellsinEUTRACoordinationResp PRESENCE mandatory}, + ... +} +*/ + +struct ENB_EUTRA_NRCellResourceCoordinationReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(id_DataTrafficResourceIndication); type=1;} + void select_id_SpectrumSharingGroupID() { set(id_SpectrumSharingGroupID); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationResp() { set(id_ListofEUTRACellsinEUTRACoordinationResp); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DataTrafficResourceIndication)) { type = 1; return true; } + else if(equal(id_SpectrumSharingGroupID)) { type = 2; return true; } + else if(equal(id_ListofEUTRACellsinEUTRACoordinationResp)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DataTrafficResourceIndication);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SpectrumSharingGroupID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ListofEUTRACellsinEUTRACoordinationResp);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(reject); type=1;} + void select_id_SpectrumSharingGroupID() { set(reject); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationResp() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + DataTrafficResourceIndication& select_id_DataTrafficResourceIndication() { return set(1); } + DataTrafficResourceIndication const* get_id_DataTrafficResourceIndication() const { return get(1); } + SpectrumSharingGroupID& select_id_SpectrumSharingGroupID() { return set(2); } + SpectrumSharingGroupID const* get_id_SpectrumSharingGroupID() const { return get(2); } + ListofEUTRACellsinEUTRACoordinationResp& select_id_ListofEUTRACellsinEUTRACoordinationResp() { return set(3); } + ListofEUTRACellsinEUTRACoordinationResp const* get_id_ListofEUTRACellsinEUTRACoordinationResp() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DataTrafficResourceIndication()); return true; + case 2: v(select_id_SpectrumSharingGroupID()); return true; + case 3: v(select_id_ListofEUTRACellsinEUTRACoordinationResp()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DataTrafficResourceIndication)]; + char dummy2[sizeof(ListofEUTRACellsinEUTRACoordinationResp)]; + char dummy3[sizeof(SpectrumSharingGroupID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(mandatory); type=1;} + void select_id_SpectrumSharingGroupID() { set(mandatory); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationResp() { set(mandatory); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ListofEUTRACellsinEUTRACoordinationReq ::= SEQUENCE (SIZE (0..maxCellineNB)) OF ECGI +*/ + +struct ListofEUTRACellsinEUTRACoordinationReq_elm : ECGI +{ + static constexpr const char* name() {return "ListofEUTRACellsinEUTRACoordinationReq_elm";} + using parent_t = ECGI; + +}; +struct ListofEUTRACellsinEUTRACoordinationReq : asn::sequenceof +{ + static constexpr const char* name() {return "ListofEUTRACellsinEUTRACoordinationReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENB-EUTRA-NRCellResourceCoordinationReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofEUTRACellsinEUTRACoordinationReq CRITICALITY reject TYPE ListofEUTRACellsinEUTRACoordinationReq PRESENCE mandatory}, + ... +} +*/ + +struct ENB_EUTRA_NRCellResourceCoordinationReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(id_DataTrafficResourceIndication); type=1;} + void select_id_SpectrumSharingGroupID() { set(id_SpectrumSharingGroupID); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationReq() { set(id_ListofEUTRACellsinEUTRACoordinationReq); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DataTrafficResourceIndication)) { type = 1; return true; } + else if(equal(id_SpectrumSharingGroupID)) { type = 2; return true; } + else if(equal(id_ListofEUTRACellsinEUTRACoordinationReq)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DataTrafficResourceIndication);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SpectrumSharingGroupID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ListofEUTRACellsinEUTRACoordinationReq);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(reject); type=1;} + void select_id_SpectrumSharingGroupID() { set(reject); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationReq() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + DataTrafficResourceIndication& select_id_DataTrafficResourceIndication() { return set(1); } + DataTrafficResourceIndication const* get_id_DataTrafficResourceIndication() const { return get(1); } + SpectrumSharingGroupID& select_id_SpectrumSharingGroupID() { return set(2); } + SpectrumSharingGroupID const* get_id_SpectrumSharingGroupID() const { return get(2); } + ListofEUTRACellsinEUTRACoordinationReq& select_id_ListofEUTRACellsinEUTRACoordinationReq() { return set(3); } + ListofEUTRACellsinEUTRACoordinationReq const* get_id_ListofEUTRACellsinEUTRACoordinationReq() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DataTrafficResourceIndication()); return true; + case 2: v(select_id_SpectrumSharingGroupID()); return true; + case 3: v(select_id_ListofEUTRACellsinEUTRACoordinationReq()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DataTrafficResourceIndication)]; + char dummy2[sizeof(ListofEUTRACellsinEUTRACoordinationReq)]; + char dummy3[sizeof(SpectrumSharingGroupID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(mandatory); type=1;} + void select_id_SpectrumSharingGroupID() { set(mandatory); type=2;} + void select_id_ListofEUTRACellsinEUTRACoordinationReq() { set(mandatory); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedCellsToModify-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-DeactivationIndication CRITICALITY ignore EXTENSION DeactivationIndication PRESENCE optional }, + ... +} +*/ + +struct ServedCellsToModify_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_DeactivationIndication() { set(id_DeactivationIndication); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DeactivationIndication)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DeactivationIndication);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_DeactivationIndication() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + DeactivationIndication& select_id_DeactivationIndication() { return set(1); } + DeactivationIndication const* get_id_DeactivationIndication() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DeactivationIndication()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DeactivationIndication)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_DeactivationIndication() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedCellsToModify-Item::= SEQUENCE { + old-ecgi ECGI, + servedCellInfo ServedCell-Information, + neighbour-Info Neighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedCellsToModify-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedCellsToModify_Item : asn::sequence<4, 0, true, 2> +{ + static constexpr const char* name() {return "ServedCellsToModify-Item";} + using parent_t = asn::sequence<4, 0, true, 2>; + struct old_ecgi_t : ECGI + { + static constexpr const char* name() {return "old_ecgi_t";} + using parent_t = ECGI; + + }; + old_ecgi_t& ref_old_ecgi() {return old_ecgi;} + old_ecgi_t const& ref_old_ecgi() const {return old_ecgi;} + struct servedCellInfo_t : ServedCell_Information + { + static constexpr const char* name() {return "servedCellInfo_t";} + using parent_t = ServedCell_Information; + + }; + servedCellInfo_t& ref_servedCellInfo() {return servedCellInfo;} + servedCellInfo_t const& ref_servedCellInfo() const {return servedCellInfo;} + struct neighbour_Info_t : Neighbour_Information + { + static constexpr const char* name() {return "neighbour_Info_t";} + using parent_t = Neighbour_Information; + static constexpr bool optional = true; + + }; + neighbour_Info_t& set_neighbour_Info() { neighbour_Info.setpresent(true); return neighbour_Info;} + neighbour_Info_t const* get_neighbour_Info() const {return neighbour_Info.is_valid() ? &neighbour_Info : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(old_ecgi); + v(servedCellInfo); + v(neighbour_Info); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(old_ecgi); + v(servedCellInfo); + v(neighbour_Info); + v(iE_Extensions); + + }; + void clear() + { + old_ecgi.clear(); + servedCellInfo.clear(); + neighbour_Info.clear(); + iE_Extensions.clear(); + + }; + private: + old_ecgi_t old_ecgi; + servedCellInfo_t servedCellInfo; + neighbour_Info_t neighbour_Info; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedCellsToModify::= SEQUENCE (SIZE (1..maxCellineNB)) OF ServedCellsToModify-Item +*/ + +struct ServedCellsToModify_elm : ServedCellsToModify_Item +{ + static constexpr const char* name() {return "ServedCellsToModify_elm";} + using parent_t = ServedCellsToModify_Item; + +}; +struct ServedCellsToModify : asn::sequenceof +{ + static constexpr const char* name() {return "ServedCellsToModify";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +Old-ECGIs::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI +*/ + +struct Old_ECGIs_elm : ECGI +{ + static constexpr const char* name() {return "Old_ECGIs_elm";} + using parent_t = ECGI; + +}; +struct Old_ECGIs : asn::sequenceof +{ + static constexpr const char* name() {return "Old-ECGIs";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENBConfigurationUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedCellsToAdd CRITICALITY reject TYPE ServedCells PRESENCE optional}| + { ID id-ServedCellsToModify CRITICALITY reject TYPE ServedCellsToModify PRESENCE optional}| + { ID id-ServedCellsToDelete CRITICALITY reject TYPE Old-ECGIs PRESENCE optional}| + { ID id-GUGroupIDToAddList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-GUGroupIDToDeleteList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-CoverageModificationList CRITICALITY reject TYPE CoverageModificationList PRESENCE optional}, + ... +} +*/ + +struct ENBConfigurationUpdate_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ServedCellsToAdd() { set(id_ServedCellsToAdd); type=1;} + void select_id_ServedCellsToModify() { set(id_ServedCellsToModify); type=2;} + void select_id_ServedCellsToDelete() { set(id_ServedCellsToDelete); type=3;} + void select_id_GUGroupIDToAddList() { set(id_GUGroupIDToAddList); type=4;} + void select_id_GUGroupIDToDeleteList() { set(id_GUGroupIDToDeleteList); type=5;} + void select_id_CoverageModificationList() { set(id_CoverageModificationList); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ServedCellsToAdd)) { type = 1; return true; } + else if(equal(id_ServedCellsToModify)) { type = 2; return true; } + else if(equal(id_ServedCellsToDelete)) { type = 3; return true; } + else if(equal(id_GUGroupIDToAddList)) { type = 4; return true; } + else if(equal(id_GUGroupIDToDeleteList)) { type = 5; return true; } + else if(equal(id_CoverageModificationList)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ServedCellsToAdd);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedCellsToModify);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ServedCellsToDelete);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_GUGroupIDToAddList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_GUGroupIDToDeleteList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_CoverageModificationList);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ServedCellsToAdd() { set(reject); type=1;} + void select_id_ServedCellsToModify() { set(reject); type=2;} + void select_id_ServedCellsToDelete() { set(reject); type=3;} + void select_id_GUGroupIDToAddList() { set(reject); type=4;} + void select_id_GUGroupIDToDeleteList() { set(reject); type=5;} + void select_id_CoverageModificationList() { set(reject); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ServedCells& select_id_ServedCellsToAdd() { return set(1); } + ServedCells const* get_id_ServedCellsToAdd() const { return get(1); } + ServedCellsToModify& select_id_ServedCellsToModify() { return set(2); } + ServedCellsToModify const* get_id_ServedCellsToModify() const { return get(2); } + Old_ECGIs& select_id_ServedCellsToDelete() { return set(3); } + Old_ECGIs const* get_id_ServedCellsToDelete() const { return get(3); } + GUGroupIDList& select_id_GUGroupIDToAddList() { return set(4); } + GUGroupIDList const* get_id_GUGroupIDToAddList() const { return get(4); } + GUGroupIDList& select_id_GUGroupIDToDeleteList() { return set(5); } + GUGroupIDList const* get_id_GUGroupIDToDeleteList() const { return get(5); } + CoverageModificationList& select_id_CoverageModificationList() { return set(6); } + CoverageModificationList const* get_id_CoverageModificationList() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ServedCellsToAdd()); return true; + case 2: v(select_id_ServedCellsToModify()); return true; + case 3: v(select_id_ServedCellsToDelete()); return true; + case 4: v(select_id_GUGroupIDToAddList()); return true; + case 5: v(select_id_GUGroupIDToDeleteList()); return true; + case 6: v(select_id_CoverageModificationList()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CoverageModificationList)]; + char dummy2[sizeof(GUGroupIDList)]; + char dummy3[sizeof(Old_ECGIs)]; + char dummy4[sizeof(ServedCells)]; + char dummy5[sizeof(ServedCellsToModify)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_ServedCellsToAdd() { set(optional); type=1;} + void select_id_ServedCellsToModify() { set(optional); type=2;} + void select_id_ServedCellsToDelete() { set(optional); type=3;} + void select_id_GUGroupIDToAddList() { set(optional); type=4;} + void select_id_GUGroupIDToDeleteList() { set(optional); type=5;} + void select_id_CoverageModificationList() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENBConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdate-IEs}}, + ... +} +*/ + +struct ENBConfigurationUpdate : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENBConfigurationUpdate";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENBConfigurationUpdateAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, +... +} +*/ + +struct ENBConfigurationUpdateAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CriticalityDiagnostics)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(1); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CriticalityDiagnostics()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(optional); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENBConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdateAcknowledge-IEs}}, + ... +} +*/ + +struct ENBConfigurationUpdateAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENBConfigurationUpdateAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENBConfigurationUpdateFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct ENBConfigurationUpdateFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_TimeToWait() { set(id_TimeToWait); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_TimeToWait)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_TimeToWait);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_TimeToWait() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + TimeToWait& select_id_TimeToWait() { return set(2); } + TimeToWait const* get_id_TimeToWait() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_TimeToWait()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(TimeToWait)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_TimeToWait() { set(optional); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENBConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENBConfigurationUpdateFailure-IEs}}, + ... +} +*/ + +struct ENBConfigurationUpdateFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENBConfigurationUpdateFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCCellActivationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory }| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +*/ + +struct ENDCCellActivationFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivationID() { set(id_ActivationID); type=1;} + void select_id_Cause() { set(id_Cause); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ActivationID)) { type = 1; return true; } + else if(equal(id_Cause)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ActivationID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivationID() { set(reject); type=1;} + void select_id_Cause() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ActivationID& select_id_ActivationID() { return set(1); } + ActivationID const* get_id_ActivationID() const { return get(1); } + Cause& select_id_Cause() { return set(2); } + Cause const* get_id_Cause() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ActivationID()); return true; + case 2: v(select_id_Cause()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ActivationID)]; + char dummy2[sizeof(Cause)]; + char dummy3[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivationID() { set(mandatory); type=1;} + void select_id_Cause() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCCellActivationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationFailure-IEs}}, + ... +} +*/ + +struct ENDCCellActivationFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCCellActivationFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ServedNRCellsToActivate-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedNRCellsToActivate_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedNRCellsToActivate-Item::= SEQUENCE { + nrCellID NRCGI, + iE-Extensions ProtocolExtensionContainer { {ServedNRCellsToActivate-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedNRCellsToActivate_Item : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ServedNRCellsToActivate-Item";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct nrCellID_t : NRCGI + { + static constexpr const char* name() {return "nrCellID_t";} + using parent_t = NRCGI; + + }; + nrCellID_t& ref_nrCellID() {return nrCellID;} + nrCellID_t const& ref_nrCellID() const {return nrCellID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nrCellID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nrCellID); + v(iE_Extensions); + + }; + void clear() + { + nrCellID.clear(); + iE_Extensions.clear(); + + }; + private: + nrCellID_t nrCellID; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedNRCellsToActivate::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF ServedNRCellsToActivate-Item +*/ + +struct ServedNRCellsToActivate_elm : ServedNRCellsToActivate_Item +{ + static constexpr const char* name() {return "ServedNRCellsToActivate_elm";} + using parent_t = ServedNRCellsToActivate_Item; + +}; +struct ServedNRCellsToActivate : asn::sequenceof +{ + static constexpr const char* name() {return "ServedNRCellsToActivate";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ENDCCellActivationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRCellsToActivate CRITICALITY reject TYPE ServedNRCellsToActivate PRESENCE mandatory}| + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory}, + ... +} +*/ + +struct ENDCCellActivationRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ServedNRCellsToActivate() { set(id_ServedNRCellsToActivate); type=1;} + void select_id_ActivationID() { set(id_ActivationID); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ServedNRCellsToActivate)) { type = 1; return true; } + else if(equal(id_ActivationID)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ServedNRCellsToActivate);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ActivationID);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ServedNRCellsToActivate() { set(reject); type=1;} + void select_id_ActivationID() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ServedNRCellsToActivate& select_id_ServedNRCellsToActivate() { return set(1); } + ServedNRCellsToActivate const* get_id_ServedNRCellsToActivate() const { return get(1); } + ActivationID& select_id_ActivationID() { return set(2); } + ActivationID const* get_id_ActivationID() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ServedNRCellsToActivate()); return true; + case 2: v(select_id_ActivationID()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ActivationID)]; + char dummy2[sizeof(ServedNRCellsToActivate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_ServedNRCellsToActivate() { set(mandatory); type=1;} + void select_id_ActivationID() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCCellActivationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationRequest-IEs}}, + ... +} +*/ + +struct ENDCCellActivationRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCCellActivationRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCCellActivationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ActivatedNRCellList CRITICALITY ignore TYPE ActivatedNRCellList PRESENCE mandatory}| + { ID id-ActivationID CRITICALITY reject TYPE ActivationID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct ENDCCellActivationResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivatedNRCellList() { set(id_ActivatedNRCellList); type=1;} + void select_id_ActivationID() { set(id_ActivationID); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ActivatedNRCellList)) { type = 1; return true; } + else if(equal(id_ActivationID)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ActivatedNRCellList);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ActivationID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivatedNRCellList() { set(ignore); type=1;} + void select_id_ActivationID() { set(reject); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ActivatedNRCellList& select_id_ActivatedNRCellList() { return set(1); } + ActivatedNRCellList const* get_id_ActivatedNRCellList() const { return get(1); } + ActivationID& select_id_ActivationID() { return set(2); } + ActivationID const* get_id_ActivationID() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ActivatedNRCellList()); return true; + case 2: v(select_id_ActivationID()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ActivatedNRCellList)]; + char dummy2[sizeof(ActivationID)]; + char dummy3[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ActivatedNRCellList() { set(mandatory); type=1;} + void select_id_ActivationID() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCCellActivationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCCellActivationResponse-IEs}}, + ... +} +*/ + +struct ENDCCellActivationResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCCellActivationResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +FDD-InfoServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct FDD_InfoServedNRCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +FDD-InfoServedNRCell-Information ::= SEQUENCE { + ul-NRFreqInfo NRFreqInfo, + dl-NRFreqInfo NRFreqInfo, + ul-NR-TxBW NR-TxBW, + dl-NR-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {FDD-InfoServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct FDD_InfoServedNRCell_Information : asn::sequence<5, 0, true, 1> +{ + static constexpr const char* name() {return "FDD-InfoServedNRCell-Information";} + using parent_t = asn::sequence<5, 0, true, 1>; + struct ul_NRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "ul_NRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + ul_NRFreqInfo_t& ref_ul_NRFreqInfo() {return ul_NRFreqInfo;} + ul_NRFreqInfo_t const& ref_ul_NRFreqInfo() const {return ul_NRFreqInfo;} + struct dl_NRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "dl_NRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + dl_NRFreqInfo_t& ref_dl_NRFreqInfo() {return dl_NRFreqInfo;} + dl_NRFreqInfo_t const& ref_dl_NRFreqInfo() const {return dl_NRFreqInfo;} + struct ul_NR_TxBW_t : NR_TxBW + { + static constexpr const char* name() {return "ul_NR_TxBW_t";} + using parent_t = NR_TxBW; + + }; + ul_NR_TxBW_t& ref_ul_NR_TxBW() {return ul_NR_TxBW;} + ul_NR_TxBW_t const& ref_ul_NR_TxBW() const {return ul_NR_TxBW;} + struct dl_NR_TxBW_t : NR_TxBW + { + static constexpr const char* name() {return "dl_NR_TxBW_t";} + using parent_t = NR_TxBW; + + }; + dl_NR_TxBW_t& ref_dl_NR_TxBW() {return dl_NR_TxBW;} + dl_NR_TxBW_t const& ref_dl_NR_TxBW() const {return dl_NR_TxBW;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(ul_NRFreqInfo); + v(dl_NRFreqInfo); + v(ul_NR_TxBW); + v(dl_NR_TxBW); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(ul_NRFreqInfo); + v(dl_NRFreqInfo); + v(ul_NR_TxBW); + v(dl_NR_TxBW); + v(iE_Extensions); + + }; + void clear() + { + ul_NRFreqInfo.clear(); + dl_NRFreqInfo.clear(); + ul_NR_TxBW.clear(); + dl_NR_TxBW.clear(); + iE_Extensions.clear(); + + }; + private: + ul_NRFreqInfo_t ul_NRFreqInfo; + dl_NRFreqInfo_t dl_NRFreqInfo; + ul_NR_TxBW_t ul_NR_TxBW; + dl_NR_TxBW_t dl_NR_TxBW; + iE_Extensions_t iE_Extensions; + +}; +/* +TDD-InfoServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct TDD_InfoServedNRCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +TDD-InfoServedNRCell-Information ::= SEQUENCE { + nRFreqInfo NRFreqInfo, + nR-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {TDD-InfoServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct TDD_InfoServedNRCell_Information : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "TDD-InfoServedNRCell-Information";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct nRFreqInfo_t : NRFreqInfo + { + static constexpr const char* name() {return "nRFreqInfo_t";} + using parent_t = NRFreqInfo; + + }; + nRFreqInfo_t& ref_nRFreqInfo() {return nRFreqInfo;} + nRFreqInfo_t const& ref_nRFreqInfo() const {return nRFreqInfo;} + struct nR_TxBW_t : NR_TxBW + { + static constexpr const char* name() {return "nR_TxBW_t";} + using parent_t = NR_TxBW; + + }; + nR_TxBW_t& ref_nR_TxBW() {return nR_TxBW;} + nR_TxBW_t const& ref_nR_TxBW() const {return nR_TxBW;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRFreqInfo); + v(nR_TxBW); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRFreqInfo); + v(nR_TxBW); + v(iE_Extensions); + + }; + void clear() + { + nRFreqInfo.clear(); + nR_TxBW.clear(); + iE_Extensions.clear(); + + }; + private: + nRFreqInfo_t nRFreqInfo; + nR_TxBW_t nR_TxBW; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedNRCell-Information-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedNRCell_Information_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedNRCell-Information ::= SEQUENCE { + nrpCI NRPCI, + nrCellID NRCGI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-TAC TAC OPTIONAL, + broadcastPLMNs BroadcastPLMNs-Item, + nrModeInfo CHOICE { + fdd FDD-InfoServedNRCell-Information, + tdd TDD-InfoServedNRCell-Information, + ... + }, + measurementTimingConfiguration OCTET STRING, + iE-Extensions ProtocolExtensionContainer { {ServedNRCell-Information-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedNRCell_Information : asn::sequence<8, 0, true, 3> +{ + static constexpr const char* name() {return "ServedNRCell-Information";} + using parent_t = asn::sequence<8, 0, true, 3>; + struct nrpCI_t : NRPCI + { + static constexpr const char* name() {return "nrpCI_t";} + using parent_t = NRPCI; + + }; + nrpCI_t& ref_nrpCI() {return nrpCI;} + nrpCI_t const& ref_nrpCI() const {return nrpCI;} + struct nrCellID_t : NRCGI + { + static constexpr const char* name() {return "nrCellID_t";} + using parent_t = NRCGI; + + }; + nrCellID_t& ref_nrCellID() {return nrCellID;} + nrCellID_t const& ref_nrCellID() const {return nrCellID;} + struct fiveGS_TAC_t : FiveGS_TAC + { + static constexpr const char* name() {return "fiveGS_TAC_t";} + using parent_t = FiveGS_TAC; + static constexpr bool optional = true; + + }; + fiveGS_TAC_t& set_fiveGS_TAC() { fiveGS_TAC.setpresent(true); return fiveGS_TAC;} + fiveGS_TAC_t const* get_fiveGS_TAC() const {return fiveGS_TAC.is_valid() ? &fiveGS_TAC : nullptr;} + struct configured_TAC_t : TAC + { + static constexpr const char* name() {return "configured_TAC_t";} + using parent_t = TAC; + static constexpr bool optional = true; + + }; + configured_TAC_t& set_configured_TAC() { configured_TAC.setpresent(true); return configured_TAC;} + configured_TAC_t const* get_configured_TAC() const {return configured_TAC.is_valid() ? &configured_TAC : nullptr;} + struct broadcastPLMNs_t : BroadcastPLMNs_Item + { + static constexpr const char* name() {return "broadcastPLMNs_t";} + using parent_t = BroadcastPLMNs_Item; + + }; + broadcastPLMNs_t& ref_broadcastPLMNs() {return broadcastPLMNs;} + broadcastPLMNs_t const& ref_broadcastPLMNs() const {return broadcastPLMNs;} + struct nrModeInfo_t : asn::choice<2, 0, true> + { + static constexpr const char* name() {return "nrModeInfo_t";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~nrModeInfo_t() {clear();} + struct fdd_t : FDD_InfoServedNRCell_Information + { + static constexpr const char* name() {return "fdd_t";} + using parent_t = FDD_InfoServedNRCell_Information; + + }; + struct tdd_t : TDD_InfoServedNRCell_Information + { + static constexpr const char* name() {return "tdd_t";} + using parent_t = TDD_InfoServedNRCell_Information; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + fdd_t& select_fdd() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + fdd_t const* get_fdd() const { if(get_index() == 1) { return &var.as();} return nullptr; } + tdd_t& select_tdd() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + tdd_t const* get_tdd() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(fdd_t)]; + char dummy2[sizeof(tdd_t)]; + + }; + asn::variant var; + index_type index {0}; + }; + nrModeInfo_t& ref_nrModeInfo() {return nrModeInfo;} + nrModeInfo_t const& ref_nrModeInfo() const {return nrModeInfo;} + struct measurementTimingConfiguration_t : asn::ostring<> + { + static constexpr const char* name() {return "measurementTimingConfiguration_t";} + using parent_t = asn::ostring<>; + + }; + + measurementTimingConfiguration_t& ref_measurementTimingConfiguration() {return measurementTimingConfiguration;} + measurementTimingConfiguration_t const& ref_measurementTimingConfiguration() const {return measurementTimingConfiguration;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nrpCI); + v(nrCellID); + v(fiveGS_TAC); + v(configured_TAC); + v(broadcastPLMNs); + v(nrModeInfo); + v(measurementTimingConfiguration); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nrpCI); + v(nrCellID); + v(fiveGS_TAC); + v(configured_TAC); + v(broadcastPLMNs); + v(nrModeInfo); + v(measurementTimingConfiguration); + v(iE_Extensions); + + }; + void clear() + { + nrpCI.clear(); + nrCellID.clear(); + fiveGS_TAC.clear(); + configured_TAC.clear(); + broadcastPLMNs.clear(); + nrModeInfo.clear(); + measurementTimingConfiguration.clear(); + iE_Extensions.clear(); + + }; + private: + nrpCI_t nrpCI; + nrCellID_t nrCellID; + fiveGS_TAC_t fiveGS_TAC; + configured_TAC_t configured_TAC; + broadcastPLMNs_t broadcastPLMNs; + nrModeInfo_t nrModeInfo; + measurementTimingConfiguration_t measurementTimingConfiguration; + iE_Extensions_t iE_Extensions; + +}; +/* +En-gNBServedCells-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct En_gNBServedCells_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedNRcellsENDCX2ManagementList ::= SEQUENCE (SIZE (1.. maxCellinengNB)) OF SEQUENCE { + servedNRCellInfo ServedNRCell-Information, + nRNeighbourInfo NRNeighbour-Information OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {En-gNBServedCells-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedNRcellsENDCX2ManagementList_elm : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "ServedNRcellsENDCX2ManagementList_elm";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct servedNRCellInfo_t : ServedNRCell_Information + { + static constexpr const char* name() {return "servedNRCellInfo_t";} + using parent_t = ServedNRCell_Information; + + }; + servedNRCellInfo_t& ref_servedNRCellInfo() {return servedNRCellInfo;} + servedNRCellInfo_t const& ref_servedNRCellInfo() const {return servedNRCellInfo;} + struct nRNeighbourInfo_t : NRNeighbour_Information + { + static constexpr const char* name() {return "nRNeighbourInfo_t";} + using parent_t = NRNeighbour_Information; + static constexpr bool optional = true; + + }; + nRNeighbourInfo_t& set_nRNeighbourInfo() { nRNeighbourInfo.setpresent(true); return nRNeighbourInfo;} + nRNeighbourInfo_t const* get_nRNeighbourInfo() const {return nRNeighbourInfo.is_valid() ? &nRNeighbourInfo : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(servedNRCellInfo); + v(nRNeighbourInfo); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(servedNRCellInfo); + v(nRNeighbourInfo); + v(iE_Extensions); + + }; + void clear() + { + servedNRCellInfo.clear(); + nRNeighbourInfo.clear(); + iE_Extensions.clear(); + + }; + private: + servedNRCellInfo_t servedNRCellInfo; + nRNeighbourInfo_t nRNeighbourInfo; + iE_Extensions_t iE_Extensions; + +}; +struct ServedNRcellsENDCX2ManagementList : asn::sequenceof +{ + static constexpr const char* name() {return "ServedNRcellsENDCX2ManagementList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedNRCellsToModify-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ServedNRCellsToModify_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ServedNRCellsToModify-Item::= SEQUENCE { + old-nrcgi NRCGI, + servedNRCellInformation ServedNRCell-Information, + nrNeighbourInformation NRNeighbour-Information OPTIONAL, + nrDeactivationIndication DeactivationIndication OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ServedNRCellsToModify-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct ServedNRCellsToModify_Item : asn::sequence<5, 0, true, 3> +{ + static constexpr const char* name() {return "ServedNRCellsToModify-Item";} + using parent_t = asn::sequence<5, 0, true, 3>; + struct old_nrcgi_t : NRCGI + { + static constexpr const char* name() {return "old_nrcgi_t";} + using parent_t = NRCGI; + + }; + old_nrcgi_t& ref_old_nrcgi() {return old_nrcgi;} + old_nrcgi_t const& ref_old_nrcgi() const {return old_nrcgi;} + struct servedNRCellInformation_t : ServedNRCell_Information + { + static constexpr const char* name() {return "servedNRCellInformation_t";} + using parent_t = ServedNRCell_Information; + + }; + servedNRCellInformation_t& ref_servedNRCellInformation() {return servedNRCellInformation;} + servedNRCellInformation_t const& ref_servedNRCellInformation() const {return servedNRCellInformation;} + struct nrNeighbourInformation_t : NRNeighbour_Information + { + static constexpr const char* name() {return "nrNeighbourInformation_t";} + using parent_t = NRNeighbour_Information; + static constexpr bool optional = true; + + }; + nrNeighbourInformation_t& set_nrNeighbourInformation() { nrNeighbourInformation.setpresent(true); return nrNeighbourInformation;} + nrNeighbourInformation_t const* get_nrNeighbourInformation() const {return nrNeighbourInformation.is_valid() ? &nrNeighbourInformation : nullptr;} + struct nrDeactivationIndication_t : DeactivationIndication + { + static constexpr const char* name() {return "nrDeactivationIndication_t";} + using parent_t = DeactivationIndication; + static constexpr bool optional = true; + + }; + nrDeactivationIndication_t& set_nrDeactivationIndication() { nrDeactivationIndication.setpresent(true); return nrDeactivationIndication;} + nrDeactivationIndication_t const* get_nrDeactivationIndication() const {return nrDeactivationIndication.is_valid() ? &nrDeactivationIndication : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(old_nrcgi); + v(servedNRCellInformation); + v(nrNeighbourInformation); + v(nrDeactivationIndication); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(old_nrcgi); + v(servedNRCellInformation); + v(nrNeighbourInformation); + v(nrDeactivationIndication); + v(iE_Extensions); + + }; + void clear() + { + old_nrcgi.clear(); + servedNRCellInformation.clear(); + nrNeighbourInformation.clear(); + nrDeactivationIndication.clear(); + iE_Extensions.clear(); + + }; + private: + old_nrcgi_t old_nrcgi; + servedNRCellInformation_t servedNRCellInformation; + nrNeighbourInformation_t nrNeighbourInformation; + nrDeactivationIndication_t nrDeactivationIndication; + iE_Extensions_t iE_Extensions; + +}; +/* +ServedNRcellsToModifyENDCConfUpdList ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF ServedNRCellsToModify-Item +*/ + +struct ServedNRcellsToModifyENDCConfUpdList_elm : ServedNRCellsToModify_Item +{ + static constexpr const char* name() {return "ServedNRcellsToModifyENDCConfUpdList_elm";} + using parent_t = ServedNRCellsToModify_Item; + +}; +struct ServedNRcellsToModifyENDCConfUpdList : asn::sequenceof +{ + static constexpr const char* name() {return "ServedNRcellsToModifyENDCConfUpdList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ServedNRcellsToDeleteENDCConfUpdList ::= SEQUENCE (SIZE (1..maxCellinengNB)) OF NRCGI +*/ + +struct ServedNRcellsToDeleteENDCConfUpdList_elm : NRCGI +{ + static constexpr const char* name() {return "ServedNRcellsToDeleteENDCConfUpdList_elm";} + using parent_t = NRCGI; + +}; +struct ServedNRcellsToDeleteENDCConfUpdList : asn::sequenceof +{ + static constexpr const char* name() {return "ServedNRcellsToDeleteENDCConfUpdList";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +En-gNB-ENDCConfigUpdateIEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE optional }| + { ID id-ServedNRcellsToModifyListENDCConfUpd CRITICALITY reject TYPE ServedNRcellsToModifyENDCConfUpdList PRESENCE optional }| + { ID id-ServedNRcellsToDeleteListENDCConfUpd CRITICALITY reject TYPE ServedNRcellsToDeleteENDCConfUpdList PRESENCE optional }, + ... +} +*/ + +struct En_gNB_ENDCConfigUpdateIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(id_ServedNRcellsENDCX2ManagementList); type=1;} + void select_id_ServedNRcellsToModifyListENDCConfUpd() { set(id_ServedNRcellsToModifyListENDCConfUpd); type=2;} + void select_id_ServedNRcellsToDeleteListENDCConfUpd() { set(id_ServedNRcellsToDeleteListENDCConfUpd); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ServedNRcellsENDCX2ManagementList)) { type = 1; return true; } + else if(equal(id_ServedNRcellsToModifyListENDCConfUpd)) { type = 2; return true; } + else if(equal(id_ServedNRcellsToDeleteListENDCConfUpd)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ServedNRcellsENDCX2ManagementList);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedNRcellsToModifyListENDCConfUpd);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ServedNRcellsToDeleteListENDCConfUpd);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(reject); type=1;} + void select_id_ServedNRcellsToModifyListENDCConfUpd() { set(reject); type=2;} + void select_id_ServedNRcellsToDeleteListENDCConfUpd() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ServedNRcellsENDCX2ManagementList& select_id_ServedNRcellsENDCX2ManagementList() { return set(1); } + ServedNRcellsENDCX2ManagementList const* get_id_ServedNRcellsENDCX2ManagementList() const { return get(1); } + ServedNRcellsToModifyENDCConfUpdList& select_id_ServedNRcellsToModifyListENDCConfUpd() { return set(2); } + ServedNRcellsToModifyENDCConfUpdList const* get_id_ServedNRcellsToModifyListENDCConfUpd() const { return get(2); } + ServedNRcellsToDeleteENDCConfUpdList& select_id_ServedNRcellsToDeleteListENDCConfUpd() { return set(3); } + ServedNRcellsToDeleteENDCConfUpdList const* get_id_ServedNRcellsToDeleteListENDCConfUpd() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ServedNRcellsENDCX2ManagementList()); return true; + case 2: v(select_id_ServedNRcellsToModifyListENDCConfUpd()); return true; + case 3: v(select_id_ServedNRcellsToDeleteListENDCConfUpd()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ServedNRcellsENDCX2ManagementList)]; + char dummy2[sizeof(ServedNRcellsToDeleteENDCConfUpdList)]; + char dummy3[sizeof(ServedNRcellsToModifyENDCConfUpdList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(optional); type=1;} + void select_id_ServedNRcellsToModifyListENDCConfUpd() { set(optional); type=2;} + void select_id_ServedNRcellsToDeleteListENDCConfUpd() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingNodeType-EndcConfigUpdate::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCConfigUpdateIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCConfigUpdateIEs}}, + ... +} +*/ + +struct InitiatingNodeType_EndcConfigUpdate : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "InitiatingNodeType-EndcConfigUpdate";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~InitiatingNodeType_EndcConfigUpdate() {clear();} + struct init_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct init_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + init_eNB_t& select_init_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + init_eNB_t const* get_init_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + init_en_gNB_t& select_init_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + init_en_gNB_t const* get_init_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(init_eNB_t)]; + char dummy2[sizeof(init_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCConfigurationUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcConfigUpdate CRITICALITY reject TYPE InitiatingNodeType-EndcConfigUpdate PRESENCE mandatory}, + ... +} +*/ + +struct ENDCConfigurationUpdate_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcConfigUpdate() { set(id_InitiatingNodeType_EndcConfigUpdate); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_InitiatingNodeType_EndcConfigUpdate)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_InitiatingNodeType_EndcConfigUpdate);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcConfigUpdate() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + InitiatingNodeType_EndcConfigUpdate& select_id_InitiatingNodeType_EndcConfigUpdate() { return set(1); } + InitiatingNodeType_EndcConfigUpdate const* get_id_InitiatingNodeType_EndcConfigUpdate() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_InitiatingNodeType_EndcConfigUpdate()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(InitiatingNodeType_EndcConfigUpdate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcConfigUpdate() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCConfigurationUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdate-IEs}}, + ... +} +*/ + +struct ENDCConfigurationUpdate : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCConfigurationUpdate";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +En-gNB-ENDCConfigUpdateAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE optional}, + ... +} +*/ + +struct En_gNB_ENDCConfigUpdateAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(id_ServedNRcellsENDCX2ManagementList); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ServedNRcellsENDCX2ManagementList)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ServedNRcellsENDCX2ManagementList);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ServedNRcellsENDCX2ManagementList& select_id_ServedNRcellsENDCX2ManagementList() { return set(1); } + ServedNRcellsENDCX2ManagementList const* get_id_ServedNRcellsENDCX2ManagementList() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ServedNRcellsENDCX2ManagementList()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ServedNRcellsENDCX2ManagementList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(optional); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RespondingNodeType-EndcConfigUpdate::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCConfigUpdateAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCConfigUpdateAckIEs}}, + ... +} +*/ + +struct RespondingNodeType_EndcConfigUpdate : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "RespondingNodeType-EndcConfigUpdate";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~RespondingNodeType_EndcConfigUpdate() {clear();} + struct respond_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct respond_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + respond_eNB_t& select_respond_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + respond_eNB_t const* get_respond_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + respond_en_gNB_t& select_respond_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + respond_en_gNB_t const* get_respond_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(respond_eNB_t)]; + char dummy2[sizeof(respond_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCConfigurationUpdateAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcConfigUpdate CRITICALITY reject TYPE RespondingNodeType-EndcConfigUpdate PRESENCE mandatory}, + ... +} +*/ + +struct ENDCConfigurationUpdateAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcConfigUpdate() { set(id_RespondingNodeType_EndcConfigUpdate); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RespondingNodeType_EndcConfigUpdate)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RespondingNodeType_EndcConfigUpdate);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcConfigUpdate() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RespondingNodeType_EndcConfigUpdate& select_id_RespondingNodeType_EndcConfigUpdate() { return set(1); } + RespondingNodeType_EndcConfigUpdate const* get_id_RespondingNodeType_EndcConfigUpdate() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RespondingNodeType_EndcConfigUpdate()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RespondingNodeType_EndcConfigUpdate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcConfigUpdate() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCConfigurationUpdateAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdateAcknowledge-IEs}}, + ... +} +*/ + +struct ENDCConfigurationUpdateAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCConfigurationUpdateAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCConfigurationUpdateFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }, + ... +} +*/ + +struct ENDCConfigurationUpdateFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + void select_id_TimeToWait() { set(id_TimeToWait); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else if(equal(id_TimeToWait)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_TimeToWait);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + void select_id_TimeToWait() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + TimeToWait& select_id_TimeToWait() { return set(3); } + TimeToWait const* get_id_TimeToWait() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: v(select_id_TimeToWait()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(TimeToWait)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + void select_id_TimeToWait() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCConfigurationUpdateFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCConfigurationUpdateFailure-IEs}}, + ... +} +*/ + +struct ENDCConfigurationUpdateFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCConfigurationUpdateFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCPartialResetConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-UEs-Admitted-ToBeReset CRITICALITY reject TYPE UEsToBeResetList PRESENCE mandatory}, + ... +} +*/ + +struct ENDCPartialResetConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEs_Admitted_ToBeReset() { set(id_UEs_Admitted_ToBeReset); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_UEs_Admitted_ToBeReset)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_UEs_Admitted_ToBeReset);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEs_Admitted_ToBeReset() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UEsToBeResetList& select_id_UEs_Admitted_ToBeReset() { return set(1); } + UEsToBeResetList const* get_id_UEs_Admitted_ToBeReset() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_UEs_Admitted_ToBeReset()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(UEsToBeResetList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UEs_Admitted_ToBeReset() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCPartialResetConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCPartialResetConfirm-IEs}}, + ... +} +*/ + +struct ENDCPartialResetConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCPartialResetConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCPartialResetRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-UEs-ToBeReset CRITICALITY reject TYPE UEsToBeResetList PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, + ... +} +*/ + +struct ENDCPartialResetRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_UEs_ToBeReset() { set(id_UEs_ToBeReset); type=1;} + void select_id_Cause() { set(id_Cause); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_UEs_ToBeReset)) { type = 1; return true; } + else if(equal(id_Cause)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_UEs_ToBeReset);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_UEs_ToBeReset() { set(reject); type=1;} + void select_id_Cause() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UEsToBeResetList& select_id_UEs_ToBeReset() { return set(1); } + UEsToBeResetList const* get_id_UEs_ToBeReset() const { return get(1); } + Cause& select_id_Cause() { return set(2); } + Cause const* get_id_Cause() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_UEs_ToBeReset()); return true; + case 2: v(select_id_Cause()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(UEsToBeResetList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_UEs_ToBeReset() { set(mandatory); type=1;} + void select_id_Cause() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCPartialResetRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCPartialResetRequired-IEs}}, + ... +} +*/ + +struct ENDCPartialResetRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCPartialResetRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCX2RemovalFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +*/ + +struct ENDCX2RemovalFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalFailure-IEs}}, + ... +} +*/ + +struct ENDCX2RemovalFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2RemovalFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +En-gNB-ENDCX2RemovalReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}, + ... +} +*/ + +struct En_gNB_ENDCX2RemovalReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(id_Globalen_gNB_ID); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Globalen_gNB_ID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Globalen_gNB_ID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalGNB_ID& select_id_Globalen_gNB_ID() { return set(1); } + GlobalGNB_ID const* get_id_Globalen_gNB_ID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Globalen_gNB_ID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalGNB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingNodeType-EndcX2Removal ::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCX2RemovalReqIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2RemovalReqIEs}}, + ... +} +*/ + +struct InitiatingNodeType_EndcX2Removal : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "InitiatingNodeType-EndcX2Removal";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~InitiatingNodeType_EndcX2Removal() {clear();} + struct init_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct init_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + init_eNB_t& select_init_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + init_eNB_t const* get_init_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + init_en_gNB_t& select_init_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + init_en_gNB_t const* get_init_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(init_eNB_t)]; + char dummy2[sizeof(init_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCX2RemovalRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcX2Removal CRITICALITY reject TYPE InitiatingNodeType-EndcX2Removal PRESENCE mandatory}, + ... +} +*/ + +struct ENDCX2RemovalRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Removal() { set(id_InitiatingNodeType_EndcX2Removal); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_InitiatingNodeType_EndcX2Removal)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_InitiatingNodeType_EndcX2Removal);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Removal() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + InitiatingNodeType_EndcX2Removal& select_id_InitiatingNodeType_EndcX2Removal() { return set(1); } + InitiatingNodeType_EndcX2Removal const* get_id_InitiatingNodeType_EndcX2Removal() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_InitiatingNodeType_EndcX2Removal()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(InitiatingNodeType_EndcX2Removal)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Removal() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalRequest-IEs}}, + ... +} +*/ + +struct ENDCX2RemovalRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2RemovalRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +En-gNB-ENDCX2RemovalReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}, + ... +} +*/ + +struct En_gNB_ENDCX2RemovalReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(id_Globalen_gNB_ID); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Globalen_gNB_ID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Globalen_gNB_ID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalGNB_ID& select_id_Globalen_gNB_ID() { return set(1); } + GlobalGNB_ID const* get_id_Globalen_gNB_ID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Globalen_gNB_ID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalGNB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RespondingNodeType-EndcX2Removal ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCX2RemovalReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2RemovalReqAckIEs}}, + ... +} +*/ + +struct RespondingNodeType_EndcX2Removal : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "RespondingNodeType-EndcX2Removal";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~RespondingNodeType_EndcX2Removal() {clear();} + struct respond_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct respond_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + respond_eNB_t& select_respond_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + respond_eNB_t const* get_respond_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + respond_en_gNB_t& select_respond_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + respond_en_gNB_t const* get_respond_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(respond_eNB_t)]; + char dummy2[sizeof(respond_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCX2RemovalResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcX2Removal CRITICALITY reject TYPE RespondingNodeType-EndcX2Removal PRESENCE mandatory}, + ... +} +*/ + +struct ENDCX2RemovalResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Removal() { set(id_RespondingNodeType_EndcX2Removal); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RespondingNodeType_EndcX2Removal)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RespondingNodeType_EndcX2Removal);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Removal() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RespondingNodeType_EndcX2Removal& select_id_RespondingNodeType_EndcX2Removal() { return set(1); } + RespondingNodeType_EndcX2Removal const* get_id_RespondingNodeType_EndcX2Removal() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RespondingNodeType_EndcX2Removal()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RespondingNodeType_EndcX2Removal)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Removal() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2RemovalResponse-IEs}}, + ... +} +*/ + +struct ENDCX2RemovalResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2RemovalResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ENDCX2SetupFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional } | + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }, + ... +} +*/ + +struct ENDCX2SetupFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + void select_id_TimeToWait() { set(id_TimeToWait); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else if(equal(id_TimeToWait)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_TimeToWait);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + void select_id_TimeToWait() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + TimeToWait& select_id_TimeToWait() { return set(3); } + TimeToWait const* get_id_TimeToWait() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: v(select_id_TimeToWait()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(TimeToWait)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + void select_id_TimeToWait() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupFailure-IEs}}, + ... +} +*/ + +struct ENDCX2SetupFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2SetupFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +En-gNB-ENDCX2SetupReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} +*/ + +struct En_gNB_ENDCX2SetupReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(id_Globalen_gNB_ID); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(id_ServedNRcellsENDCX2ManagementList); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Globalen_gNB_ID)) { type = 1; return true; } + else if(equal(id_ServedNRcellsENDCX2ManagementList)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Globalen_gNB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedNRcellsENDCX2ManagementList);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(reject); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalGNB_ID& select_id_Globalen_gNB_ID() { return set(1); } + GlobalGNB_ID const* get_id_Globalen_gNB_ID() const { return get(1); } + ServedNRcellsENDCX2ManagementList& select_id_ServedNRcellsENDCX2ManagementList() { return set(2); } + ServedNRcellsENDCX2ManagementList const* get_id_ServedNRcellsENDCX2ManagementList() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Globalen_gNB_ID()); return true; + case 2: v(select_id_ServedNRcellsENDCX2ManagementList()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalGNB_ID)]; + char dummy2[sizeof(ServedNRcellsENDCX2ManagementList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(mandatory); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingNodeType-EndcX2Setup ::= CHOICE { + init-eNB ProtocolIE-Container {{ENB-ENDCX2SetupReqIEs}}, + init-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2SetupReqIEs}}, + ... +} +*/ + +struct InitiatingNodeType_EndcX2Setup : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "InitiatingNodeType-EndcX2Setup";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~InitiatingNodeType_EndcX2Setup() {clear();} + struct init_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct init_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "init_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + init_eNB_t& select_init_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + init_eNB_t const* get_init_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + init_en_gNB_t& select_init_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + init_en_gNB_t const* get_init_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(init_eNB_t)]; + char dummy2[sizeof(init_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCX2SetupRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EndcX2Setup CRITICALITY reject TYPE InitiatingNodeType-EndcX2Setup PRESENCE mandatory}, + ... +} +*/ + +struct ENDCX2SetupRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Setup() { set(id_InitiatingNodeType_EndcX2Setup); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_InitiatingNodeType_EndcX2Setup)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_InitiatingNodeType_EndcX2Setup);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Setup() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + InitiatingNodeType_EndcX2Setup& select_id_InitiatingNodeType_EndcX2Setup() { return set(1); } + InitiatingNodeType_EndcX2Setup const* get_id_InitiatingNodeType_EndcX2Setup() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_InitiatingNodeType_EndcX2Setup()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(InitiatingNodeType_EndcX2Setup)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EndcX2Setup() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupRequest-IEs}}, + ... +} +*/ + +struct ENDCX2SetupRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2SetupRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +En-gNB-ENDCX2SetupReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-Globalen-gNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-ServedNRcellsENDCX2ManagementList CRITICALITY reject TYPE ServedNRcellsENDCX2ManagementList PRESENCE mandatory}, + ... +} +*/ + +struct En_gNB_ENDCX2SetupReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(id_Globalen_gNB_ID); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(id_ServedNRcellsENDCX2ManagementList); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Globalen_gNB_ID)) { type = 1; return true; } + else if(equal(id_ServedNRcellsENDCX2ManagementList)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Globalen_gNB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedNRcellsENDCX2ManagementList);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(reject); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalGNB_ID& select_id_Globalen_gNB_ID() { return set(1); } + GlobalGNB_ID const* get_id_Globalen_gNB_ID() const { return get(1); } + ServedNRcellsENDCX2ManagementList& select_id_ServedNRcellsENDCX2ManagementList() { return set(2); } + ServedNRcellsENDCX2ManagementList const* get_id_ServedNRcellsENDCX2ManagementList() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Globalen_gNB_ID()); return true; + case 2: v(select_id_ServedNRcellsENDCX2ManagementList()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalGNB_ID)]; + char dummy2[sizeof(ServedNRcellsENDCX2ManagementList)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Globalen_gNB_ID() { set(mandatory); type=1;} + void select_id_ServedNRcellsENDCX2ManagementList() { set(mandatory); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RespondingNodeType-EndcX2Setup ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-ENDCX2SetupReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-ENDCX2SetupReqAckIEs}}, + ... +} +*/ + +struct RespondingNodeType_EndcX2Setup : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "RespondingNodeType-EndcX2Setup";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~RespondingNodeType_EndcX2Setup() {clear();} + struct respond_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct respond_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + respond_eNB_t& select_respond_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + respond_eNB_t const* get_respond_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + respond_en_gNB_t& select_respond_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + respond_en_gNB_t const* get_respond_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(respond_eNB_t)]; + char dummy2[sizeof(respond_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ENDCX2SetupResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EndcX2Setup CRITICALITY reject TYPE RespondingNodeType-EndcX2Setup PRESENCE mandatory}, + ... +} +*/ + +struct ENDCX2SetupResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Setup() { set(id_RespondingNodeType_EndcX2Setup); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RespondingNodeType_EndcX2Setup)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RespondingNodeType_EndcX2Setup);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Setup() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RespondingNodeType_EndcX2Setup& select_id_RespondingNodeType_EndcX2Setup() { return set(1); } + RespondingNodeType_EndcX2Setup const* get_id_RespondingNodeType_EndcX2Setup() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RespondingNodeType_EndcX2Setup()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RespondingNodeType_EndcX2Setup)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EndcX2Setup() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ENDCX2SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ENDCX2SetupResponse-IEs}}, + ... +} +*/ + +struct ENDCX2SetupResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ENDCX2SetupResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ListofEUTRACellsinNRCoordinationReq ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ECGI +*/ + +struct ListofEUTRACellsinNRCoordinationReq_elm : ECGI +{ + static constexpr const char* name() {return "ListofEUTRACellsinNRCoordinationReq_elm";} + using parent_t = ECGI; + +}; +struct ListofEUTRACellsinNRCoordinationReq : asn::sequenceof +{ + static constexpr const char* name() {return "ListofEUTRACellsinNRCoordinationReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +ListofNRCellsinNRCoordinationReq ::= SEQUENCE (SIZE (0..maxnoNRcellsSpectrumSharingWithE-UTRA)) OF NRCGI +*/ + +struct ListofNRCellsinNRCoordinationReq_elm : NRCGI +{ + static constexpr const char* name() {return "ListofNRCellsinNRCoordinationReq_elm";} + using parent_t = NRCGI; + +}; +struct ListofNRCellsinNRCoordinationReq : asn::sequenceof +{ + static constexpr const char* name() {return "ListofNRCellsinNRCoordinationReq";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +En-gNB-EUTRA-NRCellResourceCoordinationReqIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-ListofEUTRACellsinNRCoordinationReq CRITICALITY reject TYPE ListofEUTRACellsinNRCoordinationReq PRESENCE mandatory }| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofNRCellsinNRCoordinationReq CRITICALITY reject TYPE ListofNRCellsinNRCoordinationReq PRESENCE mandatory}, + ... +} +*/ + +struct En_gNB_EUTRA_NRCellResourceCoordinationReqIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(id_DataTrafficResourceIndication); type=1;} + void select_id_ListofEUTRACellsinNRCoordinationReq() { set(id_ListofEUTRACellsinNRCoordinationReq); type=2;} + void select_id_SpectrumSharingGroupID() { set(id_SpectrumSharingGroupID); type=3;} + void select_id_ListofNRCellsinNRCoordinationReq() { set(id_ListofNRCellsinNRCoordinationReq); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DataTrafficResourceIndication)) { type = 1; return true; } + else if(equal(id_ListofEUTRACellsinNRCoordinationReq)) { type = 2; return true; } + else if(equal(id_SpectrumSharingGroupID)) { type = 3; return true; } + else if(equal(id_ListofNRCellsinNRCoordinationReq)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DataTrafficResourceIndication);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ListofEUTRACellsinNRCoordinationReq);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SpectrumSharingGroupID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ListofNRCellsinNRCoordinationReq);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(reject); type=1;} + void select_id_ListofEUTRACellsinNRCoordinationReq() { set(reject); type=2;} + void select_id_SpectrumSharingGroupID() { set(reject); type=3;} + void select_id_ListofNRCellsinNRCoordinationReq() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + DataTrafficResourceIndication& select_id_DataTrafficResourceIndication() { return set(1); } + DataTrafficResourceIndication const* get_id_DataTrafficResourceIndication() const { return get(1); } + ListofEUTRACellsinNRCoordinationReq& select_id_ListofEUTRACellsinNRCoordinationReq() { return set(2); } + ListofEUTRACellsinNRCoordinationReq const* get_id_ListofEUTRACellsinNRCoordinationReq() const { return get(2); } + SpectrumSharingGroupID& select_id_SpectrumSharingGroupID() { return set(3); } + SpectrumSharingGroupID const* get_id_SpectrumSharingGroupID() const { return get(3); } + ListofNRCellsinNRCoordinationReq& select_id_ListofNRCellsinNRCoordinationReq() { return set(4); } + ListofNRCellsinNRCoordinationReq const* get_id_ListofNRCellsinNRCoordinationReq() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DataTrafficResourceIndication()); return true; + case 2: v(select_id_ListofEUTRACellsinNRCoordinationReq()); return true; + case 3: v(select_id_SpectrumSharingGroupID()); return true; + case 4: v(select_id_ListofNRCellsinNRCoordinationReq()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DataTrafficResourceIndication)]; + char dummy2[sizeof(ListofEUTRACellsinNRCoordinationReq)]; + char dummy3[sizeof(ListofNRCellsinNRCoordinationReq)]; + char dummy4[sizeof(SpectrumSharingGroupID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(mandatory); type=1;} + void select_id_ListofEUTRACellsinNRCoordinationReq() { set(mandatory); type=2;} + void select_id_SpectrumSharingGroupID() { set(mandatory); type=3;} + void select_id_ListofNRCellsinNRCoordinationReq() { set(mandatory); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingNodeType-EutranrCellResourceCoordination ::= CHOICE { + initiate-eNB ProtocolIE-Container {{ENB-EUTRA-NRCellResourceCoordinationReqIEs}}, + initiate-en-gNB ProtocolIE-Container {{En-gNB-EUTRA-NRCellResourceCoordinationReqIEs}}, + ... +} +*/ + +struct InitiatingNodeType_EutranrCellResourceCoordination : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "InitiatingNodeType-EutranrCellResourceCoordination";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~InitiatingNodeType_EutranrCellResourceCoordination() {clear();} + struct initiate_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "initiate_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct initiate_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "initiate_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + initiate_eNB_t& select_initiate_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + initiate_eNB_t const* get_initiate_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + initiate_en_gNB_t& select_initiate_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + initiate_en_gNB_t const* get_initiate_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(initiate_eNB_t)]; + char dummy2[sizeof(initiate_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +EUTRANRCellResourceCoordinationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-InitiatingNodeType-EutranrCellResourceCoordination CRITICALITY reject TYPE InitiatingNodeType-EutranrCellResourceCoordination PRESENCE mandatory}, + ... +} +*/ + +struct EUTRANRCellResourceCoordinationRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EutranrCellResourceCoordination() { set(id_InitiatingNodeType_EutranrCellResourceCoordination); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_InitiatingNodeType_EutranrCellResourceCoordination)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_InitiatingNodeType_EutranrCellResourceCoordination);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EutranrCellResourceCoordination() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + InitiatingNodeType_EutranrCellResourceCoordination& select_id_InitiatingNodeType_EutranrCellResourceCoordination() { return set(1); } + InitiatingNodeType_EutranrCellResourceCoordination const* get_id_InitiatingNodeType_EutranrCellResourceCoordination() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_InitiatingNodeType_EutranrCellResourceCoordination()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(InitiatingNodeType_EutranrCellResourceCoordination)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_InitiatingNodeType_EutranrCellResourceCoordination() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +EUTRANRCellResourceCoordinationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{EUTRANRCellResourceCoordinationRequest-IEs}}, + ... +} +*/ + +struct EUTRANRCellResourceCoordinationRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "EUTRANRCellResourceCoordinationRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ListofNRCellsinNRCoordinationResp ::= SEQUENCE (SIZE (0..maxnoNRcellsSpectrumSharingWithE-UTRA)) OF NRCGI +*/ + +struct ListofNRCellsinNRCoordinationResp_elm : NRCGI +{ + static constexpr const char* name() {return "ListofNRCellsinNRCoordinationResp_elm";} + using parent_t = NRCGI; + +}; +struct ListofNRCellsinNRCoordinationResp : asn::sequenceof +{ + static constexpr const char* name() {return "ListofNRCellsinNRCoordinationResp";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +En-gNB-EUTRA-NRCellResourceCoordinationReqAckIEs X2AP-PROTOCOL-IES ::= { + { ID id-DataTrafficResourceIndication CRITICALITY reject TYPE DataTrafficResourceIndication PRESENCE mandatory}| + { ID id-SpectrumSharingGroupID CRITICALITY reject TYPE SpectrumSharingGroupID PRESENCE mandatory}| + { ID id-ListofNRCellsinNRCoordinationResp CRITICALITY reject TYPE ListofNRCellsinNRCoordinationResp PRESENCE mandatory}, + + + ... +} +*/ + +struct En_gNB_EUTRA_NRCellResourceCoordinationReqAckIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(id_DataTrafficResourceIndication); type=1;} + void select_id_SpectrumSharingGroupID() { set(id_SpectrumSharingGroupID); type=2;} + void select_id_ListofNRCellsinNRCoordinationResp() { set(id_ListofNRCellsinNRCoordinationResp); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_DataTrafficResourceIndication)) { type = 1; return true; } + else if(equal(id_SpectrumSharingGroupID)) { type = 2; return true; } + else if(equal(id_ListofNRCellsinNRCoordinationResp)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_DataTrafficResourceIndication);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SpectrumSharingGroupID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ListofNRCellsinNRCoordinationResp);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(reject); type=1;} + void select_id_SpectrumSharingGroupID() { set(reject); type=2;} + void select_id_ListofNRCellsinNRCoordinationResp() { set(reject); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + DataTrafficResourceIndication& select_id_DataTrafficResourceIndication() { return set(1); } + DataTrafficResourceIndication const* get_id_DataTrafficResourceIndication() const { return get(1); } + SpectrumSharingGroupID& select_id_SpectrumSharingGroupID() { return set(2); } + SpectrumSharingGroupID const* get_id_SpectrumSharingGroupID() const { return get(2); } + ListofNRCellsinNRCoordinationResp& select_id_ListofNRCellsinNRCoordinationResp() { return set(3); } + ListofNRCellsinNRCoordinationResp const* get_id_ListofNRCellsinNRCoordinationResp() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_DataTrafficResourceIndication()); return true; + case 2: v(select_id_SpectrumSharingGroupID()); return true; + case 3: v(select_id_ListofNRCellsinNRCoordinationResp()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(DataTrafficResourceIndication)]; + char dummy2[sizeof(ListofNRCellsinNRCoordinationResp)]; + char dummy3[sizeof(SpectrumSharingGroupID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_DataTrafficResourceIndication() { set(mandatory); type=1;} + void select_id_SpectrumSharingGroupID() { set(mandatory); type=2;} + void select_id_ListofNRCellsinNRCoordinationResp() { set(mandatory); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RespondingNodeType-EutranrCellResourceCoordination ::= CHOICE { + respond-eNB ProtocolIE-Container {{ENB-EUTRA-NRCellResourceCoordinationReqAckIEs}}, + respond-en-gNB ProtocolIE-Container {{En-gNB-EUTRA-NRCellResourceCoordinationReqAckIEs}}, + ... +} +*/ + +struct RespondingNodeType_EutranrCellResourceCoordination : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "RespondingNodeType-EutranrCellResourceCoordination";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~RespondingNodeType_EutranrCellResourceCoordination() {clear();} + struct respond_eNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_eNB_t";} + using parent_t = ProtocolIE_Container; + + }; + struct respond_en_gNB_t : ProtocolIE_Container + { + static constexpr const char* name() {return "respond_en_gNB_t";} + using parent_t = ProtocolIE_Container; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + respond_eNB_t& select_respond_eNB() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + respond_eNB_t const* get_respond_eNB() const { if(get_index() == 1) { return &var.as();} return nullptr; } + respond_en_gNB_t& select_respond_en_gNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + respond_en_gNB_t const* get_respond_en_gNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(respond_eNB_t)]; + char dummy2[sizeof(respond_en_gNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +EUTRANRCellResourceCoordinationResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RespondingNodeType-EutranrCellResourceCoordination CRITICALITY reject TYPE RespondingNodeType-EutranrCellResourceCoordination PRESENCE mandatory}, + ... +} +*/ + +struct EUTRANRCellResourceCoordinationResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EutranrCellResourceCoordination() { set(id_RespondingNodeType_EutranrCellResourceCoordination); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RespondingNodeType_EutranrCellResourceCoordination)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RespondingNodeType_EutranrCellResourceCoordination);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EutranrCellResourceCoordination() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RespondingNodeType_EutranrCellResourceCoordination& select_id_RespondingNodeType_EutranrCellResourceCoordination() { return set(1); } + RespondingNodeType_EutranrCellResourceCoordination const* get_id_RespondingNodeType_EutranrCellResourceCoordination() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RespondingNodeType_EutranrCellResourceCoordination()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RespondingNodeType_EutranrCellResourceCoordination)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_RespondingNodeType_EutranrCellResourceCoordination() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +EUTRANRCellResourceCoordinationResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{EUTRANRCellResourceCoordinationResponse-IEs}}, + ... +} +*/ + +struct EUTRANRCellResourceCoordinationResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "EUTRANRCellResourceCoordinationResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ErrorIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} +*/ + +struct ErrorIndication_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=5;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=6;} + void select_id_Old_SgNB_UE_X2AP_ID() { set(id_Old_SgNB_UE_X2AP_ID); type=7;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else if(equal(id_Old_SgNB_UE_X2AP_ID)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_Old_SgNB_UE_X2AP_ID);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + void select_id_Old_SgNB_UE_X2AP_ID() { set(ignore); type=7;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(5); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(6); } + SgNB_UE_X2AP_ID& select_id_Old_SgNB_UE_X2AP_ID() { return set(7); } + SgNB_UE_X2AP_ID const* get_id_Old_SgNB_UE_X2AP_ID() const { return get(7); } + bool is_unknown() const { return type == 8; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 7: v(select_id_Old_SgNB_UE_X2AP_ID()); return true; + case 8: if(type != 8) {clear(); asn::base::set();} type = 8; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(optional); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(optional); type=2;} + void select_id_Cause() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + void select_id_Old_SgNB_UE_X2AP_ID() { set(optional); type=7;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ErrorIndication-IEs}}, + ... +} +*/ + +struct ErrorIndication : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ErrorIndication";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +GNBStatusIndicationIEs X2AP-PROTOCOL-IES ::= { + { ID id-GNBOverloadInformation CRITICALITY ignore TYPE GNBOverloadInformation PRESENCE mandatory}, + ... +} +*/ + +struct GNBStatusIndicationIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GNBOverloadInformation() { set(id_GNBOverloadInformation); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GNBOverloadInformation)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GNBOverloadInformation);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GNBOverloadInformation() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GNBOverloadInformation& select_id_GNBOverloadInformation() { return set(1); } + GNBOverloadInformation const* get_id_GNBOverloadInformation() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GNBOverloadInformation()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GNBOverloadInformation)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GNBOverloadInformation() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +GNBStatusIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { { GNBStatusIndicationIEs} }, + ... +} +*/ + +struct GNBStatusIndication : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "GNBStatusIndication";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +HandoverCancel-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct HandoverCancel_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(4); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(optional); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverCancel ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverCancel-IEs}}, + ... +} +*/ + +struct HandoverCancel : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "HandoverCancel";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +HandoverPreparationFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + + ... +} +*/ + +struct HandoverPreparationFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_Cause() { set(id_Cause); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_Cause)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_Cause() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + Cause& select_id_Cause() { return set(2); } + Cause const* get_id_Cause() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_Cause()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_Cause() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverPreparationFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverPreparationFailure-IEs}}, + ... +} +*/ + +struct HandoverPreparationFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "HandoverPreparationFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +MobilityInformation ::= BIT STRING (SIZE(32)) +*/ + +struct MobilityInformation : asn::bstring<> +{ + using constraint_t = asn::constraints>; + static constexpr const char* name() {return "MobilityInformation";} + using parent_t = asn::bstring<>; + +}; + +/* +HandoverReport-IEs X2AP-PROTOCOL-IES ::= { + { ID id-HandoverReportType CRITICALITY ignore TYPE HandoverReportType PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SourceCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-FailureCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-Re-establishmentCellECGI CRITICALITY ignore TYPE ECGI PRESENCE conditional} -- The IE shall be present if the Handover Report Type IE is set to “HO to Wrong Cell” -- | + { ID id-TargetCellInUTRAN CRITICALITY ignore TYPE TargetCellInUTRAN PRESENCE conditional} -- The IE shall be present if the Handover Report Type IE is set to "InterRAT ping-pong" --| + { ID id-SourceCellCRNTI CRITICALITY ignore TYPE CRNTI PRESENCE optional}| + { ID id-MobilityInformation CRITICALITY ignore TYPE MobilityInformation PRESENCE optional}| + { ID id-UE-RLF-Report-Container CRITICALITY ignore TYPE UE-RLF-Report-Container PRESENCE optional}| + { ID id-UE-RLF-Report-Container-for-extended-bands CRITICALITY ignore TYPE UE-RLF-Report-Container-for-extended-bands PRESENCE optional}, + ... +} +*/ + +struct HandoverReport_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_HandoverReportType() { set(id_HandoverReportType); type=1;} + void select_id_Cause() { set(id_Cause); type=2;} + void select_id_SourceCellECGI() { set(id_SourceCellECGI); type=3;} + void select_id_FailureCellECGI() { set(id_FailureCellECGI); type=4;} + void select_id_Re_establishmentCellECGI() { set(id_Re_establishmentCellECGI); type=5;} + void select_id_TargetCellInUTRAN() { set(id_TargetCellInUTRAN); type=6;} + void select_id_SourceCellCRNTI() { set(id_SourceCellCRNTI); type=7;} + void select_id_MobilityInformation() { set(id_MobilityInformation); type=8;} + void select_id_UE_RLF_Report_Container() { set(id_UE_RLF_Report_Container); type=9;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(id_UE_RLF_Report_Container_for_extended_bands); type=10;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_HandoverReportType)) { type = 1; return true; } + else if(equal(id_Cause)) { type = 2; return true; } + else if(equal(id_SourceCellECGI)) { type = 3; return true; } + else if(equal(id_FailureCellECGI)) { type = 4; return true; } + else if(equal(id_Re_establishmentCellECGI)) { type = 5; return true; } + else if(equal(id_TargetCellInUTRAN)) { type = 6; return true; } + else if(equal(id_SourceCellCRNTI)) { type = 7; return true; } + else if(equal(id_MobilityInformation)) { type = 8; return true; } + else if(equal(id_UE_RLF_Report_Container)) { type = 9; return true; } + else if(equal(id_UE_RLF_Report_Container_for_extended_bands)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_HandoverReportType);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SourceCellECGI);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_FailureCellECGI);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_Re_establishmentCellECGI);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_TargetCellInUTRAN);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_SourceCellCRNTI);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_MobilityInformation);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_UE_RLF_Report_Container);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_UE_RLF_Report_Container_for_extended_bands);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_HandoverReportType() { set(ignore); type=1;} + void select_id_Cause() { set(ignore); type=2;} + void select_id_SourceCellECGI() { set(ignore); type=3;} + void select_id_FailureCellECGI() { set(ignore); type=4;} + void select_id_Re_establishmentCellECGI() { set(ignore); type=5;} + void select_id_TargetCellInUTRAN() { set(ignore); type=6;} + void select_id_SourceCellCRNTI() { set(ignore); type=7;} + void select_id_MobilityInformation() { set(ignore); type=8;} + void select_id_UE_RLF_Report_Container() { set(ignore); type=9;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(ignore); type=10;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + HandoverReportType& select_id_HandoverReportType() { return set(1); } + HandoverReportType const* get_id_HandoverReportType() const { return get(1); } + Cause& select_id_Cause() { return set(2); } + Cause const* get_id_Cause() const { return get(2); } + ECGI& select_id_SourceCellECGI() { return set(3); } + ECGI const* get_id_SourceCellECGI() const { return get(3); } + ECGI& select_id_FailureCellECGI() { return set(4); } + ECGI const* get_id_FailureCellECGI() const { return get(4); } + ECGI& select_id_Re_establishmentCellECGI() { return set(5); } + ECGI const* get_id_Re_establishmentCellECGI() const { return get(5); } + TargetCellInUTRAN& select_id_TargetCellInUTRAN() { return set(6); } + TargetCellInUTRAN const* get_id_TargetCellInUTRAN() const { return get(6); } + CRNTI& select_id_SourceCellCRNTI() { return set(7); } + CRNTI const* get_id_SourceCellCRNTI() const { return get(7); } + MobilityInformation& select_id_MobilityInformation() { return set(8); } + MobilityInformation const* get_id_MobilityInformation() const { return get(8); } + UE_RLF_Report_Container& select_id_UE_RLF_Report_Container() { return set(9); } + UE_RLF_Report_Container const* get_id_UE_RLF_Report_Container() const { return get(9); } + UE_RLF_Report_Container_for_extended_bands& select_id_UE_RLF_Report_Container_for_extended_bands() { return set(10); } + UE_RLF_Report_Container_for_extended_bands const* get_id_UE_RLF_Report_Container_for_extended_bands() const { return get(10); } + bool is_unknown() const { return type == 11; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_HandoverReportType()); return true; + case 2: v(select_id_Cause()); return true; + case 3: v(select_id_SourceCellECGI()); return true; + case 4: v(select_id_FailureCellECGI()); return true; + case 5: v(select_id_Re_establishmentCellECGI()); return true; + case 6: v(select_id_TargetCellInUTRAN()); return true; + case 7: v(select_id_SourceCellCRNTI()); return true; + case 8: v(select_id_MobilityInformation()); return true; + case 9: v(select_id_UE_RLF_Report_Container()); return true; + case 10: v(select_id_UE_RLF_Report_Container_for_extended_bands()); return true; + case 11: if(type != 11) {clear(); asn::base::set();} type = 11; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CRNTI)]; + char dummy2[sizeof(Cause)]; + char dummy3[sizeof(ECGI)]; + char dummy4[sizeof(HandoverReportType)]; + char dummy5[sizeof(MobilityInformation)]; + char dummy6[sizeof(TargetCellInUTRAN)]; + char dummy7[sizeof(UE_RLF_Report_Container)]; + char dummy8[sizeof(UE_RLF_Report_Container_for_extended_bands)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_HandoverReportType() { set(mandatory); type=1;} + void select_id_Cause() { set(mandatory); type=2;} + void select_id_SourceCellECGI() { set(mandatory); type=3;} + void select_id_FailureCellECGI() { set(mandatory); type=4;} + void select_id_Re_establishmentCellECGI() { set(conditional); type=5;} + void select_id_TargetCellInUTRAN() { set(conditional); type=6;} + void select_id_SourceCellCRNTI() { set(optional); type=7;} + void select_id_MobilityInformation() { set(optional); type=8;} + void select_id_UE_RLF_Report_Container() { set(optional); type=9;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(optional); type=10;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(conditional)) { type = 5; return true; } + else if(equal(conditional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(conditional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(conditional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverReport-IEs}}, + ... +} +*/ + +struct HandoverReport : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "HandoverReport";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +UE-ContextInformation-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-ManagementBasedMDTallowed CRITICALITY ignore EXTENSION ManagementBasedMDTallowed PRESENCE optional }| +{ ID id-ManagementBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }| +{ ID id-UESidelinkAggregateMaximumBitRate CRITICALITY ignore EXTENSION UESidelinkAggregateMaximumBitRate PRESENCE optional}, + ... +} +*/ + +struct UE_ContextInformation_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ManagementBasedMDTallowed() { set(id_ManagementBasedMDTallowed); type=1;} + void select_id_ManagementBasedMDTPLMNList() { set(id_ManagementBasedMDTPLMNList); type=2;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(id_UESidelinkAggregateMaximumBitRate); type=3;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ManagementBasedMDTallowed)) { type = 1; return true; } + else if(equal(id_ManagementBasedMDTPLMNList)) { type = 2; return true; } + else if(equal(id_UESidelinkAggregateMaximumBitRate)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ManagementBasedMDTallowed);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ManagementBasedMDTPLMNList);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_UESidelinkAggregateMaximumBitRate);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ManagementBasedMDTallowed() { set(ignore); type=1;} + void select_id_ManagementBasedMDTPLMNList() { set(ignore); type=2;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(ignore); type=3;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + ManagementBasedMDTallowed& select_id_ManagementBasedMDTallowed() { return set(1); } + ManagementBasedMDTallowed const* get_id_ManagementBasedMDTallowed() const { return get(1); } + MDTPLMNList& select_id_ManagementBasedMDTPLMNList() { return set(2); } + MDTPLMNList const* get_id_ManagementBasedMDTPLMNList() const { return get(2); } + UESidelinkAggregateMaximumBitRate& select_id_UESidelinkAggregateMaximumBitRate() { return set(3); } + UESidelinkAggregateMaximumBitRate const* get_id_UESidelinkAggregateMaximumBitRate() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ManagementBasedMDTallowed()); return true; + case 2: v(select_id_ManagementBasedMDTPLMNList()); return true; + case 3: v(select_id_UESidelinkAggregateMaximumBitRate()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(MDTPLMNList)]; + char dummy2[sizeof(ManagementBasedMDTallowed)]; + char dummy3[sizeof(UESidelinkAggregateMaximumBitRate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ManagementBasedMDTallowed() { set(optional); type=1;} + void select_id_ManagementBasedMDTPLMNList() { set(optional); type=2;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(optional); type=3;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextInformation ::= SEQUENCE { + mME-UE-S1AP-ID UE-S1AP-ID, + uESecurityCapabilities UESecurityCapabilities, + aS-SecurityInformation AS-SecurityInformation, + uEaggregateMaximumBitRate UEAggregateMaximumBitRate, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + e-RABs-ToBeSetup-List E-RABs-ToBeSetup-List, + rRC-Context RRC-Context, + handoverRestrictionList HandoverRestrictionList OPTIONAL, + locationReportingInformation LocationReportingInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformation-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextInformation : asn::sequence<10, 0, true, 4> +{ + static constexpr const char* name() {return "UE-ContextInformation";} + using parent_t = asn::sequence<10, 0, true, 4>; + struct mME_UE_S1AP_ID_t : UE_S1AP_ID + { + static constexpr const char* name() {return "mME_UE_S1AP_ID_t";} + using parent_t = UE_S1AP_ID; + + }; + mME_UE_S1AP_ID_t& ref_mME_UE_S1AP_ID() {return mME_UE_S1AP_ID;} + mME_UE_S1AP_ID_t const& ref_mME_UE_S1AP_ID() const {return mME_UE_S1AP_ID;} + struct uESecurityCapabilities_t : UESecurityCapabilities + { + static constexpr const char* name() {return "uESecurityCapabilities_t";} + using parent_t = UESecurityCapabilities; + + }; + uESecurityCapabilities_t& ref_uESecurityCapabilities() {return uESecurityCapabilities;} + uESecurityCapabilities_t const& ref_uESecurityCapabilities() const {return uESecurityCapabilities;} + struct aS_SecurityInformation_t : AS_SecurityInformation + { + static constexpr const char* name() {return "aS_SecurityInformation_t";} + using parent_t = AS_SecurityInformation; + + }; + aS_SecurityInformation_t& ref_aS_SecurityInformation() {return aS_SecurityInformation;} + aS_SecurityInformation_t const& ref_aS_SecurityInformation() const {return aS_SecurityInformation;} + struct uEaggregateMaximumBitRate_t : UEAggregateMaximumBitRate + { + static constexpr const char* name() {return "uEaggregateMaximumBitRate_t";} + using parent_t = UEAggregateMaximumBitRate; + + }; + uEaggregateMaximumBitRate_t& ref_uEaggregateMaximumBitRate() {return uEaggregateMaximumBitRate;} + uEaggregateMaximumBitRate_t const& ref_uEaggregateMaximumBitRate() const {return uEaggregateMaximumBitRate;} + struct subscriberProfileIDforRFP_t : SubscriberProfileIDforRFP + { + static constexpr const char* name() {return "subscriberProfileIDforRFP_t";} + using parent_t = SubscriberProfileIDforRFP; + static constexpr bool optional = true; + + }; + subscriberProfileIDforRFP_t& set_subscriberProfileIDforRFP() { subscriberProfileIDforRFP.setpresent(true); return subscriberProfileIDforRFP;} + subscriberProfileIDforRFP_t const* get_subscriberProfileIDforRFP() const {return subscriberProfileIDforRFP.is_valid() ? &subscriberProfileIDforRFP : nullptr;} + struct e_RABs_ToBeSetup_List_t : E_RABs_ToBeSetup_List + { + static constexpr const char* name() {return "e_RABs_ToBeSetup_List_t";} + using parent_t = E_RABs_ToBeSetup_List; + + }; + e_RABs_ToBeSetup_List_t& ref_e_RABs_ToBeSetup_List() {return e_RABs_ToBeSetup_List;} + e_RABs_ToBeSetup_List_t const& ref_e_RABs_ToBeSetup_List() const {return e_RABs_ToBeSetup_List;} + struct rRC_Context_t : RRC_Context + { + static constexpr const char* name() {return "rRC_Context_t";} + using parent_t = RRC_Context; + + }; + rRC_Context_t& ref_rRC_Context() {return rRC_Context;} + rRC_Context_t const& ref_rRC_Context() const {return rRC_Context;} + struct handoverRestrictionList_t : HandoverRestrictionList + { + static constexpr const char* name() {return "handoverRestrictionList_t";} + using parent_t = HandoverRestrictionList; + static constexpr bool optional = true; + + }; + handoverRestrictionList_t& set_handoverRestrictionList() { handoverRestrictionList.setpresent(true); return handoverRestrictionList;} + handoverRestrictionList_t const* get_handoverRestrictionList() const {return handoverRestrictionList.is_valid() ? &handoverRestrictionList : nullptr;} + struct locationReportingInformation_t : LocationReportingInformation + { + static constexpr const char* name() {return "locationReportingInformation_t";} + using parent_t = LocationReportingInformation; + static constexpr bool optional = true; + + }; + locationReportingInformation_t& set_locationReportingInformation() { locationReportingInformation.setpresent(true); return locationReportingInformation;} + locationReportingInformation_t const* get_locationReportingInformation() const {return locationReportingInformation.is_valid() ? &locationReportingInformation : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(mME_UE_S1AP_ID); + v(uESecurityCapabilities); + v(aS_SecurityInformation); + v(uEaggregateMaximumBitRate); + v(subscriberProfileIDforRFP); + v(e_RABs_ToBeSetup_List); + v(rRC_Context); + v(handoverRestrictionList); + v(locationReportingInformation); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(mME_UE_S1AP_ID); + v(uESecurityCapabilities); + v(aS_SecurityInformation); + v(uEaggregateMaximumBitRate); + v(subscriberProfileIDforRFP); + v(e_RABs_ToBeSetup_List); + v(rRC_Context); + v(handoverRestrictionList); + v(locationReportingInformation); + v(iE_Extensions); + + }; + void clear() + { + mME_UE_S1AP_ID.clear(); + uESecurityCapabilities.clear(); + aS_SecurityInformation.clear(); + uEaggregateMaximumBitRate.clear(); + subscriberProfileIDforRFP.clear(); + e_RABs_ToBeSetup_List.clear(); + rRC_Context.clear(); + handoverRestrictionList.clear(); + locationReportingInformation.clear(); + iE_Extensions.clear(); + + }; + private: + mME_UE_S1AP_ID_t mME_UE_S1AP_ID; + uESecurityCapabilities_t uESecurityCapabilities; + aS_SecurityInformation_t aS_SecurityInformation; + uEaggregateMaximumBitRate_t uEaggregateMaximumBitRate; + subscriberProfileIDforRFP_t subscriberProfileIDforRFP; + e_RABs_ToBeSetup_List_t e_RABs_ToBeSetup_List; + rRC_Context_t rRC_Context; + handoverRestrictionList_t handoverRestrictionList; + locationReportingInformation_t locationReportingInformation; + iE_Extensions_t iE_Extensions; + +}; +/* +UE-ContextReferenceAtSeNB-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UE_ContextReferenceAtSeNB_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextReferenceAtSeNB ::= SEQUENCE { + source-GlobalSeNB-ID GlobalENB-ID, + seNB-UE-X2AP-ID UE-X2AP-ID, + seNB-UE-X2AP-ID-Extension UE-X2AP-ID-Extension, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtSeNB-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextReferenceAtSeNB : asn::sequence<4, 0, true, 1> +{ + static constexpr const char* name() {return "UE-ContextReferenceAtSeNB";} + using parent_t = asn::sequence<4, 0, true, 1>; + struct source_GlobalSeNB_ID_t : GlobalENB_ID + { + static constexpr const char* name() {return "source_GlobalSeNB_ID_t";} + using parent_t = GlobalENB_ID; + + }; + source_GlobalSeNB_ID_t& ref_source_GlobalSeNB_ID() {return source_GlobalSeNB_ID;} + source_GlobalSeNB_ID_t const& ref_source_GlobalSeNB_ID() const {return source_GlobalSeNB_ID;} + struct seNB_UE_X2AP_ID_t : UE_X2AP_ID + { + static constexpr const char* name() {return "seNB_UE_X2AP_ID_t";} + using parent_t = UE_X2AP_ID; + + }; + seNB_UE_X2AP_ID_t& ref_seNB_UE_X2AP_ID() {return seNB_UE_X2AP_ID;} + seNB_UE_X2AP_ID_t const& ref_seNB_UE_X2AP_ID() const {return seNB_UE_X2AP_ID;} + struct seNB_UE_X2AP_ID_Extension_t : UE_X2AP_ID_Extension + { + static constexpr const char* name() {return "seNB_UE_X2AP_ID_Extension_t";} + using parent_t = UE_X2AP_ID_Extension; + + }; + seNB_UE_X2AP_ID_Extension_t& ref_seNB_UE_X2AP_ID_Extension() {return seNB_UE_X2AP_ID_Extension;} + seNB_UE_X2AP_ID_Extension_t const& ref_seNB_UE_X2AP_ID_Extension() const {return seNB_UE_X2AP_ID_Extension;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(source_GlobalSeNB_ID); + v(seNB_UE_X2AP_ID); + v(seNB_UE_X2AP_ID_Extension); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(source_GlobalSeNB_ID); + v(seNB_UE_X2AP_ID); + v(seNB_UE_X2AP_ID_Extension); + v(iE_Extensions); + + }; + void clear() + { + source_GlobalSeNB_ID.clear(); + seNB_UE_X2AP_ID.clear(); + seNB_UE_X2AP_ID_Extension.clear(); + iE_Extensions.clear(); + + }; + private: + source_GlobalSeNB_ID_t source_GlobalSeNB_ID; + seNB_UE_X2AP_ID_t seNB_UE_X2AP_ID; + seNB_UE_X2AP_ID_Extension_t seNB_UE_X2AP_ID_Extension; + iE_Extensions_t iE_Extensions; + +}; +/* +UE-ContextReferenceAtWT-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UE_ContextReferenceAtWT_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextReferenceAtWT ::= SEQUENCE { + wTID WTID, + wT-UE-XwAP-ID WT-UE-XwAP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtWT-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextReferenceAtWT : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UE-ContextReferenceAtWT";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct wTID_t : WTID + { + static constexpr const char* name() {return "wTID_t";} + using parent_t = WTID; + + }; + wTID_t& ref_wTID() {return wTID;} + wTID_t const& ref_wTID() const {return wTID;} + struct wT_UE_XwAP_ID_t : WT_UE_XwAP_ID + { + static constexpr const char* name() {return "wT_UE_XwAP_ID_t";} + using parent_t = WT_UE_XwAP_ID; + + }; + wT_UE_XwAP_ID_t& ref_wT_UE_XwAP_ID() {return wT_UE_XwAP_ID;} + wT_UE_XwAP_ID_t const& ref_wT_UE_XwAP_ID() const {return wT_UE_XwAP_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(wTID); + v(wT_UE_XwAP_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(wTID); + v(wT_UE_XwAP_ID); + v(iE_Extensions); + + }; + void clear() + { + wTID.clear(); + wT_UE_XwAP_ID.clear(); + iE_Extensions.clear(); + + }; + private: + wTID_t wTID; + wT_UE_XwAP_ID_t wT_UE_XwAP_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +UE-ContextReferenceAtSgNB-ItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UE_ContextReferenceAtSgNB_ItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextReferenceAtSgNB ::= SEQUENCE { + source-GlobalSgNB-ID GlobalGNB-ID, + sgNB-UE-X2AP-ID SgNB-UE-X2AP-ID, + iE-Extensions ProtocolExtensionContainer { {UE-ContextReferenceAtSgNB-ItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextReferenceAtSgNB : asn::sequence<3, 0, true, 1> +{ + static constexpr const char* name() {return "UE-ContextReferenceAtSgNB";} + using parent_t = asn::sequence<3, 0, true, 1>; + struct source_GlobalSgNB_ID_t : GlobalGNB_ID + { + static constexpr const char* name() {return "source_GlobalSgNB_ID_t";} + using parent_t = GlobalGNB_ID; + + }; + source_GlobalSgNB_ID_t& ref_source_GlobalSgNB_ID() {return source_GlobalSgNB_ID;} + source_GlobalSgNB_ID_t const& ref_source_GlobalSgNB_ID() const {return source_GlobalSgNB_ID;} + struct sgNB_UE_X2AP_ID_t : SgNB_UE_X2AP_ID + { + static constexpr const char* name() {return "sgNB_UE_X2AP_ID_t";} + using parent_t = SgNB_UE_X2AP_ID; + + }; + sgNB_UE_X2AP_ID_t& ref_sgNB_UE_X2AP_ID() {return sgNB_UE_X2AP_ID;} + sgNB_UE_X2AP_ID_t const& ref_sgNB_UE_X2AP_ID() const {return sgNB_UE_X2AP_ID;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(source_GlobalSgNB_ID); + v(sgNB_UE_X2AP_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(source_GlobalSgNB_ID); + v(sgNB_UE_X2AP_ID); + v(iE_Extensions); + + }; + void clear() + { + source_GlobalSgNB_ID.clear(); + sgNB_UE_X2AP_ID.clear(); + iE_Extensions.clear(); + + }; + private: + source_GlobalSgNB_ID_t source_GlobalSgNB_ID; + sgNB_UE_X2AP_ID_t sgNB_UE_X2AP_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +HandoverRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-TargetCell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE mandatory}| + { ID id-UE-ContextInformation CRITICALITY reject TYPE UE-ContextInformation PRESENCE mandatory}| + { ID id-UE-HistoryInformation CRITICALITY ignore TYPE UE-HistoryInformation PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-MobilityInformation CRITICALITY ignore TYPE MobilityInformation PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-UE-HistoryInformationFromTheUE CRITICALITY ignore TYPE UE-HistoryInformationFromTheUE PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-UE-ContextReferenceAtSeNB CRITICALITY ignore TYPE UE-ContextReferenceAtSeNB PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-UE-ContextReferenceAtWT CRITICALITY ignore TYPE UE-ContextReferenceAtWT PRESENCE optional}| + { ID id-NRUESecurityCapabilities CRITICALITY ignore TYPE NRUESecurityCapabilities PRESENCE optional}| + { ID id-UE-ContextReferenceAtSgNB CRITICALITY ignore TYPE UE-ContextReferenceAtSgNB PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} +*/ + +struct HandoverRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 23; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_Cause() { set(id_Cause); type=2;} + void select_id_TargetCell_ID() { set(id_TargetCell_ID); type=3;} + void select_id_GUMMEI_ID() { set(id_GUMMEI_ID); type=4;} + void select_id_UE_ContextInformation() { set(id_UE_ContextInformation); type=5;} + void select_id_UE_HistoryInformation() { set(id_UE_HistoryInformation); type=6;} + void select_id_TraceActivation() { set(id_TraceActivation); type=7;} + void select_id_SRVCCOperationPossible() { set(id_SRVCCOperationPossible); type=8;} + void select_id_CSGMembershipStatus() { set(id_CSGMembershipStatus); type=9;} + void select_id_MobilityInformation() { set(id_MobilityInformation); type=10;} + void select_id_Masked_IMEISV() { set(id_Masked_IMEISV); type=11;} + void select_id_UE_HistoryInformationFromTheUE() { set(id_UE_HistoryInformationFromTheUE); type=12;} + void select_id_ExpectedUEBehaviour() { set(id_ExpectedUEBehaviour); type=13;} + void select_id_ProSeAuthorized() { set(id_ProSeAuthorized); type=14;} + void select_id_UE_ContextReferenceAtSeNB() { set(id_UE_ContextReferenceAtSeNB); type=15;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=16;} + void select_id_V2XServicesAuthorized() { set(id_V2XServicesAuthorized); type=17;} + void select_id_UE_ContextReferenceAtWT() { set(id_UE_ContextReferenceAtWT); type=18;} + void select_id_NRUESecurityCapabilities() { set(id_NRUESecurityCapabilities); type=19;} + void select_id_UE_ContextReferenceAtSgNB() { set(id_UE_ContextReferenceAtSgNB); type=20;} + void select_id_AerialUEsubscriptionInformation() { set(id_AerialUEsubscriptionInformation); type=21;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(id_Subscription_Based_UE_DifferentiationInfo); type=22;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_Cause)) { type = 2; return true; } + else if(equal(id_TargetCell_ID)) { type = 3; return true; } + else if(equal(id_GUMMEI_ID)) { type = 4; return true; } + else if(equal(id_UE_ContextInformation)) { type = 5; return true; } + else if(equal(id_UE_HistoryInformation)) { type = 6; return true; } + else if(equal(id_TraceActivation)) { type = 7; return true; } + else if(equal(id_SRVCCOperationPossible)) { type = 8; return true; } + else if(equal(id_CSGMembershipStatus)) { type = 9; return true; } + else if(equal(id_MobilityInformation)) { type = 10; return true; } + else if(equal(id_Masked_IMEISV)) { type = 11; return true; } + else if(equal(id_UE_HistoryInformationFromTheUE)) { type = 12; return true; } + else if(equal(id_ExpectedUEBehaviour)) { type = 13; return true; } + else if(equal(id_ProSeAuthorized)) { type = 14; return true; } + else if(equal(id_UE_ContextReferenceAtSeNB)) { type = 15; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 16; return true; } + else if(equal(id_V2XServicesAuthorized)) { type = 17; return true; } + else if(equal(id_UE_ContextReferenceAtWT)) { type = 18; return true; } + else if(equal(id_NRUESecurityCapabilities)) { type = 19; return true; } + else if(equal(id_UE_ContextReferenceAtSgNB)) { type = 20; return true; } + else if(equal(id_AerialUEsubscriptionInformation)) { type = 21; return true; } + else if(equal(id_Subscription_Based_UE_DifferentiationInfo)) { type = 22; return true; } + else { type = 23; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_TargetCell_ID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_GUMMEI_ID);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_UE_ContextInformation);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_UE_HistoryInformation);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_TraceActivation);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_SRVCCOperationPossible);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_CSGMembershipStatus);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_MobilityInformation);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_Masked_IMEISV);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_UE_HistoryInformationFromTheUE);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_ExpectedUEBehaviour);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(id_ProSeAuthorized);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(id_UE_ContextReferenceAtSeNB);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 17: type = 17; if(v(ref_nested())) { return equal(id_V2XServicesAuthorized);} return false; + case 18: type = 18; if(v(ref_nested())) { return equal(id_UE_ContextReferenceAtWT);} return false; + case 19: type = 19; if(v(ref_nested())) { return equal(id_NRUESecurityCapabilities);} return false; + case 20: type = 20; if(v(ref_nested())) { return equal(id_UE_ContextReferenceAtSgNB);} return false; + case 21: type = 21; if(v(ref_nested())) { return equal(id_AerialUEsubscriptionInformation);} return false; + case 22: type = 22; if(v(ref_nested())) { return equal(id_Subscription_Based_UE_DifferentiationInfo);} return false; + case 23: type = 23; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 23; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_Cause() { set(ignore); type=2;} + void select_id_TargetCell_ID() { set(reject); type=3;} + void select_id_GUMMEI_ID() { set(reject); type=4;} + void select_id_UE_ContextInformation() { set(reject); type=5;} + void select_id_UE_HistoryInformation() { set(ignore); type=6;} + void select_id_TraceActivation() { set(ignore); type=7;} + void select_id_SRVCCOperationPossible() { set(ignore); type=8;} + void select_id_CSGMembershipStatus() { set(reject); type=9;} + void select_id_MobilityInformation() { set(ignore); type=10;} + void select_id_Masked_IMEISV() { set(ignore); type=11;} + void select_id_UE_HistoryInformationFromTheUE() { set(ignore); type=12;} + void select_id_ExpectedUEBehaviour() { set(ignore); type=13;} + void select_id_ProSeAuthorized() { set(ignore); type=14;} + void select_id_UE_ContextReferenceAtSeNB() { set(ignore); type=15;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(reject); type=16;} + void select_id_V2XServicesAuthorized() { set(ignore); type=17;} + void select_id_UE_ContextReferenceAtWT() { set(ignore); type=18;} + void select_id_NRUESecurityCapabilities() { set(ignore); type=19;} + void select_id_UE_ContextReferenceAtSgNB() { set(ignore); type=20;} + void select_id_AerialUEsubscriptionInformation() { set(ignore); type=21;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(ignore); type=22;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(ignore)) { type = 12; return true; } + else if(equal(ignore)) { type = 13; return true; } + else if(equal(ignore)) { type = 14; return true; } + else if(equal(ignore)) { type = 15; return true; } + else if(equal(reject)) { type = 16; return true; } + else if(equal(ignore)) { type = 17; return true; } + else if(equal(ignore)) { type = 18; return true; } + else if(equal(ignore)) { type = 19; return true; } + else if(equal(ignore)) { type = 20; return true; } + else if(equal(ignore)) { type = 21; return true; } + else if(equal(ignore)) { type = 22; return true; } + else { type = 23; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(ignore);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(ignore);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(ignore);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(reject);} return false; + case 17: type = 17; if(v(ref_nested())) { return equal(ignore);} return false; + case 18: type = 18; if(v(ref_nested())) { return equal(ignore);} return false; + case 19: type = 19; if(v(ref_nested())) { return equal(ignore);} return false; + case 20: type = 20; if(v(ref_nested())) { return equal(ignore);} return false; + case 21: type = 21; if(v(ref_nested())) { return equal(ignore);} return false; + case 22: type = 22; if(v(ref_nested())) { return equal(ignore);} return false; + case 23: type = 23; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + Cause& select_id_Cause() { return set(2); } + Cause const* get_id_Cause() const { return get(2); } + ECGI& select_id_TargetCell_ID() { return set(3); } + ECGI const* get_id_TargetCell_ID() const { return get(3); } + GUMMEI& select_id_GUMMEI_ID() { return set(4); } + GUMMEI const* get_id_GUMMEI_ID() const { return get(4); } + UE_ContextInformation& select_id_UE_ContextInformation() { return set(5); } + UE_ContextInformation const* get_id_UE_ContextInformation() const { return get(5); } + UE_HistoryInformation& select_id_UE_HistoryInformation() { return set(6); } + UE_HistoryInformation const* get_id_UE_HistoryInformation() const { return get(6); } + TraceActivation& select_id_TraceActivation() { return set(7); } + TraceActivation const* get_id_TraceActivation() const { return get(7); } + SRVCCOperationPossible& select_id_SRVCCOperationPossible() { return set(8); } + SRVCCOperationPossible const* get_id_SRVCCOperationPossible() const { return get(8); } + CSGMembershipStatus& select_id_CSGMembershipStatus() { return set(9); } + CSGMembershipStatus const* get_id_CSGMembershipStatus() const { return get(9); } + MobilityInformation& select_id_MobilityInformation() { return set(10); } + MobilityInformation const* get_id_MobilityInformation() const { return get(10); } + Masked_IMEISV& select_id_Masked_IMEISV() { return set(11); } + Masked_IMEISV const* get_id_Masked_IMEISV() const { return get(11); } + UE_HistoryInformationFromTheUE& select_id_UE_HistoryInformationFromTheUE() { return set(12); } + UE_HistoryInformationFromTheUE const* get_id_UE_HistoryInformationFromTheUE() const { return get(12); } + ExpectedUEBehaviour& select_id_ExpectedUEBehaviour() { return set(13); } + ExpectedUEBehaviour const* get_id_ExpectedUEBehaviour() const { return get(13); } + ProSeAuthorized& select_id_ProSeAuthorized() { return set(14); } + ProSeAuthorized const* get_id_ProSeAuthorized() const { return get(14); } + UE_ContextReferenceAtSeNB& select_id_UE_ContextReferenceAtSeNB() { return set(15); } + UE_ContextReferenceAtSeNB const* get_id_UE_ContextReferenceAtSeNB() const { return get(15); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(16); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(16); } + V2XServicesAuthorized& select_id_V2XServicesAuthorized() { return set(17); } + V2XServicesAuthorized const* get_id_V2XServicesAuthorized() const { return get(17); } + UE_ContextReferenceAtWT& select_id_UE_ContextReferenceAtWT() { return set(18); } + UE_ContextReferenceAtWT const* get_id_UE_ContextReferenceAtWT() const { return get(18); } + NRUESecurityCapabilities& select_id_NRUESecurityCapabilities() { return set(19); } + NRUESecurityCapabilities const* get_id_NRUESecurityCapabilities() const { return get(19); } + UE_ContextReferenceAtSgNB& select_id_UE_ContextReferenceAtSgNB() { return set(20); } + UE_ContextReferenceAtSgNB const* get_id_UE_ContextReferenceAtSgNB() const { return get(20); } + AerialUEsubscriptionInformation& select_id_AerialUEsubscriptionInformation() { return set(21); } + AerialUEsubscriptionInformation const* get_id_AerialUEsubscriptionInformation() const { return get(21); } + Subscription_Based_UE_DifferentiationInfo& select_id_Subscription_Based_UE_DifferentiationInfo() { return set(22); } + Subscription_Based_UE_DifferentiationInfo const* get_id_Subscription_Based_UE_DifferentiationInfo() const { return get(22); } + bool is_unknown() const { return type == 23; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + case 17: var.destroy(); break; + case 18: var.destroy(); break; + case 19: var.destroy(); break; + case 20: var.destroy(); break; + case 21: var.destroy(); break; + case 22: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + v.template operator()(17); + v.template operator()(18); + v.template operator()(19); + v.template operator()(20); + v.template operator()(21); + v.template operator()(22); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_Cause()); return true; + case 3: v(select_id_TargetCell_ID()); return true; + case 4: v(select_id_GUMMEI_ID()); return true; + case 5: v(select_id_UE_ContextInformation()); return true; + case 6: v(select_id_UE_HistoryInformation()); return true; + case 7: v(select_id_TraceActivation()); return true; + case 8: v(select_id_SRVCCOperationPossible()); return true; + case 9: v(select_id_CSGMembershipStatus()); return true; + case 10: v(select_id_MobilityInformation()); return true; + case 11: v(select_id_Masked_IMEISV()); return true; + case 12: v(select_id_UE_HistoryInformationFromTheUE()); return true; + case 13: v(select_id_ExpectedUEBehaviour()); return true; + case 14: v(select_id_ProSeAuthorized()); return true; + case 15: v(select_id_UE_ContextReferenceAtSeNB()); return true; + case 16: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 17: v(select_id_V2XServicesAuthorized()); return true; + case 18: v(select_id_UE_ContextReferenceAtWT()); return true; + case 19: v(select_id_NRUESecurityCapabilities()); return true; + case 20: v(select_id_UE_ContextReferenceAtSgNB()); return true; + case 21: v(select_id_AerialUEsubscriptionInformation()); return true; + case 22: v(select_id_Subscription_Based_UE_DifferentiationInfo()); return true; + case 23: if(type != 23) {clear(); asn::base::set();} type = 23; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + case 17: v(var.as()); return true; + case 18: v(var.as()); return true; + case 19: v(var.as()); return true; + case 20: v(var.as()); return true; + case 21: v(var.as()); return true; + case 22: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(AerialUEsubscriptionInformation)]; + char dummy2[sizeof(CSGMembershipStatus)]; + char dummy3[sizeof(Cause)]; + char dummy4[sizeof(ECGI)]; + char dummy5[sizeof(ExpectedUEBehaviour)]; + char dummy6[sizeof(GUMMEI)]; + char dummy7[sizeof(Masked_IMEISV)]; + char dummy8[sizeof(MobilityInformation)]; + char dummy9[sizeof(NRUESecurityCapabilities)]; + char dummy10[sizeof(ProSeAuthorized)]; + char dummy11[sizeof(SRVCCOperationPossible)]; + char dummy12[sizeof(Subscription_Based_UE_DifferentiationInfo)]; + char dummy13[sizeof(TraceActivation)]; + char dummy14[sizeof(UE_ContextInformation)]; + char dummy15[sizeof(UE_ContextReferenceAtSeNB)]; + char dummy16[sizeof(UE_ContextReferenceAtSgNB)]; + char dummy17[sizeof(UE_ContextReferenceAtWT)]; + char dummy18[sizeof(UE_HistoryInformation)]; + char dummy19[sizeof(UE_HistoryInformationFromTheUE)]; + char dummy20[sizeof(UE_X2AP_ID)]; + char dummy21[sizeof(UE_X2AP_ID_Extension)]; + char dummy22[sizeof(V2XServicesAuthorized)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 23; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_Cause() { set(mandatory); type=2;} + void select_id_TargetCell_ID() { set(mandatory); type=3;} + void select_id_GUMMEI_ID() { set(mandatory); type=4;} + void select_id_UE_ContextInformation() { set(mandatory); type=5;} + void select_id_UE_HistoryInformation() { set(mandatory); type=6;} + void select_id_TraceActivation() { set(optional); type=7;} + void select_id_SRVCCOperationPossible() { set(optional); type=8;} + void select_id_CSGMembershipStatus() { set(optional); type=9;} + void select_id_MobilityInformation() { set(optional); type=10;} + void select_id_Masked_IMEISV() { set(optional); type=11;} + void select_id_UE_HistoryInformationFromTheUE() { set(optional); type=12;} + void select_id_ExpectedUEBehaviour() { set(optional); type=13;} + void select_id_ProSeAuthorized() { set(optional); type=14;} + void select_id_UE_ContextReferenceAtSeNB() { set(optional); type=15;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=16;} + void select_id_V2XServicesAuthorized() { set(optional); type=17;} + void select_id_UE_ContextReferenceAtWT() { set(optional); type=18;} + void select_id_NRUESecurityCapabilities() { set(optional); type=19;} + void select_id_UE_ContextReferenceAtSgNB() { set(optional); type=20;} + void select_id_AerialUEsubscriptionInformation() { set(optional); type=21;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(optional); type=22;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(mandatory)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else if(equal(optional)) { type = 13; return true; } + else if(equal(optional)) { type = 14; return true; } + else if(equal(optional)) { type = 15; return true; } + else if(equal(optional)) { type = 16; return true; } + else if(equal(optional)) { type = 17; return true; } + else if(equal(optional)) { type = 18; return true; } + else if(equal(optional)) { type = 19; return true; } + else if(equal(optional)) { type = 20; return true; } + else if(equal(optional)) { type = 21; return true; } + else if(equal(optional)) { type = 22; return true; } + else { type = 23; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(mandatory);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(optional);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(optional);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(optional);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(optional);} return false; + case 17: type = 17; if(v(ref_nested())) { return equal(optional);} return false; + case 18: type = 18; if(v(ref_nested())) { return equal(optional);} return false; + case 19: type = 19; if(v(ref_nested())) { return equal(optional);} return false; + case 20: type = 20; if(v(ref_nested())) { return equal(optional);} return false; + case 21: type = 21; if(v(ref_nested())) { return equal(optional);} return false; + case 22: type = 22; if(v(ref_nested())) { return equal(optional);} return false; + case 23: type = 23; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverRequest-IEs}}, + ... +} +*/ + +struct HandoverRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "HandoverRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +HandoverRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-List CRITICALITY ignore TYPE E-RABs-Admitted-List PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-TargeteNBtoSource-eNBTransparentContainer CRITICALITY ignore TYPE TargeteNBtoSource-eNBTransparentContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-WT-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}, + ... +} +*/ + +struct HandoverRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_Admitted_List() { set(id_E_RABs_Admitted_List); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(id_E_RABs_NotAdmitted_List); type=4;} + void select_id_TargeteNBtoSource_eNBTransparentContainer() { set(id_TargeteNBtoSource_eNBTransparentContainer); type=5;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=6;} + void select_id_UE_ContextKeptIndicator() { set(id_UE_ContextKeptIndicator); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=8;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=9;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=10;} + void select_id_WT_UE_ContextKeptIndicator() { set(id_WT_UE_ContextKeptIndicator); type=11;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_Admitted_List)) { type = 3; return true; } + else if(equal(id_E_RABs_NotAdmitted_List)) { type = 4; return true; } + else if(equal(id_TargeteNBtoSource_eNBTransparentContainer)) { type = 5; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 6; return true; } + else if(equal(id_UE_ContextKeptIndicator)) { type = 7; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 8; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 10; return true; } + else if(equal(id_WT_UE_ContextKeptIndicator)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_List);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_NotAdmitted_List);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_TargeteNBtoSource_eNBTransparentContainer);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_UE_ContextKeptIndicator);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_WT_UE_ContextKeptIndicator);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_Admitted_List() { set(ignore); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(ignore); type=4;} + void select_id_TargeteNBtoSource_eNBTransparentContainer() { set(ignore); type=5;} + void select_id_CriticalityDiagnostics() { set(ignore); type=6;} + void select_id_UE_ContextKeptIndicator() { set(ignore); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=8;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(ignore); type=9;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(reject); type=10;} + void select_id_WT_UE_ContextKeptIndicator() { set(ignore); type=11;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(2); } + E_RABs_Admitted_List& select_id_E_RABs_Admitted_List() { return set(3); } + E_RABs_Admitted_List const* get_id_E_RABs_Admitted_List() const { return get(3); } + E_RAB_List& select_id_E_RABs_NotAdmitted_List() { return set(4); } + E_RAB_List const* get_id_E_RABs_NotAdmitted_List() const { return get(4); } + TargeteNBtoSource_eNBTransparentContainer& select_id_TargeteNBtoSource_eNBTransparentContainer() { return set(5); } + TargeteNBtoSource_eNBTransparentContainer const* get_id_TargeteNBtoSource_eNBTransparentContainer() const { return get(5); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(6); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(6); } + UE_ContextKeptIndicator& select_id_UE_ContextKeptIndicator() { return set(7); } + UE_ContextKeptIndicator const* get_id_UE_ContextKeptIndicator() const { return get(7); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(8); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(8); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(9); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(10); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(10); } + UE_ContextKeptIndicator& select_id_WT_UE_ContextKeptIndicator() { return set(11); } + UE_ContextKeptIndicator const* get_id_WT_UE_ContextKeptIndicator() const { return get(11); } + bool is_unknown() const { return type == 12; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_Admitted_List()); return true; + case 4: v(select_id_E_RABs_NotAdmitted_List()); return true; + case 5: v(select_id_TargeteNBtoSource_eNBTransparentContainer()); return true; + case 6: v(select_id_CriticalityDiagnostics()); return true; + case 7: v(select_id_UE_ContextKeptIndicator()); return true; + case 8: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 9: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 11: v(select_id_WT_UE_ContextKeptIndicator()); return true; + case 12: if(type != 12) {clear(); asn::base::set();} type = 12; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RAB_List)]; + char dummy3[sizeof(E_RABs_Admitted_List)]; + char dummy4[sizeof(TargeteNBtoSource_eNBTransparentContainer)]; + char dummy5[sizeof(UE_ContextKeptIndicator)]; + char dummy6[sizeof(UE_X2AP_ID)]; + char dummy7[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_Admitted_List() { set(mandatory); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(optional); type=4;} + void select_id_TargeteNBtoSource_eNBTransparentContainer() { set(mandatory); type=5;} + void select_id_CriticalityDiagnostics() { set(optional); type=6;} + void select_id_UE_ContextKeptIndicator() { set(optional); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=8;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=10;} + void select_id_WT_UE_ContextKeptIndicator() { set(optional); type=11;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +HandoverRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{HandoverRequestAcknowledge-IEs}}, + ... +} +*/ + +struct HandoverRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "HandoverRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +LoadInformation-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CellInformation CRITICALITY ignore TYPE CellInformation-List PRESENCE mandatory} , + ... +} +*/ + +struct LoadInformation_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CellInformation() { set(id_CellInformation); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CellInformation)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CellInformation);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CellInformation() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CellInformation_List& select_id_CellInformation() { return set(1); } + CellInformation_List const* get_id_CellInformation() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CellInformation()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellInformation_List)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CellInformation() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +LoadInformation ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{LoadInformation-IEs}}, + ... +} +*/ + +struct LoadInformation : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "LoadInformation";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +MeasurementInitiationResult-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct MeasurementInitiationResult_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MeasurementInitiationResult-Item ::= SEQUENCE { + cell-ID ECGI, + measurementFailureCause-List MeasurementFailureCause-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MeasurementInitiationResult-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct MeasurementInitiationResult_Item : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "MeasurementInitiationResult-Item";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct cell_ID_t : ECGI + { + static constexpr const char* name() {return "cell_ID_t";} + using parent_t = ECGI; + + }; + cell_ID_t& ref_cell_ID() {return cell_ID;} + cell_ID_t const& ref_cell_ID() const {return cell_ID;} + struct measurementFailureCause_List_t : MeasurementFailureCause_List + { + static constexpr const char* name() {return "measurementFailureCause_List_t";} + using parent_t = MeasurementFailureCause_List; + static constexpr bool optional = true; + + }; + measurementFailureCause_List_t& set_measurementFailureCause_List() { measurementFailureCause_List.setpresent(true); return measurementFailureCause_List;} + measurementFailureCause_List_t const* get_measurementFailureCause_List() const {return measurementFailureCause_List.is_valid() ? &measurementFailureCause_List : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cell_ID); + v(measurementFailureCause_List); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cell_ID); + v(measurementFailureCause_List); + v(iE_Extensions); + + }; + void clear() + { + cell_ID.clear(); + measurementFailureCause_List.clear(); + iE_Extensions.clear(); + + }; + private: + cell_ID_t cell_ID; + measurementFailureCause_List_t measurementFailureCause_List; + iE_Extensions_t iE_Extensions; + +}; +/* +MeasurementInitiationResult-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-MeasurementInitiationResult-Item CRITICALITY ignore TYPE MeasurementInitiationResult-Item PRESENCE mandatory} +} +*/ + +struct MeasurementInitiationResult_ItemIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementInitiationResult_Item() { set(id_MeasurementInitiationResult_Item); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeasurementInitiationResult_Item)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeasurementInitiationResult_Item);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementInitiationResult_Item() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + MeasurementInitiationResult_Item& select_id_MeasurementInitiationResult_Item() { return set(1); } + MeasurementInitiationResult_Item const* get_id_MeasurementInitiationResult_Item() const { return get(1); } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeasurementInitiationResult_Item()); return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(MeasurementInitiationResult_Item)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + void clear() {type = 0;} + void select_id_MeasurementInitiationResult_Item() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MeasurementInitiationResult-List ::= SEQUENCE (SIZE (1..maxCellineNB)) OF ProtocolIE-Single-Container { {MeasurementInitiationResult-ItemIEs} } +*/ + +struct MeasurementInitiationResult_List_elm : ProtocolIE_Single_Container +{ + static constexpr const char* name() {return "MeasurementInitiationResult_List_elm";} + using parent_t = ProtocolIE_Single_Container; + +}; +struct MeasurementInitiationResult_List : asn::sequenceof +{ + static constexpr const char* name() {return "MeasurementInitiationResult-List";} + using parent_t = asn::sequenceof; + using constraint_t = asn::constraints>; + +}; +/* +MobilityChangeAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct MobilityChangeAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(id_ENB1_Cell_ID); type=1;} + void select_id_ENB2_Cell_ID() { set(id_ENB2_Cell_ID); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Cell_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Cell_ID)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Cell_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Cell_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(reject); type=1;} + void select_id_ENB2_Cell_ID() { set(reject); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ECGI& select_id_ENB1_Cell_ID() { return set(1); } + ECGI const* get_id_ENB1_Cell_ID() const { return get(1); } + ECGI& select_id_ENB2_Cell_ID() { return set(2); } + ECGI const* get_id_ENB2_Cell_ID() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Cell_ID()); return true; + case 2: v(select_id_ENB2_Cell_ID()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(ECGI)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(mandatory); type=1;} + void select_id_ENB2_Cell_ID() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MobilityChangeAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeAcknowledge-IEs}}, + ... +} +*/ + +struct MobilityChangeAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "MobilityChangeAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +MobilityChangeFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-ENB2-Mobility-Parameters-Modification-Range CRITICALITY ignore TYPE MobilityParametersModificationRange PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct MobilityChangeFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(id_ENB1_Cell_ID); type=1;} + void select_id_ENB2_Cell_ID() { set(id_ENB2_Cell_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_ENB2_Mobility_Parameters_Modification_Range() { set(id_ENB2_Mobility_Parameters_Modification_Range); type=4;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Cell_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Cell_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_ENB2_Mobility_Parameters_Modification_Range)) { type = 4; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Cell_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Cell_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ENB2_Mobility_Parameters_Modification_Range);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(ignore); type=1;} + void select_id_ENB2_Cell_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_ENB2_Mobility_Parameters_Modification_Range() { set(ignore); type=4;} + void select_id_CriticalityDiagnostics() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ECGI& select_id_ENB1_Cell_ID() { return set(1); } + ECGI const* get_id_ENB1_Cell_ID() const { return get(1); } + ECGI& select_id_ENB2_Cell_ID() { return set(2); } + ECGI const* get_id_ENB2_Cell_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + MobilityParametersModificationRange& select_id_ENB2_Mobility_Parameters_Modification_Range() { return set(4); } + MobilityParametersModificationRange const* get_id_ENB2_Mobility_Parameters_Modification_Range() const { return get(4); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(5); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Cell_ID()); return true; + case 2: v(select_id_ENB2_Cell_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_ENB2_Mobility_Parameters_Modification_Range()); return true; + case 5: v(select_id_CriticalityDiagnostics()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(ECGI)]; + char dummy4[sizeof(MobilityParametersModificationRange)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(mandatory); type=1;} + void select_id_ENB2_Cell_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_ENB2_Mobility_Parameters_Modification_Range() { set(optional); type=4;} + void select_id_CriticalityDiagnostics() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MobilityChangeFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeFailure-IEs}}, + ... +} +*/ + +struct MobilityChangeFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "MobilityChangeFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +MobilityChangeRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB2-Cell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}| + { ID id-ENB1-Mobility-Parameters CRITICALITY ignore TYPE MobilityParametersInformation PRESENCE optional}| + { ID id-ENB2-Proposed-Mobility-Parameters CRITICALITY reject TYPE MobilityParametersInformation PRESENCE mandatory}| + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE mandatory}, + ... +} +*/ + +struct MobilityChangeRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(id_ENB1_Cell_ID); type=1;} + void select_id_ENB2_Cell_ID() { set(id_ENB2_Cell_ID); type=2;} + void select_id_ENB1_Mobility_Parameters() { set(id_ENB1_Mobility_Parameters); type=3;} + void select_id_ENB2_Proposed_Mobility_Parameters() { set(id_ENB2_Proposed_Mobility_Parameters); type=4;} + void select_id_Cause() { set(id_Cause); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Cell_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Cell_ID)) { type = 2; return true; } + else if(equal(id_ENB1_Mobility_Parameters)) { type = 3; return true; } + else if(equal(id_ENB2_Proposed_Mobility_Parameters)) { type = 4; return true; } + else if(equal(id_Cause)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Cell_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Cell_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ENB1_Mobility_Parameters);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ENB2_Proposed_Mobility_Parameters);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(reject); type=1;} + void select_id_ENB2_Cell_ID() { set(reject); type=2;} + void select_id_ENB1_Mobility_Parameters() { set(ignore); type=3;} + void select_id_ENB2_Proposed_Mobility_Parameters() { set(reject); type=4;} + void select_id_Cause() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + ECGI& select_id_ENB1_Cell_ID() { return set(1); } + ECGI const* get_id_ENB1_Cell_ID() const { return get(1); } + ECGI& select_id_ENB2_Cell_ID() { return set(2); } + ECGI const* get_id_ENB2_Cell_ID() const { return get(2); } + MobilityParametersInformation& select_id_ENB1_Mobility_Parameters() { return set(3); } + MobilityParametersInformation const* get_id_ENB1_Mobility_Parameters() const { return get(3); } + MobilityParametersInformation& select_id_ENB2_Proposed_Mobility_Parameters() { return set(4); } + MobilityParametersInformation const* get_id_ENB2_Proposed_Mobility_Parameters() const { return get(4); } + Cause& select_id_Cause() { return set(5); } + Cause const* get_id_Cause() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Cell_ID()); return true; + case 2: v(select_id_ENB2_Cell_ID()); return true; + case 3: v(select_id_ENB1_Mobility_Parameters()); return true; + case 4: v(select_id_ENB2_Proposed_Mobility_Parameters()); return true; + case 5: v(select_id_Cause()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(ECGI)]; + char dummy3[sizeof(MobilityParametersInformation)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Cell_ID() { set(mandatory); type=1;} + void select_id_ENB2_Cell_ID() { set(mandatory); type=2;} + void select_id_ENB1_Mobility_Parameters() { set(optional); type=3;} + void select_id_ENB2_Proposed_Mobility_Parameters() { set(mandatory); type=4;} + void select_id_Cause() { set(mandatory); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +MobilityChangeRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{MobilityChangeRequest-IEs}}, + ... +} +*/ + +struct MobilityChangeRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "MobilityChangeRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +PartialSuccessIndicator ::= ENUMERATED { + partial-success-allowed, +... +} +*/ + +struct PartialSuccessIndicator : asn::enumerated<1, 0, true> +{ + static constexpr const char* name() {return "PartialSuccessIndicator";} + using parent_t = asn::enumerated<1, 0, true>; + typedef enum { + partial_success_allowed + } index_t; + +}; + +/* +PrivateMessage-IEs X2AP-PRIVATE-IES ::= { + ... +} +*/ + +struct PrivateMessage_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PRIVATE_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PRIVATE_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PRIVATE_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessage-IEs}}, + ... +} +*/ + +struct PrivateMessage : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "PrivateMessage";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct privateIEs_t : PrivateIE_Container + { + static constexpr const char* name() {return "privateIEs_t";} + using parent_t = PrivateIE_Container; + + }; + privateIEs_t& ref_privateIEs() {return privateIEs;} + privateIEs_t const& ref_privateIEs() const {return privateIEs;} + template void decode(V& v) + { + v(privateIEs); + + }; + template void encode(V& v) const + { + v(privateIEs); + + }; + void clear() + { + privateIEs.clear(); + + }; + private: + privateIEs_t privateIEs; + +}; +/* +RLFIndication-IEs X2AP-PROTOCOL-IES ::= { + { ID id-FailureCellPCI CRITICALITY ignore TYPE PCI PRESENCE mandatory}| + { ID id-Re-establishmentCellECGI CRITICALITY ignore TYPE ECGI PRESENCE mandatory}| + { ID id-FailureCellCRNTI CRITICALITY ignore TYPE CRNTI PRESENCE mandatory}| + { ID id-ShortMAC-I CRITICALITY ignore TYPE ShortMAC-I PRESENCE optional}| + { ID id-UE-RLF-Report-Container CRITICALITY ignore TYPE UE-RLF-Report-Container PRESENCE optional}| + { ID id-RRCConnSetupIndicator CRITICALITY reject TYPE RRCConnSetupIndicator PRESENCE optional}| + { ID id-RRCConnReestabIndicator CRITICALITY ignore TYPE RRCConnReestabIndicator PRESENCE optional}| + { ID id-UE-RLF-Report-Container-for-extended-bands CRITICALITY ignore TYPE UE-RLF-Report-Container-for-extended-bands PRESENCE optional}, + ... +} +*/ + +struct RLFIndication_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_FailureCellPCI() { set(id_FailureCellPCI); type=1;} + void select_id_Re_establishmentCellECGI() { set(id_Re_establishmentCellECGI); type=2;} + void select_id_FailureCellCRNTI() { set(id_FailureCellCRNTI); type=3;} + void select_id_ShortMAC_I() { set(id_ShortMAC_I); type=4;} + void select_id_UE_RLF_Report_Container() { set(id_UE_RLF_Report_Container); type=5;} + void select_id_RRCConnSetupIndicator() { set(id_RRCConnSetupIndicator); type=6;} + void select_id_RRCConnReestabIndicator() { set(id_RRCConnReestabIndicator); type=7;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(id_UE_RLF_Report_Container_for_extended_bands); type=8;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_FailureCellPCI)) { type = 1; return true; } + else if(equal(id_Re_establishmentCellECGI)) { type = 2; return true; } + else if(equal(id_FailureCellCRNTI)) { type = 3; return true; } + else if(equal(id_ShortMAC_I)) { type = 4; return true; } + else if(equal(id_UE_RLF_Report_Container)) { type = 5; return true; } + else if(equal(id_RRCConnSetupIndicator)) { type = 6; return true; } + else if(equal(id_RRCConnReestabIndicator)) { type = 7; return true; } + else if(equal(id_UE_RLF_Report_Container_for_extended_bands)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_FailureCellPCI);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_Re_establishmentCellECGI);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_FailureCellCRNTI);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ShortMAC_I);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_UE_RLF_Report_Container);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_RRCConnSetupIndicator);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_RRCConnReestabIndicator);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_UE_RLF_Report_Container_for_extended_bands);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_FailureCellPCI() { set(ignore); type=1;} + void select_id_Re_establishmentCellECGI() { set(ignore); type=2;} + void select_id_FailureCellCRNTI() { set(ignore); type=3;} + void select_id_ShortMAC_I() { set(ignore); type=4;} + void select_id_UE_RLF_Report_Container() { set(ignore); type=5;} + void select_id_RRCConnSetupIndicator() { set(reject); type=6;} + void select_id_RRCConnReestabIndicator() { set(ignore); type=7;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(ignore); type=8;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + PCI& select_id_FailureCellPCI() { return set(1); } + PCI const* get_id_FailureCellPCI() const { return get(1); } + ECGI& select_id_Re_establishmentCellECGI() { return set(2); } + ECGI const* get_id_Re_establishmentCellECGI() const { return get(2); } + CRNTI& select_id_FailureCellCRNTI() { return set(3); } + CRNTI const* get_id_FailureCellCRNTI() const { return get(3); } + ShortMAC_I& select_id_ShortMAC_I() { return set(4); } + ShortMAC_I const* get_id_ShortMAC_I() const { return get(4); } + UE_RLF_Report_Container& select_id_UE_RLF_Report_Container() { return set(5); } + UE_RLF_Report_Container const* get_id_UE_RLF_Report_Container() const { return get(5); } + RRCConnSetupIndicator& select_id_RRCConnSetupIndicator() { return set(6); } + RRCConnSetupIndicator const* get_id_RRCConnSetupIndicator() const { return get(6); } + RRCConnReestabIndicator& select_id_RRCConnReestabIndicator() { return set(7); } + RRCConnReestabIndicator const* get_id_RRCConnReestabIndicator() const { return get(7); } + UE_RLF_Report_Container_for_extended_bands& select_id_UE_RLF_Report_Container_for_extended_bands() { return set(8); } + UE_RLF_Report_Container_for_extended_bands const* get_id_UE_RLF_Report_Container_for_extended_bands() const { return get(8); } + bool is_unknown() const { return type == 9; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_FailureCellPCI()); return true; + case 2: v(select_id_Re_establishmentCellECGI()); return true; + case 3: v(select_id_FailureCellCRNTI()); return true; + case 4: v(select_id_ShortMAC_I()); return true; + case 5: v(select_id_UE_RLF_Report_Container()); return true; + case 6: v(select_id_RRCConnSetupIndicator()); return true; + case 7: v(select_id_RRCConnReestabIndicator()); return true; + case 8: v(select_id_UE_RLF_Report_Container_for_extended_bands()); return true; + case 9: if(type != 9) {clear(); asn::base::set();} type = 9; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CRNTI)]; + char dummy2[sizeof(ECGI)]; + char dummy3[sizeof(PCI)]; + char dummy4[sizeof(RRCConnReestabIndicator)]; + char dummy5[sizeof(RRCConnSetupIndicator)]; + char dummy6[sizeof(ShortMAC_I)]; + char dummy7[sizeof(UE_RLF_Report_Container)]; + char dummy8[sizeof(UE_RLF_Report_Container_for_extended_bands)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_FailureCellPCI() { set(mandatory); type=1;} + void select_id_Re_establishmentCellECGI() { set(mandatory); type=2;} + void select_id_FailureCellCRNTI() { set(mandatory); type=3;} + void select_id_ShortMAC_I() { set(optional); type=4;} + void select_id_UE_RLF_Report_Container() { set(optional); type=5;} + void select_id_RRCConnSetupIndicator() { set(optional); type=6;} + void select_id_RRCConnReestabIndicator() { set(optional); type=7;} + void select_id_UE_RLF_Report_Container_for_extended_bands() { set(optional); type=8;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RLFIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RLFIndication-IEs}}, + ... +} +*/ + +struct RLFIndication : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RLFIndication";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RNL-Header-Item-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct RNL_Header_Item_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RNL-Header ::= SEQUENCE { + source-GlobalENB-ID GlobalENB-ID, + target-GlobalENB-ID GlobalENB-ID OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {RNL-Header-Item-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct RNL_Header : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "RNL-Header";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct source_GlobalENB_ID_t : GlobalENB_ID + { + static constexpr const char* name() {return "source_GlobalENB_ID_t";} + using parent_t = GlobalENB_ID; + + }; + source_GlobalENB_ID_t& ref_source_GlobalENB_ID() {return source_GlobalENB_ID;} + source_GlobalENB_ID_t const& ref_source_GlobalENB_ID() const {return source_GlobalENB_ID;} + struct target_GlobalENB_ID_t : GlobalENB_ID + { + static constexpr const char* name() {return "target_GlobalENB_ID_t";} + using parent_t = GlobalENB_ID; + static constexpr bool optional = true; + + }; + target_GlobalENB_ID_t& set_target_GlobalENB_ID() { target_GlobalENB_ID.setpresent(true); return target_GlobalENB_ID;} + target_GlobalENB_ID_t const* get_target_GlobalENB_ID() const {return target_GlobalENB_ID.is_valid() ? &target_GlobalENB_ID : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(source_GlobalENB_ID); + v(target_GlobalENB_ID); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(source_GlobalENB_ID); + v(target_GlobalENB_ID); + v(iE_Extensions); + + }; + void clear() + { + source_GlobalENB_ID.clear(); + target_GlobalENB_ID.clear(); + iE_Extensions.clear(); + + }; + private: + source_GlobalENB_ID_t source_GlobalENB_ID; + target_GlobalENB_ID_t target_GlobalENB_ID; + iE_Extensions_t iE_Extensions; + +}; +/* +RRCTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-SplitSRB CRITICALITY reject TYPE SplitSRB PRESENCE optional}| + { ID id-UENRMeasurement CRITICALITY reject TYPE UENRMeasurement PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct RRCTransfer_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_SplitSRB() { set(id_SplitSRB); type=3;} + void select_id_UENRMeasurement() { set(id_UENRMeasurement); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_SplitSRB)) { type = 3; return true; } + else if(equal(id_UENRMeasurement)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SplitSRB);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_UENRMeasurement);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_SplitSRB() { set(reject); type=3;} + void select_id_UENRMeasurement() { set(reject); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + SplitSRB& select_id_SplitSRB() { return set(3); } + SplitSRB const* get_id_SplitSRB() const { return get(3); } + UENRMeasurement& select_id_UENRMeasurement() { return set(4); } + UENRMeasurement const* get_id_UENRMeasurement() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_SplitSRB()); return true; + case 4: v(select_id_UENRMeasurement()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(SgNB_UE_X2AP_ID)]; + char dummy2[sizeof(SplitSRB)]; + char dummy3[sizeof(UENRMeasurement)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_SplitSRB() { set(optional); type=3;} + void select_id_UENRMeasurement() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RRCTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{RRCTransfer-IEs}}, + ... +} +*/ + +struct RRCTransfer : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RRCTransfer";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ReportingPeriodicity ::= ENUMERATED { + one-thousand-ms, + two-thousand-ms, + five-thousand-ms, + ten-thousand-ms, +... +} +*/ + +struct ReportingPeriodicity : asn::enumerated<4, 0, true> +{ + static constexpr const char* name() {return "ReportingPeriodicity";} + using parent_t = asn::enumerated<4, 0, true>; + typedef enum { + one_thousand_ms + ,two_thousand_ms + ,five_thousand_ms + ,ten_thousand_ms + } index_t; + +}; + +/* +ResetRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}, + ... +} +*/ + +struct ResetRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResetRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResetRequest-IEs}}, + ... +} +*/ + +struct ResetRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResetRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResetResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} +*/ + +struct ResetResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_CriticalityDiagnostics)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(ignore); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(1); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_CriticalityDiagnostics()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_CriticalityDiagnostics() { set(optional); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResetResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResetResponse-IEs}}, + ... +} +*/ + +struct ResetResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResetResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResourceStatusFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-CompleteFailureCauseInformation-List CRITICALITY ignore TYPE CompleteFailureCauseInformation-List PRESENCE optional}, + ... +} +*/ + +struct ResourceStatusFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(id_ENB1_Measurement_ID); type=1;} + void select_id_ENB2_Measurement_ID() { set(id_ENB2_Measurement_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_CompleteFailureCauseInformation_List() { set(id_CompleteFailureCauseInformation_List); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Measurement_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Measurement_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_CompleteFailureCauseInformation_List)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Measurement_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Measurement_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CompleteFailureCauseInformation_List);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(reject); type=1;} + void select_id_ENB2_Measurement_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_CompleteFailureCauseInformation_List() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Measurement_ID& select_id_ENB1_Measurement_ID() { return set(1); } + Measurement_ID const* get_id_ENB1_Measurement_ID() const { return get(1); } + Measurement_ID& select_id_ENB2_Measurement_ID() { return set(2); } + Measurement_ID const* get_id_ENB2_Measurement_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + CompleteFailureCauseInformation_List& select_id_CompleteFailureCauseInformation_List() { return set(5); } + CompleteFailureCauseInformation_List const* get_id_CompleteFailureCauseInformation_List() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Measurement_ID()); return true; + case 2: v(select_id_ENB2_Measurement_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_CompleteFailureCauseInformation_List()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CompleteFailureCauseInformation_List)]; + char dummy3[sizeof(CriticalityDiagnostics)]; + char dummy4[sizeof(Measurement_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(mandatory); type=1;} + void select_id_ENB2_Measurement_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_CompleteFailureCauseInformation_List() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResourceStatusFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusFailure-IEs}}, + ... +} +*/ + +struct ResourceStatusFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResourceStatusFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResourceStatusRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY ignore TYPE Measurement-ID PRESENCE conditional}|-- The IE shall be present if the Registration Request IE is set to “Stop”, “Partial stop” or to “Add”-- + { ID id-Registration-Request CRITICALITY reject TYPE Registration-Request PRESENCE mandatory}| + { ID id-ReportCharacteristics CRITICALITY reject TYPE ReportCharacteristics PRESENCE optional}| + { ID id-CellToReport CRITICALITY ignore TYPE CellToReport-List PRESENCE mandatory}| + { ID id-ReportingPeriodicity CRITICALITY ignore TYPE ReportingPeriodicity PRESENCE optional}| + { ID id-PartialSuccessIndicator CRITICALITY ignore TYPE PartialSuccessIndicator PRESENCE optional}| + { ID id-ReportingPeriodicityRSRPMR CRITICALITY ignore TYPE ReportingPeriodicityRSRPMR PRESENCE optional}| + { ID id-ReportingPeriodicityCSIR CRITICALITY ignore TYPE ReportingPeriodicityCSIR PRESENCE optional}, + ... +} +*/ + +struct ResourceStatusRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(id_ENB1_Measurement_ID); type=1;} + void select_id_ENB2_Measurement_ID() { set(id_ENB2_Measurement_ID); type=2;} + void select_id_Registration_Request() { set(id_Registration_Request); type=3;} + void select_id_ReportCharacteristics() { set(id_ReportCharacteristics); type=4;} + void select_id_CellToReport() { set(id_CellToReport); type=5;} + void select_id_ReportingPeriodicity() { set(id_ReportingPeriodicity); type=6;} + void select_id_PartialSuccessIndicator() { set(id_PartialSuccessIndicator); type=7;} + void select_id_ReportingPeriodicityRSRPMR() { set(id_ReportingPeriodicityRSRPMR); type=8;} + void select_id_ReportingPeriodicityCSIR() { set(id_ReportingPeriodicityCSIR); type=9;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Measurement_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Measurement_ID)) { type = 2; return true; } + else if(equal(id_Registration_Request)) { type = 3; return true; } + else if(equal(id_ReportCharacteristics)) { type = 4; return true; } + else if(equal(id_CellToReport)) { type = 5; return true; } + else if(equal(id_ReportingPeriodicity)) { type = 6; return true; } + else if(equal(id_PartialSuccessIndicator)) { type = 7; return true; } + else if(equal(id_ReportingPeriodicityRSRPMR)) { type = 8; return true; } + else if(equal(id_ReportingPeriodicityCSIR)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Measurement_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Measurement_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Registration_Request);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ReportCharacteristics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CellToReport);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_ReportingPeriodicity);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_PartialSuccessIndicator);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_ReportingPeriodicityRSRPMR);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_ReportingPeriodicityCSIR);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(reject); type=1;} + void select_id_ENB2_Measurement_ID() { set(ignore); type=2;} + void select_id_Registration_Request() { set(reject); type=3;} + void select_id_ReportCharacteristics() { set(reject); type=4;} + void select_id_CellToReport() { set(ignore); type=5;} + void select_id_ReportingPeriodicity() { set(ignore); type=6;} + void select_id_PartialSuccessIndicator() { set(ignore); type=7;} + void select_id_ReportingPeriodicityRSRPMR() { set(ignore); type=8;} + void select_id_ReportingPeriodicityCSIR() { set(ignore); type=9;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Measurement_ID& select_id_ENB1_Measurement_ID() { return set(1); } + Measurement_ID const* get_id_ENB1_Measurement_ID() const { return get(1); } + Measurement_ID& select_id_ENB2_Measurement_ID() { return set(2); } + Measurement_ID const* get_id_ENB2_Measurement_ID() const { return get(2); } + Registration_Request& select_id_Registration_Request() { return set(3); } + Registration_Request const* get_id_Registration_Request() const { return get(3); } + ReportCharacteristics& select_id_ReportCharacteristics() { return set(4); } + ReportCharacteristics const* get_id_ReportCharacteristics() const { return get(4); } + CellToReport_List& select_id_CellToReport() { return set(5); } + CellToReport_List const* get_id_CellToReport() const { return get(5); } + ReportingPeriodicity& select_id_ReportingPeriodicity() { return set(6); } + ReportingPeriodicity const* get_id_ReportingPeriodicity() const { return get(6); } + PartialSuccessIndicator& select_id_PartialSuccessIndicator() { return set(7); } + PartialSuccessIndicator const* get_id_PartialSuccessIndicator() const { return get(7); } + ReportingPeriodicityRSRPMR& select_id_ReportingPeriodicityRSRPMR() { return set(8); } + ReportingPeriodicityRSRPMR const* get_id_ReportingPeriodicityRSRPMR() const { return get(8); } + ReportingPeriodicityCSIR& select_id_ReportingPeriodicityCSIR() { return set(9); } + ReportingPeriodicityCSIR const* get_id_ReportingPeriodicityCSIR() const { return get(9); } + bool is_unknown() const { return type == 10; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Measurement_ID()); return true; + case 2: v(select_id_ENB2_Measurement_ID()); return true; + case 3: v(select_id_Registration_Request()); return true; + case 4: v(select_id_ReportCharacteristics()); return true; + case 5: v(select_id_CellToReport()); return true; + case 6: v(select_id_ReportingPeriodicity()); return true; + case 7: v(select_id_PartialSuccessIndicator()); return true; + case 8: v(select_id_ReportingPeriodicityRSRPMR()); return true; + case 9: v(select_id_ReportingPeriodicityCSIR()); return true; + case 10: if(type != 10) {clear(); asn::base::set();} type = 10; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellToReport_List)]; + char dummy2[sizeof(Measurement_ID)]; + char dummy3[sizeof(PartialSuccessIndicator)]; + char dummy4[sizeof(Registration_Request)]; + char dummy5[sizeof(ReportCharacteristics)]; + char dummy6[sizeof(ReportingPeriodicity)]; + char dummy7[sizeof(ReportingPeriodicityCSIR)]; + char dummy8[sizeof(ReportingPeriodicityRSRPMR)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 10; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(mandatory); type=1;} + void select_id_ENB2_Measurement_ID() { set(conditional); type=2;} + void select_id_Registration_Request() { set(mandatory); type=3;} + void select_id_ReportCharacteristics() { set(optional); type=4;} + void select_id_CellToReport() { set(mandatory); type=5;} + void select_id_ReportingPeriodicity() { set(optional); type=6;} + void select_id_PartialSuccessIndicator() { set(optional); type=7;} + void select_id_ReportingPeriodicityRSRPMR() { set(optional); type=8;} + void select_id_ReportingPeriodicityCSIR() { set(optional); type=9;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(conditional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else { type = 10; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(conditional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResourceStatusRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusRequest-IEs}}, + ... +} +*/ + +struct ResourceStatusRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResourceStatusRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResourceStatusResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeasurementInitiationResult-List CRITICALITY ignore TYPE MeasurementInitiationResult-List PRESENCE optional}, + ... +} +*/ + +struct ResourceStatusResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(id_ENB1_Measurement_ID); type=1;} + void select_id_ENB2_Measurement_ID() { set(id_ENB2_Measurement_ID); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + void select_id_MeasurementInitiationResult_List() { set(id_MeasurementInitiationResult_List); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Measurement_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Measurement_ID)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else if(equal(id_MeasurementInitiationResult_List)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Measurement_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Measurement_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeasurementInitiationResult_List);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(reject); type=1;} + void select_id_ENB2_Measurement_ID() { set(reject); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + void select_id_MeasurementInitiationResult_List() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Measurement_ID& select_id_ENB1_Measurement_ID() { return set(1); } + Measurement_ID const* get_id_ENB1_Measurement_ID() const { return get(1); } + Measurement_ID& select_id_ENB2_Measurement_ID() { return set(2); } + Measurement_ID const* get_id_ENB2_Measurement_ID() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + MeasurementInitiationResult_List& select_id_MeasurementInitiationResult_List() { return set(4); } + MeasurementInitiationResult_List const* get_id_MeasurementInitiationResult_List() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Measurement_ID()); return true; + case 2: v(select_id_ENB2_Measurement_ID()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: v(select_id_MeasurementInitiationResult_List()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(MeasurementInitiationResult_List)]; + char dummy3[sizeof(Measurement_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(mandatory); type=1;} + void select_id_ENB2_Measurement_ID() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + void select_id_MeasurementInitiationResult_List() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResourceStatusResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusResponse-IEs}}, + ... +} +*/ + +struct ResourceStatusResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResourceStatusResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResourceStatusUpdate-IEs X2AP-PROTOCOL-IES ::= { + { ID id-ENB1-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-ENB2-Measurement-ID CRITICALITY reject TYPE Measurement-ID PRESENCE mandatory}| + { ID id-CellMeasurementResult CRITICALITY ignore TYPE CellMeasurementResult-List PRESENCE mandatory}, + ... +} +*/ + +struct ResourceStatusUpdate_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(id_ENB1_Measurement_ID); type=1;} + void select_id_ENB2_Measurement_ID() { set(id_ENB2_Measurement_ID); type=2;} + void select_id_CellMeasurementResult() { set(id_CellMeasurementResult); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_ENB1_Measurement_ID)) { type = 1; return true; } + else if(equal(id_ENB2_Measurement_ID)) { type = 2; return true; } + else if(equal(id_CellMeasurementResult)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_ENB1_Measurement_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ENB2_Measurement_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CellMeasurementResult);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(reject); type=1;} + void select_id_ENB2_Measurement_ID() { set(reject); type=2;} + void select_id_CellMeasurementResult() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Measurement_ID& select_id_ENB1_Measurement_ID() { return set(1); } + Measurement_ID const* get_id_ENB1_Measurement_ID() const { return get(1); } + Measurement_ID& select_id_ENB2_Measurement_ID() { return set(2); } + Measurement_ID const* get_id_ENB2_Measurement_ID() const { return get(2); } + CellMeasurementResult_List& select_id_CellMeasurementResult() { return set(3); } + CellMeasurementResult_List const* get_id_CellMeasurementResult() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_ENB1_Measurement_ID()); return true; + case 2: v(select_id_ENB2_Measurement_ID()); return true; + case 3: v(select_id_CellMeasurementResult()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellMeasurementResult_List)]; + char dummy2[sizeof(Measurement_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_ENB1_Measurement_ID() { set(mandatory); type=1;} + void select_id_ENB2_Measurement_ID() { set(mandatory); type=2;} + void select_id_CellMeasurementResult() { set(mandatory); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResourceStatusUpdate ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ResourceStatusUpdate-IEs}}, + ... +} +*/ + +struct ResourceStatusUpdate : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "ResourceStatusUpdate";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +ResponseInformationSeNBReconfComp-SuccessItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ResponseInformationSeNBReconfComp_SuccessItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResponseInformationSeNBReconfComp-SuccessItem ::= SEQUENCE { + meNBtoSeNBContainer MeNBtoSeNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSeNBReconfComp-SuccessItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct ResponseInformationSeNBReconfComp_SuccessItem : asn::sequence<2, 0, true, 2> +{ + static constexpr const char* name() {return "ResponseInformationSeNBReconfComp-SuccessItem";} + using parent_t = asn::sequence<2, 0, true, 2>; + struct meNBtoSeNBContainer_t : MeNBtoSeNBContainer + { + static constexpr const char* name() {return "meNBtoSeNBContainer_t";} + using parent_t = MeNBtoSeNBContainer; + static constexpr bool optional = true; + + }; + meNBtoSeNBContainer_t& set_meNBtoSeNBContainer() { meNBtoSeNBContainer.setpresent(true); return meNBtoSeNBContainer;} + meNBtoSeNBContainer_t const* get_meNBtoSeNBContainer() const {return meNBtoSeNBContainer.is_valid() ? &meNBtoSeNBContainer : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(meNBtoSeNBContainer); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(meNBtoSeNBContainer); + v(iE_Extensions); + + }; + void clear() + { + meNBtoSeNBContainer.clear(); + iE_Extensions.clear(); + + }; + private: + meNBtoSeNBContainer_t meNBtoSeNBContainer; + iE_Extensions_t iE_Extensions; + +}; +/* +ResponseInformationSeNBReconfComp-RejectByMeNBItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ResponseInformationSeNBReconfComp_RejectByMeNBItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResponseInformationSeNBReconfComp-RejectByMeNBItem ::= SEQUENCE { + cause Cause, + meNBtoSeNBContainer MeNBtoSeNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSeNBReconfComp-RejectByMeNBItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct ResponseInformationSeNBReconfComp_RejectByMeNBItem : asn::sequence<3, 0, true, 2> +{ + static constexpr const char* name() {return "ResponseInformationSeNBReconfComp-RejectByMeNBItem";} + using parent_t = asn::sequence<3, 0, true, 2>; + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct meNBtoSeNBContainer_t : MeNBtoSeNBContainer + { + static constexpr const char* name() {return "meNBtoSeNBContainer_t";} + using parent_t = MeNBtoSeNBContainer; + static constexpr bool optional = true; + + }; + meNBtoSeNBContainer_t& set_meNBtoSeNBContainer() { meNBtoSeNBContainer.setpresent(true); return meNBtoSeNBContainer;} + meNBtoSeNBContainer_t const* get_meNBtoSeNBContainer() const {return meNBtoSeNBContainer.is_valid() ? &meNBtoSeNBContainer : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cause); + v(meNBtoSeNBContainer); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cause); + v(meNBtoSeNBContainer); + v(iE_Extensions); + + }; + void clear() + { + cause.clear(); + meNBtoSeNBContainer.clear(); + iE_Extensions.clear(); + + }; + private: + cause_t cause; + meNBtoSeNBContainer_t meNBtoSeNBContainer; + iE_Extensions_t iE_Extensions; + +}; +/* +ResponseInformationSeNBReconfComp ::= CHOICE { + success ResponseInformationSeNBReconfComp-SuccessItem, + reject-by-MeNB ResponseInformationSeNBReconfComp-RejectByMeNBItem, + ... +} +*/ + +struct ResponseInformationSeNBReconfComp : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "ResponseInformationSeNBReconfComp";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~ResponseInformationSeNBReconfComp() {clear();} + struct success_t : ResponseInformationSeNBReconfComp_SuccessItem + { + static constexpr const char* name() {return "success_t";} + using parent_t = ResponseInformationSeNBReconfComp_SuccessItem; + + }; + struct reject_by_MeNB_t : ResponseInformationSeNBReconfComp_RejectByMeNBItem + { + static constexpr const char* name() {return "reject_by_MeNB_t";} + using parent_t = ResponseInformationSeNBReconfComp_RejectByMeNBItem; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + success_t& select_success() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + success_t const* get_success() const { if(get_index() == 1) { return &var.as();} return nullptr; } + reject_by_MeNB_t& select_reject_by_MeNB() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + reject_by_MeNB_t const* get_reject_by_MeNB() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(success_t)]; + char dummy2[sizeof(reject_by_MeNB_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +ResponseInformationSgNBReconfComp-SuccessItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ResponseInformationSgNBReconfComp_SuccessItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResponseInformationSgNBReconfComp-SuccessItem ::= SEQUENCE { + meNBtoSgNBContainer MeNBtoSgNBContainer OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSgNBReconfComp-SuccessItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct ResponseInformationSgNBReconfComp_SuccessItem : asn::sequence<2, 0, true, 2> +{ + static constexpr const char* name() {return "ResponseInformationSgNBReconfComp-SuccessItem";} + using parent_t = asn::sequence<2, 0, true, 2>; + struct meNBtoSgNBContainer_t : MeNBtoSgNBContainer + { + static constexpr const char* name() {return "meNBtoSgNBContainer_t";} + using parent_t = MeNBtoSgNBContainer; + static constexpr bool optional = true; + + }; + meNBtoSgNBContainer_t& set_meNBtoSgNBContainer() { meNBtoSgNBContainer.setpresent(true); return meNBtoSgNBContainer;} + meNBtoSgNBContainer_t const* get_meNBtoSgNBContainer() const {return meNBtoSgNBContainer.is_valid() ? &meNBtoSgNBContainer : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(meNBtoSgNBContainer); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(meNBtoSgNBContainer); + v(iE_Extensions); + + }; + void clear() + { + meNBtoSgNBContainer.clear(); + iE_Extensions.clear(); + + }; + private: + meNBtoSgNBContainer_t meNBtoSgNBContainer; + iE_Extensions_t iE_Extensions; + +}; +/* +ResponseInformationSgNBReconfComp-RejectByMeNBItemExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct ResponseInformationSgNBReconfComp_RejectByMeNBItemExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +ResponseInformationSgNBReconfComp-RejectByMeNBItem ::= SEQUENCE { + cause Cause, + iE-Extensions ProtocolExtensionContainer { {ResponseInformationSgNBReconfComp-RejectByMeNBItemExtIEs} } OPTIONAL, + ... +} +*/ + +struct ResponseInformationSgNBReconfComp_RejectByMeNBItem : asn::sequence<2, 0, true, 1> +{ + static constexpr const char* name() {return "ResponseInformationSgNBReconfComp-RejectByMeNBItem";} + using parent_t = asn::sequence<2, 0, true, 1>; + struct cause_t : Cause + { + static constexpr const char* name() {return "cause_t";} + using parent_t = Cause; + + }; + cause_t& ref_cause() {return cause;} + cause_t const& ref_cause() const {return cause;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(cause); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(cause); + v(iE_Extensions); + + }; + void clear() + { + cause.clear(); + iE_Extensions.clear(); + + }; + private: + cause_t cause; + iE_Extensions_t iE_Extensions; + +}; +/* +ResponseInformationSgNBReconfComp ::= CHOICE { + success-SgNBReconfComp ResponseInformationSgNBReconfComp-SuccessItem, + reject-by-MeNB-SgNBReconfComp ResponseInformationSgNBReconfComp-RejectByMeNBItem, + ... +} +*/ + +struct ResponseInformationSgNBReconfComp : asn::choice<2, 0, true> +{ + static constexpr const char* name() {return "ResponseInformationSgNBReconfComp";} + using parent_t = asn::choice<2, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 3;} + void set_unknown() { set_index(3); } + ~ResponseInformationSgNBReconfComp() {clear();} + struct success_SgNBReconfComp_t : ResponseInformationSgNBReconfComp_SuccessItem + { + static constexpr const char* name() {return "success_SgNBReconfComp_t";} + using parent_t = ResponseInformationSgNBReconfComp_SuccessItem; + + }; + struct reject_by_MeNB_SgNBReconfComp_t : ResponseInformationSgNBReconfComp_RejectByMeNBItem + { + static constexpr const char* name() {return "reject_by_MeNB_SgNBReconfComp_t";} + using parent_t = ResponseInformationSgNBReconfComp_RejectByMeNBItem; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + success_SgNBReconfComp_t& select_success_SgNBReconfComp() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + success_SgNBReconfComp_t const* get_success_SgNBReconfComp() const { if(get_index() == 1) { return &var.as();} return nullptr; } + reject_by_MeNB_SgNBReconfComp_t& select_reject_by_MeNB_SgNBReconfComp() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + reject_by_MeNB_SgNBReconfComp_t const* get_reject_by_MeNB_SgNBReconfComp() const { if(get_index() == 2) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(success_SgNBReconfComp_t)]; + char dummy2[sizeof(reject_by_MeNB_SgNBReconfComp_t)]; + + }; + asn::variant var; + index_type index {0}; +}; +/* +RetrieveUEContextFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct RetrieveUEContextFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_New_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(2); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RetrieveUEContextFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextFailure-IEs}}, + ... +} +*/ + +struct RetrieveUEContextFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RetrieveUEContextFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +RetrieveUEContextRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-resumeID CRITICALITY reject TYPE ResumeID PRESENCE mandatory}| + { ID id-ShortMAC-I CRITICALITY reject TYPE ShortMAC-I PRESENCE mandatory}| + { ID id-NewEUTRANCellIdentifier CRITICALITY reject TYPE EUTRANCellIdentifier PRESENCE mandatory}| + {ID id-FailureCellCRNTI CRITICALITY reject TYPE CRNTI PRESENCE optional}| + {ID id-FailureCellPCI CRITICALITY reject TYPE PCI PRESENCE optional}, + ... +} +*/ + +struct RetrieveUEContextRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=2;} + void select_id_resumeID() { set(id_resumeID); type=3;} + void select_id_ShortMAC_I() { set(id_ShortMAC_I); type=4;} + void select_id_NewEUTRANCellIdentifier() { set(id_NewEUTRANCellIdentifier); type=5;} + void select_id_FailureCellCRNTI() { set(id_FailureCellCRNTI); type=6;} + void select_id_FailureCellPCI() { set(id_FailureCellPCI); type=7;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_New_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 2; return true; } + else if(equal(id_resumeID)) { type = 3; return true; } + else if(equal(id_ShortMAC_I)) { type = 4; return true; } + else if(equal(id_NewEUTRANCellIdentifier)) { type = 5; return true; } + else if(equal(id_FailureCellCRNTI)) { type = 6; return true; } + else if(equal(id_FailureCellPCI)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_resumeID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ShortMAC_I);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_NewEUTRANCellIdentifier);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_FailureCellCRNTI);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_FailureCellPCI);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=2;} + void select_id_resumeID() { set(reject); type=3;} + void select_id_ShortMAC_I() { set(reject); type=4;} + void select_id_NewEUTRANCellIdentifier() { set(reject); type=5;} + void select_id_FailureCellCRNTI() { set(reject); type=6;} + void select_id_FailureCellPCI() { set(reject); type=7;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(2); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(2); } + ResumeID& select_id_resumeID() { return set(3); } + ResumeID const* get_id_resumeID() const { return get(3); } + ShortMAC_I& select_id_ShortMAC_I() { return set(4); } + ShortMAC_I const* get_id_ShortMAC_I() const { return get(4); } + EUTRANCellIdentifier& select_id_NewEUTRANCellIdentifier() { return set(5); } + EUTRANCellIdentifier const* get_id_NewEUTRANCellIdentifier() const { return get(5); } + CRNTI& select_id_FailureCellCRNTI() { return set(6); } + CRNTI const* get_id_FailureCellCRNTI() const { return get(6); } + PCI& select_id_FailureCellPCI() { return set(7); } + PCI const* get_id_FailureCellPCI() const { return get(7); } + bool is_unknown() const { return type == 8; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 3: v(select_id_resumeID()); return true; + case 4: v(select_id_ShortMAC_I()); return true; + case 5: v(select_id_NewEUTRANCellIdentifier()); return true; + case 6: v(select_id_FailureCellCRNTI()); return true; + case 7: v(select_id_FailureCellPCI()); return true; + case 8: if(type != 8) {clear(); asn::base::set();} type = 8; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CRNTI)]; + char dummy2[sizeof(EUTRANCellIdentifier)]; + char dummy3[sizeof(PCI)]; + char dummy4[sizeof(ResumeID)]; + char dummy5[sizeof(ShortMAC_I)]; + char dummy6[sizeof(UE_X2AP_ID)]; + char dummy7[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=2;} + void select_id_resumeID() { set(mandatory); type=3;} + void select_id_ShortMAC_I() { set(mandatory); type=4;} + void select_id_NewEUTRANCellIdentifier() { set(mandatory); type=5;} + void select_id_FailureCellCRNTI() { set(optional); type=6;} + void select_id_FailureCellPCI() { set(optional); type=7;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RetrieveUEContextRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextRequest-IEs}}, + ... +} +*/ + +struct RetrieveUEContextRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RetrieveUEContextRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +UE-ContextInformationRetrieve-ExtIEs X2AP-PROTOCOL-EXTENSION ::= { +{ ID id-UESidelinkAggregateMaximumBitRate CRITICALITY ignore EXTENSION UESidelinkAggregateMaximumBitRate PRESENCE optional}, + ... +} +*/ + +struct UE_ContextInformationRetrieve_ExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(id_UESidelinkAggregateMaximumBitRate); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_UESidelinkAggregateMaximumBitRate)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_UESidelinkAggregateMaximumBitRate);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + UESidelinkAggregateMaximumBitRate& select_id_UESidelinkAggregateMaximumBitRate() { return set(1); } + UESidelinkAggregateMaximumBitRate const* get_id_UESidelinkAggregateMaximumBitRate() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_UESidelinkAggregateMaximumBitRate()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(UESidelinkAggregateMaximumBitRate)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_UESidelinkAggregateMaximumBitRate() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextInformationRetrieve ::= SEQUENCE { + mME-UE-S1AP-ID UE-S1AP-ID, + uESecurityCapabilities UESecurityCapabilities, + aS-SecurityInformation AS-SecurityInformation, + uEaggregateMaximumBitRate UEAggregateMaximumBitRate, + subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, + e-RABs-ToBeSetup-ListRetrieve E-RABs-ToBeSetup-ListRetrieve, + rRC-Context RRC-Context, + handoverRestrictionList HandoverRestrictionList OPTIONAL, + locationReportingInformation LocationReportingInformation OPTIONAL, + managBasedMDTallowed ManagementBasedMDTallowed OPTIONAL, + managBasedMDTPLMNList MDTPLMNList OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationRetrieve-ExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextInformationRetrieve : asn::sequence<12, 0, true, 6> +{ + static constexpr const char* name() {return "UE-ContextInformationRetrieve";} + using parent_t = asn::sequence<12, 0, true, 6>; + struct mME_UE_S1AP_ID_t : UE_S1AP_ID + { + static constexpr const char* name() {return "mME_UE_S1AP_ID_t";} + using parent_t = UE_S1AP_ID; + + }; + mME_UE_S1AP_ID_t& ref_mME_UE_S1AP_ID() {return mME_UE_S1AP_ID;} + mME_UE_S1AP_ID_t const& ref_mME_UE_S1AP_ID() const {return mME_UE_S1AP_ID;} + struct uESecurityCapabilities_t : UESecurityCapabilities + { + static constexpr const char* name() {return "uESecurityCapabilities_t";} + using parent_t = UESecurityCapabilities; + + }; + uESecurityCapabilities_t& ref_uESecurityCapabilities() {return uESecurityCapabilities;} + uESecurityCapabilities_t const& ref_uESecurityCapabilities() const {return uESecurityCapabilities;} + struct aS_SecurityInformation_t : AS_SecurityInformation + { + static constexpr const char* name() {return "aS_SecurityInformation_t";} + using parent_t = AS_SecurityInformation; + + }; + aS_SecurityInformation_t& ref_aS_SecurityInformation() {return aS_SecurityInformation;} + aS_SecurityInformation_t const& ref_aS_SecurityInformation() const {return aS_SecurityInformation;} + struct uEaggregateMaximumBitRate_t : UEAggregateMaximumBitRate + { + static constexpr const char* name() {return "uEaggregateMaximumBitRate_t";} + using parent_t = UEAggregateMaximumBitRate; + + }; + uEaggregateMaximumBitRate_t& ref_uEaggregateMaximumBitRate() {return uEaggregateMaximumBitRate;} + uEaggregateMaximumBitRate_t const& ref_uEaggregateMaximumBitRate() const {return uEaggregateMaximumBitRate;} + struct subscriberProfileIDforRFP_t : SubscriberProfileIDforRFP + { + static constexpr const char* name() {return "subscriberProfileIDforRFP_t";} + using parent_t = SubscriberProfileIDforRFP; + static constexpr bool optional = true; + + }; + subscriberProfileIDforRFP_t& set_subscriberProfileIDforRFP() { subscriberProfileIDforRFP.setpresent(true); return subscriberProfileIDforRFP;} + subscriberProfileIDforRFP_t const* get_subscriberProfileIDforRFP() const {return subscriberProfileIDforRFP.is_valid() ? &subscriberProfileIDforRFP : nullptr;} + struct e_RABs_ToBeSetup_ListRetrieve_t : E_RABs_ToBeSetup_ListRetrieve + { + static constexpr const char* name() {return "e_RABs_ToBeSetup_ListRetrieve_t";} + using parent_t = E_RABs_ToBeSetup_ListRetrieve; + + }; + e_RABs_ToBeSetup_ListRetrieve_t& ref_e_RABs_ToBeSetup_ListRetrieve() {return e_RABs_ToBeSetup_ListRetrieve;} + e_RABs_ToBeSetup_ListRetrieve_t const& ref_e_RABs_ToBeSetup_ListRetrieve() const {return e_RABs_ToBeSetup_ListRetrieve;} + struct rRC_Context_t : RRC_Context + { + static constexpr const char* name() {return "rRC_Context_t";} + using parent_t = RRC_Context; + + }; + rRC_Context_t& ref_rRC_Context() {return rRC_Context;} + rRC_Context_t const& ref_rRC_Context() const {return rRC_Context;} + struct handoverRestrictionList_t : HandoverRestrictionList + { + static constexpr const char* name() {return "handoverRestrictionList_t";} + using parent_t = HandoverRestrictionList; + static constexpr bool optional = true; + + }; + handoverRestrictionList_t& set_handoverRestrictionList() { handoverRestrictionList.setpresent(true); return handoverRestrictionList;} + handoverRestrictionList_t const* get_handoverRestrictionList() const {return handoverRestrictionList.is_valid() ? &handoverRestrictionList : nullptr;} + struct locationReportingInformation_t : LocationReportingInformation + { + static constexpr const char* name() {return "locationReportingInformation_t";} + using parent_t = LocationReportingInformation; + static constexpr bool optional = true; + + }; + locationReportingInformation_t& set_locationReportingInformation() { locationReportingInformation.setpresent(true); return locationReportingInformation;} + locationReportingInformation_t const* get_locationReportingInformation() const {return locationReportingInformation.is_valid() ? &locationReportingInformation : nullptr;} + struct managBasedMDTallowed_t : ManagementBasedMDTallowed + { + static constexpr const char* name() {return "managBasedMDTallowed_t";} + using parent_t = ManagementBasedMDTallowed; + static constexpr bool optional = true; + + }; + managBasedMDTallowed_t& set_managBasedMDTallowed() { managBasedMDTallowed.setpresent(true); return managBasedMDTallowed;} + managBasedMDTallowed_t const* get_managBasedMDTallowed() const {return managBasedMDTallowed.is_valid() ? &managBasedMDTallowed : nullptr;} + struct managBasedMDTPLMNList_t : MDTPLMNList + { + static constexpr const char* name() {return "managBasedMDTPLMNList_t";} + using parent_t = MDTPLMNList; + static constexpr bool optional = true; + + }; + managBasedMDTPLMNList_t& set_managBasedMDTPLMNList() { managBasedMDTPLMNList.setpresent(true); return managBasedMDTPLMNList;} + managBasedMDTPLMNList_t const* get_managBasedMDTPLMNList() const {return managBasedMDTPLMNList.is_valid() ? &managBasedMDTPLMNList : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(mME_UE_S1AP_ID); + v(uESecurityCapabilities); + v(aS_SecurityInformation); + v(uEaggregateMaximumBitRate); + v(subscriberProfileIDforRFP); + v(e_RABs_ToBeSetup_ListRetrieve); + v(rRC_Context); + v(handoverRestrictionList); + v(locationReportingInformation); + v(managBasedMDTallowed); + v(managBasedMDTPLMNList); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(mME_UE_S1AP_ID); + v(uESecurityCapabilities); + v(aS_SecurityInformation); + v(uEaggregateMaximumBitRate); + v(subscriberProfileIDforRFP); + v(e_RABs_ToBeSetup_ListRetrieve); + v(rRC_Context); + v(handoverRestrictionList); + v(locationReportingInformation); + v(managBasedMDTallowed); + v(managBasedMDTPLMNList); + v(iE_Extensions); + + }; + void clear() + { + mME_UE_S1AP_ID.clear(); + uESecurityCapabilities.clear(); + aS_SecurityInformation.clear(); + uEaggregateMaximumBitRate.clear(); + subscriberProfileIDforRFP.clear(); + e_RABs_ToBeSetup_ListRetrieve.clear(); + rRC_Context.clear(); + handoverRestrictionList.clear(); + locationReportingInformation.clear(); + managBasedMDTallowed.clear(); + managBasedMDTPLMNList.clear(); + iE_Extensions.clear(); + + }; + private: + mME_UE_S1AP_ID_t mME_UE_S1AP_ID; + uESecurityCapabilities_t uESecurityCapabilities; + aS_SecurityInformation_t aS_SecurityInformation; + uEaggregateMaximumBitRate_t uEaggregateMaximumBitRate; + subscriberProfileIDforRFP_t subscriberProfileIDforRFP; + e_RABs_ToBeSetup_ListRetrieve_t e_RABs_ToBeSetup_ListRetrieve; + rRC_Context_t rRC_Context; + handoverRestrictionList_t handoverRestrictionList; + locationReportingInformation_t locationReportingInformation; + managBasedMDTallowed_t managBasedMDTallowed; + managBasedMDTPLMNList_t managBasedMDTPLMNList; + iE_Extensions_t iE_Extensions; + +}; +/* +RetrieveUEContextResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE mandatory}| + { ID id-UE-ContextInformationRetrieve CRITICALITY reject TYPE UE-ContextInformationRetrieve PRESENCE mandatory}| + { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| + { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| + { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| + { ID id-AerialUEsubscriptionInformation CRITICALITY ignore TYPE AerialUEsubscriptionInformation PRESENCE optional}| + { ID id-Subscription-Based-UE-DifferentiationInfo CRITICALITY ignore TYPE Subscription-Based-UE-DifferentiationInfo PRESENCE optional}, + ... +} +*/ + +struct RetrieveUEContextResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 16; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=2;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=4;} + void select_id_GUMMEI_ID() { set(id_GUMMEI_ID); type=5;} + void select_id_UE_ContextInformationRetrieve() { set(id_UE_ContextInformationRetrieve); type=6;} + void select_id_TraceActivation() { set(id_TraceActivation); type=7;} + void select_id_SRVCCOperationPossible() { set(id_SRVCCOperationPossible); type=8;} + void select_id_Masked_IMEISV() { set(id_Masked_IMEISV); type=9;} + void select_id_ExpectedUEBehaviour() { set(id_ExpectedUEBehaviour); type=10;} + void select_id_ProSeAuthorized() { set(id_ProSeAuthorized); type=11;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=12;} + void select_id_V2XServicesAuthorized() { set(id_V2XServicesAuthorized); type=13;} + void select_id_AerialUEsubscriptionInformation() { set(id_AerialUEsubscriptionInformation); type=14;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(id_Subscription_Based_UE_DifferentiationInfo); type=15;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_New_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 2; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 3; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_GUMMEI_ID)) { type = 5; return true; } + else if(equal(id_UE_ContextInformationRetrieve)) { type = 6; return true; } + else if(equal(id_TraceActivation)) { type = 7; return true; } + else if(equal(id_SRVCCOperationPossible)) { type = 8; return true; } + else if(equal(id_Masked_IMEISV)) { type = 9; return true; } + else if(equal(id_ExpectedUEBehaviour)) { type = 10; return true; } + else if(equal(id_ProSeAuthorized)) { type = 11; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 12; return true; } + else if(equal(id_V2XServicesAuthorized)) { type = 13; return true; } + else if(equal(id_AerialUEsubscriptionInformation)) { type = 14; return true; } + else if(equal(id_Subscription_Based_UE_DifferentiationInfo)) { type = 15; return true; } + else { type = 16; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_GUMMEI_ID);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_UE_ContextInformationRetrieve);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_TraceActivation);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_SRVCCOperationPossible);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_Masked_IMEISV);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_ExpectedUEBehaviour);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_ProSeAuthorized);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_V2XServicesAuthorized);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(id_AerialUEsubscriptionInformation);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(id_Subscription_Based_UE_DifferentiationInfo);} return false; + case 16: type = 16; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 16; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(ignore); type=2;} + void select_id_Old_eNB_UE_X2AP_ID() { set(ignore); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(ignore); type=4;} + void select_id_GUMMEI_ID() { set(reject); type=5;} + void select_id_UE_ContextInformationRetrieve() { set(reject); type=6;} + void select_id_TraceActivation() { set(ignore); type=7;} + void select_id_SRVCCOperationPossible() { set(ignore); type=8;} + void select_id_Masked_IMEISV() { set(ignore); type=9;} + void select_id_ExpectedUEBehaviour() { set(ignore); type=10;} + void select_id_ProSeAuthorized() { set(ignore); type=11;} + void select_id_CriticalityDiagnostics() { set(ignore); type=12;} + void select_id_V2XServicesAuthorized() { set(ignore); type=13;} + void select_id_AerialUEsubscriptionInformation() { set(ignore); type=14;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(ignore); type=15;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(ignore)) { type = 12; return true; } + else if(equal(ignore)) { type = 13; return true; } + else if(equal(ignore)) { type = 14; return true; } + else if(equal(ignore)) { type = 15; return true; } + else { type = 16; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(ignore);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(ignore);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(ignore);} return false; + case 16: type = 16; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(2); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(2); } + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(3); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(3); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(4); } + GUMMEI& select_id_GUMMEI_ID() { return set(5); } + GUMMEI const* get_id_GUMMEI_ID() const { return get(5); } + UE_ContextInformationRetrieve& select_id_UE_ContextInformationRetrieve() { return set(6); } + UE_ContextInformationRetrieve const* get_id_UE_ContextInformationRetrieve() const { return get(6); } + TraceActivation& select_id_TraceActivation() { return set(7); } + TraceActivation const* get_id_TraceActivation() const { return get(7); } + SRVCCOperationPossible& select_id_SRVCCOperationPossible() { return set(8); } + SRVCCOperationPossible const* get_id_SRVCCOperationPossible() const { return get(8); } + Masked_IMEISV& select_id_Masked_IMEISV() { return set(9); } + Masked_IMEISV const* get_id_Masked_IMEISV() const { return get(9); } + ExpectedUEBehaviour& select_id_ExpectedUEBehaviour() { return set(10); } + ExpectedUEBehaviour const* get_id_ExpectedUEBehaviour() const { return get(10); } + ProSeAuthorized& select_id_ProSeAuthorized() { return set(11); } + ProSeAuthorized const* get_id_ProSeAuthorized() const { return get(11); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(12); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(12); } + V2XServicesAuthorized& select_id_V2XServicesAuthorized() { return set(13); } + V2XServicesAuthorized const* get_id_V2XServicesAuthorized() const { return get(13); } + AerialUEsubscriptionInformation& select_id_AerialUEsubscriptionInformation() { return set(14); } + AerialUEsubscriptionInformation const* get_id_AerialUEsubscriptionInformation() const { return get(14); } + Subscription_Based_UE_DifferentiationInfo& select_id_Subscription_Based_UE_DifferentiationInfo() { return set(15); } + Subscription_Based_UE_DifferentiationInfo const* get_id_Subscription_Based_UE_DifferentiationInfo() const { return get(15); } + bool is_unknown() const { return type == 16; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 3: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 4: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_GUMMEI_ID()); return true; + case 6: v(select_id_UE_ContextInformationRetrieve()); return true; + case 7: v(select_id_TraceActivation()); return true; + case 8: v(select_id_SRVCCOperationPossible()); return true; + case 9: v(select_id_Masked_IMEISV()); return true; + case 10: v(select_id_ExpectedUEBehaviour()); return true; + case 11: v(select_id_ProSeAuthorized()); return true; + case 12: v(select_id_CriticalityDiagnostics()); return true; + case 13: v(select_id_V2XServicesAuthorized()); return true; + case 14: v(select_id_AerialUEsubscriptionInformation()); return true; + case 15: v(select_id_Subscription_Based_UE_DifferentiationInfo()); return true; + case 16: if(type != 16) {clear(); asn::base::set();} type = 16; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(AerialUEsubscriptionInformation)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(ExpectedUEBehaviour)]; + char dummy4[sizeof(GUMMEI)]; + char dummy5[sizeof(Masked_IMEISV)]; + char dummy6[sizeof(ProSeAuthorized)]; + char dummy7[sizeof(SRVCCOperationPossible)]; + char dummy8[sizeof(Subscription_Based_UE_DifferentiationInfo)]; + char dummy9[sizeof(TraceActivation)]; + char dummy10[sizeof(UE_ContextInformationRetrieve)]; + char dummy11[sizeof(UE_X2AP_ID)]; + char dummy12[sizeof(UE_X2AP_ID_Extension)]; + char dummy13[sizeof(V2XServicesAuthorized)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 16; } + void clear() {type = 0;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=2;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_GUMMEI_ID() { set(mandatory); type=5;} + void select_id_UE_ContextInformationRetrieve() { set(mandatory); type=6;} + void select_id_TraceActivation() { set(optional); type=7;} + void select_id_SRVCCOperationPossible() { set(optional); type=8;} + void select_id_Masked_IMEISV() { set(optional); type=9;} + void select_id_ExpectedUEBehaviour() { set(optional); type=10;} + void select_id_ProSeAuthorized() { set(optional); type=11;} + void select_id_CriticalityDiagnostics() { set(optional); type=12;} + void select_id_V2XServicesAuthorized() { set(optional); type=13;} + void select_id_AerialUEsubscriptionInformation() { set(optional); type=14;} + void select_id_Subscription_Based_UE_DifferentiationInfo() { set(optional); type=15;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(mandatory)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else if(equal(optional)) { type = 13; return true; } + else if(equal(optional)) { type = 14; return true; } + else if(equal(optional)) { type = 15; return true; } + else { type = 16; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(mandatory);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(optional);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(optional);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(optional);} return false; + case 16: type = 16; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +RetrieveUEContextResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ RetrieveUEContextResponse-IEs}}, + ... +} +*/ + +struct RetrieveUEContextResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "RetrieveUEContextResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SNStatusTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToStatusTransfer-List CRITICALITY ignore TYPE E-RABs-SubjectToStatusTransfer-List PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} +*/ + +struct SNStatusTransfer_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_SubjectToStatusTransfer_List() { set(id_E_RABs_SubjectToStatusTransfer_List); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_SubjectToStatusTransfer_List)) { type = 3; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToStatusTransfer_List);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_E_RABs_SubjectToStatusTransfer_List() { set(ignore); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(2); } + E_RABs_SubjectToStatusTransfer_List& select_id_E_RABs_SubjectToStatusTransfer_List() { return set(3); } + E_RABs_SubjectToStatusTransfer_List const* get_id_E_RABs_SubjectToStatusTransfer_List() const { return get(3); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(4); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(5); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(6); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_SubjectToStatusTransfer_List()); return true; + case 4: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToStatusTransfer_List)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_SubjectToStatusTransfer_List() { set(mandatory); type=3;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SNStatusTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SNStatusTransfer-IEs}}, + ... +} +*/ + +struct SNStatusTransfer : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SNStatusTransfer";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBAdditionRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-UE-SecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE conditional}| + -- This IE shall be present if the Bearer Option IE is set to the value “SCG bearer” -- + { ID id-SeNBSecurityKey CRITICALITY reject TYPE SeNBSecurityKey PRESENCE conditional}| + -- This IE shall be present if the Bearer Option IE is set to the value “SCG bearer” -- + { ID id-SeNBUEAggregateMaximumBitRate CRITICALITY reject TYPE UEAggregateMaximumBitRate PRESENCE mandatory}| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-E-RABs-ToBeAdded-List CRITICALITY reject TYPE E-RABs-ToBeAdded-List PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY reject TYPE MeNBtoSeNBContainer PRESENCE mandatory}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBAdditionRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_UE_SecurityCapabilities() { set(id_UE_SecurityCapabilities); type=2;} + void select_id_SeNBSecurityKey() { set(id_SeNBSecurityKey); type=3;} + void select_id_SeNBUEAggregateMaximumBitRate() { set(id_SeNBUEAggregateMaximumBitRate); type=4;} + void select_id_ServingPLMN() { set(id_ServingPLMN); type=5;} + void select_id_E_RABs_ToBeAdded_List() { set(id_E_RABs_ToBeAdded_List); type=6;} + void select_id_MeNBtoSeNBContainer() { set(id_MeNBtoSeNBContainer); type=7;} + void select_id_CSGMembershipStatus() { set(id_CSGMembershipStatus); type=8;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=10;} + void select_id_ExpectedUEBehaviour() { set(id_ExpectedUEBehaviour); type=11;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=12;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_UE_SecurityCapabilities)) { type = 2; return true; } + else if(equal(id_SeNBSecurityKey)) { type = 3; return true; } + else if(equal(id_SeNBUEAggregateMaximumBitRate)) { type = 4; return true; } + else if(equal(id_ServingPLMN)) { type = 5; return true; } + else if(equal(id_E_RABs_ToBeAdded_List)) { type = 6; return true; } + else if(equal(id_MeNBtoSeNBContainer)) { type = 7; return true; } + else if(equal(id_CSGMembershipStatus)) { type = 8; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 9; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 10; return true; } + else if(equal(id_ExpectedUEBehaviour)) { type = 11; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_UE_SecurityCapabilities);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SeNBSecurityKey);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_SeNBUEAggregateMaximumBitRate);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_ServingPLMN);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_List);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNBtoSeNBContainer);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_CSGMembershipStatus);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_ExpectedUEBehaviour);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_UE_SecurityCapabilities() { set(reject); type=2;} + void select_id_SeNBSecurityKey() { set(reject); type=3;} + void select_id_SeNBUEAggregateMaximumBitRate() { set(reject); type=4;} + void select_id_ServingPLMN() { set(ignore); type=5;} + void select_id_E_RABs_ToBeAdded_List() { set(reject); type=6;} + void select_id_MeNBtoSeNBContainer() { set(reject); type=7;} + void select_id_CSGMembershipStatus() { set(reject); type=8;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=10;} + void select_id_ExpectedUEBehaviour() { set(ignore); type=11;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=12;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(reject)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(reject);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UESecurityCapabilities& select_id_UE_SecurityCapabilities() { return set(2); } + UESecurityCapabilities const* get_id_UE_SecurityCapabilities() const { return get(2); } + SeNBSecurityKey& select_id_SeNBSecurityKey() { return set(3); } + SeNBSecurityKey const* get_id_SeNBSecurityKey() const { return get(3); } + UEAggregateMaximumBitRate& select_id_SeNBUEAggregateMaximumBitRate() { return set(4); } + UEAggregateMaximumBitRate const* get_id_SeNBUEAggregateMaximumBitRate() const { return get(4); } + PLMN_Identity& select_id_ServingPLMN() { return set(5); } + PLMN_Identity const* get_id_ServingPLMN() const { return get(5); } + E_RABs_ToBeAdded_List& select_id_E_RABs_ToBeAdded_List() { return set(6); } + E_RABs_ToBeAdded_List const* get_id_E_RABs_ToBeAdded_List() const { return get(6); } + MeNBtoSeNBContainer& select_id_MeNBtoSeNBContainer() { return set(7); } + MeNBtoSeNBContainer const* get_id_MeNBtoSeNBContainer() const { return get(7); } + CSGMembershipStatus& select_id_CSGMembershipStatus() { return set(8); } + CSGMembershipStatus const* get_id_CSGMembershipStatus() const { return get(8); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(9); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(9); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(10); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(10); } + ExpectedUEBehaviour& select_id_ExpectedUEBehaviour() { return set(11); } + ExpectedUEBehaviour const* get_id_ExpectedUEBehaviour() const { return get(11); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(12); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(12); } + bool is_unknown() const { return type == 13; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_UE_SecurityCapabilities()); return true; + case 3: v(select_id_SeNBSecurityKey()); return true; + case 4: v(select_id_SeNBUEAggregateMaximumBitRate()); return true; + case 5: v(select_id_ServingPLMN()); return true; + case 6: v(select_id_E_RABs_ToBeAdded_List()); return true; + case 7: v(select_id_MeNBtoSeNBContainer()); return true; + case 8: v(select_id_CSGMembershipStatus()); return true; + case 9: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 10: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 11: v(select_id_ExpectedUEBehaviour()); return true; + case 12: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 13: if(type != 13) {clear(); asn::base::set();} type = 13; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CSGMembershipStatus)]; + char dummy2[sizeof(E_RABs_ToBeAdded_List)]; + char dummy3[sizeof(ExpectedUEBehaviour)]; + char dummy4[sizeof(MeNBtoSeNBContainer)]; + char dummy5[sizeof(PLMN_Identity)]; + char dummy6[sizeof(SeNBSecurityKey)]; + char dummy7[sizeof(UEAggregateMaximumBitRate)]; + char dummy8[sizeof(UESecurityCapabilities)]; + char dummy9[sizeof(UE_X2AP_ID)]; + char dummy10[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_UE_SecurityCapabilities() { set(conditional); type=2;} + void select_id_SeNBSecurityKey() { set(conditional); type=3;} + void select_id_SeNBUEAggregateMaximumBitRate() { set(mandatory); type=4;} + void select_id_ServingPLMN() { set(optional); type=5;} + void select_id_E_RABs_ToBeAdded_List() { set(mandatory); type=6;} + void select_id_MeNBtoSeNBContainer() { set(mandatory); type=7;} + void select_id_CSGMembershipStatus() { set(optional); type=8;} + void select_id_SeNB_UE_X2AP_ID() { set(optional); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=10;} + void select_id_ExpectedUEBehaviour() { set(optional); type=11;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=12;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(conditional)) { type = 2; return true; } + else if(equal(conditional)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(mandatory)) { type = 6; return true; } + else if(equal(mandatory)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(conditional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(conditional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(mandatory);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(mandatory);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBAdditionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequest-IEs}}, + ... +} +*/ + +struct SeNBAdditionRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBAdditionRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBAdditionRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-List CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-List PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY reject TYPE SeNBtoMeNBContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}, + ... +} +*/ + +struct SeNBAdditionRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_List() { set(id_E_RABs_Admitted_ToBeAdded_List); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(id_E_RABs_NotAdmitted_List); type=4;} + void select_id_SeNBtoMeNBContainer() { set(id_SeNBtoMeNBContainer); type=5;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=6;} + void select_id_GW_TransportLayerAddress() { set(id_GW_TransportLayerAddress); type=7;} + void select_id_SIPTO_L_GW_TransportLayerAddress() { set(id_SIPTO_L_GW_TransportLayerAddress); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=10;} + void select_id_Tunnel_Information_for_BBF() { set(id_Tunnel_Information_for_BBF); type=11;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_Admitted_ToBeAdded_List)) { type = 3; return true; } + else if(equal(id_E_RABs_NotAdmitted_List)) { type = 4; return true; } + else if(equal(id_SeNBtoMeNBContainer)) { type = 5; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 6; return true; } + else if(equal(id_GW_TransportLayerAddress)) { type = 7; return true; } + else if(equal(id_SIPTO_L_GW_TransportLayerAddress)) { type = 8; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 10; return true; } + else if(equal(id_Tunnel_Information_for_BBF)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_List);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_NotAdmitted_List);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SeNBtoMeNBContainer);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_GW_TransportLayerAddress);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_SIPTO_L_GW_TransportLayerAddress);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_Tunnel_Information_for_BBF);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_List() { set(ignore); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(ignore); type=4;} + void select_id_SeNBtoMeNBContainer() { set(reject); type=5;} + void select_id_CriticalityDiagnostics() { set(ignore); type=6;} + void select_id_GW_TransportLayerAddress() { set(ignore); type=7;} + void select_id_SIPTO_L_GW_TransportLayerAddress() { set(ignore); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=10;} + void select_id_Tunnel_Information_for_BBF() { set(ignore); type=11;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + E_RABs_Admitted_ToBeAdded_List& select_id_E_RABs_Admitted_ToBeAdded_List() { return set(3); } + E_RABs_Admitted_ToBeAdded_List const* get_id_E_RABs_Admitted_ToBeAdded_List() const { return get(3); } + E_RAB_List& select_id_E_RABs_NotAdmitted_List() { return set(4); } + E_RAB_List const* get_id_E_RABs_NotAdmitted_List() const { return get(4); } + SeNBtoMeNBContainer& select_id_SeNBtoMeNBContainer() { return set(5); } + SeNBtoMeNBContainer const* get_id_SeNBtoMeNBContainer() const { return get(5); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(6); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(6); } + TransportLayerAddress& select_id_GW_TransportLayerAddress() { return set(7); } + TransportLayerAddress const* get_id_GW_TransportLayerAddress() const { return get(7); } + TransportLayerAddress& select_id_SIPTO_L_GW_TransportLayerAddress() { return set(8); } + TransportLayerAddress const* get_id_SIPTO_L_GW_TransportLayerAddress() const { return get(8); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(9); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(10); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(10); } + TunnelInformation& select_id_Tunnel_Information_for_BBF() { return set(11); } + TunnelInformation const* get_id_Tunnel_Information_for_BBF() const { return get(11); } + bool is_unknown() const { return type == 12; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_Admitted_ToBeAdded_List()); return true; + case 4: v(select_id_E_RABs_NotAdmitted_List()); return true; + case 5: v(select_id_SeNBtoMeNBContainer()); return true; + case 6: v(select_id_CriticalityDiagnostics()); return true; + case 7: v(select_id_GW_TransportLayerAddress()); return true; + case 8: v(select_id_SIPTO_L_GW_TransportLayerAddress()); return true; + case 9: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 11: v(select_id_Tunnel_Information_for_BBF()); return true; + case 12: if(type != 12) {clear(); asn::base::set();} type = 12; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RAB_List)]; + char dummy3[sizeof(E_RABs_Admitted_ToBeAdded_List)]; + char dummy4[sizeof(SeNBtoMeNBContainer)]; + char dummy5[sizeof(TransportLayerAddress)]; + char dummy6[sizeof(TunnelInformation)]; + char dummy7[sizeof(UE_X2AP_ID)]; + char dummy8[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 12; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_List() { set(mandatory); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(optional); type=4;} + void select_id_SeNBtoMeNBContainer() { set(mandatory); type=5;} + void select_id_CriticalityDiagnostics() { set(optional); type=6;} + void select_id_GW_TransportLayerAddress() { set(optional); type=7;} + void select_id_SIPTO_L_GW_TransportLayerAddress() { set(optional); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=10;} + void select_id_Tunnel_Information_for_BBF() { set(optional); type=11;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else { type = 12; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBAdditionRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequestAcknowledge-IEs}}, + ... +} +*/ + +struct SeNBAdditionRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBAdditionRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBAdditionRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBAdditionRequestReject_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBAdditionRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBAdditionRequestReject-IEs}}, + ... +} +*/ + +struct SeNBAdditionRequestReject : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBAdditionRequestReject";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBCounterCheckRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToCounterCheck-List CRITICALITY ignore TYPE E-RABs-SubjectToCounterCheck-List PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBCounterCheckRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_SubjectToCounterCheck_List() { set(id_E_RABs_SubjectToCounterCheck_List); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_SubjectToCounterCheck_List)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToCounterCheck_List);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_E_RABs_SubjectToCounterCheck_List() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + E_RABs_SubjectToCounterCheck_List& select_id_E_RABs_SubjectToCounterCheck_List() { return set(3); } + E_RABs_SubjectToCounterCheck_List const* get_id_E_RABs_SubjectToCounterCheck_List() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_SubjectToCounterCheck_List()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToCounterCheck_List)]; + char dummy2[sizeof(UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_SubjectToCounterCheck_List() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBCounterCheckRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBCounterCheckRequest-IEs}}, + ... +} +*/ + +struct SeNBCounterCheckRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBCounterCheckRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBModificationConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_MeNBtoSeNBContainer() { set(id_MeNBtoSeNBContainer); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_MeNBtoSeNBContainer)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_MeNBtoSeNBContainer);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_MeNBtoSeNBContainer() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + MeNBtoSeNBContainer& select_id_MeNBtoSeNBContainer() { return set(3); } + MeNBtoSeNBContainer const* get_id_MeNBtoSeNBContainer() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_MeNBtoSeNBContainer()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(MeNBtoSeNBContainer)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_MeNBtoSeNBContainer() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationConfirm-IEs}}, + ... +} +*/ + +struct SeNBModificationConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBModificationRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationRefuse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_MeNBtoSeNBContainer() { set(id_MeNBtoSeNBContainer); type=4;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=7;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_MeNBtoSeNBContainer)) { type = 4; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNBtoSeNBContainer);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_MeNBtoSeNBContainer() { set(ignore); type=4;} + void select_id_CriticalityDiagnostics() { set(ignore); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=7;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + MeNBtoSeNBContainer& select_id_MeNBtoSeNBContainer() { return set(4); } + MeNBtoSeNBContainer const* get_id_MeNBtoSeNBContainer() const { return get(4); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(5); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(7); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(7); } + bool is_unknown() const { return type == 8; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_MeNBtoSeNBContainer()); return true; + case 5: v(select_id_CriticalityDiagnostics()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 8: if(type != 8) {clear(); asn::base::set();} type = 8; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(MeNBtoSeNBContainer)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_MeNBtoSeNBContainer() { set(optional); type=4;} + void select_id_CriticalityDiagnostics() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=7;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRefuse-IEs}}, + ... +} +*/ + +struct SeNBModificationRefuse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationRefuse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +UE-ContextInformationSeNBModReqExtIEs X2AP-PROTOCOL-EXTENSION ::= { + ... +} +*/ + +struct UE_ContextInformationSeNBModReqExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() + { + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: if(type != 1) {clear(); asn::base::set();} type = 1; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + return false; + + } + private: + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 1; } + void clear() {type = 0;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + { type = 1; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextInformationSeNBModReq ::= SEQUENCE { + uE-SecurityCapabilities UESecurityCapabilities OPTIONAL, + seNB-SecurityKey SeNBSecurityKey OPTIONAL, + seNBUEAggregateMaximumBitRate UEAggregateMaximumBitRate OPTIONAL, + e-RABs-ToBeAdded E-RABs-ToBeAdded-List-ModReq OPTIONAL, + e-RABs-ToBeModified E-RABs-ToBeModified-List-ModReq OPTIONAL, + e-RABs-ToBeReleased E-RABs-ToBeReleased-List-ModReq OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationSeNBModReqExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextInformationSeNBModReq : asn::sequence<7, 0, true, 7> +{ + static constexpr const char* name() {return "UE-ContextInformationSeNBModReq";} + using parent_t = asn::sequence<7, 0, true, 7>; + struct uE_SecurityCapabilities_t : UESecurityCapabilities + { + static constexpr const char* name() {return "uE_SecurityCapabilities_t";} + using parent_t = UESecurityCapabilities; + static constexpr bool optional = true; + + }; + uE_SecurityCapabilities_t& set_uE_SecurityCapabilities() { uE_SecurityCapabilities.setpresent(true); return uE_SecurityCapabilities;} + uE_SecurityCapabilities_t const* get_uE_SecurityCapabilities() const {return uE_SecurityCapabilities.is_valid() ? &uE_SecurityCapabilities : nullptr;} + struct seNB_SecurityKey_t : SeNBSecurityKey + { + static constexpr const char* name() {return "seNB_SecurityKey_t";} + using parent_t = SeNBSecurityKey; + static constexpr bool optional = true; + + }; + seNB_SecurityKey_t& set_seNB_SecurityKey() { seNB_SecurityKey.setpresent(true); return seNB_SecurityKey;} + seNB_SecurityKey_t const* get_seNB_SecurityKey() const {return seNB_SecurityKey.is_valid() ? &seNB_SecurityKey : nullptr;} + struct seNBUEAggregateMaximumBitRate_t : UEAggregateMaximumBitRate + { + static constexpr const char* name() {return "seNBUEAggregateMaximumBitRate_t";} + using parent_t = UEAggregateMaximumBitRate; + static constexpr bool optional = true; + + }; + seNBUEAggregateMaximumBitRate_t& set_seNBUEAggregateMaximumBitRate() { seNBUEAggregateMaximumBitRate.setpresent(true); return seNBUEAggregateMaximumBitRate;} + seNBUEAggregateMaximumBitRate_t const* get_seNBUEAggregateMaximumBitRate() const {return seNBUEAggregateMaximumBitRate.is_valid() ? &seNBUEAggregateMaximumBitRate : nullptr;} + struct e_RABs_ToBeAdded_t : E_RABs_ToBeAdded_List_ModReq + { + static constexpr const char* name() {return "e_RABs_ToBeAdded_t";} + using parent_t = E_RABs_ToBeAdded_List_ModReq; + static constexpr bool optional = true; + + }; + e_RABs_ToBeAdded_t& set_e_RABs_ToBeAdded() { e_RABs_ToBeAdded.setpresent(true); return e_RABs_ToBeAdded;} + e_RABs_ToBeAdded_t const* get_e_RABs_ToBeAdded() const {return e_RABs_ToBeAdded.is_valid() ? &e_RABs_ToBeAdded : nullptr;} + struct e_RABs_ToBeModified_t : E_RABs_ToBeModified_List_ModReq + { + static constexpr const char* name() {return "e_RABs_ToBeModified_t";} + using parent_t = E_RABs_ToBeModified_List_ModReq; + static constexpr bool optional = true; + + }; + e_RABs_ToBeModified_t& set_e_RABs_ToBeModified() { e_RABs_ToBeModified.setpresent(true); return e_RABs_ToBeModified;} + e_RABs_ToBeModified_t const* get_e_RABs_ToBeModified() const {return e_RABs_ToBeModified.is_valid() ? &e_RABs_ToBeModified : nullptr;} + struct e_RABs_ToBeReleased_t : E_RABs_ToBeReleased_List_ModReq + { + static constexpr const char* name() {return "e_RABs_ToBeReleased_t";} + using parent_t = E_RABs_ToBeReleased_List_ModReq; + static constexpr bool optional = true; + + }; + e_RABs_ToBeReleased_t& set_e_RABs_ToBeReleased() { e_RABs_ToBeReleased.setpresent(true); return e_RABs_ToBeReleased;} + e_RABs_ToBeReleased_t const* get_e_RABs_ToBeReleased() const {return e_RABs_ToBeReleased.is_valid() ? &e_RABs_ToBeReleased : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(uE_SecurityCapabilities); + v(seNB_SecurityKey); + v(seNBUEAggregateMaximumBitRate); + v(e_RABs_ToBeAdded); + v(e_RABs_ToBeModified); + v(e_RABs_ToBeReleased); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(uE_SecurityCapabilities); + v(seNB_SecurityKey); + v(seNBUEAggregateMaximumBitRate); + v(e_RABs_ToBeAdded); + v(e_RABs_ToBeModified); + v(e_RABs_ToBeReleased); + v(iE_Extensions); + + }; + void clear() + { + uE_SecurityCapabilities.clear(); + seNB_SecurityKey.clear(); + seNBUEAggregateMaximumBitRate.clear(); + e_RABs_ToBeAdded.clear(); + e_RABs_ToBeModified.clear(); + e_RABs_ToBeReleased.clear(); + iE_Extensions.clear(); + + }; + private: + uE_SecurityCapabilities_t uE_SecurityCapabilities; + seNB_SecurityKey_t seNB_SecurityKey; + seNBUEAggregateMaximumBitRate_t seNBUEAggregateMaximumBitRate; + e_RABs_ToBeAdded_t e_RABs_ToBeAdded; + e_RABs_ToBeModified_t e_RABs_ToBeModified; + e_RABs_ToBeReleased_t e_RABs_ToBeReleased; + iE_Extensions_t iE_Extensions; + +}; +/* +SeNBModificationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SCGChangeIndication CRITICALITY ignore TYPE SCGChangeIndication PRESENCE optional}| + { ID id-ServingPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-UE-ContextInformationSeNBModReq CRITICALITY reject TYPE UE-ContextInformationSeNBModReq PRESENCE optional}| + { ID id-MeNBtoSeNBContainer CRITICALITY ignore TYPE MeNBtoSeNBContainer PRESENCE optional}| + { ID id-CSGMembershipStatus CRITICALITY reject TYPE CSGMembershipStatus PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_SCGChangeIndication() { set(id_SCGChangeIndication); type=4;} + void select_id_ServingPLMN() { set(id_ServingPLMN); type=5;} + void select_id_UE_ContextInformationSeNBModReq() { set(id_UE_ContextInformationSeNBModReq); type=6;} + void select_id_MeNBtoSeNBContainer() { set(id_MeNBtoSeNBContainer); type=7;} + void select_id_CSGMembershipStatus() { set(id_CSGMembershipStatus); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=10;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_SCGChangeIndication)) { type = 4; return true; } + else if(equal(id_ServingPLMN)) { type = 5; return true; } + else if(equal(id_UE_ContextInformationSeNBModReq)) { type = 6; return true; } + else if(equal(id_MeNBtoSeNBContainer)) { type = 7; return true; } + else if(equal(id_CSGMembershipStatus)) { type = 8; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_SCGChangeIndication);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_ServingPLMN);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_UE_ContextInformationSeNBModReq);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNBtoSeNBContainer);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_CSGMembershipStatus);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_SCGChangeIndication() { set(ignore); type=4;} + void select_id_ServingPLMN() { set(ignore); type=5;} + void select_id_UE_ContextInformationSeNBModReq() { set(reject); type=6;} + void select_id_MeNBtoSeNBContainer() { set(ignore); type=7;} + void select_id_CSGMembershipStatus() { set(reject); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=10;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + SCGChangeIndication& select_id_SCGChangeIndication() { return set(4); } + SCGChangeIndication const* get_id_SCGChangeIndication() const { return get(4); } + PLMN_Identity& select_id_ServingPLMN() { return set(5); } + PLMN_Identity const* get_id_ServingPLMN() const { return get(5); } + UE_ContextInformationSeNBModReq& select_id_UE_ContextInformationSeNBModReq() { return set(6); } + UE_ContextInformationSeNBModReq const* get_id_UE_ContextInformationSeNBModReq() const { return get(6); } + MeNBtoSeNBContainer& select_id_MeNBtoSeNBContainer() { return set(7); } + MeNBtoSeNBContainer const* get_id_MeNBtoSeNBContainer() const { return get(7); } + CSGMembershipStatus& select_id_CSGMembershipStatus() { return set(8); } + CSGMembershipStatus const* get_id_CSGMembershipStatus() const { return get(8); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(9); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(10); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(10); } + bool is_unknown() const { return type == 11; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_SCGChangeIndication()); return true; + case 5: v(select_id_ServingPLMN()); return true; + case 6: v(select_id_UE_ContextInformationSeNBModReq()); return true; + case 7: v(select_id_MeNBtoSeNBContainer()); return true; + case 8: v(select_id_CSGMembershipStatus()); return true; + case 9: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 11: if(type != 11) {clear(); asn::base::set();} type = 11; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CSGMembershipStatus)]; + char dummy2[sizeof(Cause)]; + char dummy3[sizeof(MeNBtoSeNBContainer)]; + char dummy4[sizeof(PLMN_Identity)]; + char dummy5[sizeof(SCGChangeIndication)]; + char dummy6[sizeof(UE_ContextInformationSeNBModReq)]; + char dummy7[sizeof(UE_X2AP_ID)]; + char dummy8[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_SCGChangeIndication() { set(optional); type=4;} + void select_id_ServingPLMN() { set(optional); type=5;} + void select_id_UE_ContextInformationSeNBModReq() { set(optional); type=6;} + void select_id_MeNBtoSeNBContainer() { set(optional); type=7;} + void select_id_CSGMembershipStatus() { set(optional); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=10;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SeNBModificationRequest-IEs}}, + ... +} +*/ + +struct SeNBModificationRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBModificationRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-ModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeModified-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-ModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeReleased-ModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-ModAckList PRESENCE optional}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY ignore TYPE SeNBtoMeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckList() { set(id_E_RABs_Admitted_ToBeAdded_ModAckList); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckList() { set(id_E_RABs_Admitted_ToBeModified_ModAckList); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckList() { set(id_E_RABs_Admitted_ToBeReleased_ModAckList); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(id_E_RABs_NotAdmitted_List); type=6;} + void select_id_SeNBtoMeNBContainer() { set(id_SeNBtoMeNBContainer); type=7;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=10;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_Admitted_ToBeAdded_ModAckList)) { type = 3; return true; } + else if(equal(id_E_RABs_Admitted_ToBeModified_ModAckList)) { type = 4; return true; } + else if(equal(id_E_RABs_Admitted_ToBeReleased_ModAckList)) { type = 5; return true; } + else if(equal(id_E_RABs_NotAdmitted_List)) { type = 6; return true; } + else if(equal(id_SeNBtoMeNBContainer)) { type = 7; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 8; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_ModAckList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeModified_ModAckList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_ModAckList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_E_RABs_NotAdmitted_List);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_SeNBtoMeNBContainer);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckList() { set(ignore); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckList() { set(ignore); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckList() { set(ignore); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(ignore); type=6;} + void select_id_SeNBtoMeNBContainer() { set(ignore); type=7;} + void select_id_CriticalityDiagnostics() { set(ignore); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=10;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + E_RABs_Admitted_ToBeAdded_ModAckList& select_id_E_RABs_Admitted_ToBeAdded_ModAckList() { return set(3); } + E_RABs_Admitted_ToBeAdded_ModAckList const* get_id_E_RABs_Admitted_ToBeAdded_ModAckList() const { return get(3); } + E_RABs_Admitted_ToBeModified_ModAckList& select_id_E_RABs_Admitted_ToBeModified_ModAckList() { return set(4); } + E_RABs_Admitted_ToBeModified_ModAckList const* get_id_E_RABs_Admitted_ToBeModified_ModAckList() const { return get(4); } + E_RABs_Admitted_ToBeReleased_ModAckList& select_id_E_RABs_Admitted_ToBeReleased_ModAckList() { return set(5); } + E_RABs_Admitted_ToBeReleased_ModAckList const* get_id_E_RABs_Admitted_ToBeReleased_ModAckList() const { return get(5); } + E_RAB_List& select_id_E_RABs_NotAdmitted_List() { return set(6); } + E_RAB_List const* get_id_E_RABs_NotAdmitted_List() const { return get(6); } + SeNBtoMeNBContainer& select_id_SeNBtoMeNBContainer() { return set(7); } + SeNBtoMeNBContainer const* get_id_SeNBtoMeNBContainer() const { return get(7); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(8); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(8); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(9); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(10); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(10); } + bool is_unknown() const { return type == 11; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_Admitted_ToBeAdded_ModAckList()); return true; + case 4: v(select_id_E_RABs_Admitted_ToBeModified_ModAckList()); return true; + case 5: v(select_id_E_RABs_Admitted_ToBeReleased_ModAckList()); return true; + case 6: v(select_id_E_RABs_NotAdmitted_List()); return true; + case 7: v(select_id_SeNBtoMeNBContainer()); return true; + case 8: v(select_id_CriticalityDiagnostics()); return true; + case 9: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 11: if(type != 11) {clear(); asn::base::set();} type = 11; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RAB_List)]; + char dummy3[sizeof(E_RABs_Admitted_ToBeAdded_ModAckList)]; + char dummy4[sizeof(E_RABs_Admitted_ToBeModified_ModAckList)]; + char dummy5[sizeof(E_RABs_Admitted_ToBeReleased_ModAckList)]; + char dummy6[sizeof(SeNBtoMeNBContainer)]; + char dummy7[sizeof(UE_X2AP_ID)]; + char dummy8[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_ModAckList() { set(optional); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_ModAckList() { set(optional); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_ModAckList() { set(optional); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(optional); type=6;} + void select_id_SeNBtoMeNBContainer() { set(optional); type=7;} + void select_id_CriticalityDiagnostics() { set(optional); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=10;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequestAcknowledge-IEs}}, + ... +} +*/ + +struct SeNBModificationRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBModificationRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationRequestReject_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequestReject-IEs}}, + ... +} +*/ + +struct SeNBModificationRequestReject : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationRequestReject";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBModificationRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SCGChangeIndication CRITICALITY ignore TYPE SCGChangeIndication PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-ModReqd CRITICALITY ignore TYPE E-RABs-ToBeReleased-ModReqd PRESENCE optional}| + { ID id-SeNBtoMeNBContainer CRITICALITY ignore TYPE SeNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBModificationRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_SCGChangeIndication() { set(id_SCGChangeIndication); type=4;} + void select_id_E_RABs_ToBeReleased_ModReqd() { set(id_E_RABs_ToBeReleased_ModReqd); type=5;} + void select_id_SeNBtoMeNBContainer() { set(id_SeNBtoMeNBContainer); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=8;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_SCGChangeIndication)) { type = 4; return true; } + else if(equal(id_E_RABs_ToBeReleased_ModReqd)) { type = 5; return true; } + else if(equal(id_SeNBtoMeNBContainer)) { type = 6; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 7; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_SCGChangeIndication);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_ModReqd);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SeNBtoMeNBContainer);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_SCGChangeIndication() { set(ignore); type=4;} + void select_id_E_RABs_ToBeReleased_ModReqd() { set(ignore); type=5;} + void select_id_SeNBtoMeNBContainer() { set(ignore); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=8;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + SCGChangeIndication& select_id_SCGChangeIndication() { return set(4); } + SCGChangeIndication const* get_id_SCGChangeIndication() const { return get(4); } + E_RABs_ToBeReleased_ModReqd& select_id_E_RABs_ToBeReleased_ModReqd() { return set(5); } + E_RABs_ToBeReleased_ModReqd const* get_id_E_RABs_ToBeReleased_ModReqd() const { return get(5); } + SeNBtoMeNBContainer& select_id_SeNBtoMeNBContainer() { return set(6); } + SeNBtoMeNBContainer const* get_id_SeNBtoMeNBContainer() const { return get(6); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(7); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(7); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(8); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(8); } + bool is_unknown() const { return type == 9; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_SCGChangeIndication()); return true; + case 5: v(select_id_E_RABs_ToBeReleased_ModReqd()); return true; + case 6: v(select_id_SeNBtoMeNBContainer()); return true; + case 7: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 8: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 9: if(type != 9) {clear(); asn::base::set();} type = 9; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(E_RABs_ToBeReleased_ModReqd)]; + char dummy3[sizeof(SCGChangeIndication)]; + char dummy4[sizeof(SeNBtoMeNBContainer)]; + char dummy5[sizeof(UE_X2AP_ID)]; + char dummy6[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_SCGChangeIndication() { set(optional); type=4;} + void select_id_E_RABs_ToBeReleased_ModReqd() { set(optional); type=5;} + void select_id_SeNBtoMeNBContainer() { set(optional); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=7;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=8;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBModificationRequired-IEs}}, + ... +} +*/ + +struct SeNBModificationRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBModificationRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBReconfigurationComplete-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-ResponseInformationSeNBReconfComp CRITICALITY ignore TYPE ResponseInformationSeNBReconfComp PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBReconfigurationComplete_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_ResponseInformationSeNBReconfComp() { set(id_ResponseInformationSeNBReconfComp); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_ResponseInformationSeNBReconfComp)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ResponseInformationSeNBReconfComp);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_ResponseInformationSeNBReconfComp() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + ResponseInformationSeNBReconfComp& select_id_ResponseInformationSeNBReconfComp() { return set(3); } + ResponseInformationSeNBReconfComp const* get_id_ResponseInformationSeNBReconfComp() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_ResponseInformationSeNBReconfComp()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ResponseInformationSeNBReconfComp)]; + char dummy2[sizeof(UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_ResponseInformationSeNBReconfComp() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBReconfigurationComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReconfigurationComplete-IEs}}, + ... +} +*/ + +struct SeNBReconfigurationComplete : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBReconfigurationComplete";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBReleaseConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-List-RelConf CRITICALITY ignore TYPE E-RABs-ToBeReleased-List-RelConf PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBReleaseConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_ToBeReleased_List_RelConf() { set(id_E_RABs_ToBeReleased_List_RelConf); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_ToBeReleased_List_RelConf)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_List_RelConf);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_ToBeReleased_List_RelConf() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + E_RABs_ToBeReleased_List_RelConf& select_id_E_RABs_ToBeReleased_List_RelConf() { return set(3); } + E_RABs_ToBeReleased_List_RelConf const* get_id_E_RABs_ToBeReleased_List_RelConf() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_ToBeReleased_List_RelConf()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RABs_ToBeReleased_List_RelConf)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_ToBeReleased_List_RelConf() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBReleaseConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseConfirm-IEs}}, + ... +} +*/ + +struct SeNBReleaseConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBReleaseConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBReleaseRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-List-RelReq CRITICALITY ignore TYPE E-RABs-ToBeReleased-List-RelReq PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MakeBeforeBreakIndicator CRITICALITY ignore TYPE MakeBeforeBreakIndicator PRESENCE optional}, + ... +} +*/ + +struct SeNBReleaseRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_E_RABs_ToBeReleased_List_RelReq() { set(id_E_RABs_ToBeReleased_List_RelReq); type=4;} + void select_id_UE_ContextKeptIndicator() { set(id_UE_ContextKeptIndicator); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=7;} + void select_id_MakeBeforeBreakIndicator() { set(id_MakeBeforeBreakIndicator); type=8;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_E_RABs_ToBeReleased_List_RelReq)) { type = 4; return true; } + else if(equal(id_UE_ContextKeptIndicator)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 7; return true; } + else if(equal(id_MakeBeforeBreakIndicator)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_List_RelReq);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_UE_ContextKeptIndicator);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_MakeBeforeBreakIndicator);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_E_RABs_ToBeReleased_List_RelReq() { set(ignore); type=4;} + void select_id_UE_ContextKeptIndicator() { set(ignore); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=7;} + void select_id_MakeBeforeBreakIndicator() { set(ignore); type=8;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + E_RABs_ToBeReleased_List_RelReq& select_id_E_RABs_ToBeReleased_List_RelReq() { return set(4); } + E_RABs_ToBeReleased_List_RelReq const* get_id_E_RABs_ToBeReleased_List_RelReq() const { return get(4); } + UE_ContextKeptIndicator& select_id_UE_ContextKeptIndicator() { return set(5); } + UE_ContextKeptIndicator const* get_id_UE_ContextKeptIndicator() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(7); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(7); } + MakeBeforeBreakIndicator& select_id_MakeBeforeBreakIndicator() { return set(8); } + MakeBeforeBreakIndicator const* get_id_MakeBeforeBreakIndicator() const { return get(8); } + bool is_unknown() const { return type == 9; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_E_RABs_ToBeReleased_List_RelReq()); return true; + case 5: v(select_id_UE_ContextKeptIndicator()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 8: v(select_id_MakeBeforeBreakIndicator()); return true; + case 9: if(type != 9) {clear(); asn::base::set();} type = 9; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(E_RABs_ToBeReleased_List_RelReq)]; + char dummy3[sizeof(MakeBeforeBreakIndicator)]; + char dummy4[sizeof(UE_ContextKeptIndicator)]; + char dummy5[sizeof(UE_X2AP_ID)]; + char dummy6[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 9; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(optional); type=2;} + void select_id_Cause() { set(optional); type=3;} + void select_id_E_RABs_ToBeReleased_List_RelReq() { set(optional); type=4;} + void select_id_UE_ContextKeptIndicator() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=7;} + void select_id_MakeBeforeBreakIndicator() { set(optional); type=8;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else { type = 9; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseRequest-IEs}}, + ... +} +*/ + +struct SeNBReleaseRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBReleaseRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SeNBReleaseRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SeNBReleaseRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(id_SeNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(id_SeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SeNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_SeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_SeNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_SeNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + UE_X2AP_ID_Extension& select_id_SeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_SeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SeNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_SeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SeNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_SeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SeNBReleaseRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SeNBReleaseRequired-IEs}}, + ... +} +*/ + +struct SeNBReleaseRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SeNBReleaseRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SecondaryRATDataUsageReport-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-SecondaryRATUsageReportList CRITICALITY reject TYPE SecondaryRATUsageReportList PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SecondaryRATDataUsageReport_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_SecondaryRATUsageReportList() { set(id_SecondaryRATUsageReportList); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_SecondaryRATUsageReportList)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SecondaryRATUsageReportList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_SecondaryRATUsageReportList() { set(reject); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + SecondaryRATUsageReportList& select_id_SecondaryRATUsageReportList() { return set(3); } + SecondaryRATUsageReportList const* get_id_SecondaryRATUsageReportList() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_SecondaryRATUsageReportList()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(SecondaryRATUsageReportList)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_SecondaryRATUsageReportList() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SecondaryRATDataUsageReport ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SecondaryRATDataUsageReport-IEs}}, + ... +} +*/ + +struct SecondaryRATDataUsageReport : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SecondaryRATDataUsageReport";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBActivityNotification-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-UEContextLevelUserPlaneActivity CRITICALITY ignore TYPE UserPlaneTrafficActivityReport PRESENCE optional}| + { ID id-ERABActivityNotifyItemList CRITICALITY ignore TYPE ERABActivityNotifyItemList PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBActivityNotification_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_UEContextLevelUserPlaneActivity() { set(id_UEContextLevelUserPlaneActivity); type=3;} + void select_id_ERABActivityNotifyItemList() { set(id_ERABActivityNotifyItemList); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_UEContextLevelUserPlaneActivity)) { type = 3; return true; } + else if(equal(id_ERABActivityNotifyItemList)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_UEContextLevelUserPlaneActivity);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_ERABActivityNotifyItemList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_UEContextLevelUserPlaneActivity() { set(ignore); type=3;} + void select_id_ERABActivityNotifyItemList() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + UserPlaneTrafficActivityReport& select_id_UEContextLevelUserPlaneActivity() { return set(3); } + UserPlaneTrafficActivityReport const* get_id_UEContextLevelUserPlaneActivity() const { return get(3); } + ERABActivityNotifyItemList& select_id_ERABActivityNotifyItemList() { return set(4); } + ERABActivityNotifyItemList const* get_id_ERABActivityNotifyItemList() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_UEContextLevelUserPlaneActivity()); return true; + case 4: v(select_id_ERABActivityNotifyItemList()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ERABActivityNotifyItemList)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + char dummy5[sizeof(UserPlaneTrafficActivityReport)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_UEContextLevelUserPlaneActivity() { set(optional); type=3;} + void select_id_ERABActivityNotifyItemList() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBActivityNotification ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBActivityNotification-IEs}}, + ... +} +*/ + +struct SgNBActivityNotification : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBActivityNotification";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBAdditionRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-NRUESecurityCapabilities CRITICALITY reject TYPE NRUESecurityCapabilities PRESENCE mandatory}| + { ID id-SgNBSecurityKey CRITICALITY reject TYPE SgNBSecurityKey PRESENCE mandatory}| + { ID id-SgNBUEAggregateMaximumBitRate CRITICALITY reject TYPE UEAggregateMaximumBitRate PRESENCE mandatory}| + { ID id-SelectedPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-E-RABs-ToBeAdded-SgNBAddReqList CRITICALITY reject TYPE E-RABs-ToBeAdded-SgNBAddReqList PRESENCE mandatory}| + { ID id-MeNBtoSgNBContainer CRITICALITY reject TYPE MeNBtoSgNBContainer PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-RequestedSplitSRBs CRITICALITY reject TYPE SplitSRBs PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}| + { ID id-SGNB-Addition-Trigger-Ind CRITICALITY reject TYPE SGNB-Addition-Trigger-Ind PRESENCE optional}| + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| + { ID id-MeNBCell-ID CRITICALITY reject TYPE ECGI PRESENCE mandatory}, + ... +} +*/ + +struct SgNBAdditionRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 17; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_NRUESecurityCapabilities() { set(id_NRUESecurityCapabilities); type=2;} + void select_id_SgNBSecurityKey() { set(id_SgNBSecurityKey); type=3;} + void select_id_SgNBUEAggregateMaximumBitRate() { set(id_SgNBUEAggregateMaximumBitRate); type=4;} + void select_id_SelectedPLMN() { set(id_SelectedPLMN); type=5;} + void select_id_HandoverRestrictionList() { set(id_HandoverRestrictionList); type=6;} + void select_id_E_RABs_ToBeAdded_SgNBAddReqList() { set(id_E_RABs_ToBeAdded_SgNBAddReqList); type=7;} + void select_id_MeNBtoSgNBContainer() { set(id_MeNBtoSgNBContainer); type=8;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=9;} + void select_id_ExpectedUEBehaviour() { set(id_ExpectedUEBehaviour); type=10;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=11;} + void select_id_RequestedSplitSRBs() { set(id_RequestedSplitSRBs); type=12;} + void select_id_MeNBResourceCoordinationInformation() { set(id_MeNBResourceCoordinationInformation); type=13;} + void select_id_SGNB_Addition_Trigger_Ind() { set(id_SGNB_Addition_Trigger_Ind); type=14;} + void select_id_SubscriberProfileIDforRFP() { set(id_SubscriberProfileIDforRFP); type=15;} + void select_id_MeNBCell_ID() { set(id_MeNBCell_ID); type=16;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_NRUESecurityCapabilities)) { type = 2; return true; } + else if(equal(id_SgNBSecurityKey)) { type = 3; return true; } + else if(equal(id_SgNBUEAggregateMaximumBitRate)) { type = 4; return true; } + else if(equal(id_SelectedPLMN)) { type = 5; return true; } + else if(equal(id_HandoverRestrictionList)) { type = 6; return true; } + else if(equal(id_E_RABs_ToBeAdded_SgNBAddReqList)) { type = 7; return true; } + else if(equal(id_MeNBtoSgNBContainer)) { type = 8; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 9; return true; } + else if(equal(id_ExpectedUEBehaviour)) { type = 10; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 11; return true; } + else if(equal(id_RequestedSplitSRBs)) { type = 12; return true; } + else if(equal(id_MeNBResourceCoordinationInformation)) { type = 13; return true; } + else if(equal(id_SGNB_Addition_Trigger_Ind)) { type = 14; return true; } + else if(equal(id_SubscriberProfileIDforRFP)) { type = 15; return true; } + else if(equal(id_MeNBCell_ID)) { type = 16; return true; } + else { type = 17; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_NRUESecurityCapabilities);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_SgNBSecurityKey);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_SgNBUEAggregateMaximumBitRate);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SelectedPLMN);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_HandoverRestrictionList);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_E_RABs_ToBeAdded_SgNBAddReqList);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_MeNBtoSgNBContainer);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_ExpectedUEBehaviour);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_RequestedSplitSRBs);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_MeNBResourceCoordinationInformation);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(id_SGNB_Addition_Trigger_Ind);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(id_SubscriberProfileIDforRFP);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(id_MeNBCell_ID);} return false; + case 17: type = 17; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 17; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_NRUESecurityCapabilities() { set(reject); type=2;} + void select_id_SgNBSecurityKey() { set(reject); type=3;} + void select_id_SgNBUEAggregateMaximumBitRate() { set(reject); type=4;} + void select_id_SelectedPLMN() { set(ignore); type=5;} + void select_id_HandoverRestrictionList() { set(ignore); type=6;} + void select_id_E_RABs_ToBeAdded_SgNBAddReqList() { set(reject); type=7;} + void select_id_MeNBtoSgNBContainer() { set(reject); type=8;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=9;} + void select_id_ExpectedUEBehaviour() { set(ignore); type=10;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=11;} + void select_id_RequestedSplitSRBs() { set(reject); type=12;} + void select_id_MeNBResourceCoordinationInformation() { set(ignore); type=13;} + void select_id_SGNB_Addition_Trigger_Ind() { set(reject); type=14;} + void select_id_SubscriberProfileIDforRFP() { set(ignore); type=15;} + void select_id_MeNBCell_ID() { set(reject); type=16;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else if(equal(reject)) { type = 11; return true; } + else if(equal(reject)) { type = 12; return true; } + else if(equal(ignore)) { type = 13; return true; } + else if(equal(reject)) { type = 14; return true; } + else if(equal(ignore)) { type = 15; return true; } + else if(equal(reject)) { type = 16; return true; } + else { type = 17; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(reject);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(reject);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(ignore);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(reject);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(ignore);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(reject);} return false; + case 17: type = 17; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + NRUESecurityCapabilities& select_id_NRUESecurityCapabilities() { return set(2); } + NRUESecurityCapabilities const* get_id_NRUESecurityCapabilities() const { return get(2); } + SgNBSecurityKey& select_id_SgNBSecurityKey() { return set(3); } + SgNBSecurityKey const* get_id_SgNBSecurityKey() const { return get(3); } + UEAggregateMaximumBitRate& select_id_SgNBUEAggregateMaximumBitRate() { return set(4); } + UEAggregateMaximumBitRate const* get_id_SgNBUEAggregateMaximumBitRate() const { return get(4); } + PLMN_Identity& select_id_SelectedPLMN() { return set(5); } + PLMN_Identity const* get_id_SelectedPLMN() const { return get(5); } + HandoverRestrictionList& select_id_HandoverRestrictionList() { return set(6); } + HandoverRestrictionList const* get_id_HandoverRestrictionList() const { return get(6); } + E_RABs_ToBeAdded_SgNBAddReqList& select_id_E_RABs_ToBeAdded_SgNBAddReqList() { return set(7); } + E_RABs_ToBeAdded_SgNBAddReqList const* get_id_E_RABs_ToBeAdded_SgNBAddReqList() const { return get(7); } + MeNBtoSgNBContainer& select_id_MeNBtoSgNBContainer() { return set(8); } + MeNBtoSgNBContainer const* get_id_MeNBtoSgNBContainer() const { return get(8); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(9); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(9); } + ExpectedUEBehaviour& select_id_ExpectedUEBehaviour() { return set(10); } + ExpectedUEBehaviour const* get_id_ExpectedUEBehaviour() const { return get(10); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(11); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(11); } + SplitSRBs& select_id_RequestedSplitSRBs() { return set(12); } + SplitSRBs const* get_id_RequestedSplitSRBs() const { return get(12); } + MeNBResourceCoordinationInformation& select_id_MeNBResourceCoordinationInformation() { return set(13); } + MeNBResourceCoordinationInformation const* get_id_MeNBResourceCoordinationInformation() const { return get(13); } + SGNB_Addition_Trigger_Ind& select_id_SGNB_Addition_Trigger_Ind() { return set(14); } + SGNB_Addition_Trigger_Ind const* get_id_SGNB_Addition_Trigger_Ind() const { return get(14); } + SubscriberProfileIDforRFP& select_id_SubscriberProfileIDforRFP() { return set(15); } + SubscriberProfileIDforRFP const* get_id_SubscriberProfileIDforRFP() const { return get(15); } + ECGI& select_id_MeNBCell_ID() { return set(16); } + ECGI const* get_id_MeNBCell_ID() const { return get(16); } + bool is_unknown() const { return type == 17; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_NRUESecurityCapabilities()); return true; + case 3: v(select_id_SgNBSecurityKey()); return true; + case 4: v(select_id_SgNBUEAggregateMaximumBitRate()); return true; + case 5: v(select_id_SelectedPLMN()); return true; + case 6: v(select_id_HandoverRestrictionList()); return true; + case 7: v(select_id_E_RABs_ToBeAdded_SgNBAddReqList()); return true; + case 8: v(select_id_MeNBtoSgNBContainer()); return true; + case 9: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 10: v(select_id_ExpectedUEBehaviour()); return true; + case 11: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 12: v(select_id_RequestedSplitSRBs()); return true; + case 13: v(select_id_MeNBResourceCoordinationInformation()); return true; + case 14: v(select_id_SGNB_Addition_Trigger_Ind()); return true; + case 15: v(select_id_SubscriberProfileIDforRFP()); return true; + case 16: v(select_id_MeNBCell_ID()); return true; + case 17: if(type != 17) {clear(); asn::base::set();} type = 17; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ECGI)]; + char dummy2[sizeof(E_RABs_ToBeAdded_SgNBAddReqList)]; + char dummy3[sizeof(ExpectedUEBehaviour)]; + char dummy4[sizeof(HandoverRestrictionList)]; + char dummy5[sizeof(MeNBResourceCoordinationInformation)]; + char dummy6[sizeof(MeNBtoSgNBContainer)]; + char dummy7[sizeof(NRUESecurityCapabilities)]; + char dummy8[sizeof(PLMN_Identity)]; + char dummy9[sizeof(SGNB_Addition_Trigger_Ind)]; + char dummy10[sizeof(SgNBSecurityKey)]; + char dummy11[sizeof(SgNB_UE_X2AP_ID)]; + char dummy12[sizeof(SplitSRBs)]; + char dummy13[sizeof(SubscriberProfileIDforRFP)]; + char dummy14[sizeof(UEAggregateMaximumBitRate)]; + char dummy15[sizeof(UE_X2AP_ID)]; + char dummy16[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 17; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_NRUESecurityCapabilities() { set(mandatory); type=2;} + void select_id_SgNBSecurityKey() { set(mandatory); type=3;} + void select_id_SgNBUEAggregateMaximumBitRate() { set(mandatory); type=4;} + void select_id_SelectedPLMN() { set(optional); type=5;} + void select_id_HandoverRestrictionList() { set(optional); type=6;} + void select_id_E_RABs_ToBeAdded_SgNBAddReqList() { set(mandatory); type=7;} + void select_id_MeNBtoSgNBContainer() { set(mandatory); type=8;} + void select_id_SgNB_UE_X2AP_ID() { set(optional); type=9;} + void select_id_ExpectedUEBehaviour() { set(optional); type=10;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=11;} + void select_id_RequestedSplitSRBs() { set(optional); type=12;} + void select_id_MeNBResourceCoordinationInformation() { set(optional); type=13;} + void select_id_SGNB_Addition_Trigger_Ind() { set(optional); type=14;} + void select_id_SubscriberProfileIDforRFP() { set(optional); type=15;} + void select_id_MeNBCell_ID() { set(mandatory); type=16;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(mandatory)) { type = 7; return true; } + else if(equal(mandatory)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else if(equal(optional)) { type = 13; return true; } + else if(equal(optional)) { type = 14; return true; } + else if(equal(optional)) { type = 15; return true; } + else if(equal(mandatory)) { type = 16; return true; } + else { type = 17; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(mandatory);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(mandatory);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(optional);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(optional);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(optional);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(mandatory);} return false; + case 17: type = 17; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBAdditionRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequest-IEs}}, + ... +} +*/ + +struct SgNBAdditionRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBAdditionRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBAdditionRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBAddReqAckList PRESENCE mandatory}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY reject TYPE SgNBtoMeNBContainer PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-AdmittedSplitSRBs CRITICALITY reject TYPE SplitSRBs PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} +*/ + +struct SgNBAdditionRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList() { set(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(id_E_RABs_NotAdmitted_List); type=4;} + void select_id_SgNBtoMeNBContainer() { set(id_SgNBtoMeNBContainer); type=5;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=7;} + void select_id_AdmittedSplitSRBs() { set(id_AdmittedSplitSRBs); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(id_SgNBResourceCoordinationInformation); type=9;} + void select_id_RRCConfigIndication() { set(id_RRCConfigIndication); type=10;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList)) { type = 3; return true; } + else if(equal(id_E_RABs_NotAdmitted_List)) { type = 4; return true; } + else if(equal(id_SgNBtoMeNBContainer)) { type = 5; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 6; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 7; return true; } + else if(equal(id_AdmittedSplitSRBs)) { type = 8; return true; } + else if(equal(id_SgNBResourceCoordinationInformation)) { type = 9; return true; } + else if(equal(id_RRCConfigIndication)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_NotAdmitted_List);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SgNBtoMeNBContainer);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_AdmittedSplitSRBs);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_SgNBResourceCoordinationInformation);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_RRCConfigIndication);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList() { set(ignore); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(ignore); type=4;} + void select_id_SgNBtoMeNBContainer() { set(reject); type=5;} + void select_id_CriticalityDiagnostics() { set(ignore); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=7;} + void select_id_AdmittedSplitSRBs() { set(reject); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(ignore); type=9;} + void select_id_RRCConfigIndication() { set(reject); type=10;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList& select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList() { return set(3); } + E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList const* get_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList() const { return get(3); } + E_RAB_List& select_id_E_RABs_NotAdmitted_List() { return set(4); } + E_RAB_List const* get_id_E_RABs_NotAdmitted_List() const { return get(4); } + SgNBtoMeNBContainer& select_id_SgNBtoMeNBContainer() { return set(5); } + SgNBtoMeNBContainer const* get_id_SgNBtoMeNBContainer() const { return get(5); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(6); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(6); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(7); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(7); } + SplitSRBs& select_id_AdmittedSplitSRBs() { return set(8); } + SplitSRBs const* get_id_AdmittedSplitSRBs() const { return get(8); } + SgNBResourceCoordinationInformation& select_id_SgNBResourceCoordinationInformation() { return set(9); } + SgNBResourceCoordinationInformation const* get_id_SgNBResourceCoordinationInformation() const { return get(9); } + RRC_Config_Ind& select_id_RRCConfigIndication() { return set(10); } + RRC_Config_Ind const* get_id_RRCConfigIndication() const { return get(10); } + bool is_unknown() const { return type == 11; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList()); return true; + case 4: v(select_id_E_RABs_NotAdmitted_List()); return true; + case 5: v(select_id_SgNBtoMeNBContainer()); return true; + case 6: v(select_id_CriticalityDiagnostics()); return true; + case 7: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 8: v(select_id_AdmittedSplitSRBs()); return true; + case 9: v(select_id_SgNBResourceCoordinationInformation()); return true; + case 10: v(select_id_RRCConfigIndication()); return true; + case 11: if(type != 11) {clear(); asn::base::set();} type = 11; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RAB_List)]; + char dummy3[sizeof(E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList)]; + char dummy4[sizeof(RRC_Config_Ind)]; + char dummy5[sizeof(SgNBResourceCoordinationInformation)]; + char dummy6[sizeof(SgNB_UE_X2AP_ID)]; + char dummy7[sizeof(SgNBtoMeNBContainer)]; + char dummy8[sizeof(SplitSRBs)]; + char dummy9[sizeof(UE_X2AP_ID)]; + char dummy10[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBAddReqAckList() { set(mandatory); type=3;} + void select_id_E_RABs_NotAdmitted_List() { set(optional); type=4;} + void select_id_SgNBtoMeNBContainer() { set(mandatory); type=5;} + void select_id_CriticalityDiagnostics() { set(optional); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=7;} + void select_id_AdmittedSplitSRBs() { set(optional); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(optional); type=9;} + void select_id_RRCConfigIndication() { set(optional); type=10;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(mandatory)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(mandatory);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBAdditionRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequestAcknowledge-IEs}}, + ... +} +*/ + +struct SgNBAdditionRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBAdditionRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBAdditionRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBAdditionRequestReject_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(optional); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBAdditionRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBAdditionRequestReject-IEs}}, + ... +} +*/ + +struct SgNBAdditionRequestReject : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBAdditionRequestReject";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBChangeConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBChaConfList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBChaConfList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBChangeConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBChaConfList() { set(id_E_RABs_ToBeReleased_SgNBChaConfList); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_ToBeReleased_SgNBChaConfList)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBChaConfList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBChaConfList() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_ToBeReleased_SgNBChaConfList& select_id_E_RABs_ToBeReleased_SgNBChaConfList() { return set(3); } + E_RABs_ToBeReleased_SgNBChaConfList const* get_id_E_RABs_ToBeReleased_SgNBChaConfList() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_ToBeReleased_SgNBChaConfList()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RABs_ToBeReleased_SgNBChaConfList)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBChaConfList() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBChangeConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeConfirm-IEs}}, + ... +} +*/ + +struct SgNBChangeConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBChangeConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBChangeRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBChangeRefuse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBChangeRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeRefuse-IEs}}, + ... +} +*/ + +struct SgNBChangeRefuse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBChangeRefuse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBChangeRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Target-SgNB-ID CRITICALITY reject TYPE GlobalGNB-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SgNBtoMeNBContainer CRITICALITY reject TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBChangeRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Target_SgNB_ID() { set(id_Target_SgNB_ID); type=3;} + void select_id_Cause() { set(id_Cause); type=4;} + void select_id_SgNBtoMeNBContainer() { set(id_SgNBtoMeNBContainer); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Target_SgNB_ID)) { type = 3; return true; } + else if(equal(id_Cause)) { type = 4; return true; } + else if(equal(id_SgNBtoMeNBContainer)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Target_SgNB_ID);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SgNBtoMeNBContainer);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Target_SgNB_ID() { set(reject); type=3;} + void select_id_Cause() { set(ignore); type=4;} + void select_id_SgNBtoMeNBContainer() { set(reject); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + GlobalGNB_ID& select_id_Target_SgNB_ID() { return set(3); } + GlobalGNB_ID const* get_id_Target_SgNB_ID() const { return get(3); } + Cause& select_id_Cause() { return set(4); } + Cause const* get_id_Cause() const { return get(4); } + SgNBtoMeNBContainer& select_id_SgNBtoMeNBContainer() { return set(5); } + SgNBtoMeNBContainer const* get_id_SgNBtoMeNBContainer() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Target_SgNB_ID()); return true; + case 4: v(select_id_Cause()); return true; + case 5: v(select_id_SgNBtoMeNBContainer()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(GlobalGNB_ID)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(SgNBtoMeNBContainer)]; + char dummy5[sizeof(UE_X2AP_ID)]; + char dummy6[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Target_SgNB_ID() { set(mandatory); type=3;} + void select_id_Cause() { set(mandatory); type=4;} + void select_id_SgNBtoMeNBContainer() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(mandatory)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(mandatory);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBChangeRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBChangeRequired-IEs}}, + ... +} +*/ + +struct SgNBChangeRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBChangeRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBCounterCheckRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-SubjectToSgNBCounterCheck-List CRITICALITY ignore TYPE E-RABs-SubjectToSgNBCounterCheck-List PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBCounterCheckRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_List() { set(id_E_RABs_SubjectToSgNBCounterCheck_List); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_SubjectToSgNBCounterCheck_List)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_SubjectToSgNBCounterCheck_List);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_List() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_SubjectToSgNBCounterCheck_List& select_id_E_RABs_SubjectToSgNBCounterCheck_List() { return set(3); } + E_RABs_SubjectToSgNBCounterCheck_List const* get_id_E_RABs_SubjectToSgNBCounterCheck_List() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_SubjectToSgNBCounterCheck_List()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(E_RABs_SubjectToSgNBCounterCheck_List)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_SubjectToSgNBCounterCheck_List() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBCounterCheckRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBCounterCheckRequest-IEs}}, + ... +} +*/ + +struct SgNBCounterCheckRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBCounterCheckRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBModificationConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-AdmittedToBeModified-SgNBModConfList CRITICALITY ignore TYPE E-RABs-AdmittedToBeModified-SgNBModConfList PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY ignore TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConfList() { set(id_E_RABs_AdmittedToBeModified_SgNBModConfList); type=3;} + void select_id_MeNBtoSgNBContainer() { set(id_MeNBtoSgNBContainer); type=4;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + void select_id_MeNBResourceCoordinationInformation() { set(id_MeNBResourceCoordinationInformation); type=7;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_AdmittedToBeModified_SgNBModConfList)) { type = 3; return true; } + else if(equal(id_MeNBtoSgNBContainer)) { type = 4; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else if(equal(id_MeNBResourceCoordinationInformation)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_AdmittedToBeModified_SgNBModConfList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNBtoSgNBContainer);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNBResourceCoordinationInformation);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConfList() { set(ignore); type=3;} + void select_id_MeNBtoSgNBContainer() { set(ignore); type=4;} + void select_id_CriticalityDiagnostics() { set(ignore); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + void select_id_MeNBResourceCoordinationInformation() { set(ignore); type=7;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_AdmittedToBeModified_SgNBModConfList& select_id_E_RABs_AdmittedToBeModified_SgNBModConfList() { return set(3); } + E_RABs_AdmittedToBeModified_SgNBModConfList const* get_id_E_RABs_AdmittedToBeModified_SgNBModConfList() const { return get(3); } + MeNBtoSgNBContainer& select_id_MeNBtoSgNBContainer() { return set(4); } + MeNBtoSgNBContainer const* get_id_MeNBtoSgNBContainer() const { return get(4); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(5); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + MeNBResourceCoordinationInformation& select_id_MeNBResourceCoordinationInformation() { return set(7); } + MeNBResourceCoordinationInformation const* get_id_MeNBResourceCoordinationInformation() const { return get(7); } + bool is_unknown() const { return type == 8; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_AdmittedToBeModified_SgNBModConfList()); return true; + case 4: v(select_id_MeNBtoSgNBContainer()); return true; + case 5: v(select_id_CriticalityDiagnostics()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: v(select_id_MeNBResourceCoordinationInformation()); return true; + case 8: if(type != 8) {clear(); asn::base::set();} type = 8; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RABs_AdmittedToBeModified_SgNBModConfList)]; + char dummy3[sizeof(MeNBResourceCoordinationInformation)]; + char dummy4[sizeof(MeNBtoSgNBContainer)]; + char dummy5[sizeof(SgNB_UE_X2AP_ID)]; + char dummy6[sizeof(UE_X2AP_ID)]; + char dummy7[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_AdmittedToBeModified_SgNBModConfList() { set(optional); type=3;} + void select_id_MeNBtoSgNBContainer() { set(optional); type=4;} + void select_id_CriticalityDiagnostics() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + void select_id_MeNBResourceCoordinationInformation() { set(optional); type=7;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationConfirm-IEs}}, + ... +} +*/ + +struct SgNBModificationConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBModificationRefuse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNBtoSgNBContainer CRITICALITY ignore TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationRefuse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_MeNBtoSgNBContainer() { set(id_MeNBtoSgNBContainer); type=4;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_MeNBtoSgNBContainer)) { type = 4; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNBtoSgNBContainer);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_MeNBtoSgNBContainer() { set(ignore); type=4;} + void select_id_CriticalityDiagnostics() { set(ignore); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + MeNBtoSgNBContainer& select_id_MeNBtoSgNBContainer() { return set(4); } + MeNBtoSgNBContainer const* get_id_MeNBtoSgNBContainer() const { return get(4); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(5); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_MeNBtoSgNBContainer()); return true; + case 5: v(select_id_CriticalityDiagnostics()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(MeNBtoSgNBContainer)]; + char dummy4[sizeof(SgNB_UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID)]; + char dummy6[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_MeNBtoSgNBContainer() { set(optional); type=4;} + void select_id_CriticalityDiagnostics() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationRefuse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRefuse-IEs}}, + ... +} +*/ + +struct SgNBModificationRefuse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationRefuse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +UE-ContextInformationSgNBModReqExtIEs X2AP-PROTOCOL-EXTENSION ::= { + { ID id-SubscriberProfileIDforRFP CRITICALITY ignore EXTENSION SubscriberProfileIDforRFP PRESENCE optional}, + ... +} +*/ + +struct UE_ContextInformationSgNBModReqExtIEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SubscriberProfileIDforRFP() { set(id_SubscriberProfileIDforRFP); type=1;} + X2AP_PROTOCOL_EXTENSION::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_SubscriberProfileIDforRFP)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_SubscriberProfileIDforRFP);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SubscriberProfileIDforRFP() { set(ignore); type=1;} + X2AP_PROTOCOL_EXTENSION::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Extension_t : asn::typefield + { + ~Extension_t() {clear();} + size_t get_index() const {return type;} + SubscriberProfileIDforRFP& select_id_SubscriberProfileIDforRFP() { return set(1); } + SubscriberProfileIDforRFP const* get_id_SubscriberProfileIDforRFP() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_SubscriberProfileIDforRFP()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(SubscriberProfileIDforRFP)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_SubscriberProfileIDforRFP() { set(optional); type=1;} + X2AP_PROTOCOL_EXTENSION::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(optional)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(optional);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UE-ContextInformation-SgNBModReq ::= SEQUENCE { + nRUE-SecurityCapabilities NRUESecurityCapabilities OPTIONAL, + sgNB-SecurityKey SgNBSecurityKey OPTIONAL, + sgNBUEAggregateMaximumBitRate UEAggregateMaximumBitRate OPTIONAL, + e-RABs-ToBeAdded E-RABs-ToBeAdded-SgNBModReq-List OPTIONAL, + e-RABs-ToBeModified E-RABs-ToBeModified-SgNBModReq-List OPTIONAL, + e-RABs-ToBeReleased E-RABs-ToBeReleased-SgNBModReq-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {UE-ContextInformationSgNBModReqExtIEs} } OPTIONAL, + ... +} +*/ + +struct UE_ContextInformation_SgNBModReq : asn::sequence<7, 0, true, 7> +{ + static constexpr const char* name() {return "UE-ContextInformation-SgNBModReq";} + using parent_t = asn::sequence<7, 0, true, 7>; + struct nRUE_SecurityCapabilities_t : NRUESecurityCapabilities + { + static constexpr const char* name() {return "nRUE_SecurityCapabilities_t";} + using parent_t = NRUESecurityCapabilities; + static constexpr bool optional = true; + + }; + nRUE_SecurityCapabilities_t& set_nRUE_SecurityCapabilities() { nRUE_SecurityCapabilities.setpresent(true); return nRUE_SecurityCapabilities;} + nRUE_SecurityCapabilities_t const* get_nRUE_SecurityCapabilities() const {return nRUE_SecurityCapabilities.is_valid() ? &nRUE_SecurityCapabilities : nullptr;} + struct sgNB_SecurityKey_t : SgNBSecurityKey + { + static constexpr const char* name() {return "sgNB_SecurityKey_t";} + using parent_t = SgNBSecurityKey; + static constexpr bool optional = true; + + }; + sgNB_SecurityKey_t& set_sgNB_SecurityKey() { sgNB_SecurityKey.setpresent(true); return sgNB_SecurityKey;} + sgNB_SecurityKey_t const* get_sgNB_SecurityKey() const {return sgNB_SecurityKey.is_valid() ? &sgNB_SecurityKey : nullptr;} + struct sgNBUEAggregateMaximumBitRate_t : UEAggregateMaximumBitRate + { + static constexpr const char* name() {return "sgNBUEAggregateMaximumBitRate_t";} + using parent_t = UEAggregateMaximumBitRate; + static constexpr bool optional = true; + + }; + sgNBUEAggregateMaximumBitRate_t& set_sgNBUEAggregateMaximumBitRate() { sgNBUEAggregateMaximumBitRate.setpresent(true); return sgNBUEAggregateMaximumBitRate;} + sgNBUEAggregateMaximumBitRate_t const* get_sgNBUEAggregateMaximumBitRate() const {return sgNBUEAggregateMaximumBitRate.is_valid() ? &sgNBUEAggregateMaximumBitRate : nullptr;} + struct e_RABs_ToBeAdded_t : E_RABs_ToBeAdded_SgNBModReq_List + { + static constexpr const char* name() {return "e_RABs_ToBeAdded_t";} + using parent_t = E_RABs_ToBeAdded_SgNBModReq_List; + static constexpr bool optional = true; + + }; + e_RABs_ToBeAdded_t& set_e_RABs_ToBeAdded() { e_RABs_ToBeAdded.setpresent(true); return e_RABs_ToBeAdded;} + e_RABs_ToBeAdded_t const* get_e_RABs_ToBeAdded() const {return e_RABs_ToBeAdded.is_valid() ? &e_RABs_ToBeAdded : nullptr;} + struct e_RABs_ToBeModified_t : E_RABs_ToBeModified_SgNBModReq_List + { + static constexpr const char* name() {return "e_RABs_ToBeModified_t";} + using parent_t = E_RABs_ToBeModified_SgNBModReq_List; + static constexpr bool optional = true; + + }; + e_RABs_ToBeModified_t& set_e_RABs_ToBeModified() { e_RABs_ToBeModified.setpresent(true); return e_RABs_ToBeModified;} + e_RABs_ToBeModified_t const* get_e_RABs_ToBeModified() const {return e_RABs_ToBeModified.is_valid() ? &e_RABs_ToBeModified : nullptr;} + struct e_RABs_ToBeReleased_t : E_RABs_ToBeReleased_SgNBModReq_List + { + static constexpr const char* name() {return "e_RABs_ToBeReleased_t";} + using parent_t = E_RABs_ToBeReleased_SgNBModReq_List; + static constexpr bool optional = true; + + }; + e_RABs_ToBeReleased_t& set_e_RABs_ToBeReleased() { e_RABs_ToBeReleased.setpresent(true); return e_RABs_ToBeReleased;} + e_RABs_ToBeReleased_t const* get_e_RABs_ToBeReleased() const {return e_RABs_ToBeReleased.is_valid() ? &e_RABs_ToBeReleased : nullptr;} + struct iE_Extensions_t : ProtocolExtensionContainer + { + static constexpr const char* name() {return "iE_Extensions_t";} + using parent_t = ProtocolExtensionContainer; + static constexpr bool optional = true; + + }; + iE_Extensions_t& set_iE_Extensions() { iE_Extensions.setpresent(true); return iE_Extensions;} + iE_Extensions_t const* get_iE_Extensions() const {return iE_Extensions.is_valid() ? &iE_Extensions : nullptr;} + template void decode(V& v) + { + v(nRUE_SecurityCapabilities); + v(sgNB_SecurityKey); + v(sgNBUEAggregateMaximumBitRate); + v(e_RABs_ToBeAdded); + v(e_RABs_ToBeModified); + v(e_RABs_ToBeReleased); + v(iE_Extensions); + + }; + template void encode(V& v) const + { + v(nRUE_SecurityCapabilities); + v(sgNB_SecurityKey); + v(sgNBUEAggregateMaximumBitRate); + v(e_RABs_ToBeAdded); + v(e_RABs_ToBeModified); + v(e_RABs_ToBeReleased); + v(iE_Extensions); + + }; + void clear() + { + nRUE_SecurityCapabilities.clear(); + sgNB_SecurityKey.clear(); + sgNBUEAggregateMaximumBitRate.clear(); + e_RABs_ToBeAdded.clear(); + e_RABs_ToBeModified.clear(); + e_RABs_ToBeReleased.clear(); + iE_Extensions.clear(); + + }; + private: + nRUE_SecurityCapabilities_t nRUE_SecurityCapabilities; + sgNB_SecurityKey_t sgNB_SecurityKey; + sgNBUEAggregateMaximumBitRate_t sgNBUEAggregateMaximumBitRate; + e_RABs_ToBeAdded_t e_RABs_ToBeAdded; + e_RABs_ToBeModified_t e_RABs_ToBeModified; + e_RABs_ToBeReleased_t e_RABs_ToBeReleased; + iE_Extensions_t iE_Extensions; + +}; +/* +SgNBModificationRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-SelectedPLMN CRITICALITY ignore TYPE PLMN-Identity PRESENCE optional}| + { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| + { ID id-SCGConfigurationQuery CRITICALITY ignore TYPE SCGConfigurationQuery PRESENCE optional}| + { ID id-UE-ContextInformation-SgNBModReq CRITICALITY reject TYPE UE-ContextInformation-SgNBModReq PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY reject TYPE MeNBtoSgNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBResourceCoordinationInformation CRITICALITY ignore TYPE MeNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RequestedSplitSRBs CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-RequestedSplitSRBsrelease CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_SelectedPLMN() { set(id_SelectedPLMN); type=4;} + void select_id_HandoverRestrictionList() { set(id_HandoverRestrictionList); type=5;} + void select_id_SCGConfigurationQuery() { set(id_SCGConfigurationQuery); type=6;} + void select_id_UE_ContextInformation_SgNBModReq() { set(id_UE_ContextInformation_SgNBModReq); type=7;} + void select_id_MeNBtoSgNBContainer() { set(id_MeNBtoSgNBContainer); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=9;} + void select_id_MeNBResourceCoordinationInformation() { set(id_MeNBResourceCoordinationInformation); type=10;} + void select_id_RequestedSplitSRBs() { set(id_RequestedSplitSRBs); type=11;} + void select_id_RequestedSplitSRBsrelease() { set(id_RequestedSplitSRBsrelease); type=12;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_SelectedPLMN)) { type = 4; return true; } + else if(equal(id_HandoverRestrictionList)) { type = 5; return true; } + else if(equal(id_SCGConfigurationQuery)) { type = 6; return true; } + else if(equal(id_UE_ContextInformation_SgNBModReq)) { type = 7; return true; } + else if(equal(id_MeNBtoSgNBContainer)) { type = 8; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_MeNBResourceCoordinationInformation)) { type = 10; return true; } + else if(equal(id_RequestedSplitSRBs)) { type = 11; return true; } + else if(equal(id_RequestedSplitSRBsrelease)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_SelectedPLMN);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_HandoverRestrictionList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SCGConfigurationQuery);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_UE_ContextInformation_SgNBModReq);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_MeNBtoSgNBContainer);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_MeNBResourceCoordinationInformation);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_RequestedSplitSRBs);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_RequestedSplitSRBsrelease);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_SelectedPLMN() { set(ignore); type=4;} + void select_id_HandoverRestrictionList() { set(ignore); type=5;} + void select_id_SCGConfigurationQuery() { set(ignore); type=6;} + void select_id_UE_ContextInformation_SgNBModReq() { set(reject); type=7;} + void select_id_MeNBtoSgNBContainer() { set(reject); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=9;} + void select_id_MeNBResourceCoordinationInformation() { set(ignore); type=10;} + void select_id_RequestedSplitSRBs() { set(ignore); type=11;} + void select_id_RequestedSplitSRBsrelease() { set(ignore); type=12;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(ignore)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + PLMN_Identity& select_id_SelectedPLMN() { return set(4); } + PLMN_Identity const* get_id_SelectedPLMN() const { return get(4); } + HandoverRestrictionList& select_id_HandoverRestrictionList() { return set(5); } + HandoverRestrictionList const* get_id_HandoverRestrictionList() const { return get(5); } + SCGConfigurationQuery& select_id_SCGConfigurationQuery() { return set(6); } + SCGConfigurationQuery const* get_id_SCGConfigurationQuery() const { return get(6); } + UE_ContextInformation_SgNBModReq& select_id_UE_ContextInformation_SgNBModReq() { return set(7); } + UE_ContextInformation_SgNBModReq const* get_id_UE_ContextInformation_SgNBModReq() const { return get(7); } + MeNBtoSgNBContainer& select_id_MeNBtoSgNBContainer() { return set(8); } + MeNBtoSgNBContainer const* get_id_MeNBtoSgNBContainer() const { return get(8); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(9); } + MeNBResourceCoordinationInformation& select_id_MeNBResourceCoordinationInformation() { return set(10); } + MeNBResourceCoordinationInformation const* get_id_MeNBResourceCoordinationInformation() const { return get(10); } + SplitSRBs& select_id_RequestedSplitSRBs() { return set(11); } + SplitSRBs const* get_id_RequestedSplitSRBs() const { return get(11); } + SplitSRBs& select_id_RequestedSplitSRBsrelease() { return set(12); } + SplitSRBs const* get_id_RequestedSplitSRBsrelease() const { return get(12); } + bool is_unknown() const { return type == 13; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_SelectedPLMN()); return true; + case 5: v(select_id_HandoverRestrictionList()); return true; + case 6: v(select_id_SCGConfigurationQuery()); return true; + case 7: v(select_id_UE_ContextInformation_SgNBModReq()); return true; + case 8: v(select_id_MeNBtoSgNBContainer()); return true; + case 9: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_MeNBResourceCoordinationInformation()); return true; + case 11: v(select_id_RequestedSplitSRBs()); return true; + case 12: v(select_id_RequestedSplitSRBsrelease()); return true; + case 13: if(type != 13) {clear(); asn::base::set();} type = 13; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(HandoverRestrictionList)]; + char dummy3[sizeof(MeNBResourceCoordinationInformation)]; + char dummy4[sizeof(MeNBtoSgNBContainer)]; + char dummy5[sizeof(PLMN_Identity)]; + char dummy6[sizeof(SCGConfigurationQuery)]; + char dummy7[sizeof(SgNB_UE_X2AP_ID)]; + char dummy8[sizeof(SplitSRBs)]; + char dummy9[sizeof(UE_ContextInformation_SgNBModReq)]; + char dummy10[sizeof(UE_X2AP_ID)]; + char dummy11[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 13; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_SelectedPLMN() { set(optional); type=4;} + void select_id_HandoverRestrictionList() { set(optional); type=5;} + void select_id_SCGConfigurationQuery() { set(optional); type=6;} + void select_id_UE_ContextInformation_SgNBModReq() { set(optional); type=7;} + void select_id_MeNBtoSgNBContainer() { set(optional); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_MeNBResourceCoordinationInformation() { set(optional); type=10;} + void select_id_RequestedSplitSRBs() { set(optional); type=11;} + void select_id_RequestedSplitSRBsrelease() { set(optional); type=12;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else { type = 13; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{ SgNBModificationRequest-IEs}}, + ... +} +*/ + +struct SgNBModificationRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBModificationRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-Admitted-ToBeAdded-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeAdded-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeModified-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeModified-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-Admitted-ToBeReleased-SgNBModAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-SgNBModAckList PRESENCE optional}| + { ID id-E-RABs-NotAdmitted-List CRITICALITY ignore TYPE E-RAB-List PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY ignore TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-AdmittedSplitSRBs CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-AdmittedSplitSRBsrelease CRITICALITY ignore TYPE SplitSRBs PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 14; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList() { set(id_E_RABs_Admitted_ToBeAdded_SgNBModAckList); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAckList() { set(id_E_RABs_Admitted_ToBeModified_SgNBModAckList); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList() { set(id_E_RABs_Admitted_ToBeReleased_SgNBModAckList); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(id_E_RABs_NotAdmitted_List); type=6;} + void select_id_SgNBtoMeNBContainer() { set(id_SgNBtoMeNBContainer); type=7;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=9;} + void select_id_SgNBResourceCoordinationInformation() { set(id_SgNBResourceCoordinationInformation); type=10;} + void select_id_AdmittedSplitSRBs() { set(id_AdmittedSplitSRBs); type=11;} + void select_id_AdmittedSplitSRBsrelease() { set(id_AdmittedSplitSRBsrelease); type=12;} + void select_id_RRCConfigIndication() { set(id_RRCConfigIndication); type=13;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_Admitted_ToBeAdded_SgNBModAckList)) { type = 3; return true; } + else if(equal(id_E_RABs_Admitted_ToBeModified_SgNBModAckList)) { type = 4; return true; } + else if(equal(id_E_RABs_Admitted_ToBeReleased_SgNBModAckList)) { type = 5; return true; } + else if(equal(id_E_RABs_NotAdmitted_List)) { type = 6; return true; } + else if(equal(id_SgNBtoMeNBContainer)) { type = 7; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 8; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 9; return true; } + else if(equal(id_SgNBResourceCoordinationInformation)) { type = 10; return true; } + else if(equal(id_AdmittedSplitSRBs)) { type = 11; return true; } + else if(equal(id_AdmittedSplitSRBsrelease)) { type = 12; return true; } + else if(equal(id_RRCConfigIndication)) { type = 13; return true; } + else { type = 14; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeAdded_SgNBModAckList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeModified_SgNBModAckList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_SgNBModAckList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_E_RABs_NotAdmitted_List);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_SgNBtoMeNBContainer);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_SgNBResourceCoordinationInformation);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_AdmittedSplitSRBs);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_AdmittedSplitSRBsrelease);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_RRCConfigIndication);} return false; + case 14: type = 14; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 14; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList() { set(ignore); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAckList() { set(ignore); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList() { set(ignore); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(ignore); type=6;} + void select_id_SgNBtoMeNBContainer() { set(ignore); type=7;} + void select_id_CriticalityDiagnostics() { set(ignore); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=9;} + void select_id_SgNBResourceCoordinationInformation() { set(ignore); type=10;} + void select_id_AdmittedSplitSRBs() { set(ignore); type=11;} + void select_id_AdmittedSplitSRBsrelease() { set(ignore); type=12;} + void select_id_RRCConfigIndication() { set(reject); type=13;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(ignore)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(ignore)) { type = 10; return true; } + else if(equal(ignore)) { type = 11; return true; } + else if(equal(ignore)) { type = 12; return true; } + else if(equal(reject)) { type = 13; return true; } + else { type = 14; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(ignore);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(ignore);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(ignore);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(ignore);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(reject);} return false; + case 14: type = 14; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_Admitted_ToBeAdded_SgNBModAckList& select_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList() { return set(3); } + E_RABs_Admitted_ToBeAdded_SgNBModAckList const* get_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList() const { return get(3); } + E_RABs_Admitted_ToBeModified_SgNBModAckList& select_id_E_RABs_Admitted_ToBeModified_SgNBModAckList() { return set(4); } + E_RABs_Admitted_ToBeModified_SgNBModAckList const* get_id_E_RABs_Admitted_ToBeModified_SgNBModAckList() const { return get(4); } + E_RABs_Admitted_ToBeReleased_SgNBModAckList& select_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList() { return set(5); } + E_RABs_Admitted_ToBeReleased_SgNBModAckList const* get_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList() const { return get(5); } + E_RAB_List& select_id_E_RABs_NotAdmitted_List() { return set(6); } + E_RAB_List const* get_id_E_RABs_NotAdmitted_List() const { return get(6); } + SgNBtoMeNBContainer& select_id_SgNBtoMeNBContainer() { return set(7); } + SgNBtoMeNBContainer const* get_id_SgNBtoMeNBContainer() const { return get(7); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(8); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(8); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(9); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(9); } + SgNBResourceCoordinationInformation& select_id_SgNBResourceCoordinationInformation() { return set(10); } + SgNBResourceCoordinationInformation const* get_id_SgNBResourceCoordinationInformation() const { return get(10); } + SplitSRBs& select_id_AdmittedSplitSRBs() { return set(11); } + SplitSRBs const* get_id_AdmittedSplitSRBs() const { return get(11); } + SplitSRBs& select_id_AdmittedSplitSRBsrelease() { return set(12); } + SplitSRBs const* get_id_AdmittedSplitSRBsrelease() const { return get(12); } + RRC_Config_Ind& select_id_RRCConfigIndication() { return set(13); } + RRC_Config_Ind const* get_id_RRCConfigIndication() const { return get(13); } + bool is_unknown() const { return type == 14; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList()); return true; + case 4: v(select_id_E_RABs_Admitted_ToBeModified_SgNBModAckList()); return true; + case 5: v(select_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList()); return true; + case 6: v(select_id_E_RABs_NotAdmitted_List()); return true; + case 7: v(select_id_SgNBtoMeNBContainer()); return true; + case 8: v(select_id_CriticalityDiagnostics()); return true; + case 9: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 10: v(select_id_SgNBResourceCoordinationInformation()); return true; + case 11: v(select_id_AdmittedSplitSRBs()); return true; + case 12: v(select_id_AdmittedSplitSRBsrelease()); return true; + case 13: v(select_id_RRCConfigIndication()); return true; + case 14: if(type != 14) {clear(); asn::base::set();} type = 14; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RAB_List)]; + char dummy3[sizeof(E_RABs_Admitted_ToBeAdded_SgNBModAckList)]; + char dummy4[sizeof(E_RABs_Admitted_ToBeModified_SgNBModAckList)]; + char dummy5[sizeof(E_RABs_Admitted_ToBeReleased_SgNBModAckList)]; + char dummy6[sizeof(RRC_Config_Ind)]; + char dummy7[sizeof(SgNBResourceCoordinationInformation)]; + char dummy8[sizeof(SgNB_UE_X2AP_ID)]; + char dummy9[sizeof(SgNBtoMeNBContainer)]; + char dummy10[sizeof(SplitSRBs)]; + char dummy11[sizeof(UE_X2AP_ID)]; + char dummy12[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 14; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_Admitted_ToBeAdded_SgNBModAckList() { set(optional); type=3;} + void select_id_E_RABs_Admitted_ToBeModified_SgNBModAckList() { set(optional); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBModAckList() { set(optional); type=5;} + void select_id_E_RABs_NotAdmitted_List() { set(optional); type=6;} + void select_id_SgNBtoMeNBContainer() { set(optional); type=7;} + void select_id_CriticalityDiagnostics() { set(optional); type=8;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=9;} + void select_id_SgNBResourceCoordinationInformation() { set(optional); type=10;} + void select_id_AdmittedSplitSRBs() { set(optional); type=11;} + void select_id_AdmittedSplitSRBsrelease() { set(optional); type=12;} + void select_id_RRCConfigIndication() { set(optional); type=13;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else if(equal(optional)) { type = 11; return true; } + else if(equal(optional)) { type = 12; return true; } + else if(equal(optional)) { type = 13; return true; } + else { type = 14; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(optional);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(optional);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(optional);} return false; + case 14: type = 14; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequestAcknowledge-IEs}}, + ... +} +*/ + +struct SgNBModificationRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBModificationRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationRequestReject_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequestReject-IEs}}, + ... +} +*/ + +struct SgNBModificationRequestReject : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationRequestReject";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBModificationRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-PDCPChangeIndication CRITICALITY ignore TYPE PDCPChangeIndication PRESENCE optional}| + { ID id-E-RABs-ToBeReleased-SgNBModReqdList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBModReqdList PRESENCE optional}| + { ID id-SgNBtoMeNBContainer CRITICALITY ignore TYPE SgNBtoMeNBContainer PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-E-RABs-ToBeModified-SgNBModReqdList CRITICALITY ignore TYPE E-RABs-ToBeModified-SgNBModReqdList PRESENCE optional}| + { ID id-SgNBResourceCoordinationInformation CRITICALITY ignore TYPE SgNBResourceCoordinationInformation PRESENCE optional}| + { ID id-RRCConfigIndication CRITICALITY reject TYPE RRC-Config-Ind PRESENCE optional}, + ... +} +*/ + +struct SgNBModificationRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_PDCPChangeIndication() { set(id_PDCPChangeIndication); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBModReqdList() { set(id_E_RABs_ToBeReleased_SgNBModReqdList); type=5;} + void select_id_SgNBtoMeNBContainer() { set(id_SgNBtoMeNBContainer); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=7;} + void select_id_E_RABs_ToBeModified_SgNBModReqdList() { set(id_E_RABs_ToBeModified_SgNBModReqdList); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(id_SgNBResourceCoordinationInformation); type=9;} + void select_id_RRCConfigIndication() { set(id_RRCConfigIndication); type=10;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_PDCPChangeIndication)) { type = 4; return true; } + else if(equal(id_E_RABs_ToBeReleased_SgNBModReqdList)) { type = 5; return true; } + else if(equal(id_SgNBtoMeNBContainer)) { type = 6; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 7; return true; } + else if(equal(id_E_RABs_ToBeModified_SgNBModReqdList)) { type = 8; return true; } + else if(equal(id_SgNBResourceCoordinationInformation)) { type = 9; return true; } + else if(equal(id_RRCConfigIndication)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_PDCPChangeIndication);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBModReqdList);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SgNBtoMeNBContainer);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_E_RABs_ToBeModified_SgNBModReqdList);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_SgNBResourceCoordinationInformation);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_RRCConfigIndication);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_PDCPChangeIndication() { set(ignore); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBModReqdList() { set(ignore); type=5;} + void select_id_SgNBtoMeNBContainer() { set(ignore); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=7;} + void select_id_E_RABs_ToBeModified_SgNBModReqdList() { set(ignore); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(ignore); type=9;} + void select_id_RRCConfigIndication() { set(reject); type=10;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(ignore)) { type = 8; return true; } + else if(equal(ignore)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(ignore);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(ignore);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + PDCPChangeIndication& select_id_PDCPChangeIndication() { return set(4); } + PDCPChangeIndication const* get_id_PDCPChangeIndication() const { return get(4); } + E_RABs_ToBeReleased_SgNBModReqdList& select_id_E_RABs_ToBeReleased_SgNBModReqdList() { return set(5); } + E_RABs_ToBeReleased_SgNBModReqdList const* get_id_E_RABs_ToBeReleased_SgNBModReqdList() const { return get(5); } + SgNBtoMeNBContainer& select_id_SgNBtoMeNBContainer() { return set(6); } + SgNBtoMeNBContainer const* get_id_SgNBtoMeNBContainer() const { return get(6); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(7); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(7); } + E_RABs_ToBeModified_SgNBModReqdList& select_id_E_RABs_ToBeModified_SgNBModReqdList() { return set(8); } + E_RABs_ToBeModified_SgNBModReqdList const* get_id_E_RABs_ToBeModified_SgNBModReqdList() const { return get(8); } + SgNBResourceCoordinationInformation& select_id_SgNBResourceCoordinationInformation() { return set(9); } + SgNBResourceCoordinationInformation const* get_id_SgNBResourceCoordinationInformation() const { return get(9); } + RRC_Config_Ind& select_id_RRCConfigIndication() { return set(10); } + RRC_Config_Ind const* get_id_RRCConfigIndication() const { return get(10); } + bool is_unknown() const { return type == 11; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_PDCPChangeIndication()); return true; + case 5: v(select_id_E_RABs_ToBeReleased_SgNBModReqdList()); return true; + case 6: v(select_id_SgNBtoMeNBContainer()); return true; + case 7: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 8: v(select_id_E_RABs_ToBeModified_SgNBModReqdList()); return true; + case 9: v(select_id_SgNBResourceCoordinationInformation()); return true; + case 10: v(select_id_RRCConfigIndication()); return true; + case 11: if(type != 11) {clear(); asn::base::set();} type = 11; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(E_RABs_ToBeModified_SgNBModReqdList)]; + char dummy3[sizeof(E_RABs_ToBeReleased_SgNBModReqdList)]; + char dummy4[sizeof(PDCPChangeIndication)]; + char dummy5[sizeof(RRC_Config_Ind)]; + char dummy6[sizeof(SgNBResourceCoordinationInformation)]; + char dummy7[sizeof(SgNB_UE_X2AP_ID)]; + char dummy8[sizeof(SgNBtoMeNBContainer)]; + char dummy9[sizeof(UE_X2AP_ID)]; + char dummy10[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 11; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_PDCPChangeIndication() { set(optional); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBModReqdList() { set(optional); type=5;} + void select_id_SgNBtoMeNBContainer() { set(optional); type=6;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=7;} + void select_id_E_RABs_ToBeModified_SgNBModReqdList() { set(optional); type=8;} + void select_id_SgNBResourceCoordinationInformation() { set(optional); type=9;} + void select_id_RRCConfigIndication() { set(optional); type=10;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else if(equal(optional)) { type = 8; return true; } + else if(equal(optional)) { type = 9; return true; } + else if(equal(optional)) { type = 10; return true; } + else { type = 11; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(optional);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(optional);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(optional);} return false; + case 11: type = 11; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBModificationRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBModificationRequired-IEs}}, + ... +} +*/ + +struct SgNBModificationRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBModificationRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReconfigurationComplete-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-ResponseInformationSgNBReconfComp CRITICALITY ignore TYPE ResponseInformationSgNBReconfComp PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBReconfigurationComplete_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_ResponseInformationSgNBReconfComp() { set(id_ResponseInformationSgNBReconfComp); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_ResponseInformationSgNBReconfComp)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_ResponseInformationSgNBReconfComp);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_ResponseInformationSgNBReconfComp() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + ResponseInformationSgNBReconfComp& select_id_ResponseInformationSgNBReconfComp() { return set(3); } + ResponseInformationSgNBReconfComp const* get_id_ResponseInformationSgNBReconfComp() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_ResponseInformationSgNBReconfComp()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(ResponseInformationSgNBReconfComp)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_ResponseInformationSgNBReconfComp() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReconfigurationComplete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReconfigurationComplete-IEs}}, + ... +} +*/ + +struct SgNBReconfigurationComplete : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReconfigurationComplete";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReleaseConfirm-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBRelConfList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelConfList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY ignore TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBReleaseConfirm_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBRelConfList() { set(id_E_RABs_ToBeReleased_SgNBRelConfList); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_E_RABs_ToBeReleased_SgNBRelConfList)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelConfList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBRelConfList() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + E_RABs_ToBeReleased_SgNBRelConfList& select_id_E_RABs_ToBeReleased_SgNBRelConfList() { return set(3); } + E_RABs_ToBeReleased_SgNBRelConfList const* get_id_E_RABs_ToBeReleased_SgNBRelConfList() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_E_RABs_ToBeReleased_SgNBRelConfList()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RABs_ToBeReleased_SgNBRelConfList)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_E_RABs_ToBeReleased_SgNBRelConfList() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReleaseConfirm ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseConfirm-IEs}}, + ... +} +*/ + +struct SgNBReleaseConfirm : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReleaseConfirm";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReleaseRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE optional}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-E-RABs-ToBeReleased-SgNBRelReqList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReqList PRESENCE optional}| + { ID id-UE-ContextKeptIndicator CRITICALITY ignore TYPE UE-ContextKeptIndicator PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-MeNBtoSgNBContainer CRITICALITY reject TYPE MeNBtoSgNBContainer PRESENCE optional}, + ... +} +*/ + +struct SgNBReleaseRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqList() { set(id_E_RABs_ToBeReleased_SgNBRelReqList); type=4;} + void select_id_UE_ContextKeptIndicator() { set(id_UE_ContextKeptIndicator); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=6;} + void select_id_MeNBtoSgNBContainer() { set(id_MeNBtoSgNBContainer); type=7;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_E_RABs_ToBeReleased_SgNBRelReqList)) { type = 4; return true; } + else if(equal(id_UE_ContextKeptIndicator)) { type = 5; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 6; return true; } + else if(equal(id_MeNBtoSgNBContainer)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelReqList);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_UE_ContextKeptIndicator);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_MeNBtoSgNBContainer);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqList() { set(ignore); type=4;} + void select_id_UE_ContextKeptIndicator() { set(ignore); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=6;} + void select_id_MeNBtoSgNBContainer() { set(reject); type=7;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + E_RABs_ToBeReleased_SgNBRelReqList& select_id_E_RABs_ToBeReleased_SgNBRelReqList() { return set(4); } + E_RABs_ToBeReleased_SgNBRelReqList const* get_id_E_RABs_ToBeReleased_SgNBRelReqList() const { return get(4); } + UE_ContextKeptIndicator& select_id_UE_ContextKeptIndicator() { return set(5); } + UE_ContextKeptIndicator const* get_id_UE_ContextKeptIndicator() const { return get(5); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(6); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(6); } + MeNBtoSgNBContainer& select_id_MeNBtoSgNBContainer() { return set(7); } + MeNBtoSgNBContainer const* get_id_MeNBtoSgNBContainer() const { return get(7); } + bool is_unknown() const { return type == 8; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_E_RABs_ToBeReleased_SgNBRelReqList()); return true; + case 5: v(select_id_UE_ContextKeptIndicator()); return true; + case 6: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 7: v(select_id_MeNBtoSgNBContainer()); return true; + case 8: if(type != 8) {clear(); asn::base::set();} type = 8; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(E_RABs_ToBeReleased_SgNBRelReqList)]; + char dummy3[sizeof(MeNBtoSgNBContainer)]; + char dummy4[sizeof(SgNB_UE_X2AP_ID)]; + char dummy5[sizeof(UE_ContextKeptIndicator)]; + char dummy6[sizeof(UE_X2AP_ID)]; + char dummy7[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 8; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(optional); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqList() { set(optional); type=4;} + void select_id_UE_ContextKeptIndicator() { set(optional); type=5;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=6;} + void select_id_MeNBtoSgNBContainer() { set(optional); type=7;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else if(equal(optional)) { type = 7; return true; } + else { type = 8; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(optional);} return false; + case 8: type = 8; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReleaseRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequest-IEs}}, + ... +} +*/ + +struct SgNBReleaseRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReleaseRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReleaseRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-E-RABs-Admitted-ToBeReleased-SgNBRelReqAckList CRITICALITY ignore TYPE E-RABs-Admitted-ToBeReleased-SgNBRelReqAckList PRESENCE optional }, + ... +} +*/ + +struct SgNBReleaseRequestAcknowledge_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList() { set(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList& select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList() { return set(5); } + E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList const* get_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_E_RABs_Admitted_ToBeReleased_SgNBRelReqAckList() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReleaseRequestAcknowledge ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequestAcknowledge-IEs}}, + ... +} +*/ + +struct SgNBReleaseRequestAcknowledge : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReleaseRequestAcknowledge";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReleaseRequestReject-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}, + ... +} +*/ + +struct SgNBReleaseRequestReject_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(ignore); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(5); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReleaseRequestReject ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequestReject-IEs}}, + ... +} +*/ + +struct SgNBReleaseRequestReject : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReleaseRequestReject";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +SgNBReleaseRequired-IEs X2AP-PROTOCOL-IES ::= { + { ID id-MeNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY reject TYPE SgNB-UE-X2AP-ID PRESENCE mandatory}| + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-MeNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional }| + { ID id-E-RABs-ToBeReleased-SgNBRelReqdList CRITICALITY ignore TYPE E-RABs-ToBeReleased-SgNBRelReqdList PRESENCE optional }, + ... +} +*/ + +struct SgNBReleaseRequired_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(id_MeNB_UE_X2AP_ID); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=2;} + void select_id_Cause() { set(id_Cause); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(id_MeNB_UE_X2AP_ID_Extension); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqdList() { set(id_E_RABs_ToBeReleased_SgNBRelReqdList); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_MeNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Cause)) { type = 3; return true; } + else if(equal(id_MeNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_E_RABs_ToBeReleased_SgNBRelReqdList)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_MeNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_E_RABs_ToBeReleased_SgNBRelReqdList);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Cause() { set(ignore); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqdList() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_MeNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_MeNB_UE_X2AP_ID() const { return get(1); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(2); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(2); } + Cause& select_id_Cause() { return set(3); } + Cause const* get_id_Cause() const { return get(3); } + UE_X2AP_ID_Extension& select_id_MeNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_MeNB_UE_X2AP_ID_Extension() const { return get(4); } + E_RABs_ToBeReleased_SgNBRelReqdList& select_id_E_RABs_ToBeReleased_SgNBRelReqdList() { return set(5); } + E_RABs_ToBeReleased_SgNBRelReqdList const* get_id_E_RABs_ToBeReleased_SgNBRelReqdList() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_MeNB_UE_X2AP_ID()); return true; + case 2: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Cause()); return true; + case 4: v(select_id_MeNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_E_RABs_ToBeReleased_SgNBRelReqdList()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(E_RABs_ToBeReleased_SgNBRelReqdList)]; + char dummy3[sizeof(SgNB_UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID)]; + char dummy5[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_MeNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_SgNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Cause() { set(mandatory); type=3;} + void select_id_MeNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_E_RABs_ToBeReleased_SgNBRelReqdList() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(mandatory)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(mandatory);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +SgNBReleaseRequired ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{SgNBReleaseRequired-IEs}}, + ... +} +*/ + +struct SgNBReleaseRequired : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "SgNBReleaseRequired";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +UEContextRelease-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Old-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-New-eNB-UE-X2AP-ID CRITICALITY reject TYPE UE-X2AP-ID PRESENCE mandatory}| + { ID id-Old-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-New-eNB-UE-X2AP-ID-Extension CRITICALITY reject TYPE UE-X2AP-ID-Extension PRESENCE optional}| + { ID id-SIPTO-BearerDeactivationIndication CRITICALITY ignore TYPE SIPTOBearerDeactivationIndication PRESENCE optional}| + { ID id-SgNB-UE-X2AP-ID CRITICALITY ignore TYPE SgNB-UE-X2AP-ID PRESENCE optional}, + ... +} +*/ + +struct UEContextRelease_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(id_Old_eNB_UE_X2AP_ID); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(id_New_eNB_UE_X2AP_ID); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(id_Old_eNB_UE_X2AP_ID_Extension); type=3;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(id_New_eNB_UE_X2AP_ID_Extension); type=4;} + void select_id_SIPTO_BearerDeactivationIndication() { set(id_SIPTO_BearerDeactivationIndication); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(id_SgNB_UE_X2AP_ID); type=6;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Old_eNB_UE_X2AP_ID)) { type = 1; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID)) { type = 2; return true; } + else if(equal(id_Old_eNB_UE_X2AP_ID_Extension)) { type = 3; return true; } + else if(equal(id_New_eNB_UE_X2AP_ID_Extension)) { type = 4; return true; } + else if(equal(id_SIPTO_BearerDeactivationIndication)) { type = 5; return true; } + else if(equal(id_SgNB_UE_X2AP_ID)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_Old_eNB_UE_X2AP_ID_Extension);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_New_eNB_UE_X2AP_ID_Extension);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_SIPTO_BearerDeactivationIndication);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_SgNB_UE_X2AP_ID);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(reject); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(reject); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(reject); type=3;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(reject); type=4;} + void select_id_SIPTO_BearerDeactivationIndication() { set(ignore); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(ignore); type=6;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else if(equal(ignore)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(ignore);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + UE_X2AP_ID& select_id_Old_eNB_UE_X2AP_ID() { return set(1); } + UE_X2AP_ID const* get_id_Old_eNB_UE_X2AP_ID() const { return get(1); } + UE_X2AP_ID& select_id_New_eNB_UE_X2AP_ID() { return set(2); } + UE_X2AP_ID const* get_id_New_eNB_UE_X2AP_ID() const { return get(2); } + UE_X2AP_ID_Extension& select_id_Old_eNB_UE_X2AP_ID_Extension() { return set(3); } + UE_X2AP_ID_Extension const* get_id_Old_eNB_UE_X2AP_ID_Extension() const { return get(3); } + UE_X2AP_ID_Extension& select_id_New_eNB_UE_X2AP_ID_Extension() { return set(4); } + UE_X2AP_ID_Extension const* get_id_New_eNB_UE_X2AP_ID_Extension() const { return get(4); } + SIPTOBearerDeactivationIndication& select_id_SIPTO_BearerDeactivationIndication() { return set(5); } + SIPTOBearerDeactivationIndication const* get_id_SIPTO_BearerDeactivationIndication() const { return get(5); } + SgNB_UE_X2AP_ID& select_id_SgNB_UE_X2AP_ID() { return set(6); } + SgNB_UE_X2AP_ID const* get_id_SgNB_UE_X2AP_ID() const { return get(6); } + bool is_unknown() const { return type == 7; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Old_eNB_UE_X2AP_ID()); return true; + case 2: v(select_id_New_eNB_UE_X2AP_ID()); return true; + case 3: v(select_id_Old_eNB_UE_X2AP_ID_Extension()); return true; + case 4: v(select_id_New_eNB_UE_X2AP_ID_Extension()); return true; + case 5: v(select_id_SIPTO_BearerDeactivationIndication()); return true; + case 6: v(select_id_SgNB_UE_X2AP_ID()); return true; + case 7: if(type != 7) {clear(); asn::base::set();} type = 7; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(SIPTOBearerDeactivationIndication)]; + char dummy2[sizeof(SgNB_UE_X2AP_ID)]; + char dummy3[sizeof(UE_X2AP_ID)]; + char dummy4[sizeof(UE_X2AP_ID_Extension)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 7; } + void clear() {type = 0;} + void select_id_Old_eNB_UE_X2AP_ID() { set(mandatory); type=1;} + void select_id_New_eNB_UE_X2AP_ID() { set(mandatory); type=2;} + void select_id_Old_eNB_UE_X2AP_ID_Extension() { set(optional); type=3;} + void select_id_New_eNB_UE_X2AP_ID_Extension() { set(optional); type=4;} + void select_id_SIPTO_BearerDeactivationIndication() { set(optional); type=5;} + void select_id_SgNB_UE_X2AP_ID() { set(optional); type=6;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else if(equal(optional)) { type = 6; return true; } + else { type = 7; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(optional);} return false; + case 7: type = 7; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +UEContextRelease ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{UEContextRelease-IEs}}, + ... +} +*/ + +struct UEContextRelease : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "UEContextRelease";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2AP-Message ::= OCTET STRING +*/ + +struct X2AP_Message : asn::ostring<> +{ + static constexpr const char* name() {return "X2AP-Message";} + using parent_t = asn::ostring<>; + +}; + +/* +X2APMessageTransfer-IEs X2AP-PROTOCOL-IES ::= { + { ID id-RNL-Header CRITICALITY reject TYPE RNL-Header PRESENCE mandatory}| + { ID id-x2APMessage CRITICALITY reject TYPE X2AP-Message PRESENCE optional}, + ... +} +*/ + +struct X2APMessageTransfer_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RNL_Header() { set(id_RNL_Header); type=1;} + void select_id_x2APMessage() { set(id_x2APMessage); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_RNL_Header)) { type = 1; return true; } + else if(equal(id_x2APMessage)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_RNL_Header);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_x2APMessage);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RNL_Header() { set(reject); type=1;} + void select_id_x2APMessage() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + RNL_Header& select_id_RNL_Header() { return set(1); } + RNL_Header const* get_id_RNL_Header() const { return get(1); } + X2AP_Message& select_id_x2APMessage() { return set(2); } + X2AP_Message const* get_id_x2APMessage() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_RNL_Header()); return true; + case 2: v(select_id_x2APMessage()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(RNL_Header)]; + char dummy2[sizeof(X2AP_Message)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_RNL_Header() { set(mandatory); type=1;} + void select_id_x2APMessage() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2APMessageTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2APMessageTransfer-IEs}}, + ... +} +*/ + +struct X2APMessageTransfer : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2APMessageTransfer";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2Release-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}, +... +} +*/ + +struct X2Release_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + bool is_unknown() const { return type == 2; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: if(type != 2) {clear(); asn::base::set();} type = 2; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 2; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else { type = 2; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2Release ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2Release-IEs}}, + ... +} +*/ + +struct X2Release : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2Release";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2RemovalFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct X2RemovalFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2RemovalFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalFailure-IEs}}, + ... +} +*/ + +struct X2RemovalFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2RemovalFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2RemovalRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-X2RemovalThreshold CRITICALITY reject TYPE X2BenefitValue PRESENCE optional}, +... +} +*/ + +struct X2RemovalRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_X2RemovalThreshold() { set(id_X2RemovalThreshold); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_X2RemovalThreshold)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_X2RemovalThreshold);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_X2RemovalThreshold() { set(reject); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + X2BenefitValue& select_id_X2RemovalThreshold() { return set(2); } + X2BenefitValue const* get_id_X2RemovalThreshold() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_X2RemovalThreshold()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GlobalENB_ID)]; + char dummy2[sizeof(X2BenefitValue)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_X2RemovalThreshold() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2RemovalRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalRequest-IEs}}, + ... +} +*/ + +struct X2RemovalRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2RemovalRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2RemovalResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, + ... +} +*/ + +struct X2RemovalResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=2;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_CriticalityDiagnostics() { set(ignore); type=2;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(2); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(2); } + bool is_unknown() const { return type == 3; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_CriticalityDiagnostics()); return true; + case 3: if(type != 3) {clear(); asn::base::set();} type = 3; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(GlobalENB_ID)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 3; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_CriticalityDiagnostics() { set(optional); type=2;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else { type = 3; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2RemovalResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2RemovalResponse-IEs}}, + ... +} +*/ + +struct X2RemovalResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2RemovalResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2SetupFailure-IEs X2AP-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory} | + { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional} | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + + ... +} +*/ + +struct X2SetupFailure_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(id_Cause); type=1;} + void select_id_TimeToWait() { set(id_TimeToWait); type=2;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=3;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_Cause)) { type = 1; return true; } + else if(equal(id_TimeToWait)) { type = 2; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_Cause);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_TimeToWait);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(ignore); type=1;} + void select_id_TimeToWait() { set(ignore); type=2;} + void select_id_CriticalityDiagnostics() { set(ignore); type=3;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(ignore)) { type = 1; return true; } + else if(equal(ignore)) { type = 2; return true; } + else if(equal(ignore)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(ignore);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(ignore);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(ignore);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + Cause& select_id_Cause() { return set(1); } + Cause const* get_id_Cause() const { return get(1); } + TimeToWait& select_id_TimeToWait() { return set(2); } + TimeToWait const* get_id_TimeToWait() const { return get(2); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(3); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(3); } + bool is_unknown() const { return type == 4; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_Cause()); return true; + case 2: v(select_id_TimeToWait()); return true; + case 3: v(select_id_CriticalityDiagnostics()); return true; + case 4: if(type != 4) {clear(); asn::base::set();} type = 4; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(Cause)]; + char dummy2[sizeof(CriticalityDiagnostics)]; + char dummy3[sizeof(TimeToWait)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 4; } + void clear() {type = 0;} + void select_id_Cause() { set(mandatory); type=1;} + void select_id_TimeToWait() { set(optional); type=2;} + void select_id_CriticalityDiagnostics() { set(optional); type=3;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(optional)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else { type = 4; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(optional);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2SetupFailure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupFailure-IEs}}, + ... +} +*/ + +struct X2SetupFailure : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2SetupFailure";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2SetupRequest-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedCells CRITICALITY reject TYPE ServedCells PRESENCE mandatory}| + { ID id-GUGroupIDList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, +... +} +*/ + +struct X2SetupRequest_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_ServedCells() { set(id_ServedCells); type=2;} + void select_id_GUGroupIDList() { set(id_GUGroupIDList); type=3;} + void select_id_LHN_ID() { set(id_LHN_ID); type=4;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_ServedCells)) { type = 2; return true; } + else if(equal(id_GUGroupIDList)) { type = 3; return true; } + else if(equal(id_LHN_ID)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedCells);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_GUGroupIDList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_LHN_ID);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_ServedCells() { set(reject); type=2;} + void select_id_GUGroupIDList() { set(reject); type=3;} + void select_id_LHN_ID() { set(ignore); type=4;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + ServedCells& select_id_ServedCells() { return set(2); } + ServedCells const* get_id_ServedCells() const { return get(2); } + GUGroupIDList& select_id_GUGroupIDList() { return set(3); } + GUGroupIDList const* get_id_GUGroupIDList() const { return get(3); } + LHN_ID& select_id_LHN_ID() { return set(4); } + LHN_ID const* get_id_LHN_ID() const { return get(4); } + bool is_unknown() const { return type == 5; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_ServedCells()); return true; + case 3: v(select_id_GUGroupIDList()); return true; + case 4: v(select_id_LHN_ID()); return true; + case 5: if(type != 5) {clear(); asn::base::set();} type = 5; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(GUGroupIDList)]; + char dummy2[sizeof(GlobalENB_ID)]; + char dummy3[sizeof(LHN_ID)]; + char dummy4[sizeof(ServedCells)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 5; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_ServedCells() { set(mandatory); type=2;} + void select_id_GUGroupIDList() { set(optional); type=3;} + void select_id_LHN_ID() { set(optional); type=4;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else { type = 5; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2SetupRequest ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupRequest-IEs}}, + ... +} +*/ + +struct X2SetupRequest : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2SetupRequest";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; +/* +X2SetupResponse-IEs X2AP-PROTOCOL-IES ::= { + { ID id-GlobalENB-ID CRITICALITY reject TYPE GlobalENB-ID PRESENCE mandatory}| + { ID id-ServedCells CRITICALITY reject TYPE ServedCells PRESENCE mandatory}| + { ID id-GUGroupIDList CRITICALITY reject TYPE GUGroupIDList PRESENCE optional}| + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| + { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, + ... +} +*/ + +struct X2SetupResponse_IEs +{ + struct id_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(id_GlobalENB_ID); type=1;} + void select_id_ServedCells() { set(id_ServedCells); type=2;} + void select_id_GUGroupIDList() { set(id_GUGroupIDList); type=3;} + void select_id_CriticalityDiagnostics() { set(id_CriticalityDiagnostics); type=4;} + void select_id_LHN_ID() { set(id_LHN_ID); type=5;} + X2AP_PROTOCOL_IES::id_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_GlobalENB_ID)) { type = 1; return true; } + else if(equal(id_ServedCells)) { type = 2; return true; } + else if(equal(id_GUGroupIDList)) { type = 3; return true; } + else if(equal(id_CriticalityDiagnostics)) { type = 4; return true; } + else if(equal(id_LHN_ID)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_GlobalENB_ID);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_ServedCells);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_GUGroupIDList);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_CriticalityDiagnostics);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_LHN_ID);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(reject); type=1;} + void select_id_ServedCells() { set(reject); type=2;} + void select_id_GUGroupIDList() { set(reject); type=3;} + void select_id_CriticalityDiagnostics() { set(ignore); type=4;} + void select_id_LHN_ID() { set(ignore); type=5;} + X2AP_PROTOCOL_IES::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(ignore)) { type = 4; return true; } + else if(equal(ignore)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(ignore);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(ignore);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct Value_t : asn::typefield + { + ~Value_t() {clear();} + size_t get_index() const {return type;} + GlobalENB_ID& select_id_GlobalENB_ID() { return set(1); } + GlobalENB_ID const* get_id_GlobalENB_ID() const { return get(1); } + ServedCells& select_id_ServedCells() { return set(2); } + ServedCells const* get_id_ServedCells() const { return get(2); } + GUGroupIDList& select_id_GUGroupIDList() { return set(3); } + GUGroupIDList const* get_id_GUGroupIDList() const { return get(3); } + CriticalityDiagnostics& select_id_CriticalityDiagnostics() { return set(4); } + CriticalityDiagnostics const* get_id_CriticalityDiagnostics() const { return get(4); } + LHN_ID& select_id_LHN_ID() { return set(5); } + LHN_ID const* get_id_LHN_ID() const { return get(5); } + bool is_unknown() const { return type == 6; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_GlobalENB_ID()); return true; + case 2: v(select_id_ServedCells()); return true; + case 3: v(select_id_GUGroupIDList()); return true; + case 4: v(select_id_CriticalityDiagnostics()); return true; + case 5: v(select_id_LHN_ID()); return true; + case 6: if(type != 6) {clear(); asn::base::set();} type = 6; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CriticalityDiagnostics)]; + char dummy2[sizeof(GUGroupIDList)]; + char dummy3[sizeof(GlobalENB_ID)]; + char dummy4[sizeof(LHN_ID)]; + char dummy5[sizeof(ServedCells)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct presence_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 6; } + void clear() {type = 0;} + void select_id_GlobalENB_ID() { set(mandatory); type=1;} + void select_id_ServedCells() { set(mandatory); type=2;} + void select_id_GUGroupIDList() { set(optional); type=3;} + void select_id_CriticalityDiagnostics() { set(optional); type=4;} + void select_id_LHN_ID() { set(optional); type=5;} + X2AP_PROTOCOL_IES::presence_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(mandatory)) { type = 1; return true; } + else if(equal(mandatory)) { type = 2; return true; } + else if(equal(optional)) { type = 3; return true; } + else if(equal(optional)) { type = 4; return true; } + else if(equal(optional)) { type = 5; return true; } + else { type = 6; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(mandatory);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(mandatory);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(optional);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(optional);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(optional);} return false; + case 6: type = 6; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +X2SetupResponse ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{X2SetupResponse-IEs}}, + ... +} +*/ + +struct X2SetupResponse : asn::sequence<1, 0, true, 0> +{ + static constexpr const char* name() {return "X2SetupResponse";} + using parent_t = asn::sequence<1, 0, true, 0>; + struct protocolIEs_t : ProtocolIE_Container + { + static constexpr const char* name() {return "protocolIEs_t";} + using parent_t = ProtocolIE_Container; + + }; + protocolIEs_t& ref_protocolIEs() {return protocolIEs;} + protocolIEs_t const& ref_protocolIEs() const {return protocolIEs;} + template void decode(V& v) + { + v(protocolIEs); + + }; + template void encode(V& v) const + { + v(protocolIEs); + + }; + void clear() + { + protocolIEs.clear(); + + }; + private: + protocolIEs_t protocolIEs; + +}; diff --git a/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Descriptions.hpp b/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Descriptions.hpp new file mode 100644 index 0000000..5fbef04 --- /dev/null +++ b/simulators/e2sim/src/ASN1/generated/X2AP-PDU-Descriptions.hpp @@ -0,0 +1,1537 @@ +/***************************************************************************** +# Copyright 2019 AT&T Intellectual Property * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#pragma once + +#include "asn/asn.hpp" +static_assert(ASN_API_VERSION_MAJOR == 5, "re-generate the ASN parser's code using 'make regen-asn' (do not use -j option)"); + +#include "X2AP-CommonDataTypes.hpp" +#include "X2AP-PDU-Contents.hpp" +#include "X2AP-Constants.hpp" + +/* +X2AP-ELEMENTARY-PROCEDURE ::= CLASS { + &InitiatingMessage , + &SuccessfulOutcome OPTIONAL, + &UnsuccessfulOutcome OPTIONAL, + &procedureCode ProcedureCode UNIQUE, + &criticality Criticality DEFAULT ignore +} +WITH SYNTAX { + INITIATING MESSAGE &InitiatingMessage + [SUCCESSFUL OUTCOME &SuccessfulOutcome] + [UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome] + PROCEDURE CODE &procedureCode + [CRITICALITY &criticality] +} +*/ + +struct X2AP_ELEMENTARY_PROCEDURE +{ + struct procedureCode_t : ProcedureCode + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = ProcedureCode; + + }; + struct criticality_t : Criticality + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = Criticality; + + }; + +}; +/* +X2AP-ELEMENTARY-PROCEDURES X2AP-ELEMENTARY-PROCEDURE ::= { + X2AP-ELEMENTARY-PROCEDURES-CLASS-1 | + X2AP-ELEMENTARY-PROCEDURES-CLASS-2 , + ... +} +*/ + +struct X2AP_ELEMENTARY_PROCEDURES +{ + struct InitiatingMessage_t : asn::typefield + { + ~InitiatingMessage_t() {clear();} + size_t get_index() const {return type;} + HandoverRequest& select_id_handoverPreparation() { return set(1); } + HandoverRequest const* get_id_handoverPreparation() const { return get(1); } + ResetRequest& select_id_reset() { return set(2); } + ResetRequest const* get_id_reset() const { return get(2); } + X2SetupRequest& select_id_x2Setup() { return set(3); } + X2SetupRequest const* get_id_x2Setup() const { return get(3); } + ResourceStatusRequest& select_id_resourceStatusReportingInitiation() { return set(4); } + ResourceStatusRequest const* get_id_resourceStatusReportingInitiation() const { return get(4); } + ENBConfigurationUpdate& select_id_eNBConfigurationUpdate() { return set(5); } + ENBConfigurationUpdate const* get_id_eNBConfigurationUpdate() const { return get(5); } + MobilityChangeRequest& select_id_mobilitySettingsChange() { return set(6); } + MobilityChangeRequest const* get_id_mobilitySettingsChange() const { return get(6); } + CellActivationRequest& select_id_cellActivation() { return set(7); } + CellActivationRequest const* get_id_cellActivation() const { return get(7); } + SeNBAdditionRequest& select_id_seNBAdditionPreparation() { return set(8); } + SeNBAdditionRequest const* get_id_seNBAdditionPreparation() const { return get(8); } + SeNBModificationRequest& select_id_meNBinitiatedSeNBModificationPreparation() { return set(9); } + SeNBModificationRequest const* get_id_meNBinitiatedSeNBModificationPreparation() const { return get(9); } + SeNBModificationRequired& select_id_seNBinitiatedSeNBModification() { return set(10); } + SeNBModificationRequired const* get_id_seNBinitiatedSeNBModification() const { return get(10); } + SeNBReleaseRequired& select_id_seNBinitiatedSeNBRelease() { return set(11); } + SeNBReleaseRequired const* get_id_seNBinitiatedSeNBRelease() const { return get(11); } + X2RemovalRequest& select_id_x2Removal() { return set(12); } + X2RemovalRequest const* get_id_x2Removal() const { return get(12); } + RetrieveUEContextRequest& select_id_retrieveUEContext() { return set(13); } + RetrieveUEContextRequest const* get_id_retrieveUEContext() const { return get(13); } + SgNBAdditionRequest& select_id_sgNBAdditionPreparation() { return set(14); } + SgNBAdditionRequest const* get_id_sgNBAdditionPreparation() const { return get(14); } + SgNBModificationRequest& select_id_meNBinitiatedSgNBModificationPreparation() { return set(15); } + SgNBModificationRequest const* get_id_meNBinitiatedSgNBModificationPreparation() const { return get(15); } + SgNBModificationRequired& select_id_sgNBinitiatedSgNBModification() { return set(16); } + SgNBModificationRequired const* get_id_sgNBinitiatedSgNBModification() const { return get(16); } + SgNBReleaseRequest& select_id_meNBinitiatedSgNBRelease() { return set(17); } + SgNBReleaseRequest const* get_id_meNBinitiatedSgNBRelease() const { return get(17); } + SgNBReleaseRequired& select_id_sgNBinitiatedSgNBRelease() { return set(18); } + SgNBReleaseRequired const* get_id_sgNBinitiatedSgNBRelease() const { return get(18); } + SgNBChangeRequired& select_id_sgNBChange() { return set(19); } + SgNBChangeRequired const* get_id_sgNBChange() const { return get(19); } + ENDCX2SetupRequest& select_id_endcX2Setup() { return set(20); } + ENDCX2SetupRequest const* get_id_endcX2Setup() const { return get(20); } + ENDCConfigurationUpdate& select_id_endcConfigurationUpdate() { return set(21); } + ENDCConfigurationUpdate const* get_id_endcConfigurationUpdate() const { return get(21); } + ENDCCellActivationRequest& select_id_endcCellActivation() { return set(22); } + ENDCCellActivationRequest const* get_id_endcCellActivation() const { return get(22); } + ENDCPartialResetRequired& select_id_endcPartialReset() { return set(23); } + ENDCPartialResetRequired const* get_id_endcPartialReset() const { return get(23); } + EUTRANRCellResourceCoordinationRequest& select_id_eUTRANRCellResourceCoordination() { return set(24); } + EUTRANRCellResourceCoordinationRequest const* get_id_eUTRANRCellResourceCoordination() const { return get(24); } + ENDCX2RemovalRequest& select_id_endcX2Removal() { return set(25); } + ENDCX2RemovalRequest const* get_id_endcX2Removal() const { return get(25); } + SNStatusTransfer& select_id_snStatusTransfer() { return set(26); } + SNStatusTransfer const* get_id_snStatusTransfer() const { return get(26); } + UEContextRelease& select_id_uEContextRelease() { return set(27); } + UEContextRelease const* get_id_uEContextRelease() const { return get(27); } + HandoverCancel& select_id_handoverCancel() { return set(28); } + HandoverCancel const* get_id_handoverCancel() const { return get(28); } + ErrorIndication& select_id_errorIndication() { return set(29); } + ErrorIndication const* get_id_errorIndication() const { return get(29); } + ResourceStatusUpdate& select_id_resourceStatusReporting() { return set(30); } + ResourceStatusUpdate const* get_id_resourceStatusReporting() const { return get(30); } + LoadInformation& select_id_loadIndication() { return set(31); } + LoadInformation const* get_id_loadIndication() const { return get(31); } + PrivateMessage& select_id_privateMessage() { return set(32); } + PrivateMessage const* get_id_privateMessage() const { return get(32); } + RLFIndication& select_id_rLFIndication() { return set(33); } + RLFIndication const* get_id_rLFIndication() const { return get(33); } + HandoverReport& select_id_handoverReport() { return set(34); } + HandoverReport const* get_id_handoverReport() const { return get(34); } + X2Release& select_id_x2Release() { return set(35); } + X2Release const* get_id_x2Release() const { return get(35); } + X2APMessageTransfer& select_id_x2APMessageTransfer() { return set(36); } + X2APMessageTransfer const* get_id_x2APMessageTransfer() const { return get(36); } + SeNBReconfigurationComplete& select_id_seNBReconfigurationCompletion() { return set(37); } + SeNBReconfigurationComplete const* get_id_seNBReconfigurationCompletion() const { return get(37); } + SeNBReleaseRequest& select_id_meNBinitiatedSeNBRelease() { return set(38); } + SeNBReleaseRequest const* get_id_meNBinitiatedSeNBRelease() const { return get(38); } + SeNBCounterCheckRequest& select_id_seNBCounterCheck() { return set(39); } + SeNBCounterCheckRequest const* get_id_seNBCounterCheck() const { return get(39); } + SgNBReconfigurationComplete& select_id_sgNBReconfigurationCompletion() { return set(40); } + SgNBReconfigurationComplete const* get_id_sgNBReconfigurationCompletion() const { return get(40); } + SgNBCounterCheckRequest& select_id_sgNBCounterCheck() { return set(41); } + SgNBCounterCheckRequest const* get_id_sgNBCounterCheck() const { return get(41); } + RRCTransfer& select_id_rRCTransfer() { return set(42); } + RRCTransfer const* get_id_rRCTransfer() const { return get(42); } + SecondaryRATDataUsageReport& select_id_secondaryRATDataUsageReport() { return set(43); } + SecondaryRATDataUsageReport const* get_id_secondaryRATDataUsageReport() const { return get(43); } + SgNBActivityNotification& select_id_SgNBActivityNotification() { return set(44); } + SgNBActivityNotification const* get_id_SgNBActivityNotification() const { return get(44); } + DataForwardingAddressIndication& select_id_dataForwardingAddressIndication() { return set(45); } + DataForwardingAddressIndication const* get_id_dataForwardingAddressIndication() const { return get(45); } + bool is_unknown() const { return type == 46; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + case 17: var.destroy(); break; + case 18: var.destroy(); break; + case 19: var.destroy(); break; + case 20: var.destroy(); break; + case 21: var.destroy(); break; + case 22: var.destroy(); break; + case 23: var.destroy(); break; + case 24: var.destroy(); break; + case 25: var.destroy(); break; + case 26: var.destroy(); break; + case 27: var.destroy(); break; + case 28: var.destroy(); break; + case 29: var.destroy(); break; + case 30: var.destroy(); break; + case 31: var.destroy(); break; + case 32: var.destroy(); break; + case 33: var.destroy(); break; + case 34: var.destroy(); break; + case 35: var.destroy(); break; + case 36: var.destroy(); break; + case 37: var.destroy(); break; + case 38: var.destroy(); break; + case 39: var.destroy(); break; + case 40: var.destroy(); break; + case 41: var.destroy(); break; + case 42: var.destroy(); break; + case 43: var.destroy(); break; + case 44: var.destroy(); break; + case 45: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + v.template operator()(17); + v.template operator()(18); + v.template operator()(19); + v.template operator()(20); + v.template operator()(21); + v.template operator()(22); + v.template operator()(23); + v.template operator()(24); + v.template operator()(25); + v.template operator()(26); + v.template operator()(27); + v.template operator()(28); + v.template operator()(29); + v.template operator()(30); + v.template operator()(31); + v.template operator()(32); + v.template operator()(33); + v.template operator()(34); + v.template operator()(35); + v.template operator()(36); + v.template operator()(37); + v.template operator()(38); + v.template operator()(39); + v.template operator()(40); + v.template operator()(41); + v.template operator()(42); + v.template operator()(43); + v.template operator()(44); + v.template operator()(45); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_handoverPreparation()); return true; + case 2: v(select_id_reset()); return true; + case 3: v(select_id_x2Setup()); return true; + case 4: v(select_id_resourceStatusReportingInitiation()); return true; + case 5: v(select_id_eNBConfigurationUpdate()); return true; + case 6: v(select_id_mobilitySettingsChange()); return true; + case 7: v(select_id_cellActivation()); return true; + case 8: v(select_id_seNBAdditionPreparation()); return true; + case 9: v(select_id_meNBinitiatedSeNBModificationPreparation()); return true; + case 10: v(select_id_seNBinitiatedSeNBModification()); return true; + case 11: v(select_id_seNBinitiatedSeNBRelease()); return true; + case 12: v(select_id_x2Removal()); return true; + case 13: v(select_id_retrieveUEContext()); return true; + case 14: v(select_id_sgNBAdditionPreparation()); return true; + case 15: v(select_id_meNBinitiatedSgNBModificationPreparation()); return true; + case 16: v(select_id_sgNBinitiatedSgNBModification()); return true; + case 17: v(select_id_meNBinitiatedSgNBRelease()); return true; + case 18: v(select_id_sgNBinitiatedSgNBRelease()); return true; + case 19: v(select_id_sgNBChange()); return true; + case 20: v(select_id_endcX2Setup()); return true; + case 21: v(select_id_endcConfigurationUpdate()); return true; + case 22: v(select_id_endcCellActivation()); return true; + case 23: v(select_id_endcPartialReset()); return true; + case 24: v(select_id_eUTRANRCellResourceCoordination()); return true; + case 25: v(select_id_endcX2Removal()); return true; + case 26: v(select_id_snStatusTransfer()); return true; + case 27: v(select_id_uEContextRelease()); return true; + case 28: v(select_id_handoverCancel()); return true; + case 29: v(select_id_errorIndication()); return true; + case 30: v(select_id_resourceStatusReporting()); return true; + case 31: v(select_id_loadIndication()); return true; + case 32: v(select_id_privateMessage()); return true; + case 33: v(select_id_rLFIndication()); return true; + case 34: v(select_id_handoverReport()); return true; + case 35: v(select_id_x2Release()); return true; + case 36: v(select_id_x2APMessageTransfer()); return true; + case 37: v(select_id_seNBReconfigurationCompletion()); return true; + case 38: v(select_id_meNBinitiatedSeNBRelease()); return true; + case 39: v(select_id_seNBCounterCheck()); return true; + case 40: v(select_id_sgNBReconfigurationCompletion()); return true; + case 41: v(select_id_sgNBCounterCheck()); return true; + case 42: v(select_id_rRCTransfer()); return true; + case 43: v(select_id_secondaryRATDataUsageReport()); return true; + case 44: v(select_id_SgNBActivityNotification()); return true; + case 45: v(select_id_dataForwardingAddressIndication()); return true; + case 46: if(type != 46) {clear(); asn::base::set();} type = 46; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + case 17: v(var.as()); return true; + case 18: v(var.as()); return true; + case 19: v(var.as()); return true; + case 20: v(var.as()); return true; + case 21: v(var.as()); return true; + case 22: v(var.as()); return true; + case 23: v(var.as()); return true; + case 24: v(var.as()); return true; + case 25: v(var.as()); return true; + case 26: v(var.as()); return true; + case 27: v(var.as()); return true; + case 28: v(var.as()); return true; + case 29: v(var.as()); return true; + case 30: v(var.as()); return true; + case 31: v(var.as()); return true; + case 32: v(var.as()); return true; + case 33: v(var.as()); return true; + case 34: v(var.as()); return true; + case 35: v(var.as()); return true; + case 36: v(var.as()); return true; + case 37: v(var.as()); return true; + case 38: v(var.as()); return true; + case 39: v(var.as()); return true; + case 40: v(var.as()); return true; + case 41: v(var.as()); return true; + case 42: v(var.as()); return true; + case 43: v(var.as()); return true; + case 44: v(var.as()); return true; + case 45: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellActivationRequest)]; + char dummy2[sizeof(DataForwardingAddressIndication)]; + char dummy3[sizeof(ENBConfigurationUpdate)]; + char dummy4[sizeof(ENDCCellActivationRequest)]; + char dummy5[sizeof(ENDCConfigurationUpdate)]; + char dummy6[sizeof(ENDCPartialResetRequired)]; + char dummy7[sizeof(ENDCX2RemovalRequest)]; + char dummy8[sizeof(ENDCX2SetupRequest)]; + char dummy9[sizeof(EUTRANRCellResourceCoordinationRequest)]; + char dummy10[sizeof(ErrorIndication)]; + char dummy11[sizeof(HandoverCancel)]; + char dummy12[sizeof(HandoverReport)]; + char dummy13[sizeof(HandoverRequest)]; + char dummy14[sizeof(LoadInformation)]; + char dummy15[sizeof(MobilityChangeRequest)]; + char dummy16[sizeof(PrivateMessage)]; + char dummy17[sizeof(RLFIndication)]; + char dummy18[sizeof(RRCTransfer)]; + char dummy19[sizeof(ResetRequest)]; + char dummy20[sizeof(ResourceStatusRequest)]; + char dummy21[sizeof(ResourceStatusUpdate)]; + char dummy22[sizeof(RetrieveUEContextRequest)]; + char dummy23[sizeof(SNStatusTransfer)]; + char dummy24[sizeof(SeNBAdditionRequest)]; + char dummy25[sizeof(SeNBCounterCheckRequest)]; + char dummy26[sizeof(SeNBModificationRequest)]; + char dummy27[sizeof(SeNBModificationRequired)]; + char dummy28[sizeof(SeNBReconfigurationComplete)]; + char dummy29[sizeof(SeNBReleaseRequest)]; + char dummy30[sizeof(SeNBReleaseRequired)]; + char dummy31[sizeof(SecondaryRATDataUsageReport)]; + char dummy32[sizeof(SgNBActivityNotification)]; + char dummy33[sizeof(SgNBAdditionRequest)]; + char dummy34[sizeof(SgNBChangeRequired)]; + char dummy35[sizeof(SgNBCounterCheckRequest)]; + char dummy36[sizeof(SgNBModificationRequest)]; + char dummy37[sizeof(SgNBModificationRequired)]; + char dummy38[sizeof(SgNBReconfigurationComplete)]; + char dummy39[sizeof(SgNBReleaseRequest)]; + char dummy40[sizeof(SgNBReleaseRequired)]; + char dummy41[sizeof(UEContextRelease)]; + char dummy42[sizeof(X2APMessageTransfer)]; + char dummy43[sizeof(X2Release)]; + char dummy44[sizeof(X2RemovalRequest)]; + char dummy45[sizeof(X2SetupRequest)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct SuccessfulOutcome_t : asn::typefield + { + ~SuccessfulOutcome_t() {clear();} + size_t get_index() const {return type;} + HandoverRequestAcknowledge& select_id_handoverPreparation() { return set(1); } + HandoverRequestAcknowledge const* get_id_handoverPreparation() const { return get(1); } + ResetResponse& select_id_reset() { return set(2); } + ResetResponse const* get_id_reset() const { return get(2); } + X2SetupResponse& select_id_x2Setup() { return set(3); } + X2SetupResponse const* get_id_x2Setup() const { return get(3); } + ResourceStatusResponse& select_id_resourceStatusReportingInitiation() { return set(4); } + ResourceStatusResponse const* get_id_resourceStatusReportingInitiation() const { return get(4); } + ENBConfigurationUpdateAcknowledge& select_id_eNBConfigurationUpdate() { return set(5); } + ENBConfigurationUpdateAcknowledge const* get_id_eNBConfigurationUpdate() const { return get(5); } + MobilityChangeAcknowledge& select_id_mobilitySettingsChange() { return set(6); } + MobilityChangeAcknowledge const* get_id_mobilitySettingsChange() const { return get(6); } + CellActivationResponse& select_id_cellActivation() { return set(7); } + CellActivationResponse const* get_id_cellActivation() const { return get(7); } + SeNBAdditionRequestAcknowledge& select_id_seNBAdditionPreparation() { return set(8); } + SeNBAdditionRequestAcknowledge const* get_id_seNBAdditionPreparation() const { return get(8); } + SeNBModificationRequestAcknowledge& select_id_meNBinitiatedSeNBModificationPreparation() { return set(9); } + SeNBModificationRequestAcknowledge const* get_id_meNBinitiatedSeNBModificationPreparation() const { return get(9); } + SeNBModificationConfirm& select_id_seNBinitiatedSeNBModification() { return set(10); } + SeNBModificationConfirm const* get_id_seNBinitiatedSeNBModification() const { return get(10); } + SeNBReleaseConfirm& select_id_seNBinitiatedSeNBRelease() { return set(11); } + SeNBReleaseConfirm const* get_id_seNBinitiatedSeNBRelease() const { return get(11); } + X2RemovalResponse& select_id_x2Removal() { return set(12); } + X2RemovalResponse const* get_id_x2Removal() const { return get(12); } + RetrieveUEContextResponse& select_id_retrieveUEContext() { return set(13); } + RetrieveUEContextResponse const* get_id_retrieveUEContext() const { return get(13); } + SgNBAdditionRequestAcknowledge& select_id_sgNBAdditionPreparation() { return set(14); } + SgNBAdditionRequestAcknowledge const* get_id_sgNBAdditionPreparation() const { return get(14); } + SgNBModificationRequestAcknowledge& select_id_meNBinitiatedSgNBModificationPreparation() { return set(15); } + SgNBModificationRequestAcknowledge const* get_id_meNBinitiatedSgNBModificationPreparation() const { return get(15); } + SgNBModificationConfirm& select_id_sgNBinitiatedSgNBModification() { return set(16); } + SgNBModificationConfirm const* get_id_sgNBinitiatedSgNBModification() const { return get(16); } + SgNBReleaseRequestAcknowledge& select_id_meNBinitiatedSgNBRelease() { return set(17); } + SgNBReleaseRequestAcknowledge const* get_id_meNBinitiatedSgNBRelease() const { return get(17); } + SgNBReleaseConfirm& select_id_sgNBinitiatedSgNBRelease() { return set(18); } + SgNBReleaseConfirm const* get_id_sgNBinitiatedSgNBRelease() const { return get(18); } + SgNBChangeConfirm& select_id_sgNBChange() { return set(19); } + SgNBChangeConfirm const* get_id_sgNBChange() const { return get(19); } + ENDCX2SetupResponse& select_id_endcX2Setup() { return set(20); } + ENDCX2SetupResponse const* get_id_endcX2Setup() const { return get(20); } + ENDCConfigurationUpdateAcknowledge& select_id_endcConfigurationUpdate() { return set(21); } + ENDCConfigurationUpdateAcknowledge const* get_id_endcConfigurationUpdate() const { return get(21); } + ENDCCellActivationResponse& select_id_endcCellActivation() { return set(22); } + ENDCCellActivationResponse const* get_id_endcCellActivation() const { return get(22); } + ENDCPartialResetConfirm& select_id_endcPartialReset() { return set(23); } + ENDCPartialResetConfirm const* get_id_endcPartialReset() const { return get(23); } + EUTRANRCellResourceCoordinationResponse& select_id_eUTRANRCellResourceCoordination() { return set(24); } + EUTRANRCellResourceCoordinationResponse const* get_id_eUTRANRCellResourceCoordination() const { return get(24); } + ENDCX2RemovalResponse& select_id_endcX2Removal() { return set(25); } + ENDCX2RemovalResponse const* get_id_endcX2Removal() const { return get(25); } + bool is_unknown() const { return type == 46; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 11: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + case 17: var.destroy(); break; + case 18: var.destroy(); break; + case 19: var.destroy(); break; + case 20: var.destroy(); break; + case 21: var.destroy(); break; + case 22: var.destroy(); break; + case 23: var.destroy(); break; + case 24: var.destroy(); break; + case 25: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(11); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + v.template operator()(17); + v.template operator()(18); + v.template operator()(19); + v.template operator()(20); + v.template operator()(21); + v.template operator()(22); + v.template operator()(23); + v.template operator()(24); + v.template operator()(25); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_handoverPreparation()); return true; + case 2: v(select_id_reset()); return true; + case 3: v(select_id_x2Setup()); return true; + case 4: v(select_id_resourceStatusReportingInitiation()); return true; + case 5: v(select_id_eNBConfigurationUpdate()); return true; + case 6: v(select_id_mobilitySettingsChange()); return true; + case 7: v(select_id_cellActivation()); return true; + case 8: v(select_id_seNBAdditionPreparation()); return true; + case 9: v(select_id_meNBinitiatedSeNBModificationPreparation()); return true; + case 10: v(select_id_seNBinitiatedSeNBModification()); return true; + case 11: v(select_id_seNBinitiatedSeNBRelease()); return true; + case 12: v(select_id_x2Removal()); return true; + case 13: v(select_id_retrieveUEContext()); return true; + case 14: v(select_id_sgNBAdditionPreparation()); return true; + case 15: v(select_id_meNBinitiatedSgNBModificationPreparation()); return true; + case 16: v(select_id_sgNBinitiatedSgNBModification()); return true; + case 17: v(select_id_meNBinitiatedSgNBRelease()); return true; + case 18: v(select_id_sgNBinitiatedSgNBRelease()); return true; + case 19: v(select_id_sgNBChange()); return true; + case 20: v(select_id_endcX2Setup()); return true; + case 21: v(select_id_endcConfigurationUpdate()); return true; + case 22: v(select_id_endcCellActivation()); return true; + case 23: v(select_id_endcPartialReset()); return true; + case 24: v(select_id_eUTRANRCellResourceCoordination()); return true; + case 25: v(select_id_endcX2Removal()); return true; + case 46: if(type != 46) {clear(); asn::base::set();} type = 46; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 2: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 11: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + case 17: v(var.as()); return true; + case 18: v(var.as()); return true; + case 19: v(var.as()); return true; + case 20: v(var.as()); return true; + case 21: v(var.as()); return true; + case 22: v(var.as()); return true; + case 23: v(var.as()); return true; + case 24: v(var.as()); return true; + case 25: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellActivationResponse)]; + char dummy2[sizeof(ENBConfigurationUpdateAcknowledge)]; + char dummy3[sizeof(ENDCCellActivationResponse)]; + char dummy4[sizeof(ENDCConfigurationUpdateAcknowledge)]; + char dummy5[sizeof(ENDCPartialResetConfirm)]; + char dummy6[sizeof(ENDCX2RemovalResponse)]; + char dummy7[sizeof(ENDCX2SetupResponse)]; + char dummy8[sizeof(EUTRANRCellResourceCoordinationResponse)]; + char dummy9[sizeof(HandoverRequestAcknowledge)]; + char dummy10[sizeof(MobilityChangeAcknowledge)]; + char dummy11[sizeof(ResetResponse)]; + char dummy12[sizeof(ResourceStatusResponse)]; + char dummy13[sizeof(RetrieveUEContextResponse)]; + char dummy14[sizeof(SeNBAdditionRequestAcknowledge)]; + char dummy15[sizeof(SeNBModificationConfirm)]; + char dummy16[sizeof(SeNBModificationRequestAcknowledge)]; + char dummy17[sizeof(SeNBReleaseConfirm)]; + char dummy18[sizeof(SgNBAdditionRequestAcknowledge)]; + char dummy19[sizeof(SgNBChangeConfirm)]; + char dummy20[sizeof(SgNBModificationConfirm)]; + char dummy21[sizeof(SgNBModificationRequestAcknowledge)]; + char dummy22[sizeof(SgNBReleaseConfirm)]; + char dummy23[sizeof(SgNBReleaseRequestAcknowledge)]; + char dummy24[sizeof(X2RemovalResponse)]; + char dummy25[sizeof(X2SetupResponse)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct UnsuccessfulOutcome_t : asn::typefield + { + ~UnsuccessfulOutcome_t() {clear();} + size_t get_index() const {return type;} + HandoverPreparationFailure& select_id_handoverPreparation() { return set(1); } + HandoverPreparationFailure const* get_id_handoverPreparation() const { return get(1); } + X2SetupFailure& select_id_x2Setup() { return set(3); } + X2SetupFailure const* get_id_x2Setup() const { return get(3); } + ResourceStatusFailure& select_id_resourceStatusReportingInitiation() { return set(4); } + ResourceStatusFailure const* get_id_resourceStatusReportingInitiation() const { return get(4); } + ENBConfigurationUpdateFailure& select_id_eNBConfigurationUpdate() { return set(5); } + ENBConfigurationUpdateFailure const* get_id_eNBConfigurationUpdate() const { return get(5); } + MobilityChangeFailure& select_id_mobilitySettingsChange() { return set(6); } + MobilityChangeFailure const* get_id_mobilitySettingsChange() const { return get(6); } + CellActivationFailure& select_id_cellActivation() { return set(7); } + CellActivationFailure const* get_id_cellActivation() const { return get(7); } + SeNBAdditionRequestReject& select_id_seNBAdditionPreparation() { return set(8); } + SeNBAdditionRequestReject const* get_id_seNBAdditionPreparation() const { return get(8); } + SeNBModificationRequestReject& select_id_meNBinitiatedSeNBModificationPreparation() { return set(9); } + SeNBModificationRequestReject const* get_id_meNBinitiatedSeNBModificationPreparation() const { return get(9); } + SeNBModificationRefuse& select_id_seNBinitiatedSeNBModification() { return set(10); } + SeNBModificationRefuse const* get_id_seNBinitiatedSeNBModification() const { return get(10); } + X2RemovalFailure& select_id_x2Removal() { return set(12); } + X2RemovalFailure const* get_id_x2Removal() const { return get(12); } + RetrieveUEContextFailure& select_id_retrieveUEContext() { return set(13); } + RetrieveUEContextFailure const* get_id_retrieveUEContext() const { return get(13); } + SgNBAdditionRequestReject& select_id_sgNBAdditionPreparation() { return set(14); } + SgNBAdditionRequestReject const* get_id_sgNBAdditionPreparation() const { return get(14); } + SgNBModificationRequestReject& select_id_meNBinitiatedSgNBModificationPreparation() { return set(15); } + SgNBModificationRequestReject const* get_id_meNBinitiatedSgNBModificationPreparation() const { return get(15); } + SgNBModificationRefuse& select_id_sgNBinitiatedSgNBModification() { return set(16); } + SgNBModificationRefuse const* get_id_sgNBinitiatedSgNBModification() const { return get(16); } + SgNBReleaseRequestReject& select_id_meNBinitiatedSgNBRelease() { return set(17); } + SgNBReleaseRequestReject const* get_id_meNBinitiatedSgNBRelease() const { return get(17); } + SgNBChangeRefuse& select_id_sgNBChange() { return set(19); } + SgNBChangeRefuse const* get_id_sgNBChange() const { return get(19); } + ENDCX2SetupFailure& select_id_endcX2Setup() { return set(20); } + ENDCX2SetupFailure const* get_id_endcX2Setup() const { return get(20); } + ENDCConfigurationUpdateFailure& select_id_endcConfigurationUpdate() { return set(21); } + ENDCConfigurationUpdateFailure const* get_id_endcConfigurationUpdate() const { return get(21); } + ENDCCellActivationFailure& select_id_endcCellActivation() { return set(22); } + ENDCCellActivationFailure const* get_id_endcCellActivation() const { return get(22); } + ENDCX2RemovalFailure& select_id_endcX2Removal() { return set(25); } + ENDCX2RemovalFailure const* get_id_endcX2Removal() const { return get(25); } + bool is_unknown() const { return type == 46; } + void clear() + { + switch(type) + { + case 1: var.destroy(); break; + case 3: var.destroy(); break; + case 4: var.destroy(); break; + case 5: var.destroy(); break; + case 6: var.destroy(); break; + case 7: var.destroy(); break; + case 8: var.destroy(); break; + case 9: var.destroy(); break; + case 10: var.destroy(); break; + case 12: var.destroy(); break; + case 13: var.destroy(); break; + case 14: var.destroy(); break; + case 15: var.destroy(); break; + case 16: var.destroy(); break; + case 17: var.destroy(); break; + case 19: var.destroy(); break; + case 20: var.destroy(); break; + case 21: var.destroy(); break; + case 22: var.destroy(); break; + case 25: var.destroy(); break; + } + type = 0; ref_nested().clear(); + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(3); + v.template operator()(4); + v.template operator()(5); + v.template operator()(6); + v.template operator()(7); + v.template operator()(8); + v.template operator()(9); + v.template operator()(10); + v.template operator()(12); + v.template operator()(13); + v.template operator()(14); + v.template operator()(15); + v.template operator()(16); + v.template operator()(17); + v.template operator()(19); + v.template operator()(20); + v.template operator()(21); + v.template operator()(22); + v.template operator()(25); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: v(select_id_handoverPreparation()); return true; + case 3: v(select_id_x2Setup()); return true; + case 4: v(select_id_resourceStatusReportingInitiation()); return true; + case 5: v(select_id_eNBConfigurationUpdate()); return true; + case 6: v(select_id_mobilitySettingsChange()); return true; + case 7: v(select_id_cellActivation()); return true; + case 8: v(select_id_seNBAdditionPreparation()); return true; + case 9: v(select_id_meNBinitiatedSeNBModificationPreparation()); return true; + case 10: v(select_id_seNBinitiatedSeNBModification()); return true; + case 12: v(select_id_x2Removal()); return true; + case 13: v(select_id_retrieveUEContext()); return true; + case 14: v(select_id_sgNBAdditionPreparation()); return true; + case 15: v(select_id_meNBinitiatedSgNBModificationPreparation()); return true; + case 16: v(select_id_sgNBinitiatedSgNBModification()); return true; + case 17: v(select_id_meNBinitiatedSgNBRelease()); return true; + case 19: v(select_id_sgNBChange()); return true; + case 20: v(select_id_endcX2Setup()); return true; + case 21: v(select_id_endcConfigurationUpdate()); return true; + case 22: v(select_id_endcCellActivation()); return true; + case 25: v(select_id_endcX2Removal()); return true; + case 46: if(type != 46) {clear(); asn::base::set();} type = 46; return true; + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) return false; + switch(type) + { + case 1: v(var.as()); return true; + case 3: v(var.as()); return true; + case 4: v(var.as()); return true; + case 5: v(var.as()); return true; + case 6: v(var.as()); return true; + case 7: v(var.as()); return true; + case 8: v(var.as()); return true; + case 9: v(var.as()); return true; + case 10: v(var.as()); return true; + case 12: v(var.as()); return true; + case 13: v(var.as()); return true; + case 14: v(var.as()); return true; + case 15: v(var.as()); return true; + case 16: v(var.as()); return true; + case 17: v(var.as()); return true; + case 19: v(var.as()); return true; + case 20: v(var.as()); return true; + case 21: v(var.as()); return true; + case 22: v(var.as()); return true; + case 25: v(var.as()); return true; + } + return false; + + } + private: + template T& set(size_t index) {if(type != index) {clear(); type = index; return var.build();} return var.as();} + template T const* get(size_t index) const {if(type == index) {return &var.as();} return nullptr;} + union union_type + { + char dummy1[sizeof(CellActivationFailure)]; + char dummy2[sizeof(ENBConfigurationUpdateFailure)]; + char dummy3[sizeof(ENDCCellActivationFailure)]; + char dummy4[sizeof(ENDCConfigurationUpdateFailure)]; + char dummy5[sizeof(ENDCX2RemovalFailure)]; + char dummy6[sizeof(ENDCX2SetupFailure)]; + char dummy7[sizeof(HandoverPreparationFailure)]; + char dummy8[sizeof(MobilityChangeFailure)]; + char dummy9[sizeof(ResourceStatusFailure)]; + char dummy10[sizeof(RetrieveUEContextFailure)]; + char dummy11[sizeof(SeNBAdditionRequestReject)]; + char dummy12[sizeof(SeNBModificationRefuse)]; + char dummy13[sizeof(SeNBModificationRequestReject)]; + char dummy14[sizeof(SgNBAdditionRequestReject)]; + char dummy15[sizeof(SgNBChangeRefuse)]; + char dummy16[sizeof(SgNBModificationRefuse)]; + char dummy17[sizeof(SgNBModificationRequestReject)]; + char dummy18[sizeof(SgNBReleaseRequestReject)]; + char dummy19[sizeof(X2RemovalFailure)]; + char dummy20[sizeof(X2SetupFailure)]; + + }; + asn::variant var; + size_t type {0}; + + }; + struct procedureCode_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 46; } + void clear() {type = 0;} + void select_id_handoverPreparation() { set(id_handoverPreparation); type=1;} + void select_id_reset() { set(id_reset); type=2;} + void select_id_x2Setup() { set(id_x2Setup); type=3;} + void select_id_resourceStatusReportingInitiation() { set(id_resourceStatusReportingInitiation); type=4;} + void select_id_eNBConfigurationUpdate() { set(id_eNBConfigurationUpdate); type=5;} + void select_id_mobilitySettingsChange() { set(id_mobilitySettingsChange); type=6;} + void select_id_cellActivation() { set(id_cellActivation); type=7;} + void select_id_seNBAdditionPreparation() { set(id_seNBAdditionPreparation); type=8;} + void select_id_meNBinitiatedSeNBModificationPreparation() { set(id_meNBinitiatedSeNBModificationPreparation); type=9;} + void select_id_seNBinitiatedSeNBModification() { set(id_seNBinitiatedSeNBModification); type=10;} + void select_id_seNBinitiatedSeNBRelease() { set(id_seNBinitiatedSeNBRelease); type=11;} + void select_id_x2Removal() { set(id_x2Removal); type=12;} + void select_id_retrieveUEContext() { set(id_retrieveUEContext); type=13;} + void select_id_sgNBAdditionPreparation() { set(id_sgNBAdditionPreparation); type=14;} + void select_id_meNBinitiatedSgNBModificationPreparation() { set(id_meNBinitiatedSgNBModificationPreparation); type=15;} + void select_id_sgNBinitiatedSgNBModification() { set(id_sgNBinitiatedSgNBModification); type=16;} + void select_id_meNBinitiatedSgNBRelease() { set(id_meNBinitiatedSgNBRelease); type=17;} + void select_id_sgNBinitiatedSgNBRelease() { set(id_sgNBinitiatedSgNBRelease); type=18;} + void select_id_sgNBChange() { set(id_sgNBChange); type=19;} + void select_id_endcX2Setup() { set(id_endcX2Setup); type=20;} + void select_id_endcConfigurationUpdate() { set(id_endcConfigurationUpdate); type=21;} + void select_id_endcCellActivation() { set(id_endcCellActivation); type=22;} + void select_id_endcPartialReset() { set(id_endcPartialReset); type=23;} + void select_id_eUTRANRCellResourceCoordination() { set(id_eUTRANRCellResourceCoordination); type=24;} + void select_id_endcX2Removal() { set(id_endcX2Removal); type=25;} + void select_id_snStatusTransfer() { set(id_snStatusTransfer); type=26;} + void select_id_uEContextRelease() { set(id_uEContextRelease); type=27;} + void select_id_handoverCancel() { set(id_handoverCancel); type=28;} + void select_id_errorIndication() { set(id_errorIndication); type=29;} + void select_id_resourceStatusReporting() { set(id_resourceStatusReporting); type=30;} + void select_id_loadIndication() { set(id_loadIndication); type=31;} + void select_id_privateMessage() { set(id_privateMessage); type=32;} + void select_id_rLFIndication() { set(id_rLFIndication); type=33;} + void select_id_handoverReport() { set(id_handoverReport); type=34;} + void select_id_x2Release() { set(id_x2Release); type=35;} + void select_id_x2APMessageTransfer() { set(id_x2APMessageTransfer); type=36;} + void select_id_seNBReconfigurationCompletion() { set(id_seNBReconfigurationCompletion); type=37;} + void select_id_meNBinitiatedSeNBRelease() { set(id_meNBinitiatedSeNBRelease); type=38;} + void select_id_seNBCounterCheck() { set(id_seNBCounterCheck); type=39;} + void select_id_sgNBReconfigurationCompletion() { set(id_sgNBReconfigurationCompletion); type=40;} + void select_id_sgNBCounterCheck() { set(id_sgNBCounterCheck); type=41;} + void select_id_rRCTransfer() { set(id_rRCTransfer); type=42;} + void select_id_secondaryRATDataUsageReport() { set(id_secondaryRATDataUsageReport); type=43;} + void select_id_SgNBActivityNotification() { set(id_SgNBActivityNotification); type=44;} + void select_id_dataForwardingAddressIndication() { set(id_dataForwardingAddressIndication); type=45;} + X2AP_ELEMENTARY_PROCEDURE::procedureCode_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(id_handoverPreparation)) { type = 1; return true; } + else if(equal(id_reset)) { type = 2; return true; } + else if(equal(id_x2Setup)) { type = 3; return true; } + else if(equal(id_resourceStatusReportingInitiation)) { type = 4; return true; } + else if(equal(id_eNBConfigurationUpdate)) { type = 5; return true; } + else if(equal(id_mobilitySettingsChange)) { type = 6; return true; } + else if(equal(id_cellActivation)) { type = 7; return true; } + else if(equal(id_seNBAdditionPreparation)) { type = 8; return true; } + else if(equal(id_meNBinitiatedSeNBModificationPreparation)) { type = 9; return true; } + else if(equal(id_seNBinitiatedSeNBModification)) { type = 10; return true; } + else if(equal(id_seNBinitiatedSeNBRelease)) { type = 11; return true; } + else if(equal(id_x2Removal)) { type = 12; return true; } + else if(equal(id_retrieveUEContext)) { type = 13; return true; } + else if(equal(id_sgNBAdditionPreparation)) { type = 14; return true; } + else if(equal(id_meNBinitiatedSgNBModificationPreparation)) { type = 15; return true; } + else if(equal(id_sgNBinitiatedSgNBModification)) { type = 16; return true; } + else if(equal(id_meNBinitiatedSgNBRelease)) { type = 17; return true; } + else if(equal(id_sgNBinitiatedSgNBRelease)) { type = 18; return true; } + else if(equal(id_sgNBChange)) { type = 19; return true; } + else if(equal(id_endcX2Setup)) { type = 20; return true; } + else if(equal(id_endcConfigurationUpdate)) { type = 21; return true; } + else if(equal(id_endcCellActivation)) { type = 22; return true; } + else if(equal(id_endcPartialReset)) { type = 23; return true; } + else if(equal(id_eUTRANRCellResourceCoordination)) { type = 24; return true; } + else if(equal(id_endcX2Removal)) { type = 25; return true; } + else if(equal(id_snStatusTransfer)) { type = 26; return true; } + else if(equal(id_uEContextRelease)) { type = 27; return true; } + else if(equal(id_handoverCancel)) { type = 28; return true; } + else if(equal(id_errorIndication)) { type = 29; return true; } + else if(equal(id_resourceStatusReporting)) { type = 30; return true; } + else if(equal(id_loadIndication)) { type = 31; return true; } + else if(equal(id_privateMessage)) { type = 32; return true; } + else if(equal(id_rLFIndication)) { type = 33; return true; } + else if(equal(id_handoverReport)) { type = 34; return true; } + else if(equal(id_x2Release)) { type = 35; return true; } + else if(equal(id_x2APMessageTransfer)) { type = 36; return true; } + else if(equal(id_seNBReconfigurationCompletion)) { type = 37; return true; } + else if(equal(id_meNBinitiatedSeNBRelease)) { type = 38; return true; } + else if(equal(id_seNBCounterCheck)) { type = 39; return true; } + else if(equal(id_sgNBReconfigurationCompletion)) { type = 40; return true; } + else if(equal(id_sgNBCounterCheck)) { type = 41; return true; } + else if(equal(id_rRCTransfer)) { type = 42; return true; } + else if(equal(id_secondaryRATDataUsageReport)) { type = 43; return true; } + else if(equal(id_SgNBActivityNotification)) { type = 44; return true; } + else if(equal(id_dataForwardingAddressIndication)) { type = 45; return true; } + else { type = 46; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(id_handoverPreparation);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(id_reset);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(id_x2Setup);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(id_resourceStatusReportingInitiation);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(id_eNBConfigurationUpdate);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(id_mobilitySettingsChange);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(id_cellActivation);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(id_seNBAdditionPreparation);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(id_meNBinitiatedSeNBModificationPreparation);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(id_seNBinitiatedSeNBModification);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(id_seNBinitiatedSeNBRelease);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(id_x2Removal);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(id_retrieveUEContext);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(id_sgNBAdditionPreparation);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(id_meNBinitiatedSgNBModificationPreparation);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(id_sgNBinitiatedSgNBModification);} return false; + case 17: type = 17; if(v(ref_nested())) { return equal(id_meNBinitiatedSgNBRelease);} return false; + case 18: type = 18; if(v(ref_nested())) { return equal(id_sgNBinitiatedSgNBRelease);} return false; + case 19: type = 19; if(v(ref_nested())) { return equal(id_sgNBChange);} return false; + case 20: type = 20; if(v(ref_nested())) { return equal(id_endcX2Setup);} return false; + case 21: type = 21; if(v(ref_nested())) { return equal(id_endcConfigurationUpdate);} return false; + case 22: type = 22; if(v(ref_nested())) { return equal(id_endcCellActivation);} return false; + case 23: type = 23; if(v(ref_nested())) { return equal(id_endcPartialReset);} return false; + case 24: type = 24; if(v(ref_nested())) { return equal(id_eUTRANRCellResourceCoordination);} return false; + case 25: type = 25; if(v(ref_nested())) { return equal(id_endcX2Removal);} return false; + case 26: type = 26; if(v(ref_nested())) { return equal(id_snStatusTransfer);} return false; + case 27: type = 27; if(v(ref_nested())) { return equal(id_uEContextRelease);} return false; + case 28: type = 28; if(v(ref_nested())) { return equal(id_handoverCancel);} return false; + case 29: type = 29; if(v(ref_nested())) { return equal(id_errorIndication);} return false; + case 30: type = 30; if(v(ref_nested())) { return equal(id_resourceStatusReporting);} return false; + case 31: type = 31; if(v(ref_nested())) { return equal(id_loadIndication);} return false; + case 32: type = 32; if(v(ref_nested())) { return equal(id_privateMessage);} return false; + case 33: type = 33; if(v(ref_nested())) { return equal(id_rLFIndication);} return false; + case 34: type = 34; if(v(ref_nested())) { return equal(id_handoverReport);} return false; + case 35: type = 35; if(v(ref_nested())) { return equal(id_x2Release);} return false; + case 36: type = 36; if(v(ref_nested())) { return equal(id_x2APMessageTransfer);} return false; + case 37: type = 37; if(v(ref_nested())) { return equal(id_seNBReconfigurationCompletion);} return false; + case 38: type = 38; if(v(ref_nested())) { return equal(id_meNBinitiatedSeNBRelease);} return false; + case 39: type = 39; if(v(ref_nested())) { return equal(id_seNBCounterCheck);} return false; + case 40: type = 40; if(v(ref_nested())) { return equal(id_sgNBReconfigurationCompletion);} return false; + case 41: type = 41; if(v(ref_nested())) { return equal(id_sgNBCounterCheck);} return false; + case 42: type = 42; if(v(ref_nested())) { return equal(id_rRCTransfer);} return false; + case 43: type = 43; if(v(ref_nested())) { return equal(id_secondaryRATDataUsageReport);} return false; + case 44: type = 44; if(v(ref_nested())) { return equal(id_SgNBActivityNotification);} return false; + case 45: type = 45; if(v(ref_nested())) { return equal(id_dataForwardingAddressIndication);} return false; + case 46: type = 46; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + struct criticality_t : asn::fixedtypefield + { + size_t get_index() const {return type;} + bool is_unknown() const { return type == 46; } + void clear() {type = 0;} + void select_id_handoverPreparation() { set(reject); type=1;} + void select_id_reset() { set(reject); type=2;} + void select_id_x2Setup() { set(reject); type=3;} + void select_id_resourceStatusReportingInitiation() { set(reject); type=4;} + void select_id_eNBConfigurationUpdate() { set(reject); type=5;} + void select_id_mobilitySettingsChange() { set(reject); type=6;} + void select_id_cellActivation() { set(reject); type=7;} + void select_id_seNBAdditionPreparation() { set(reject); type=8;} + void select_id_meNBinitiatedSeNBModificationPreparation() { set(reject); type=9;} + void select_id_seNBinitiatedSeNBModification() { set(reject); type=10;} + void select_id_seNBinitiatedSeNBRelease() { set(reject); type=11;} + void select_id_x2Removal() { set(reject); type=12;} + void select_id_retrieveUEContext() { set(reject); type=13;} + void select_id_sgNBAdditionPreparation() { set(reject); type=14;} + void select_id_meNBinitiatedSgNBModificationPreparation() { set(reject); type=15;} + void select_id_sgNBinitiatedSgNBModification() { set(reject); type=16;} + void select_id_meNBinitiatedSgNBRelease() { set(ignore); type=17;} + void select_id_sgNBinitiatedSgNBRelease() { set(reject); type=18;} + void select_id_sgNBChange() { set(reject); type=19;} + void select_id_endcX2Setup() { set(reject); type=20;} + void select_id_endcConfigurationUpdate() { set(reject); type=21;} + void select_id_endcCellActivation() { set(reject); type=22;} + void select_id_endcPartialReset() { set(reject); type=23;} + void select_id_eUTRANRCellResourceCoordination() { set(reject); type=24;} + void select_id_endcX2Removal() { set(reject); type=25;} + void select_id_snStatusTransfer() { set(ignore); type=26;} + void select_id_uEContextRelease() { set(ignore); type=27;} + void select_id_handoverCancel() { set(ignore); type=28;} + void select_id_errorIndication() { set(ignore); type=29;} + void select_id_resourceStatusReporting() { set(ignore); type=30;} + void select_id_loadIndication() { set(ignore); type=31;} + void select_id_privateMessage() { set(ignore); type=32;} + void select_id_rLFIndication() { set(ignore); type=33;} + void select_id_handoverReport() { set(ignore); type=34;} + void select_id_x2Release() { set(reject); type=35;} + void select_id_x2APMessageTransfer() { set(reject); type=36;} + void select_id_seNBReconfigurationCompletion() { set(ignore); type=37;} + void select_id_meNBinitiatedSeNBRelease() { set(ignore); type=38;} + void select_id_seNBCounterCheck() { set(reject); type=39;} + void select_id_sgNBReconfigurationCompletion() { set(ignore); type=40;} + void select_id_sgNBCounterCheck() { set(reject); type=41;} + void select_id_rRCTransfer() { set(reject); type=42;} + void select_id_secondaryRATDataUsageReport() { set(reject); type=43;} + void select_id_SgNBActivityNotification() { set(reject); type=44;} + void select_id_dataForwardingAddressIndication() { set(ignore); type=45;} + X2AP_ELEMENTARY_PROCEDURE::criticality_t const& ref_value() const {return ref_nested();} + template bool decode(V& v) + { + clear(); + if(!v(ref_nested())) return false; + if(equal(reject)) { type = 1; return true; } + else if(equal(reject)) { type = 2; return true; } + else if(equal(reject)) { type = 3; return true; } + else if(equal(reject)) { type = 4; return true; } + else if(equal(reject)) { type = 5; return true; } + else if(equal(reject)) { type = 6; return true; } + else if(equal(reject)) { type = 7; return true; } + else if(equal(reject)) { type = 8; return true; } + else if(equal(reject)) { type = 9; return true; } + else if(equal(reject)) { type = 10; return true; } + else if(equal(reject)) { type = 11; return true; } + else if(equal(reject)) { type = 12; return true; } + else if(equal(reject)) { type = 13; return true; } + else if(equal(reject)) { type = 14; return true; } + else if(equal(reject)) { type = 15; return true; } + else if(equal(reject)) { type = 16; return true; } + else if(equal(ignore)) { type = 17; return true; } + else if(equal(reject)) { type = 18; return true; } + else if(equal(reject)) { type = 19; return true; } + else if(equal(reject)) { type = 20; return true; } + else if(equal(reject)) { type = 21; return true; } + else if(equal(reject)) { type = 22; return true; } + else if(equal(reject)) { type = 23; return true; } + else if(equal(reject)) { type = 24; return true; } + else if(equal(reject)) { type = 25; return true; } + else if(equal(ignore)) { type = 26; return true; } + else if(equal(ignore)) { type = 27; return true; } + else if(equal(ignore)) { type = 28; return true; } + else if(equal(ignore)) { type = 29; return true; } + else if(equal(ignore)) { type = 30; return true; } + else if(equal(ignore)) { type = 31; return true; } + else if(equal(ignore)) { type = 32; return true; } + else if(equal(ignore)) { type = 33; return true; } + else if(equal(ignore)) { type = 34; return true; } + else if(equal(reject)) { type = 35; return true; } + else if(equal(reject)) { type = 36; return true; } + else if(equal(ignore)) { type = 37; return true; } + else if(equal(ignore)) { type = 38; return true; } + else if(equal(reject)) { type = 39; return true; } + else if(equal(ignore)) { type = 40; return true; } + else if(equal(reject)) { type = 41; return true; } + else if(equal(reject)) { type = 42; return true; } + else if(equal(reject)) { type = 43; return true; } + else if(equal(reject)) { type = 44; return true; } + else if(equal(ignore)) { type = 45; return true; } + else { type = 46; return true;} + return false; + + } + template bool encode(V& v) const + { + return v(ref_nested()); + + } + protected: + template bool decode(size_t index, V& v) + { + clear(); + switch(index) + { + case 1: type = 1; if(v(ref_nested())) { return equal(reject);} return false; + case 2: type = 2; if(v(ref_nested())) { return equal(reject);} return false; + case 3: type = 3; if(v(ref_nested())) { return equal(reject);} return false; + case 4: type = 4; if(v(ref_nested())) { return equal(reject);} return false; + case 5: type = 5; if(v(ref_nested())) { return equal(reject);} return false; + case 6: type = 6; if(v(ref_nested())) { return equal(reject);} return false; + case 7: type = 7; if(v(ref_nested())) { return equal(reject);} return false; + case 8: type = 8; if(v(ref_nested())) { return equal(reject);} return false; + case 9: type = 9; if(v(ref_nested())) { return equal(reject);} return false; + case 10: type = 10; if(v(ref_nested())) { return equal(reject);} return false; + case 11: type = 11; if(v(ref_nested())) { return equal(reject);} return false; + case 12: type = 12; if(v(ref_nested())) { return equal(reject);} return false; + case 13: type = 13; if(v(ref_nested())) { return equal(reject);} return false; + case 14: type = 14; if(v(ref_nested())) { return equal(reject);} return false; + case 15: type = 15; if(v(ref_nested())) { return equal(reject);} return false; + case 16: type = 16; if(v(ref_nested())) { return equal(reject);} return false; + case 17: type = 17; if(v(ref_nested())) { return equal(ignore);} return false; + case 18: type = 18; if(v(ref_nested())) { return equal(reject);} return false; + case 19: type = 19; if(v(ref_nested())) { return equal(reject);} return false; + case 20: type = 20; if(v(ref_nested())) { return equal(reject);} return false; + case 21: type = 21; if(v(ref_nested())) { return equal(reject);} return false; + case 22: type = 22; if(v(ref_nested())) { return equal(reject);} return false; + case 23: type = 23; if(v(ref_nested())) { return equal(reject);} return false; + case 24: type = 24; if(v(ref_nested())) { return equal(reject);} return false; + case 25: type = 25; if(v(ref_nested())) { return equal(reject);} return false; + case 26: type = 26; if(v(ref_nested())) { return equal(ignore);} return false; + case 27: type = 27; if(v(ref_nested())) { return equal(ignore);} return false; + case 28: type = 28; if(v(ref_nested())) { return equal(ignore);} return false; + case 29: type = 29; if(v(ref_nested())) { return equal(ignore);} return false; + case 30: type = 30; if(v(ref_nested())) { return equal(ignore);} return false; + case 31: type = 31; if(v(ref_nested())) { return equal(ignore);} return false; + case 32: type = 32; if(v(ref_nested())) { return equal(ignore);} return false; + case 33: type = 33; if(v(ref_nested())) { return equal(ignore);} return false; + case 34: type = 34; if(v(ref_nested())) { return equal(ignore);} return false; + case 35: type = 35; if(v(ref_nested())) { return equal(reject);} return false; + case 36: type = 36; if(v(ref_nested())) { return equal(reject);} return false; + case 37: type = 37; if(v(ref_nested())) { return equal(ignore);} return false; + case 38: type = 38; if(v(ref_nested())) { return equal(ignore);} return false; + case 39: type = 39; if(v(ref_nested())) { return equal(reject);} return false; + case 40: type = 40; if(v(ref_nested())) { return equal(ignore);} return false; + case 41: type = 41; if(v(ref_nested())) { return equal(reject);} return false; + case 42: type = 42; if(v(ref_nested())) { return equal(reject);} return false; + case 43: type = 43; if(v(ref_nested())) { return equal(reject);} return false; + case 44: type = 44; if(v(ref_nested())) { return equal(reject);} return false; + case 45: type = 45; if(v(ref_nested())) { return equal(ignore);} return false; + case 46: type = 46; return v(ref_nested()); + ref_nested().clear(); + } + return false; + + } + template bool encode(size_t index, V& v) const + { + if(index != type) {return false;} return v(ref_nested()); + + } + private: + size_t type {0}; + + }; + +}; +/* +InitiatingMessage ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct InitiatingMessage : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "InitiatingMessage";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : X2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : X2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : X2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t; + template bool decode(V& v, InitiatingMessage const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, InitiatingMessage const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::InitiatingMessage_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +SuccessfulOutcome ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct SuccessfulOutcome : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "SuccessfulOutcome";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : X2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : X2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : X2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t; + template bool decode(V& v, SuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, SuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::SuccessfulOutcome_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode X2AP-ELEMENTARY-PROCEDURE.&procedureCode ({X2AP-ELEMENTARY-PROCEDURES}), + criticality X2AP-ELEMENTARY-PROCEDURE.&criticality ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value X2AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({X2AP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +*/ + +struct UnsuccessfulOutcome : asn::sequence<3, 0, false, 0> +{ + static constexpr const char* name() {return "UnsuccessfulOutcome";} + using parent_t = asn::sequence<3, 0, false, 0>; + struct procedureCode_t : X2AP_ELEMENTARY_PROCEDURES::procedureCode_t + { + static constexpr const char* name() {return "procedureCode_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::procedureCode_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::decode(v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::procedureCode_t::encode(v); + }; + }; + procedureCode_t& ref_procedureCode() {return procedureCode;} + procedureCode_t const& ref_procedureCode() const {return procedureCode;} + struct criticality_t : X2AP_ELEMENTARY_PROCEDURES::criticality_t + { + static constexpr const char* name() {return "criticality_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::criticality_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::criticality_t::encode(c.procedureCode.get_index(), v); + }; + }; + criticality_t& ref_criticality() {return criticality;} + criticality_t const& ref_criticality() const {return criticality;} + struct value_t : X2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t + { + static constexpr const char* name() {return "value_t";} + using parent_t = typename X2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t; + template bool decode(V& v, UnsuccessfulOutcome const& c) + { + return X2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::decode(c.procedureCode.get_index(), v); + }; + template bool encode(V& v, UnsuccessfulOutcome const& c) const + { + return X2AP_ELEMENTARY_PROCEDURES::UnsuccessfulOutcome_t::encode(c.procedureCode.get_index(), v); + }; + }; + value_t& ref_value() {return value;} + value_t const& ref_value() const {return value;} + template void decode(V& v) + { + v(procedureCode); + v(criticality); + v(value); + + }; + template void encode(V& v) const + { + v(procedureCode); + v(criticality); + v(value); + + }; + void clear() + { + procedureCode.clear(); + criticality.clear(); + value.clear(); + + }; + private: + procedureCode_t procedureCode; + criticality_t criticality; + value_t value; + +}; +/* +X2AP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} +*/ + +struct X2AP_PDU : asn::choice<3, 0, true> +{ + static constexpr const char* name() {return "X2AP-PDU";} + using parent_t = asn::choice<3, 0, true>; + index_type get_index() const {return index;} + bool is_unknown() const {return index == 4;} + void set_unknown() { set_index(4); } + ~X2AP_PDU() {clear();} + struct initiatingMessage_t : InitiatingMessage + { + static constexpr const char* name() {return "initiatingMessage_t";} + using parent_t = InitiatingMessage; + + }; + struct successfulOutcome_t : SuccessfulOutcome + { + static constexpr const char* name() {return "successfulOutcome_t";} + using parent_t = SuccessfulOutcome; + + }; + struct unsuccessfulOutcome_t : UnsuccessfulOutcome + { + static constexpr const char* name() {return "unsuccessfulOutcome_t";} + using parent_t = UnsuccessfulOutcome; + + }; + void clear() + { + switch(get_index()) + { + case 1: var.destroy(); break; + case 2: var.destroy(); break; + case 3: var.destroy(); break; + } + index = 0; + base::clear(); + } + template bool decode(size_t idx, V& v) + { + clear(); + switch(idx) + { + case 1: set_index(1); return v(var.build()); + case 2: set_index(2); return v(var.build()); + case 3: set_index(3); return v(var.build()); + } + return false; + + } + template bool encode(V& v) const + { + switch(get_index()) + { + case 1: return v(var.as()); + case 2: return v(var.as()); + case 3: return v(var.as()); + } + return false; + } + template static inline void enumerate(V& v) + { + v.template operator()(1); + v.template operator()(2); + v.template operator()(3); + + } + initiatingMessage_t& select_initiatingMessage() { if(get_index() != 1) { clear(); set_index(1); return var.build();} return var.as();} + initiatingMessage_t const* get_initiatingMessage() const { if(get_index() == 1) { return &var.as();} return nullptr; } + successfulOutcome_t& select_successfulOutcome() { if(get_index() != 2) { clear(); set_index(2); return var.build();} return var.as();} + successfulOutcome_t const* get_successfulOutcome() const { if(get_index() == 2) { return &var.as();} return nullptr; } + unsuccessfulOutcome_t& select_unsuccessfulOutcome() { if(get_index() != 3) { clear(); set_index(3); return var.build();} return var.as();} + unsuccessfulOutcome_t const* get_unsuccessfulOutcome() const { if(get_index() == 3) { return &var.as();} return nullptr; } + private: + void set_index(index_type i) {index = i; base::set();} + union union_type + { + char dummy1[sizeof(initiatingMessage_t)]; + char dummy2[sizeof(successfulOutcome_t)]; + char dummy3[sizeof(unsuccessfulOutcome_t)]; + + }; + asn::variant var; + index_type index {0}; +}; diff --git a/simulators/e2sim/src/ASN1/lib/asn_e2ap.cpp b/simulators/e2sim/src/ASN1/lib/asn_e2ap.cpp new file mode 100644 index 0000000..fa2fd88 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_e2ap.cpp @@ -0,0 +1,982 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#include "asn_e2ap.hpp" +#include "asn_e2ap_wrapper.hpp" + +/*----------------------------------------------------------------------- + COMMON ROUTINES +------------------------------------------------------------------------- +*/ +e2ap_pdu_t* new_e2ap_pdu(void) +{ + E2APpduWrapper* pduWrapper = new E2APpduWrapper(); + return reinterpret_cast(pduWrapper); +} + +void e2ap_asn_print(e2ap_pdu_t* pdu, char* buf, size_t buf_size) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + buf[0] = 0; + + strncat(buf, asn::get_printed(pduWrapper->ref_pdu()).c_str(), buf_size - 1); +} + +int e2ap_asn_per_encode(e2ap_pdu_t* pdu, unsigned char* buf, size_t buf_size, + char* err_buf, size_t err_buf_size) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + asn::per::EncoderCtx ctx{ buf, buf_size }; + + if (!asn::per::pack(pduWrapper->ref_pdu(), ctx)) { + err_buf[0] = 0; + //strncat(err_buf, ctx.refErrorCtx().toString().c_str(), err_buf_size - 1); + return -1; + } else { + return static_cast(ctx.refBuffer().getBytesUsed()); + } + +} + +int e2ap_asn_per_decode(e2ap_pdu_t* pdu, unsigned char const* buf, size_t buf_size, + char* err_buf, size_t err_buf_size) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + asn::per::DecoderCtx ctx{ buf, + buf_size, + pduWrapper->m_allocation_buffer, + pduWrapper->m_allocation_buffer_size }; + + if (!asn::per::unpack(pduWrapper->ref_pdu(), ctx)) { + err_buf[0] = 0; + //strncat(err_buf, ctx.refErrorCtx().toString().c_str(), err_buf_size - 1); + return -1; + } + + return 0; + +} + +int e2ap_get_index(e2ap_pdu_t* pdu) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + return pduWrapper->ref_pdu().get_index(); +} + +int e2ap_get_procedureCode(e2ap_pdu_t* pdu) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + switch(pduWrapper->ref_pdu().get_index()) + { + case 1: + return pduWrapper->ref_pdu().get_initiatingMessage()->ref_procedureCode().get(); + break; + + case 2: + return pduWrapper->ref_pdu().get_successfulOutcome()->ref_procedureCode().get(); + break; + + case 3: + return pduWrapper->ref_pdu().get_unsuccessfulOutcome()->ref_procedureCode().get(); + break; + + default: + return -1; + } + +} + +/*----------------------------------------------------------------------- + MESSAGE GENERATORS +------------------------------------------------------------------------- +*/ +//X2Setup +bool e2ap_init_X2SetupRequest(e2ap_pdu_t* pdu) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + //Initialization + pduWrapper->ref_pdu().select_initiatingMessage(); + pduWrapper->ref_pdu().select_initiatingMessage().clear(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_x2Setup(); + + return true; +} + +bool e2ap_create_X2SetupRequest(e2ap_pdu_t* pdu, eNB_config &cfg) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_x2Setup(); + + X2SetupRequest* container = + &(pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupRequest::protocolIEs_t::value_type; + + /* X2SetupRequest-IEs : GlobalENB-ID*/ + IE_value_t* val_GlobalENB_ID = new IE_value_t; + container->ref_protocolIEs().push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_pLMN_Identity() + .set(3, cfg.pLMN_Identity); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* X2SetupRequest-IEs : ServedCells*/ + IE_value_t* val_ServedCells = new IE_value_t; + container->ref_protocolIEs().push_back(*val_ServedCells); + + val_ServedCells->ref_id().select_id_ServedCells(); + val_ServedCells->ref_criticality().select_id_ServedCells(); + val_ServedCells->ref_value().select_id_ServedCells(); + + //Add servedCellInfo + ServedCells::value_type* elm = new ServedCells::value_type(); + ServedCell_Information* info = &(elm->ref_servedCellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_ServedCells->ref_value().select_id_ServedCells().push_back(*elm); + + return true; +} + +bool e2ap_create_X2SetupResponse(e2ap_pdu_t* pdu, eNB_config &cfg) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_successfulOutcome().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_successfulOutcome().ref_criticality().select_id_x2Setup(); + + X2SetupResponse* container = + &(pduWrapper->ref_pdu().select_successfulOutcome().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupResponse::protocolIEs_t::value_type; + + /* X2SetupResponse-IEs : GlobalENB-ID*/ + IE_value_t* val_GlobalENB_ID = new IE_value_t; + container->ref_protocolIEs().push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_pLMN_Identity() + .set(3, cfg.pLMN_Identity); + + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* X2SetupResponse-IEs : ServedCells*/ + IE_value_t* val_ServedCells = new IE_value_t; + container->ref_protocolIEs().push_back(*val_ServedCells); + + val_ServedCells->ref_id().select_id_ServedCells(); + val_ServedCells->ref_criticality().select_id_ServedCells(); + val_ServedCells->ref_value().select_id_ServedCells(); + + //Add servedCellInfo + ServedCells::value_type* elm = new ServedCells::value_type(); + ServedCell_Information* info = &(elm->ref_servedCellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_ServedCells->ref_value().select_id_ServedCells().push_back(*elm); + + return true; +} + +bool e2ap_create_X2SetupFailure(e2ap_pdu_t* pdu) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_criticality().select_id_x2Setup(); + + X2SetupFailure* container = + &(pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupFailure::protocolIEs_t::value_type; + + /* X2SetupFailure-IEs << id-Cause */ + IE_value_t* val_cause = new IE_value_t; + container->ref_protocolIEs().push_back(*val_cause); + + val_cause->ref_id().select_id_Cause(); + val_cause->ref_criticality().select_id_Cause(); + + /* Cause << radioNetwork */ + val_cause->ref_value().select_id_Cause().select_radioNetwork(); + + /* CauseRadioNetwork = ho-target-not-allowed (enum = 8)*/ + val_cause->ref_value().select_id_Cause().select_radioNetwork() + .set(static_cast(8)); + + return true; +} + +//ENDCX2Setup +bool e2ap_create_ENDCX2SetupRequest(e2ap_pdu_t* pdu, eNB_config &cfg) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_endcX2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_endcX2Setup(); + + ENDCX2SetupRequest* container = + &(pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_endcX2Setup()); + + using IE_value_t = ENDCX2SetupRequest::protocolIEs_t::value_type; + + /* ENDCX2SetupRequest-IEs = id-InitiatingNodeType-EndcX2Setup */ + IE_value_t* ie = new IE_value_t; + container->ref_protocolIEs().push_back(*ie); + ie->ref_id().select_id_InitiatingNodeType_EndcX2Setup(); + ie->ref_criticality().select_id_InitiatingNodeType_EndcX2Setup(); + ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup(); + + /* InitiatingNodeType-EndcX2Setup = init-eNB {ENB-ENDCX2SetupReqIEs} */ + ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup().select_init_eNB(); + + using eNB_val_t = InitiatingNodeType_EndcX2Setup::init_eNB_t::value_type; + + ProtocolIE_Container* eNB_node = + &(ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup().select_init_eNB()); + + /* ENB-ENDCX2SetupReqIEs <-- id-GlobalENB-ID */ + eNB_val_t* val_GlobalENB_ID = new eNB_val_t; + eNB_node->push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID() + .ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* ENB-ENDCX2SetupReqIEs <-- id-ServedEUTRAcellsENDCX2ManagementList */ + eNB_val_t* val_EUTRAlist = new eNB_val_t; + eNB_node->push_back(*val_EUTRAlist); + + val_EUTRAlist->ref_id().select_id_ServedEUTRAcellsENDCX2ManagementList(); + val_EUTRAlist->ref_criticality().select_id_ServedEUTRAcellsENDCX2ManagementList(); + val_EUTRAlist->ref_value().select_id_ServedEUTRAcellsENDCX2ManagementList(); + + /* ServedEUTRAcellsENDCX2ManagementList <-- servedEUTRACellInfo */ + ServedEUTRAcellsENDCX2ManagementList::value_type* elm = + new ServedEUTRAcellsENDCX2ManagementList::value_type(); + ServedCell_Information* info = &(elm->ref_servedEUTRACellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_EUTRAlist->ref_value().select_id_ServedEUTRAcellsENDCX2ManagementList() + .push_back(*elm); + + return true; +} + +bool e2ap_create_ENDCX2SetupResponse(e2ap_pdu_t* pdu, gNB_config &gnb_cfg) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_successfulOutcome().ref_procedureCode().select_id_endcX2Setup(); + pduWrapper->ref_pdu().select_successfulOutcome().ref_criticality().select_id_endcX2Setup(); + + ENDCX2SetupResponse* container = + &(pduWrapper->ref_pdu().select_successfulOutcome().ref_value().select_id_endcX2Setup()); + + using IE_value_t = ENDCX2SetupResponse::protocolIEs_t::value_type; + + /* ENDCX2SetupRequest-IEs = id-RespondingNodeType-EndcX2Setup */ + IE_value_t* ie = new IE_value_t; + container->ref_protocolIEs().push_back(*ie); + ie->ref_id().select_id_RespondingNodeType_EndcX2Setup(); + ie->ref_criticality().select_id_RespondingNodeType_EndcX2Setup(); + ie->ref_value().select_id_RespondingNodeType_EndcX2Setup(); + + /* RespondingNodeType-EndcX2Setup = respond-en-gNB {En-gNB-ENDCX2SetupReqAckIEs} */ + ie->ref_value().select_id_RespondingNodeType_EndcX2Setup().select_respond_en_gNB(); + + using gNB_val_t = RespondingNodeType_EndcX2Setup::respond_en_gNB_t::value_type; + + ProtocolIE_Container* gNB_node = + &(ie->ref_value().select_id_RespondingNodeType_EndcX2Setup().select_respond_en_gNB()); + + /* En-gNB-ENDCX2SetupReqAckIEs << id-Globalen-gNB-ID */ + gNB_val_t* val_Globalen_gNB_ID = new gNB_val_t; + gNB_node->push_back(*val_Globalen_gNB_ID); + + val_Globalen_gNB_ID->ref_id().select_id_Globalen_gNB_ID(); + val_Globalen_gNB_ID->ref_criticality().select_id_Globalen_gNB_ID(); + val_Globalen_gNB_ID->ref_value().select_id_Globalen_gNB_ID() + .ref_pLMN_Identity().set(3, gnb_cfg.pLMN_Identity); + val_Globalen_gNB_ID->ref_value().select_id_Globalen_gNB_ID().ref_gNB_ID() + .select_gNB_ID().set_buffer(22, gnb_cfg.gNB_ID); + + /* En-gNB-ENDCX2SetupReqAckIEs << id-ServedNRcellsENDCX2ManagementList */ + gNB_val_t* val_ServedNRCells = new gNB_val_t; + gNB_node->push_back(*val_ServedNRCells); + + val_ServedNRCells->ref_id().select_id_ServedNRcellsENDCX2ManagementList(); + val_ServedNRCells->ref_criticality().select_id_ServedNRcellsENDCX2ManagementList(); + val_ServedNRCells->ref_value().select_id_ServedNRcellsENDCX2ManagementList(); + + /* ServedNRcellsENDCX2ManagementList <-- servedNRCellInfo*/ + ServedNRcellsENDCX2ManagementList::value_type* elm = + new ServedNRcellsENDCX2ManagementList::value_type(); + + /* + ServedNRCell-Information ::= SEQUENCE { + nrpCI NRPCI, + nrCellID NRCGI, + fiveGS-TAC FiveGS-TAC OPTIONAL, + configured-TAC TAC OPTIONAL, + broadcastPLMNs BroadcastPLMNs-Item, + nrModeInfo CHOICE { + fdd FDD-InfoServedNRCell-Information, + tdd TDD-InfoServedNRCell-Information, + ... + }, + measurementTimingConfiguration OCTET STRING, + iE-Extensions ProtocolExtensionContainer { {ServedNRCell-Information-ExtIEs} } OPTIONAL, + ... + } + */ + ServedNRCell_Information* info = &(elm->ref_servedNRCellInfo()); + { + // nrpCI NRPCI, + info->ref_nrpCI().set(gnb_cfg.nrpCI); + + /* nrCellID NRCGI, + + NRCGI ::= SEQUENCE { + pLMN-Identity PLMN-Identity, + nRcellIdentifier NRCellIdentifier, + iE-Extensions ProtocolExtensionContainer { {NRCGI-ExtIEs} } OPTIONAL, + ... + } + */ + info->ref_nrCellID().ref_pLMN_Identity().set(3, gnb_cfg.pLMN_Identity); + info->ref_nrCellID().ref_nRcellIdentifier().set_buffer(36, gnb_cfg.nRcellIdentifier); + + /* broadcastPLMNs BroadcastPLMNs-Item */ + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, gnb_cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + /* nrModeInfo CHOICE { + fdd FDD-InfoServedNRCell-Information, + tdd TDD-InfoServedNRCell-Information, + ... + }, + + FDD-InfoServedNRCell-Information ::= SEQUENCE { + ul-NRFreqInfo NRFreqInfo, + dl-NRFreqInfo NRFreqInfo, + ul-NR-TxBW NR-TxBW, + dl-NR-TxBW NR-TxBW, + iE-Extensions ProtocolExtensionContainer { {FDD-InfoServedNRCell-Information-ExtIEs} } OPTIONAL, + ... + } + + NRFreqInfo ::= SEQUENCE{ + nRARFCN INTEGER (0.. 3279165), + freqBandListNr SEQUENCE (SIZE(1..maxnoofNrCellBands)) OF FreqBandNrItem, + sULInformation SULInformation OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NRFreqInfo-ExtIEs} } OPTIONAL, + + ... + } + + */ + info->ref_nrModeInfo().select_fdd().ref_ul_NRFreqInfo().ref_nRARFCN().set(gnb_cfg.uL_nRARFCN); + info->ref_nrModeInfo().select_fdd().ref_dl_NRFreqInfo().ref_nRARFCN().set(gnb_cfg.dL_nRARFCN); + + /* + FreqBandNrItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + supportedSULBandList SEQUENCE (SIZE(0..maxnoofNrCellBands)) OF SupportedSULFreqBandItem, + iE-Extensions ProtocolExtensionContainer { {FreqBandNrItem-ExtIEs} } OPTIONAL, + ... + } + */ + //uplink + asn::sequenceof::value_type* ul_band_item = + new asn::sequenceof::value_type(); + { + ul_band_item->ref_freqBandIndicatorNr().set(gnb_cfg.ul_freqBandIndicatorNr); + + /* + SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { {SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... + } + */ + + asn::sequenceof::value_type* ul_supported_band_item = + new asn::sequenceof::value_type(); + + ul_supported_band_item->ref_freqBandIndicatorNr().set(gnb_cfg.ul_freqBandIndicatorNr); + + ul_band_item->ref_supportedSULBandList().push_back(*ul_supported_band_item); + } + info->ref_nrModeInfo().select_fdd().ref_ul_NRFreqInfo() + .ref_freqBandListNr().push_back(*ul_band_item); + + //downlink + asn::sequenceof::value_type* dl_band_item = + new asn::sequenceof::value_type(); + { + dl_band_item->ref_freqBandIndicatorNr().set(gnb_cfg.dl_freqBandIndicatorNr); + + /* + SupportedSULFreqBandItem ::= SEQUENCE { + freqBandIndicatorNr INTEGER (1..1024,...), + iE-Extensions ProtocolExtensionContainer { {SupportedSULFreqBandItem-ExtIEs} } OPTIONAL, + ... + } + */ + + asn::sequenceof::value_type* dl_supported_band_item = + new asn::sequenceof::value_type(); + + dl_supported_band_item->ref_freqBandIndicatorNr().set(gnb_cfg.dl_freqBandIndicatorNr); + + dl_band_item->ref_supportedSULBandList().push_back(*dl_supported_band_item); + } + info->ref_nrModeInfo().select_fdd().ref_dl_NRFreqInfo() + .ref_freqBandListNr().push_back(*dl_band_item); + + /* + NR-TxBW ::= SEQUENCE { + nRSCS NRSCS, + nRNRB NRNRB, + iE-Extensions ProtocolExtensionContainer { {NR-TxBW-ExtIEs} } OPTIONAL, + ... + } + */ + { + info->ref_nrModeInfo().select_fdd().ref_ul_NR_TxBW().ref_nRNRB() + .set( static_cast(gnb_cfg.uL_NRNRB) ); + info->ref_nrModeInfo().select_fdd().ref_ul_NR_TxBW().ref_nRSCS() + .set( static_cast(gnb_cfg.uL_NRSCS) ); + + info->ref_nrModeInfo().select_fdd().ref_dl_NR_TxBW().ref_nRNRB() + .set( static_cast(gnb_cfg.dL_NRNRB) ); + info->ref_nrModeInfo().select_fdd().ref_dl_NR_TxBW().ref_nRSCS() + .set( static_cast(gnb_cfg.dL_NRSCS) ); + } + + /* + measurementTimingConfiguration OCTET STRING, + */ + info->ref_measurementTimingConfiguration().set(gnb_cfg.measurementTimingConfiguration); + } + val_ServedNRCells->ref_value().select_id_ServedNRcellsENDCX2ManagementList().push_back(*elm); + + + + return true; +} + +bool e2ap_create_ENDCX2SetupFailure(e2ap_pdu_t* pdu) +{ + + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_procedureCode().select_id_endcX2Setup(); + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_criticality().select_id_endcX2Setup(); + + ENDCX2SetupFailure* container = + &(pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_value().select_id_endcX2Setup()); + + using IE_value_t = ENDCX2SetupFailure::protocolIEs_t::value_type; + + /* ENDCX2SetupFailure-IEs := id-Cause*/ + IE_value_t* val_cause = new IE_value_t; + container->ref_protocolIEs().push_back(*val_cause); + + val_cause->ref_id().select_id_Cause(); + val_cause->ref_criticality().select_id_Cause(); + + /* Cause << radioNetwork */ + val_cause->ref_value().select_id_Cause().select_radioNetwork(); + + /* CauseRadioNetwork = ho-target-not-allowed (enum = 8)*/ + val_cause->ref_value().select_id_Cause().select_radioNetwork() + .set(static_cast(8)); + + return true; +} + +//RICSubscription +bool e2ap_create_RICsubscriptionRequest(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_initiatingMessage() + .ref_procedureCode().select_id_ricSubscription(); + pduWrapper->ref_pdu().select_initiatingMessage() + .ref_criticality().select_id_ricSubscription(); + + RICsubscriptionRequest* container = &(pduWrapper->ref_pdu() + .select_initiatingMessage().ref_value().select_id_ricSubscription()); + + using IE_value_t = RICsubscriptionRequest::protocolIEs_t::value_type; + + /* RICsubscriptionRequest-IEs : RICrequestID */ + IE_value_t* ie_RICrequestID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RICrequestID); + + ie_RICrequestID->ref_id().select_id_RICrequestID(); + ie_RICrequestID->ref_criticality().select_id_RICrequestID(); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestorID().set(params.request_id); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestSequenceNumber().set(params.seq_number); + + /* RICsubscriptionRequest-IEs : RANfunctionID */ + IE_value_t* ie_RANfunctionID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RANfunctionID); + + ie_RANfunctionID->ref_id().select_id_RANfunctionID(); + ie_RANfunctionID->ref_criticality().select_id_RANfunctionID(); + ie_RANfunctionID->ref_value().select_id_RANfunctionID().set(params.ran_func_id); + + + /* + RICsubscription ::= SEQUENCE { + ricEventTriggerDefinition RICeventTriggerDefinition, + ricAction-ToBeSetup-List RICactions-ToBeSetup-List, + ... + } + + RICeventTriggerDefinition ::= OCTET STRING + RICactions-ToBeSetup-List ::= SEQUENCE (SIZE(1..maxofRICactionID)) OF ProtocolIE-Single-Container { {RICaction-ToBeSetup-ItemIEs} } + + RICaction-ToBeSetup-ItemIEs X2AP-PROTOCOL-IES ::= { + { ID id-RICaction-ToBeSetup-Item CRITICALITY ignore TYPE RICaction-ToBeSetup-Item PRESENCE mandatory }, + ... + } + + RICaction-ToBeSetup-Item ::= SEQUENCE { + ricActionID RICactionID, + ricActionType RICactionType, + ricActionDefinition RICactionDefinition OPTIONAL, + ricSubsequentAction RICsubsequentAction OPTIONAL, + ... + } + + RICactionID ::= INTEGER (0..255) + + RICactionType ::= ENUMERATED{ + report, + insert, + policy, + ... + } + */ + + /* RICsubscriptionRequest-IEs : RICsubscription */ + IE_value_t* ie_RICsubscription = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RICsubscription); + + ie_RICsubscription->ref_id().select_id_RICsubscription(); + ie_RICsubscription->ref_criticality().select_id_RICsubscription(); + + // RICeventTriggerDefinition + ie_RICsubscription->ref_value().select_id_RICsubscription() + .ref_ricEventTriggerDefinition().set(params.event_trigger_def); + + //RICactions-ToBeSetup-List + for( auto const &action : params.actionList) + { + RICactions_ToBeSetup_List::value_type* item = + new RICactions_ToBeSetup_List::value_type(); + + ie_RICsubscription->ref_value().select_id_RICsubscription() + .ref_ricAction_ToBeSetup_List().push_back(*item); + + item->ref_id().select_id_RICaction_ToBeSetup_Item(); + item->ref_criticality().select_id_RICaction_ToBeSetup_Item(); + item->ref_value().select_id_RICaction_ToBeSetup_Item() + .ref_ricActionID().set(action.action_id); + item->ref_value().select_id_RICaction_ToBeSetup_Item() + .ref_ricActionType().set(action.action_type); + + } + + return true; +} + +bool e2ap_parse_RICsubscriptionRequest(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + RICsubscriptionRequest* container = &(pduWrapper->ref_pdu() + .select_initiatingMessage().ref_value().select_id_ricSubscription()); + + + for(auto &e : container->ref_protocolIEs()) + { + /*See struct RICsubscriptionRequest_IEs*/ + size_t type = e.ref_value().get_index(); + + switch(type) + { + case 1: //RICrequestID + { + params.request_id = e.ref_value().select_id_RICrequestID().ref_ricRequestorID().get(); + params.seq_number = e.ref_value().select_id_RICrequestID().ref_ricRequestSequenceNumber().get(); + } + break; + + case 2: //RANfunctionID + params.ran_func_id = e.ref_value().select_id_RANfunctionID().get(); + break; + + case 3: //RICsubscription + { + auto event = e.ref_value().select_id_RICsubscription().ref_ricEventTriggerDefinition().get(); + (params.event_trigger_def).assign(std::string(event.data(), event.data() + event.size())); + + //ricAction_ToBeSetup_List + for (auto & f : e.ref_value().select_id_RICsubscription().ref_ricAction_ToBeSetup_List()) + { + RIC_action_t action; + action.action_id = f.ref_value() + .select_id_RICaction_ToBeSetup_Item().ref_ricActionID().get(); + action.action_type = static_cast(f.ref_value() + .select_id_RICaction_ToBeSetup_Item().ref_ricActionType().get()); + + params.actionList.push_back(action); + } + } + break; + + default: + printf("Unknown IE type = %d\n", (int)type); + return false; + } + } + + return true; +} + +bool e2ap_create_RICsubscriptionResponse(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_successfulOutcome().ref_procedureCode().select_id_ricSubscription(); + pduWrapper->ref_pdu().select_successfulOutcome().ref_criticality().select_id_ricSubscription(); + + RICsubscriptionResponse* container = &(pduWrapper->ref_pdu() + .select_successfulOutcome().ref_value().select_id_ricSubscription()); + + using IE_value_t = RICsubscriptionResponse::protocolIEs_t::value_type; + + /* RICsubscriptionResponse-IEs : RICrequestID */ + IE_value_t* ie_RICrequestID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RICrequestID); + + ie_RICrequestID->ref_id().select_id_RICrequestID(); + ie_RICrequestID->ref_criticality().select_id_RICrequestID(); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestorID().set(params.request_id); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestSequenceNumber().set(params.seq_number); + + /* RICsubscriptionResponse-IEs : RANfunctionID */ + IE_value_t* ie_RANfunctionID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RANfunctionID); + + ie_RANfunctionID->ref_id().select_id_RANfunctionID(); + ie_RANfunctionID->ref_criticality().select_id_RANfunctionID(); + ie_RANfunctionID->ref_value().select_id_RANfunctionID().set(params.ran_func_id); + + /* RICsubscriptionResponse-IEs : RICaction-Admitted-List */ + IE_value_t* ie_admittedList = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_admittedList); + + ie_admittedList->ref_id().select_id_RICactions_Admitted(); + ie_admittedList->ref_criticality().select_id_RICactions_Admitted(); + + /* RICsubscriptionResponse-IEs : RICaction-NotAdmitted-List */ + IE_value_t* ie_notAdmittedList = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_notAdmittedList); + + ie_notAdmittedList->ref_id().select_id_RICactions_NotAdmitted(); + ie_notAdmittedList->ref_criticality().select_id_RICactions_NotAdmitted(); + + //add action to admitted and not-admitted list + for(auto const &a : params.actionList) + { + if(a.isAdmitted) + { + RICaction_Admitted_List::value_type* item = new RICaction_Admitted_List::value_type(); + + ie_admittedList->ref_value().select_id_RICactions_Admitted().push_back(*item); + + item->ref_id().select_id_RICaction_Admitted_Item(); + item->ref_criticality().select_id_RICaction_Admitted_Item(); + item->ref_value().select_id_RICaction_Admitted_Item().ref_ricActionID().set(a.action_id); + } + else + { + RICaction_NotAdmitted_List::value_type* item = new RICaction_NotAdmitted_List::value_type(); + + ie_notAdmittedList->ref_value().select_id_RICactions_NotAdmitted().push_back(*item); + + item->ref_id().select_id_RICaction_NotAdmitted_Item(); + item->ref_criticality().select_id_RICaction_NotAdmitted_Item(); + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricActionID().set(a.action_id); + + // set cause and sub-cause + switch(a.notAdmitted_cause) + { + case RICcause_radioNetwork: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_radioNetwork().set(a.notAdmitted_subCause); + break; + + case RICcause_transport: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_transport().set(a.notAdmitted_subCause); + break; + + case RICcause_protocol: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_protocol().set(a.notAdmitted_subCause); + break; + + case RICcause_misc: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_misc().set(a.notAdmitted_subCause); + break; + + case RICcause_ric: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_ric().set(a.notAdmitted_subCause); + break; + + default: + printf("Unknown cause for action not admitted = %d", (int)a.notAdmitted_cause); + } + } + } + + return true; +} + +bool e2ap_create_RICsubscriptionFailure(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms) +{ + E2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_procedureCode().select_id_ricSubscription(); + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_criticality().select_id_ricSubscription(); + + RICsubscriptionFailure* container = &(pduWrapper->ref_pdu() + .select_unsuccessfulOutcome().ref_value().select_id_ricSubscription()); + + using IE_value_t = RICsubscriptionFailure::protocolIEs_t::value_type; + + /* RICsubscriptionFailure-IEs : RICrequestID */ + IE_value_t* ie_RICrequestID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RICrequestID); + + ie_RICrequestID->ref_id().select_id_RICrequestID(); + ie_RICrequestID->ref_criticality().select_id_RICrequestID(); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestorID().set(params.request_id); + ie_RICrequestID->ref_value().select_id_RICrequestID() + .ref_ricRequestSequenceNumber().set(params.seq_number); + + /* RICsubscriptionFailure-IEs : RANfunctionID */ + IE_value_t* ie_RANfunctionID = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_RANfunctionID); + + ie_RANfunctionID->ref_id().select_id_RANfunctionID(); + ie_RANfunctionID->ref_criticality().select_id_RANfunctionID(); + ie_RANfunctionID->ref_value().select_id_RANfunctionID().set(params.ran_func_id); + + /* RICsubscriptionFailure-IEs : RICaction-NotAdmitted-List */ + IE_value_t* ie_notAdmittedList = new IE_value_t; + container->ref_protocolIEs().push_back(*ie_notAdmittedList); + + ie_notAdmittedList->ref_id().select_id_RICactions_NotAdmitted(); + ie_notAdmittedList->ref_criticality().select_id_RICactions_NotAdmitted(); + + for(auto const &a : params.actionList) + { + if(!a.isAdmitted) + { + RICaction_NotAdmitted_List::value_type* item = new RICaction_NotAdmitted_List::value_type(); + + ie_notAdmittedList->ref_value().select_id_RICactions_NotAdmitted().push_back(*item); + + item->ref_id().select_id_RICaction_NotAdmitted_Item(); + item->ref_criticality().select_id_RICaction_NotAdmitted_Item(); + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricActionID().set(a.action_id); + + // set cause and sub-cause + switch(a.notAdmitted_cause) + { + case RICcause_radioNetwork: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_radioNetwork().set(a.notAdmitted_subCause); + break; + + case RICcause_transport: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_transport().set(a.notAdmitted_subCause); + break; + + case RICcause_protocol: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_protocol().set(a.notAdmitted_subCause); + break; + + case RICcause_misc: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_misc().set(a.notAdmitted_subCause); + break; + + case RICcause_ric: + item->ref_value().select_id_RICaction_NotAdmitted_Item().ref_ricCause().select_ric().set(a.notAdmitted_subCause); + break; + + default: + printf("Unknown cause for action not admitted = %d", (int)a.notAdmitted_cause); + } + } + } + + return true; +} + + +/*----------------------------------------------------------------------- + TESTS +------------------------------------------------------------------------- +*/ +void test_E2AP_X2Setup_codec(void) +{ + e2ap_pdu_t* pdu = new_e2ap_pdu(); + + // e2ap_init_X2SetupRequest(pdu); + eNB_config cfg; + e2ap_create_X2SetupRequest(pdu, cfg); + + char pdu_str[1024]; + e2ap_asn_print(pdu, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + //Test encode + unsigned char packed_buf[4096]; + char err_buf[1024]; + + int packed_len = e2ap_asn_per_encode(pdu, packed_buf, sizeof(packed_buf), + err_buf, sizeof(err_buf)); + if(packed_len != -1) { + printf("Encode successful, packed_len = %d\n", packed_len); + } else { + printf("Encode Error: %s\n", err_buf); + } + + //Test decode + e2ap_pdu_t* pdu2 = new_e2ap_pdu(); + int rc = e2ap_asn_per_decode(pdu2, packed_buf, packed_len, err_buf, sizeof(err_buf)); + if(rc == -1) { + printf("Decode error: %s\n", err_buf); + } else { + printf("Decode successful\n"); + } + + e2ap_asn_print(pdu2, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + printf("index = %d\n", e2ap_get_index(pdu2)); + printf("procedureCode = %d\n", e2ap_get_procedureCode(pdu2)); + + //Test X2SetupResponse + e2ap_pdu_t* pdu_resp = new_e2ap_pdu(); + e2ap_create_X2SetupResponse(pdu_resp, cfg); + e2ap_asn_print(pdu_resp, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + //Test X2SetupFailure + e2ap_pdu_t* pdu_failure = new_e2ap_pdu(); + e2ap_create_X2SetupFailure(pdu_failure); + e2ap_asn_print(pdu_failure, pdu_str, sizeof(pdu_str)); + printf("%s \n", pdu_str); +} diff --git a/simulators/e2sim/src/ASN1/lib/asn_e2ap.hpp b/simulators/e2sim/src/ASN1/lib/asn_e2ap.hpp new file mode 100644 index 0000000..aa858b2 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_e2ap.hpp @@ -0,0 +1,85 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#ifndef ASN_E2AP_HPP +#define ASN_E2AP_HPP + +#include +#include +#include + +#include "e2ap_config.hpp" + +typedef struct c__dummy01 e2ap_pdu_t; + +/*----------------------------------------------------------------------- + COMMON ROUTINES +------------------------------------------------------------------------- +*/ +e2ap_pdu_t* new_e2ap_pdu(void); + +void e2ap_asn_print(e2ap_pdu_t* pdu, char* buf, size_t buf_size); + +int e2ap_asn_per_encode(e2ap_pdu_t* pdu, unsigned char* buf, size_t buf_size, + char* err_buf, size_t err_buf_size); + +int e2ap_asn_per_decode(e2ap_pdu_t* pdu, unsigned char const* buf, size_t buf_size, + char* err_buf, size_t err_buf_size); + +int e2ap_get_index(e2ap_pdu_t* pdu); + +int e2ap_get_procedureCode(e2ap_pdu_t* pdu); + +/*----------------------------------------------------------------------- + MESSAGE GENERATORS +------------------------------------------------------------------------- +*/ + +//X2Setup +bool e2ap_init_X2SetupRequest(e2ap_pdu_t* pdu); + +bool e2ap_create_X2SetupRequest(e2ap_pdu_t* pdu, eNB_config &cfg); + +bool e2ap_create_X2SetupResponse(e2ap_pdu_t* pdu, eNB_config &cfg); + +bool e2ap_create_X2SetupFailure(e2ap_pdu_t* pdu); + +//ENDCX2Setup +bool e2ap_create_ENDCX2SetupRequest(e2ap_pdu_t* pdu, eNB_config &cfg); + +bool e2ap_create_ENDCX2SetupResponse(e2ap_pdu_t* pdu, gNB_config &cfg); + +bool e2ap_create_ENDCX2SetupFailure(e2ap_pdu_t* pdu); + +//RIC Subscription +bool e2ap_create_RICsubscriptionRequest(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms); + +bool e2ap_parse_RICsubscriptionRequest(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms); + +bool e2ap_create_RICsubscriptionResponse(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms); + +bool e2ap_create_RICsubscriptionFailure(e2ap_pdu_t* pdu, RICsubscription_params_t ¶ms); + +/*----------------------------------------------------------------------- + TESTS +------------------------------------------------------------------------- +*/ +void test_E2AP_X2Setup_codec(void); + +#endif diff --git a/simulators/e2sim/src/ASN1/lib/asn_e2ap_wrapper.hpp b/simulators/e2sim/src/ASN1/lib/asn_e2ap_wrapper.hpp new file mode 100644 index 0000000..38704e8 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_e2ap_wrapper.hpp @@ -0,0 +1,85 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef ASN_E2AP_PDU_WRAPPER_HPP +#define ASN_E2AP_PDU_WRAPPER_HPP + +#include +#include +#include + +// #include + +// #include +// #include +// #include +// #include +// #include + +#include +// #include +#include +#include +#include + +#define E2AP_PDU_DEFAULT_BUFFER_SIZE 4096 + +//Credit: copied from E2-Manager +struct E2APpduWrapper +{ + unsigned char* m_allocation_buffer; + size_t m_allocation_buffer_size; + + E2APpduWrapper(size_t allocation_buffer_size = E2AP_PDU_DEFAULT_BUFFER_SIZE) + { + m_allocation_buffer_size = allocation_buffer_size; + m_allocation_buffer = 0; + if (allocation_buffer_size) { + m_allocation_buffer = + new (std::nothrow) unsigned char[allocation_buffer_size]; + m_allocator.reset( + m_allocation_buffer, + m_allocation_buffer_size); // initialized correctly on + // allocation failure. + } + } + + ~E2APpduWrapper() + { + if (m_allocation_buffer) + delete[] m_allocation_buffer; + } + + asn::allocator& ref_allocator() { return m_allocator; } + + E2AP_PDU& ref_pdu() { return m_pdu; } + + // reset pdu and allocation buffer. Allows reusing. + void clear() + { + m_pdu.clear(); + m_allocator.reset(m_allocation_buffer, m_allocation_buffer_size); + } + + private: + E2AP_PDU m_pdu; + asn::allocator m_allocator; +}; + + +#endif diff --git a/simulators/e2sim/src/ASN1/lib/asn_x2ap.cpp b/simulators/e2sim/src/ASN1/lib/asn_x2ap.cpp new file mode 100644 index 0000000..dae9ca8 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_x2ap.cpp @@ -0,0 +1,428 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include "asn_x2ap.hpp" +#include "asn_x2ap_wrapper.hpp" + +/*----------------------------------------------------------------------- + COMMON ROUTINES +------------------------------------------------------------------------- +*/ +x2ap_pdu_t* new_x2ap_pdu(void) +{ + X2APpduWrapper* pduWrapper = new X2APpduWrapper(); + return reinterpret_cast(pduWrapper); +} + +void x2ap_asn_print(x2ap_pdu_t* pdu, char* buf, size_t buf_size) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + buf[0] = 0; + + strncat(buf, asn::get_printed(pduWrapper->ref_pdu()).c_str(), buf_size - 1); +} + +int x2ap_asn_per_encode(x2ap_pdu_t* pdu, unsigned char* buf, size_t buf_size, + char* err_buf, size_t err_buf_size) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + asn::per::EncoderCtx ctx{ buf, buf_size }; + + if (!asn::per::pack(pduWrapper->ref_pdu(), ctx)) { + err_buf[0] = 0; + // strncat(err_buf, ctx.refErrorCtx().toString().c_str(), err_buf_size - 1); + return -1; + } else { + return static_cast(ctx.refBuffer().getBytesUsed()); + } + +} + +int x2ap_asn_per_decode(x2ap_pdu_t* pdu, unsigned char const* buf, size_t buf_size, + char* err_buf, size_t err_buf_size) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + asn::per::DecoderCtx ctx{ buf, + buf_size, + pduWrapper->m_allocation_buffer, + pduWrapper->m_allocation_buffer_size }; + + if (!asn::per::unpack(pduWrapper->ref_pdu(), ctx)) { + err_buf[0] = 0; + // strncat(err_buf, ctx.refErrorCtx().toString().c_str(), err_buf_size - 1); + return -1; + } + + return 0; + +} + +int x2ap_get_index(x2ap_pdu_t* pdu) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + return pduWrapper->ref_pdu().get_index(); +} + +int x2ap_get_procedureCode(x2ap_pdu_t* pdu) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + switch(pduWrapper->ref_pdu().get_index()) + { + case 1: + return pduWrapper->ref_pdu().get_initiatingMessage()->ref_procedureCode().get(); + break; + + case 2: + return pduWrapper->ref_pdu().get_successfulOutcome()->ref_procedureCode().get(); + break; + + case 3: + return pduWrapper->ref_pdu().get_unsuccessfulOutcome()->ref_procedureCode().get(); + break; + + default: + return -1; + } + +} + +/*----------------------------------------------------------------------- + MESSAGE GENERATORS +------------------------------------------------------------------------- +*/ +//X2Setup +bool x2ap_init_X2SetupRequest(x2ap_pdu_t* pdu) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + //Initialization + pduWrapper->ref_pdu().select_initiatingMessage(); + pduWrapper->ref_pdu().select_initiatingMessage().clear(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_x2Setup(); + + return true; +} + +bool x2ap_create_X2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_x2Setup(); + + X2SetupRequest* container = + &(pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupRequest::protocolIEs_t::value_type; + + /* X2SetupRequest-IEs : GlobalENB-ID*/ + IE_value_t* val_GlobalENB_ID = new IE_value_t; + container->ref_protocolIEs().push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_pLMN_Identity() + .set(3, cfg.pLMN_Identity); + + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* X2SetupRequest-IEs : ServedCells*/ + IE_value_t* val_ServedCells = new IE_value_t; + container->ref_protocolIEs().push_back(*val_ServedCells); + + val_ServedCells->ref_id().select_id_ServedCells(); + val_ServedCells->ref_criticality().select_id_ServedCells(); + val_ServedCells->ref_value().select_id_ServedCells(); + + //Add servedCellInfo + ServedCells::value_type* elm = new ServedCells::value_type(); + ServedCell_Information* info = &(elm->ref_servedCellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_ServedCells->ref_value().select_id_ServedCells().push_back(*elm); + + return true; +} + +bool x2ap_create_X2SetupResponse(x2ap_pdu_t* pdu, eNB_config &cfg) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_successfulOutcome().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_successfulOutcome().ref_criticality().select_id_x2Setup(); + + X2SetupResponse* container = + &(pduWrapper->ref_pdu().select_successfulOutcome().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupResponse::protocolIEs_t::value_type; + + /* X2SetupResponse-IEs : GlobalENB-ID*/ + IE_value_t* val_GlobalENB_ID = new IE_value_t; + container->ref_protocolIEs().push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_pLMN_Identity() + .set(3, cfg.pLMN_Identity); + + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* X2SetupResponse-IEs : ServedCells*/ + IE_value_t* val_ServedCells = new IE_value_t; + container->ref_protocolIEs().push_back(*val_ServedCells); + + val_ServedCells->ref_id().select_id_ServedCells(); + val_ServedCells->ref_criticality().select_id_ServedCells(); + val_ServedCells->ref_value().select_id_ServedCells(); + + //Add servedCellInfo + ServedCells::value_type* elm = new ServedCells::value_type(); + ServedCell_Information* info = &(elm->ref_servedCellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_ServedCells->ref_value().select_id_ServedCells().push_back(*elm); + + return true; +} + +bool x2ap_create_X2SetupFailure(x2ap_pdu_t* pdu) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_procedureCode().select_id_x2Setup(); + pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_criticality().select_id_x2Setup(); + + X2SetupFailure* container = + &(pduWrapper->ref_pdu().select_unsuccessfulOutcome().ref_value().select_id_x2Setup()); + + using IE_value_t = X2SetupFailure::protocolIEs_t::value_type; + + /* X2SetupFailure-IEs << id-Cause */ + IE_value_t* val_cause = new IE_value_t; + container->ref_protocolIEs().push_back(*val_cause); + + val_cause->ref_id().select_id_Cause(); + val_cause->ref_criticality().select_id_Cause(); + + /* Cause << radioNetwork */ + val_cause->ref_value().select_id_Cause().select_radioNetwork(); + + /* CauseRadioNetwork = ho-target-not-allowed (enum = 8)*/ + val_cause->ref_value().select_id_Cause().select_radioNetwork() + .set(static_cast(8)); + + return true; +} + +//ENDCX2Setup +bool x2ap_create_ENDCX2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg) +{ + X2APpduWrapper* pduWrapper = reinterpret_cast(pdu); + + /* Initiaization */ + pduWrapper->ref_pdu().select_initiatingMessage().ref_procedureCode().select_id_endcX2Setup(); + pduWrapper->ref_pdu().select_initiatingMessage().ref_criticality().select_id_endcX2Setup(); + + ENDCX2SetupRequest* container = + &(pduWrapper->ref_pdu().select_initiatingMessage().ref_value().select_id_endcX2Setup()); + + using IE_value_t = ENDCX2SetupRequest::protocolIEs_t::value_type; + + /* ENDCX2SetupRequest-IEs = id-InitiatingNodeType-EndcX2Setup */ + IE_value_t* ie = new IE_value_t; + container->ref_protocolIEs().push_back(*ie); + ie->ref_id().select_id_InitiatingNodeType_EndcX2Setup(); + ie->ref_criticality().select_id_InitiatingNodeType_EndcX2Setup(); + ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup(); + + /* InitiatingNodeType-EndcX2Setup = init-eNB {ENB-ENDCX2SetupReqIEs} */ + ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup().select_init_eNB(); + + using eNB_val_t = InitiatingNodeType_EndcX2Setup::init_eNB_t::value_type; + + ProtocolIE_Container* eNB_node = + &(ie->ref_value().select_id_InitiatingNodeType_EndcX2Setup().select_init_eNB()); + + /* ENB-ENDCX2SetupReqIEs <-- id-GlobalENB-ID */ + eNB_val_t* val_GlobalENB_ID = new eNB_val_t; + eNB_node->push_back(*val_GlobalENB_ID); + + val_GlobalENB_ID->ref_id().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_criticality().select_id_GlobalENB_ID(); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID() + .ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + val_GlobalENB_ID->ref_value().select_id_GlobalENB_ID().ref_eNB_ID() + .select_macro_eNB_ID().set_buffer(20, cfg.macro_eNB_ID); + + /* ENB-ENDCX2SetupReqIEs <-- id-ServedEUTRAcellsENDCX2ManagementList */ + eNB_val_t* val_EUTRAlist = new eNB_val_t; + eNB_node->push_back(*val_EUTRAlist); + + val_EUTRAlist->ref_id().select_id_ServedEUTRAcellsENDCX2ManagementList(); + val_EUTRAlist->ref_criticality().select_id_ServedEUTRAcellsENDCX2ManagementList(); + val_EUTRAlist->ref_value().select_id_ServedEUTRAcellsENDCX2ManagementList(); + + /* ServedEUTRAcellsENDCX2ManagementList <-- servedEUTRACellInfo */ + ServedEUTRAcellsENDCX2ManagementList::value_type* elm = + new ServedEUTRAcellsENDCX2ManagementList::value_type(); + ServedCell_Information* info = &(elm->ref_servedEUTRACellInfo()); + { + //Set ServedCell-Information: pCI, cellId, tAC, broadcastPLMNs, eUTRA-Mode-Info + info->ref_pCI().set(cfg.pCI); + info->ref_cellId().ref_pLMN_Identity().set(3, cfg.pLMN_Identity); + info->ref_cellId().ref_eUTRANcellIdentifier().set_buffer(28, cfg.eUTRANcellIdentifier); + info->ref_tAC().set(2, cfg.tAC); + + BroadcastPLMNs_Item::value_type* item = new BroadcastPLMNs_Item::value_type(); + item->set(3, cfg.pLMN_Identity); + info->ref_broadcastPLMNs().push_back(*item); + + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_EARFCN().set(cfg.uL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_EARFCN().set(cfg.dL_EARFCN); + info->ref_eUTRA_Mode_Info().select_fDD().ref_uL_Transmission_Bandwidth() + .set(static_cast(cfg.uL_Bandwidth)); + info->ref_eUTRA_Mode_Info().select_fDD().ref_dL_Transmission_Bandwidth() + .set(static_cast(cfg.dL_Bandwidth)); + } + val_EUTRAlist->ref_value().select_id_ServedEUTRAcellsENDCX2ManagementList() + .push_back(*elm); + + return true; +} + +/*----------------------------------------------------------------------- + TESTS +------------------------------------------------------------------------- +*/ +void test_X2Setup_codec(void) +{ + x2ap_pdu_t* pdu = new_x2ap_pdu(); + + eNB_config cfg; + x2ap_create_X2SetupRequest(pdu, cfg); + + char pdu_str[1024]; + x2ap_asn_print(pdu, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + //Test encode + unsigned char packed_buf[4096]; + char err_buf[1024]; + + int packed_len = x2ap_asn_per_encode(pdu, packed_buf, sizeof(packed_buf), + err_buf, sizeof(err_buf)); + if(packed_len != -1) { + printf("Encode successful, packed_len = %d\n", packed_len); + } else { + printf("Encode Error: %s\n", err_buf); + } + + //Test encode error + x2ap_pdu_t* pdu1 = new_x2ap_pdu(); + x2ap_init_X2SetupRequest(pdu1); + + int packed_len1 = x2ap_asn_per_encode(pdu1, packed_buf, sizeof(packed_buf), + err_buf, sizeof(err_buf)); + if(packed_len1 != -1) { + printf("Encode successful, packed_len = %d\n", packed_len1); + } else { + printf("Encode Error: %s\n", err_buf); + } + + //Test decode + x2ap_pdu_t* pdu2 = new_x2ap_pdu(); + int rc = x2ap_asn_per_decode(pdu2, packed_buf, packed_len, err_buf, sizeof(err_buf)); + if(rc == -1) { + printf("Decode error: %s\n", err_buf); + } else { + printf("Decode successful\n"); + } + + x2ap_asn_print(pdu2, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + printf("index = %d\n", x2ap_get_index(pdu2)); + printf("procedureCode = %d\n", x2ap_get_procedureCode(pdu2)); + + + //Test decode error + x2ap_pdu_t* pdu3 = new_x2ap_pdu(); + int rc2 = x2ap_asn_per_decode(pdu3, packed_buf, 1, err_buf, sizeof(err_buf)); + if(rc2 == -1) { + printf("Decode error: %s\n", err_buf); + } else { + printf("Decode successful\n"); + } + + //Test X2SetupResponse + x2ap_pdu_t* pdu_resp = new_x2ap_pdu(); + x2ap_create_X2SetupResponse(pdu_resp, cfg); + x2ap_asn_print(pdu_resp, pdu_str, sizeof(pdu_str)); + printf("%s\n", pdu_str); + + //Test X2SetupFailure + x2ap_pdu_t* pdu_failure = new_x2ap_pdu(); + x2ap_create_X2SetupFailure(pdu_failure); + x2ap_asn_print(pdu_failure, pdu_str, sizeof(pdu_str)); + printf("%s \n", pdu_str); +} diff --git a/simulators/e2sim/src/ASN1/lib/asn_x2ap.hpp b/simulators/e2sim/src/ASN1/lib/asn_x2ap.hpp new file mode 100644 index 0000000..d0c02d2 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_x2ap.hpp @@ -0,0 +1,72 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#ifndef ASN_X2AP_HPP +#define ASN_X2AP_HPP + +#include +#include +#include + +#include "e2ap_config.hpp" + +typedef struct c__dummy00 x2ap_pdu_t; + +/*----------------------------------------------------------------------- + COMMON ROUTINES +------------------------------------------------------------------------- +*/ + +x2ap_pdu_t* new_x2ap_pdu(void); + +void x2ap_asn_print(x2ap_pdu_t* pdu, char* buf, size_t buf_size); + +int x2ap_asn_per_encode(x2ap_pdu_t* pdu, unsigned char* buf, size_t buf_size, + char* err_buf, size_t err_buf_size); + +int x2ap_asn_per_decode(x2ap_pdu_t* pdu, unsigned char const* buf, size_t buf_size, + char* err_buf, size_t err_buf_size); + +int x2ap_get_index(x2ap_pdu_t* pdu); + +int x2ap_get_procedureCode(x2ap_pdu_t* pdu); + +/*----------------------------------------------------------------------- + MESSAGE GENERATORS +------------------------------------------------------------------------- +*/ +//X2Setup +bool x2ap_init_X2SetupRequest(x2ap_pdu_t* pdu); + +bool x2ap_create_X2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg); + +bool x2ap_create_X2SetupResponse(x2ap_pdu_t* pdu, eNB_config &cfg); + +bool x2ap_create_X2SetupFailure(x2ap_pdu_t* pdu); + +//ENDCX2Setup +bool x2ap_create_ENDCX2SetupRequest(x2ap_pdu_t* pdu, eNB_config &cfg); + +/*----------------------------------------------------------------------- + TESTS +------------------------------------------------------------------------- +*/ +void test_X2Setup_codec(void); + +#endif diff --git a/simulators/e2sim/src/ASN1/lib/asn_x2ap_wrapper.hpp b/simulators/e2sim/src/ASN1/lib/asn_x2ap_wrapper.hpp new file mode 100644 index 0000000..96ea81c --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/asn_x2ap_wrapper.hpp @@ -0,0 +1,78 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef ASN_X2AP_PDU_WRAPPER_HPP +#define ASN_X2AP_PDU_WRAPPER_HPP + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define X2AP_PDU_DEFAULT_BUFFER_SIZE 4096 + +//Credit: copied from E2-Manager +struct X2APpduWrapper +{ + unsigned char* m_allocation_buffer; + size_t m_allocation_buffer_size; + + X2APpduWrapper(size_t allocation_buffer_size = X2AP_PDU_DEFAULT_BUFFER_SIZE) + { + m_allocation_buffer_size = allocation_buffer_size; + m_allocation_buffer = 0; + if (allocation_buffer_size) { + m_allocation_buffer = + new (std::nothrow) unsigned char[allocation_buffer_size]; + m_allocator.reset( + m_allocation_buffer, + m_allocation_buffer_size); // initialized correctly on + // allocation failure. + } + } + + ~X2APpduWrapper() + { + if (m_allocation_buffer) + delete[] m_allocation_buffer; + } + + asn::allocator& ref_allocator() { return m_allocator; } + + X2AP_PDU& ref_pdu() { return m_pdu; } + + // reset pdu and allocation buffer. Allows reusing. + void clear() + { + m_pdu.clear(); + m_allocator.reset(m_allocation_buffer, m_allocation_buffer_size); + } + + private: + X2AP_PDU m_pdu; + asn::allocator m_allocator; +}; + + +#endif diff --git a/simulators/e2sim/src/ASN1/lib/e2ap_config.hpp b/simulators/e2sim/src/ASN1/lib/e2ap_config.hpp new file mode 100644 index 0000000..9182ed1 --- /dev/null +++ b/simulators/e2sim/src/ASN1/lib/e2ap_config.hpp @@ -0,0 +1,160 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef E2AP_CONFIG_HPP +#define E2AP_CONFIG_HPP + +#include +#include + +enum enum_Transmission_Bandwidth { + enum_bw6, + enum_bw15, + enum_bw25, + enum_bw50, + enum_bw75, + enum_bw100, + enum_bw1 +}; + +enum enum_NRNRB{ + enum_nrb11, enum_nrb18, enum_nrb24, enum_nrb25, enum_nrb31, enum_nrb32, + enum_nrb38, enum_nrb51, enum_nrb52, enum_nrb65, enum_nrb66, enum_nrb78, + enum_nrb79, enum_nrb93, enum_nrb106, enum_nrb107, enum_nrb121, + enum_nrb132, enum_nrb133, enum_nrb135, enum_nrb160, enum_nrb162, + enum_nrb189, enum_nrb216, enum_nrb217, enum_nrb245, enum_nrb264, + enum_nrb270, enum_nrb273 +}; + +enum enum_NRSCS { + enum_scs15, enum_scs30, enum_scs60, enum_scs120 +}; + +class eNB_config { + public: + uint8_t* pLMN_Identity; + uint8_t* macro_eNB_ID; + int64_t pCI; + uint8_t* tAC; + uint8_t* eUTRANcellIdentifier; + + int64_t uL_EARFCN; + int64_t dL_EARFCN; + + enum_Transmission_Bandwidth uL_Bandwidth; + enum_Transmission_Bandwidth dL_Bandwidth; + + /*Default Constructor*/ + eNB_config() { + pLMN_Identity = (uint8_t*)"abc"; + macro_eNB_ID = (uint8_t*)"5"; + pCI = 0; + tAC = (uint8_t*)"ab"; + eUTRANcellIdentifier = (uint8_t*)"def"; + uL_EARFCN = 21400; + dL_EARFCN = 3400; + uL_Bandwidth = enum_bw25; + dL_Bandwidth = enum_bw50; + } +}; + +class gNB_config { + public: + uint8_t* pLMN_Identity; + uint8_t* gNB_ID; + int64_t nrpCI; + uint8_t* tAC; + uint8_t* nRcellIdentifier; + + int64_t uL_nRARFCN; + int64_t dL_nRARFCN; + + enum enum_NRNRB uL_NRNRB; + enum enum_NRNRB dL_NRNRB; + + enum enum_NRSCS uL_NRSCS; + enum enum_NRSCS dL_NRSCS; + + uint8_t ul_freqBandIndicatorNr; + uint8_t dl_freqBandIndicatorNr; + + std::string measurementTimingConfiguration; + + /*Default Constructor*/ + gNB_config() { + pLMN_Identity = (uint8_t*)"xyz"; + gNB_ID = (uint8_t*)"3"; + nrpCI = 1; + tAC = (uint8_t*)"ab"; + nRcellIdentifier = (uint8_t*)"gnb_id_123"; + uL_nRARFCN = 21400; + dL_nRARFCN = 21500; + + uL_NRNRB = enum_nrb11; + dL_NRNRB = enum_nrb121; + + uL_NRSCS = enum_scs15; + dL_NRSCS = enum_scs120; + + ul_freqBandIndicatorNr = 11; + dl_freqBandIndicatorNr = 12; + + measurementTimingConfiguration = "dummy timing"; + } +}; + +enum enum_RICactionType { + RICactionType_report, + RICactionType_insert, + RICactionType_policy +}; + +enum enum_RICcause { + RICcause_radioNetwork = 1, + RICcause_transport, + RICcause_protocol, + RICcause_misc, + RICcause_ric +}; + +struct RIC_action_t { + unsigned char action_id; + enum_RICactionType action_type; + bool isAdmitted = false; //for response/failure only + enum_RICcause notAdmitted_cause; //for response/failure only + unsigned int notAdmitted_subCause; //for response/failure only + + RIC_action_t() {;} + + RIC_action_t(unsigned char id, enum_RICactionType type) + { + action_id = id; + action_type = type; + } +}; + +struct RICsubscription_params_t { + uint16_t request_id = 0; + uint16_t seq_number = 0; + uint16_t ran_func_id = 0; + std::string event_trigger_def = ""; + + std::vector actionList; +} ; + +#endif diff --git a/simulators/e2sim/src/E2AP/e2ap_asn_codec.cpp b/simulators/e2sim/src/E2AP/e2ap_asn_codec.cpp new file mode 100644 index 0000000..a1a6bee --- /dev/null +++ b/simulators/e2sim/src/E2AP/e2ap_asn_codec.cpp @@ -0,0 +1,59 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include "e2ap_asn_codec.hpp" + +void e2ap_encode_pdu(e2ap_pdu_t* pdu, unsigned char* buf, int buf_size, int &encoded_size) +{ + char err_buf[ERROR_MESSAGE_BUFFER]; + + encoded_size = e2ap_asn_per_encode(pdu, buf, buf_size, err_buf, sizeof(err_buf)); + + if(encoded_size != -1) + { + LOG_D("[E2AP] ASN Encode successful, encoded_size = %d", encoded_size); + } + else + { + LOG_E("[E2AP] Encode error: %s", err_buf); + exit(1); + } + +} + +void e2ap_decode_pdu(e2ap_pdu_t* pdu, unsigned char* buf, int &encoded_size) +{ + char err_buf[ERROR_MESSAGE_BUFFER]; + + int rc = e2ap_asn_per_decode(pdu, buf, encoded_size, err_buf, sizeof(err_buf)); + if(rc == -1) { + LOG_E("[E2AP] Decode error: %s", err_buf); + } else { + LOG_D("[E2AP] ASN decode successful"); + } +} + +void e2ap_print_pdu(e2ap_pdu_t* pdu) +{ + char pdu_str[PDU_PRINT_BUFFER]; + + e2ap_asn_print(pdu, pdu_str, sizeof(pdu_str)); + + LOG_D("[E2AP] %s", pdu_str); +} diff --git a/simulators/e2sim/src/E2AP/e2ap_asn_codec.hpp b/simulators/e2sim/src/E2AP/e2ap_asn_codec.hpp new file mode 100644 index 0000000..6fd6170 --- /dev/null +++ b/simulators/e2sim/src/E2AP/e2ap_asn_codec.hpp @@ -0,0 +1,34 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef E2AP_ASN_CODEC_HPP +#define E2AP_ASN_CODEC_HPP + +#include "e2sim_defs.h" +#include "asn_e2ap.hpp" + +#define ERROR_MESSAGE_BUFFER 1024 +#define PDU_PRINT_BUFFER 4096 + +void e2ap_encode_pdu(e2ap_pdu_t* pdu, unsigned char* buf, int buf_size, int &encoded_size); + +void e2ap_decode_pdu(e2ap_pdu_t* pdu, unsigned char* buf, int &encoded_size); + +void e2ap_print_pdu(e2ap_pdu_t* pdu); + +#endif diff --git a/simulators/e2sim/src/E2AP/e2ap_message_handler.cpp b/simulators/e2sim/src/E2AP/e2ap_message_handler.cpp new file mode 100644 index 0000000..d511949 --- /dev/null +++ b/simulators/e2sim/src/E2AP/e2ap_message_handler.cpp @@ -0,0 +1,240 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#include "e2ap_message_handler.hpp" + +void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data) +{ + //decode the data into E2AP-PDU + e2ap_pdu_t* pdu = new_e2ap_pdu(); + + e2ap_decode_pdu(pdu, data.buffer, data.len); + + e2ap_print_pdu(pdu); + + int index = e2ap_get_index(pdu); + int procedureCode = e2ap_get_procedureCode(pdu); + + LOG_I("[E2AP] Unpacked E2AP-PDU: index = %d, procedureCode = %d\n", index, procedureCode); + + switch(procedureCode) + { + case 6: //X2Setup + switch(index) + { + case 1: //initiatingMessage + LOG_D("[E2AP] Received X2-SETUP-REQUEST"); + e2ap_handle_X2SetupRequest(pdu, socket_fd); + break; + + case 2: //successfulOutcome + LOG_D("[E2AP] Received X2-SETUP-RESPONSE"); + //e2ap_handle_X2SetupResponse(pdu, socket_fd); + break; + + case 3: + break; + + default: + LOG_E("[E2AP] Invalid message index=%d in E2AP-PDU", index); + break; + } + break; + + case 36: //ENDCX2Setup + switch(index) + { + case 1: //initiatingMessage + LOG_D("[E2AP] Received ENDC-X2-SETUP-REQUEST"); + e2ap_handle_ENDCX2SetupRequest(pdu, socket_fd); + break; + + case 2: //successfulOutcome + LOG_D("[E2AP] Received ENDC-X2-SETUP-RESPONSE"); + //x2ap_handle_X2SetupResponse(pdu, socket_fd); + break; + + case 3: + LOG_D("[E2AP] Received ENDC-X2-SETUP-FAILURE"); + break; + + default: + LOG_E("[E2AP] Invalid message index=%d in E2AP-PDU", index); + break; + } + break; + + case 201: //RIC SUBSCRIPTION + switch(index) + { + case 1: //initiatingMessage + LOG_D("[E2AP] Received RIC-SUBSCRIPTION-REQUEST"); + e2ap_handle_RICSubscriptionRequest(pdu, socket_fd); + break; + + case 2: + LOG_D("[E2AP] Received RIC-SUBSCRIPTION-RESPONSE"); + break; + + case 3: + LOG_D("[E2AP] Received RIC-SUBSCRIPTION-FAILURE"); + break; + + default: + LOG_E("[E2AP] Invalid message index=%d in E2AP-PDU", index); + break; + } + break; + + default: + LOG_E("[E2AP] No available handler for procedureCode=%d", procedureCode); + break; + } +} + +void e2ap_handle_X2SetupRequest(e2ap_pdu_t* pdu, int &socket_fd) +{ + /* + Simply send back X2SetupResponse + Todo: add more handling options (failure, duplicated request, etc.) + */ + + e2ap_pdu_t* res_pdu = new_e2ap_pdu(); + eNB_config cfg; + + e2ap_create_X2SetupResponse(res_pdu, cfg); + LOG_D("[E2AP] Created X2-SETUP-RESPONSE") + + e2ap_print_pdu(res_pdu); + + //encode response pdu into buffer + sctp_buffer_t res_data; + e2ap_encode_pdu(res_pdu, res_data.buffer, sizeof(res_data.buffer), res_data.len); + + //send response data over sctp + if(sctp_send_data(socket_fd, res_data) > 0) { + LOG_I("[SCTP] Sent X2-SETUP-RESPONSE"); + } else { + LOG_E("[SCTP] Unable to send X2-SETUP-RESPONSE to peer"); + } +} + +void e2ap_handle_X2SetupResponse(e2ap_pdu_t* pdu, int &socket_fd) +{ + ; +} + +void e2ap_handle_ENDCX2SetupRequest(e2ap_pdu_t* pdu, int &socket_fd) +{ + /* + Simply send back ENDCX2SetupResponse + Todo: add more handling options (failure, duplicated request, etc.) + */ + + e2ap_pdu_t* res_pdu = new_e2ap_pdu(); + gNB_config gnb_cfg; + + e2ap_create_ENDCX2SetupResponse(res_pdu, gnb_cfg); + LOG_D("[E2AP] Created ENDC-X2-SETUP-RESPONSE"); + + e2ap_print_pdu(res_pdu); + + sctp_buffer_t data; + e2ap_encode_pdu(res_pdu, data.buffer, sizeof(data.buffer), data.len); + + //send response data over sctp + if(sctp_send_data(socket_fd, data) > 0) { + LOG_I("[SCTP] Sent ENDC-X2-SETUP-RESPONSE"); + } else { + LOG_E("[SCTP] Unable to send ENDC-X2-SETUP-RESPONSE to peer"); + } +} + +void e2ap_handle_RICSubscriptionRequest(e2ap_pdu_t* pdu, int &socket_fd) +{ + RICsubscription_params_t params; + e2ap_parse_RICsubscriptionRequest(pdu, params); + + /* Example handling logic + - Accept if request id is even-numbered -> send back response + in this case, accept every other actions + + - Reject if request id is odd-numbered -> send back failure + */ + + e2ap_pdu_t* res_pdu = new_e2ap_pdu(); + bool is_failure = false; + + if(params.request_id % 2 == 0) + { + for(size_t i = 0; i < params.actionList.size(); i++) + { + if(i%2 == 0){ + params.actionList[i].isAdmitted = true; + } else { + params.actionList[i].isAdmitted = false; + params.actionList[i].notAdmitted_cause = RICcause_radioNetwork; + params.actionList[i].notAdmitted_subCause = 5; + } + } + + e2ap_create_RICsubscriptionResponse(res_pdu, params); + LOG_I("[E2AP] Created RIC-SUBSCRIPTION-RESPONSE"); + } + else + { + is_failure = true; + + for(size_t i = 0; i < params.actionList.size(); i++) + { + params.actionList[i].isAdmitted = false; + params.actionList[i].notAdmitted_cause = RICcause_radioNetwork; + params.actionList[i].notAdmitted_subCause = 5; + } + + e2ap_create_RICsubscriptionFailure(res_pdu, params); + LOG_I("[E2AP] Created RIC-SUBSCRIPTION-FAILURE"); + } + + e2ap_print_pdu(res_pdu); + + //Encode into buffer + sctp_buffer_t data; + e2ap_encode_pdu(res_pdu, data.buffer, sizeof(data.buffer), data.len); + + //send response data over sctp + if(sctp_send_data(socket_fd, data) > 0) + { + if(is_failure) { + LOG_I("[SCTP] Sent RIC-SUBSCRIPTION-FAILURE"); + } + else { + LOG_I("[SCTP] Sent RIC-SUBSCRIPTION-RESPONSE"); + } + } + else + { + if(is_failure) { + LOG_I("[SCTP] Unable to send RIC-SUBSCRIPTION-FAILURE"); + } + else { + LOG_E("[SCTP] Unable to send RIC-SUBSCRIPTION-RESPONSE"); + } + } + +} diff --git a/simulators/e2sim/src/E2AP/e2ap_message_handler.hpp b/simulators/e2sim/src/E2AP/e2ap_message_handler.hpp new file mode 100644 index 0000000..42bb80f --- /dev/null +++ b/simulators/e2sim/src/E2AP/e2ap_message_handler.hpp @@ -0,0 +1,37 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef E2AP_MESSAGE_HANDLER_HPP +#define E2AP_MESSAGE_HANDLER_HPP + +#include "e2sim_defs.h" +#include "e2sim_sctp.hpp" +#include "asn_e2ap.hpp" +#include "e2ap_asn_codec.hpp" + +void e2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data); + +void e2ap_handle_X2SetupRequest(e2ap_pdu_t* pdu, int &socket_fd); + +void e2ap_handle_X2SetupResponse(e2ap_pdu_t* pdu, int &socket_fd); + +void e2ap_handle_ENDCX2SetupRequest(e2ap_pdu_t* pdu, int &socket_fd); + +void e2ap_handle_RICSubscriptionRequest(e2ap_pdu_t* pdu, int &socket_fd); + +#endif diff --git a/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.c b/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.c new file mode 100644 index 0000000..9b44adf --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.c @@ -0,0 +1,180 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "Pendulum_asn_codec.h" +#include "per_decoder.h" +#include "per_encoder.h" + +#include "OCTET_STRING.h" + +static int ASN_DEBUG = 0; + +int pendulum_asn_encode(Pendulum_t *pend, uint8_t **buffer, uint32_t *len) +{ + ssize_t encoded; + assert(pend != NULL); + assert(buffer != NULL); + + encoded = aper_encode_to_new_buffer(&asn_DEF_Pendulum, 0, pend, (void **)buffer); + if(encoded < 0){ + perror("Failed to aper encode\n"); + exit(1); + } + + *len = encoded; + //ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_Pendulum, pend); + return encoded; +} + +int pendulum_asn_decode(Pendulum_t *pend, const uint8_t *const buffer, const int len) +{ + asn_dec_rval_t dec_ret; + + // THIS IS IMPORTANT, otherwise: Segmentation fault + memset(pend, 0, sizeof(*pend)); + + assert(buffer != NULL); + + dec_ret = aper_decode(NULL, &asn_DEF_Pendulum, (void **)&pend, buffer, len, 0, 0); + if (dec_ret.code != RC_OK) { + fprintf(stderr, "ERROR: Failed to decode asn1 message\n"); + return -1; + } + + if(ASN_DEBUG) + xer_fprint(stdout, &asn_DEF_Pendulum, pend); + + return 0; +} + +int pendulum_create_asn_msg(uint8_t **buffer, long sequence, + double angle, double torque, const char* msg) +{ + //Create Pendulum payload struct + Pendulum_t *pend; + + pend = calloc(1, sizeof(Pendulum_t)); + if(!pend){ + perror("calloc() failed"); + exit(1); + } + + //convert char* to PrintableString_t* + PrintableString_t *payload = calloc(1, sizeof(PrintableString_t)); + payload->buf = (uint8_t *)msg; + payload->size = strlen(msg); + + pend->strval = payload; + pend->sequence = &sequence; + pend->angle = ∠ + pend->torque = &torque; + + if (ASN_DEBUG) + xer_fprint(stdout, &asn_DEF_Pendulum, pend); + + //Encode Pendulum payload struct to asn1 buffer + uint32_t len; + if(pendulum_asn_encode(pend, buffer, &len) < 0) + { + return -1; + } + //fprintf(stderr, "len = %d\n", len); + + return len; +} + +long pendulum_get_sequence(const uint8_t *const buffer, const int len) +{ + Pendulum_t pend; + pendulum_asn_decode(&pend, buffer, len); + + return *(pend.sequence); +} + +double pendulum_get_angle(const uint8_t *const buffer, const int len) +{ + Pendulum_t pend; + pendulum_asn_decode(&pend, buffer, len); + + return *(pend.angle); +} + +double pendulum_get_torque(const uint8_t *const buffer, const int len) +{ + Pendulum_t pend; + pendulum_asn_decode(&pend, buffer, len); + + return *(pend.torque); +} + +char* pendulum_get_strval(const uint8_t *const buffer, const int len) +{ + Pendulum_t pend; + char* str; + + pendulum_asn_decode(&pend, buffer, len); + + str = (char*)pend.strval->buf; + + return str; +} + +void test_pendulum_msg(void) +{ + uint8_t *buffer = NULL; + uint32_t len = 0; + double angle = 1.9; + len = pendulum_create_asn_msg(&buffer, 0, angle, 0, NULL); + + double ex_angle = pendulum_get_angle(buffer, len); + fprintf(stderr, "Extracted angle = %f\n", ex_angle); +} + +void test_pendulum_asn1(void) +{ + fprintf(stderr, "test_pendulum_asn1\n"); + + Pendulum_t *pend; + + long sequence = 0; /* OPTIONAL */ + double angle = 1.5; /* OPTIONAL */ + //double torque = 0.7; /* OPTIONAL */ + + pend = calloc(1, sizeof(Pendulum_t)); + if(!pend){ + perror("calloc() failed"); + exit(1); + } + + pend->sequence = &sequence; + pend->angle = ∠ + //pend->torque = &torque; + + xer_fprint(stdout, &asn_DEF_Pendulum, pend); + + //encode + uint8_t *buffer = NULL; + uint32_t len; + pendulum_asn_encode(pend, &buffer, &len); + fprintf(stderr, "len = %d\n", len); + + //decode + Pendulum_t dec_pend; + pendulum_asn_decode(&dec_pend, buffer, len); +} diff --git a/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.h b/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.h new file mode 100644 index 0000000..3928caf --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Pendulum_asn_codec.h @@ -0,0 +1,46 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef PENDULUM_ASN_CODEC_H_ +#define PENDULUM_ASN_CODEC_H_ + +#include "Pendulum.h" + +int pendulum_asn_encode(Pendulum_t *pend, uint8_t **buffer, uint32_t *len); + +int pendulum_asn_decode(Pendulum_t *pend, const uint8_t *const buffer, const int len); + +int pendulum_create_asn_msg(uint8_t **buffer, long sequence, + double angle, double torque, const char* msg); + +long pendulum_get_sequence(const uint8_t *const buffer, const int len); + +double pendulum_get_angle(const uint8_t *const buffer, const int len); + +double pendulum_get_torque(const uint8_t *const buffer, const int len); + +char* pendulum_get_strval(const uint8_t *const buffer, const int len); + +//For testing only + +void test_pendulum_msg(void); + +void test_pendulum_asn1(void); + +#endif diff --git a/simulators/e2sim/src/ONS2019/Serial/adruino_serial.c b/simulators/e2sim/src/ONS2019/Serial/adruino_serial.c new file mode 100644 index 0000000..e67465c --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Serial/adruino_serial.c @@ -0,0 +1,98 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "stdio.h" +#include +#include + +#include "adruino_serial.h" + +int start_serial_inferface(int baudrate, char *serial_port) +{ + int fd = -1; + + fd = serialport_init(serial_port, baudrate); + if(fd == -1) { + fprintf(stderr, "couldn't open serial port %s\n", serial_port); + return -1; + } else { + fprintf(stderr, "Openning serial port: %s ...\n", serial_port); + } + + serialport_flush(fd); // take 2 seconds + fprintf(stderr, "Serial port ready!\n"); + + return fd; + +} + +int serial_readline(int fd, char* buf, int buf_max) +{ + if( fd == -1 ){ + perror("serial port not opened"); + return -1; + } + + memset(buf, 0, buf_max); + + do { + serialport_read_until(fd, buf, SERIAL_EOL_CHAR, buf_max, SERIAL_TIMEOUT); + } while( buf[0] == '\n' ); + + // serialport_read_until(fd, buf, SERIAL_EOL_CHAR, buf_max, SERIAL_TIMEOUT); + + return 0; +} + +int serial_writeline(int fd, char* buf) +{ + if(buf[strlen(buf)-1] != SERIAL_EOL_CHAR){ + //append EOL to buf + int len = strlen(buf); + buf[len] = SERIAL_EOL_CHAR; + buf[len+1] = '\0'; + } + + serialport_write(fd, buf); + + return 0; +} + +//For testing only +void test_adruino_serial(void) +{ + int fd; + char buf[MAX_SERIAL_BUFFER]; + + fd = start_serial_inferface(DEFAULT_BAUDRATE, DEFAULT_SERIAL_PORT); + + while(1){ + fprintf(stderr, "[E2 Agent]: "); + fgets(buf, MAX_SERIAL_BUFFER, stdin); + + // serialport_write(fd, "hello\n"); + //serialport_write(fd, buf); + serial_writeline(fd, buf); + + serial_readline(fd, buf, MAX_SERIAL_BUFFER); + fprintf(stderr, "[Adruino] %s", buf); + } + + return; +} diff --git a/simulators/e2sim/src/ONS2019/Serial/adruino_serial.h b/simulators/e2sim/src/ONS2019/Serial/adruino_serial.h new file mode 100644 index 0000000..c061f8a --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Serial/adruino_serial.h @@ -0,0 +1,40 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef ADRUINO_SERIAL_H +#define ADRUINO_SERIAL_H + +#include "arduino-serial-lib.h" + +#define MAX_SERIAL_BUFFER 256 +#define DEFAULT_SERIAL_PORT "/dev/ttyACM0" +#define DEFAULT_BAUDRATE 115200 +#define SERIAL_EOL_CHAR '\n' +#define SERIAL_TIMEOUT 5000 //ms + +int start_serial_inferface(int baudrate, char *serial_port); + +int serial_readline(int fd, char* buf, int buf_max); + +int serial_writeline(int fd, char* buf); + +//For testing only +void test_adruino_serial(void); + +#endif diff --git a/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.c b/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.c new file mode 100644 index 0000000..73cac84 --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.c @@ -0,0 +1,170 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// +// arduino-serial-lib -- simple library for reading/writing serial ports +// +// 2006-2013, Tod E. Kurt, http://todbot.com/blog/ +// + +#include "arduino-serial-lib.h" + +#include // Standard input/output definitions +#include // UNIX standard function definitions +#include // File control definitions +#include // Error number definitions +#include // POSIX terminal control definitions +#include // String function definitions +#include + +// uncomment this to debug reads +//#define SERIALPORTDEBUG + +// takes the string name of the serial port (e.g. "/dev/tty.usbserial","COM1") +// and a baud rate (bps) and connects to that port at that speed and 8N1. +// opens the port in fully raw mode so you can send binary data. +// returns valid fd, or -1 on error +int serialport_init(const char* serialport, int baud) +{ + struct termios toptions; + int fd; + + //fd = open(serialport, O_RDWR | O_NOCTTY | O_NDELAY); + fd = open(serialport, O_RDWR | O_NONBLOCK ); + + if (fd == -1) { + perror("serialport_init: Unable to open port s"); + return -1; + } + + //int iflags = TIOCM_DTR; + //ioctl(fd, TIOCMBIS, &iflags); // turn on DTR + //ioctl(fd, TIOCMBIC, &iflags); // turn off DTR + + if (tcgetattr(fd, &toptions) < 0) { + perror("serialport_init: Couldn't get term attributes"); + return -1; + } + speed_t brate = baud; // let you override switch below if needed + switch(baud) + { + case 4800: brate=B4800; break; + case 9600: brate=B9600; break; + #ifdef B14400 + case 14400: brate=B14400; break; + #endif + case 19200: brate=B19200; break; + #ifdef B28800 + case 28800: brate=B28800; break; + #endif + case 38400: brate=B38400; break; + case 57600: brate=B57600; break; + case 115200: brate=B115200; break; + } + cfsetispeed(&toptions, brate); + cfsetospeed(&toptions, brate); + + // 8N1 + toptions.c_cflag &= ~PARENB; + toptions.c_cflag &= ~CSTOPB; + toptions.c_cflag &= ~CSIZE; + toptions.c_cflag |= CS8; + // no flow control + toptions.c_cflag &= ~CRTSCTS; + + //toptions.c_cflag &= ~HUPCL; // disable hang-up-on-close to avoid reset + + toptions.c_cflag |= CREAD | CLOCAL; // turn on READ & ignore ctrl lines + toptions.c_iflag &= ~(IXON | IXOFF | IXANY); // turn off s/w flow ctrl + + toptions.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // make raw + toptions.c_oflag &= ~OPOST; // make raw + + // see: http://unixwiz.net/techtips/termios-vmin-vtime.html + toptions.c_cc[VMIN] = 0; + toptions.c_cc[VTIME] = 0; + //toptions.c_cc[VTIME] = 20; + + tcsetattr(fd, TCSANOW, &toptions); + if( tcsetattr(fd, TCSAFLUSH, &toptions) < 0) { + perror("init_serialport: Couldn't set term attributes"); + return -1; + } + + return fd; +} + +// +int serialport_close( int fd ) +{ + return close( fd ); +} + +// +int serialport_writebyte( int fd, uint8_t b) +{ + int n = write(fd,&b,1); + if( n!=1) + return -1; + return 0; +} + +// +int serialport_write(int fd, const char* str) +{ + int len = strlen(str); + int n = write(fd, str, len); + if( n!=len ) { + perror("serialport_write: couldn't write whole string\n"); + return -1; + } + return 0; +} + +// +int serialport_read_until(int fd, char* buf, char until, int buf_max, int timeout) +{ + char b[1]; // read expects an array, so we give it a 1-byte array + int i=0; + do { + int n = read(fd, b, 1); // read a char at a time + if( n==-1) return -1; // couldn't read + if( n==0 ) { + usleep( 1 * 1000 ); // wait 1 msec try again + timeout--; + if( timeout==0 ) return -2; + continue; + } +#ifdef SERIALPORTDEBUG + fprintf(stderr, "serialport_read_until: i=%d, n=%d b='%c'\n",i,n,b[0]); // debug +#endif + buf[i] = b[0]; + i++; + } while( b[0] != until && i < buf_max && timeout>0 ); + + buf[i] = 0; // null terminate the string + return 0; +} + +// +int serialport_flush(int fd) +{ + sleep(2); //required to make flush work, for some reason + return tcflush(fd, TCIOFLUSH); +} diff --git a/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.h b/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.h new file mode 100644 index 0000000..74fe592 --- /dev/null +++ b/simulators/e2sim/src/ONS2019/Serial/arduino-serial-lib.h @@ -0,0 +1,39 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// +// arduino-serial-lib -- simple library for reading/writing serial ports +// +// 2006-2013, Tod E. Kurt, http://todbot.com/blog/ +// + + +#ifndef __ARDUINO_SERIAL_LIB_H__ +#define __ARDUINO_SERIAL_LIB_H__ + +#include // Standard types + +int serialport_init(const char* serialport, int baud); +int serialport_close(int fd); +int serialport_writebyte( int fd, uint8_t b); +int serialport_write(int fd, const char* str); +int serialport_read_until(int fd, char* buf, char until, int buf_max,int timeout); +int serialport_flush(int fd); + +#endif diff --git a/simulators/e2sim/src/ONS2019/demo_setup.txt b/simulators/e2sim/src/ONS2019/demo_setup.txt new file mode 100644 index 0000000..03cd1d6 --- /dev/null +++ b/simulators/e2sim/src/ONS2019/demo_setup.txt @@ -0,0 +1,14 @@ +# DEMO March 20, 2019 + ## E2 Agent Laptop with IP x.x.x.x + - Connect to adruino via USB + - Connect to E2 Termination Desktop via Ethernet + - Run E2 Agent: $E2SIM_DIR/build/e2sim x.x.x.x + + ## E2 Termination Desktop + - Run xApp + cd $E2SIM_DIR/rmr_interface/tests/pendulum_xapp + bash run_receiver + + - Run E2 Termination + cd $E2SIM_DIR + ./build_and_run_e2sim diff --git a/simulators/e2sim/src/ONS2019/pendulum.asn1 b/simulators/e2sim/src/ONS2019/pendulum.asn1 new file mode 100644 index 0000000..686d2c0 --- /dev/null +++ b/simulators/e2sim/src/ONS2019/pendulum.asn1 @@ -0,0 +1,12 @@ +PendulumModule DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +Pendulum ::= SEQUENCE { + sequence INTEGER OPTIONAL, + angle REAL OPTIONAL, + torque REAL OPTIONAL, + strval PrintableString OPTIONAL +} + +END diff --git a/simulators/e2sim/src/SCTP/e2sim_sctp.c b/simulators/e2sim/src/SCTP/e2sim_sctp.c new file mode 100644 index 0000000..b4880f9 --- /dev/null +++ b/simulators/e2sim/src/SCTP/e2sim_sctp.c @@ -0,0 +1,173 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include //for close() +#include +#include +#include +#include +#include //for inet_ntop() +#include + +#include "e2sim_sctp.h" + +const int CLIENT_SEND_COUNT = 1; +const int SERVER_LISTEN_QUEUE_SIZE = 10; + +int sctp_start_server(const char *server_ip_str, const int server_port) +{ + if(server_port < 1 || server_port > 65535) { + fprintf(stderr, "Invalid port number (%d). Valid values are between 1 and 65535.\n", server_port); + return -1; + } + + int server_fd; + if((server_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) == -1) { + perror("socket"); + return -1; + } + + struct sockaddr_in server_addr; + memset(&server_addr, 0, sizeof(struct sockaddr_in)); + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(server_port); + server_addr.sin_addr.s_addr = inet_addr(server_ip_str); + + if(bind(server_fd, (struct sockaddr*)&server_addr, sizeof(server_addr)) == -1) { + perror("bind"); + return -1; + } + + if(listen(server_fd, SERVER_LISTEN_QUEUE_SIZE) != 0) { + perror("listen"); + return -1; + } + + assert(server_fd != 0); + + fprintf(stderr, "SCTP server started on %s:%d\n", server_ip_str, server_port); + + return server_fd; +} + +int sctp_start_client(const char *server_ip_str, const int server_port) +{ + int client_fd; + + if((client_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)) == -1) + { + perror("socket"); + return -1; + } + + struct sockaddr_in peer_addr; + memset(&peer_addr, 0, sizeof(struct sockaddr_in)); + peer_addr.sin_family = AF_INET; + peer_addr.sin_port = htons(server_port); + peer_addr.sin_addr.s_addr = inet_addr(server_ip_str); + // if(inet_pton(AF_INET, server_ip, &(peer_addr.sin_addr)) != 1) { + // printf("Error converting IP address (%s) to sockaddr_in structure\n", server_ip); + // return 0; + // } + + fprintf(stderr, "Connecting to server at %s:%d ...", server_ip_str, server_port); + if(connect(client_fd, (struct sockaddr*)&peer_addr, sizeof(peer_addr)) == -1) { + perror("connect"); + return -1; + } + + assert(client_fd != 0); + + fprintf(stderr, "OK\n"); + + return client_fd; + +} + +//ssize_t sctp_send_to_socket(int sockfd, const void* buf, size_t len) +int sctp_send_to_socket(int sockfd, const void* buf, size_t len) +{ + int sent_len = 0; + + sent_len = send(sockfd, buf, len, 0); + + if(sent_len == -1) + { + perror("sctp_send_to_socket"); + return -1; + } + + return sent_len; +} + +// int sctp_recv_from_socket(int sockfd, void *buf, size_t buf_size) +// { +// //int len = 0; +// +// memset(buf, 0, buf_size); +// +// int len = recv(sockfd, &buf, buf_size, 0); +// if(len == -1) +// { +// perror("sctp_recv_from_socket"); +// return -1; +// } +// +// return len; +// } + + +//test only +void client_send_multiple_test_msg(int client_fd) +{ + char buf[1024]; + int SEND_COUNT = 4; + + for(int i = 0; i < SEND_COUNT; i++) + { + fprintf(stderr, "Sending message %d of %d \n", i+1, SEND_COUNT); + + memset(buf, 0, sizeof(buf)); + snprintf(buf, sizeof(buf)-1, "DATA %d", i+1); + + if(send(client_fd, &buf, strlen(buf), 0) == -1) { + perror("send"); + return; + } + + memset(buf, 0, sizeof(buf)); + + if(recv(client_fd, &buf, sizeof(buf), 0) == -1) { + perror("recv"); + return; + } + + fprintf(stderr, "Server reply: %s\n", buf); + + sleep(1); + } + + fprintf(stderr, "Closing...\n"); + if(close(client_fd) == -1) { + perror("close"); + return; + } +} diff --git a/simulators/e2sim/src/SCTP/e2sim_sctp.cpp b/simulators/e2sim/src/SCTP/e2sim_sctp.cpp new file mode 100644 index 0000000..3d808c5 --- /dev/null +++ b/simulators/e2sim/src/SCTP/e2sim_sctp.cpp @@ -0,0 +1,229 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#include +#include +#include //for close() +#include +#include +#include +#include +#include //for inet_ntop() +#include + +#include "e2sim_sctp.hpp" +// #include "e2sim_defs.h" + +int sctp_start_server(const char *server_ip_str, const int server_port) +{ + if(server_port < 1 || server_port > 65535) { + LOG_E("Invalid port number (%d). Valid values are between 1 and 65535.\n", server_port); + exit(1); + } + + int server_fd, af; + struct sockaddr* server_addr; + size_t addr_len; + + struct sockaddr_in server4_addr; + memset(&server4_addr, 0, sizeof(struct sockaddr_in)); + + struct sockaddr_in6 server6_addr; + memset(&server6_addr, 0, sizeof(struct sockaddr_in6)); + + if(inet_pton(AF_INET, server_ip_str, &server4_addr.sin_addr) == 1) + { + server4_addr.sin_family = AF_INET; + server4_addr.sin_port = htons(server_port); + + server_addr = (struct sockaddr*)&server4_addr; + af = AF_INET; + addr_len = sizeof(server4_addr); + } + else if(inet_pton(AF_INET6, server_ip_str, &server6_addr.sin6_addr) == 1) + { + server6_addr.sin6_family = AF_INET6; + server6_addr.sin6_port = htons(server_port); + + server_addr = (struct sockaddr*)&server6_addr; + af = AF_INET6; + addr_len = sizeof(server6_addr); + } + else { + perror("inet_pton()"); + exit(1); + } + + if((server_fd = socket(af, SOCK_STREAM, IPPROTO_SCTP)) == -1) { + perror("socket"); + exit(1); + } + + if(bind(server_fd, server_addr, addr_len) == -1) { + perror("bind"); + exit(1); + } + + if(listen(server_fd, SERVER_LISTEN_QUEUE_SIZE) != 0) { + perror("listen"); + exit(1); + } + + assert(server_fd != 0); + + LOG_I("[SCTP] Server started on %s:%d", server_ip_str, server_port); + + return server_fd; +} + +int sctp_start_client(const char *server_ip_str, const int server_port) +{ + int client_fd, af; + + struct sockaddr* server_addr; + size_t addr_len; + + struct sockaddr_in server4_addr; + memset(&server4_addr, 0, sizeof(struct sockaddr_in)); + + struct sockaddr_in6 server6_addr; + memset(&server6_addr, 0, sizeof(struct sockaddr_in6)); + + if(inet_pton(AF_INET, server_ip_str, &server4_addr.sin_addr) == 1) + { + server4_addr.sin_family = AF_INET; + server4_addr.sin_port = htons(server_port); + + server_addr = (struct sockaddr*)&server4_addr; + af = AF_INET; + addr_len = sizeof(server4_addr); + } + else if(inet_pton(AF_INET6, server_ip_str, &server6_addr.sin6_addr) == 1) + { + server6_addr.sin6_family = AF_INET6; + server6_addr.sin6_port = htons(server_port); + + server_addr = (struct sockaddr*)&server6_addr; + af = AF_INET6; + addr_len = sizeof(server6_addr); + } + else { + perror("inet_pton()"); + exit(1); + } + + if((client_fd = socket(af, SOCK_STREAM, IPPROTO_SCTP)) == -1) + { + perror("socket"); + exit(1); + } + + LOG_I("[SCTP] Connecting to server at %s:%d ...", server_ip_str, server_port); + + if(connect(client_fd, server_addr, addr_len) == -1) { + perror("connect"); + exit(1); + } + + assert(client_fd != 0); + + LOG_I("[SCTP] Connection established"); + + return client_fd; + +} + +int sctp_accept_connection(const char *server_ip_str, const int server_fd) +{ + LOG_I("[SCTP] Waiting for new connection..."); + + struct sockaddr client_addr; + socklen_t client_addr_size; + int client_fd; + + //Blocking call + client_fd = accept(server_fd, &client_addr, &client_addr_size); + if(client_fd == -1){ + perror("accept()"); + close(client_fd); + exit(1); + } + + //Retrieve client IP_ADDR + char client_ip6_addr[INET6_ADDRSTRLEN], client_ip4_addr[INET_ADDRSTRLEN]; + if(strchr(server_ip_str, ':') != NULL) //IPv6 + { + struct sockaddr_in6* client_ipv6 = (struct sockaddr_in6*)&client_addr; + inet_ntop(AF_INET6, &(client_ipv6->sin6_addr), client_ip6_addr, INET6_ADDRSTRLEN); + LOG_I("[SCTP] New client connected from %s", client_ip6_addr); + } + else { + struct sockaddr_in* client_ipv4 = (struct sockaddr_in*)&client_addr; + inet_ntop(AF_INET, &(client_ipv4->sin_addr), client_ip4_addr, INET_ADDRSTRLEN); + LOG_I("[SCTP] New client connected from %s", client_ip4_addr); + } + + return client_fd; +} + +int sctp_send_data(int &socket_fd, sctp_buffer_t &data) +{ + int sent_len = send(socket_fd, (void*)(&(data.buffer[0])), data.len, 0); + + if(sent_len == -1) { + perror("[SCTP] sctp_send_data"); + exit(1); + } + + return sent_len; +} + +/* +Receive data from SCTP socket +Outcome of recv() +-1: exit the program +0: close the connection ++: new data +*/ +int sctp_receive_data(int &socket_fd, sctp_buffer_t &data) +{ + //clear out the data before receiving + memset(data.buffer, 0, sizeof(data.buffer)); + data.len = 0; + + //receive data from the socket + int recv_len = recv(socket_fd, &(data.buffer), sizeof(data.buffer), 0); + if(recv_len == -1) + { + perror("[SCTP] recv"); + exit(1); + } + else if (recv_len == 0) + { + LOG_I("[SCTP] Connection closed by remote peer"); + if(close(socket_fd) == -1) + { + perror("[SCTP] close"); + } + return -1; + } + + data.len = recv_len; + + return recv_len; +} diff --git a/simulators/e2sim/src/SCTP/e2sim_sctp.h b/simulators/e2sim/src/SCTP/e2sim_sctp.h new file mode 100644 index 0000000..c102df0 --- /dev/null +++ b/simulators/e2sim/src/SCTP/e2sim_sctp.h @@ -0,0 +1,39 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/*! \file e2sim_sctp.h + */ + +#ifndef E2SIM_SCTP_H +#define E2SIM_SCTP_H + +void *handle_connection(void *thread_data); + +int sctp_start_server(const char *server_ip_str, const int server_port); + +int sctp_start_client(const char *server_ip_str, const int server_port); + +int sctp_send_to_socket(int sockfd, const void *buf, size_t len); + +//int sctp_recv_from_socket(int sockfd, void *buf, size_t buf_size); + +//test only +void client_send_multiple_test_msg(int client_fd); + +#endif diff --git a/simulators/e2sim/src/SCTP/e2sim_sctp.hpp b/simulators/e2sim/src/SCTP/e2sim_sctp.hpp new file mode 100644 index 0000000..636f4e7 --- /dev/null +++ b/simulators/e2sim/src/SCTP/e2sim_sctp.hpp @@ -0,0 +1,39 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#ifndef E2SIM_SCTP_HPP +#define E2SIM_SCTP_HPP + +#include "e2sim_defs.h" + +const int SERVER_LISTEN_QUEUE_SIZE = 10; + +int sctp_start_server(const char *server_ip_str, const int server_port); + +int sctp_start_client(const char *server_ip_str, const int server_port); + +int sctp_accept_connection(const char *server_ip_str, const int server_fd); + +int sctp_send_data(int &socket_fd, sctp_buffer_t &data); + +int sctp_receive_data(int &socket_fd, sctp_buffer_t &data); + + + +#endif diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_failure.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_failure.xml new file mode 100644 index 0000000..f0b6262 --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_failure.xml @@ -0,0 +1,21 @@ + + + 36 + + + + + + 5 + + + + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_request.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_request.xml new file mode 100644 index 0000000..5f94d2e --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_request.xml @@ -0,0 +1,67 @@ + + + 36 + + + + + + 244 + + + + + + 21 + + + + 61 62 63 + + + 00110101000000000001 + + + + + + + 250 + + + + + + 0 + + 61 62 63 + + 0110010001100101011001100000 + + + 61 62 + + 61 62 63 + + + + 21400 + 3400 + + + + + + + + + + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_response.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_response.xml new file mode 100644 index 0000000..587b578 --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_endc_x2_setup_response.xml @@ -0,0 +1,36 @@ + + + 36 + + + + + + 246 + + + + + + 252 + + + + 02 F8 29 + + + 01001010100101010010101010101010 + + + + + + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_failure.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_failure.xml new file mode 100644 index 0000000..3b82969 --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_failure.xml @@ -0,0 +1,21 @@ + + + 6 + + + + + + 5 + + + + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_request.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_request.xml new file mode 100644 index 0000000..3589f28 --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_request.xml @@ -0,0 +1,57 @@ + + + 6 + + + + + + 21 + + + + 02 F8 39 + + + 00000000111000100000 + + + + + + + 20 + + + + + + 0 + + 02 F8 39 + + 0000000011100010000000000000 + + + 00 01 + + 02 F8 39 + + + + 21400 + 3400 + + + + + + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_response.xml b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_response.xml new file mode 100644 index 0000000..bab51d3 --- /dev/null +++ b/simulators/e2sim/src/X2AP/MESSAGES/XML/sample_x2_setup_response.xml @@ -0,0 +1,69 @@ + + + 6 + + + + + + 21 + + + + 02 F8 39 + + + 00000000111000110000 + + + + + + + 20 + + + + + + 0 + + 02 F8 39 + + 0000000011100011000000000000 + + + 00 01 + + 02 F8 39 + + + + 21400 + 3400 + + + + + + + + + + + 24 + + + + + 02 F8 39 + 00 00 + + + + + + + + + diff --git a/simulators/e2sim/src/X2AP/x2ap_asn_codec.c b/simulators/e2sim/src/X2AP/x2ap_asn_codec.c new file mode 100644 index 0000000..959e7ef --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_asn_codec.c @@ -0,0 +1,64 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "x2ap_asn_codec.h" +#include "per_decoder.h" +#include "per_encoder.h" + +/* Encode X2AP PDU ASN1 buffer*/ +int X2AP_ASN_encode(X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ + ssize_t encoded; + + assert(pdu != NULL); + assert(buffer != NULL); + assert(len != NULL); + + encoded = aper_encode_to_new_buffer(&asn_DEF_X2AP_PDU, 0, pdu, (void **)buffer); + + if (encoded < 0) + { + return -1; + } + + *len = encoded; + + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_PDU, pdu); + return encoded; +} + +/* Decode XASN1 buffer to X2AP PDU*/ +int X2AP_ASN_decode(X2AP_PDU_t *pdu, const uint8_t *const buffer, const int len) +{ + asn_dec_rval_t dec_ret; + + assert(buffer != NULL); + + dec_ret = aper_decode(NULL, &asn_DEF_X2AP_PDU, (void **)&pdu, buffer, + len, 0, 0); + + //xer_fprint(stdout, &asn_DEF_X2AP_PDU, pdu); + + if (dec_ret.code != RC_OK) { + fprintf(stderr, "ERROR: Failed to decode pdu\n"); + return -1; + } + + return 0; +} diff --git a/simulators/e2sim/src/X2AP/x2ap_asn_codec.cpp b/simulators/e2sim/src/X2AP/x2ap_asn_codec.cpp new file mode 100644 index 0000000..7f2e6be --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_asn_codec.cpp @@ -0,0 +1,59 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include "x2ap_asn_codec.hpp" + +void x2ap_encode_pdu(x2ap_pdu_t* pdu, unsigned char* buf, int buf_size, int &encoded_size) +{ + char err_buf[X2AP_ERROR_MESSAGE_BUFFER]; + + encoded_size = x2ap_asn_per_encode(pdu, buf, buf_size, err_buf, sizeof(err_buf)); + + if(encoded_size != -1) + { + LOG_D("[X2AP] ASN Encode successful, encoded_size = %d", encoded_size); + } + else + { + LOG_E("[X2AP] Encode error: %s", err_buf); + exit(1); + } + +} + +void x2ap_decode_pdu(x2ap_pdu_t* pdu, unsigned char* buf, int &encoded_size) +{ + char err_buf[X2AP_ERROR_MESSAGE_BUFFER]; + + int rc = x2ap_asn_per_decode(pdu, buf, encoded_size, err_buf, sizeof(err_buf)); + if(rc == -1) { + LOG_E("[X2AP] Decode error: %s", err_buf); + } else { + LOG_D("[X2AP] ASN decode successful"); + } +} + +void x2ap_print_pdu(x2ap_pdu_t* pdu) +{ + char pdu_str[X2AP_PDU_PRINT_BUFFER]; + + x2ap_asn_print(pdu, pdu_str, sizeof(pdu_str)); + + LOG_D("[X2AP] %s", pdu_str); +} diff --git a/simulators/e2sim/src/X2AP/x2ap_asn_codec.h b/simulators/e2sim/src/X2AP/x2ap_asn_codec.h new file mode 100644 index 0000000..bad3ae7 --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_asn_codec.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef X2AP_ASN_CODEC_H_ +#define X2AP_ASN_CODEC_H_ + +#include "X2AP-PDU.h" + +int X2AP_ASN_encode(X2AP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +__attribute__ ((warn_unused_result)); + +int X2AP_ASN_decode(X2AP_PDU_t *pdu, const uint8_t *const buffer, const int len); + +#endif diff --git a/simulators/e2sim/src/X2AP/x2ap_asn_codec.hpp b/simulators/e2sim/src/X2AP/x2ap_asn_codec.hpp new file mode 100644 index 0000000..a07f441 --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_asn_codec.hpp @@ -0,0 +1,34 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef X2AP_ASN_CODEC_HPP +#define X2AP_ASN_CODEC_HPP + +#include "e2sim_defs.h" +#include "asn_x2ap.hpp" + +#define X2AP_ERROR_MESSAGE_BUFFER 1024 +#define X2AP_PDU_PRINT_BUFFER 4096 + +void x2ap_encode_pdu(x2ap_pdu_t* pdu, unsigned char* buf, int buf_size, int &encoded_size); + +void x2ap_decode_pdu(x2ap_pdu_t* pdu, unsigned char* buf, int &encoded_size); + +void x2ap_print_pdu(x2ap_pdu_t* pdu); + +#endif diff --git a/simulators/e2sim/src/X2AP/x2ap_generate_messages.c b/simulators/e2sim/src/X2AP/x2ap_generate_messages.c new file mode 100644 index 0000000..db12a3e --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_generate_messages.c @@ -0,0 +1,113 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include +#include "x2ap_generate_messages.h" +#include "x2ap_asn_codec.h" +#include "e2sim_defs.h" + +int asn1_xer_print = 0; +int MAX_XML_BUFFER = 10000; + +void x2ap_fetch_pdu_from_XML(X2AP_PDU_t **pdu, char *filename) +{ + + uint8_t buf[MAX_XML_BUFFER]; + + asn_dec_rval_t rval; + size_t size; + FILE *f; + + char XML_path[200]; + char *work_dir = getenv(WORKDIR_ENV); + + strcpy(XML_path, work_dir); + strcat(XML_path, "/src/X2AP/MESSAGES/XML/"); + strcat(XML_path, filename); + + //printf("Generate X2AP PDU from XML file: %s\n", XML_path); + + f = fopen(XML_path, "r"); + assert(f); + size = fread(buf, 1, sizeof(buf), f); + if(size == 0 || size == sizeof(buf)) + { + fprintf(stderr, "%s: Too large input\n", XML_path); + exit(1); + } + + fclose(f); + + //printf("Decode the XER buffer\n"); + rval = xer_decode(NULL, &asn_DEF_X2AP_PDU, (void **)pdu, buf, size); + assert(rval.code == RC_OK); + +} + +uint32_t x2ap_generate_x2_setup_request(uint8_t **buffer) +{ + X2AP_PDU_t *pdu; + pdu = (X2AP_PDU_t *)calloc(1, sizeof(X2AP_PDU_t)); + + uint32_t len; + + char *XML_file = "sample_x2_setup_request.xml"; + + x2ap_fetch_pdu_from_XML(&pdu, XML_file); + + if(asn1_xer_print) + xer_fprint(stdout, &asn_DEF_X2AP_PDU, (void *)pdu); + + if(X2AP_ASN_encode(pdu, buffer, &len) < 0) + { + fprintf(stderr, "Failed to APER encode X2 Setup Request\n"); + return -1; + } + + return len; + +} + +uint32_t x2ap_generate_x2_setup_response(uint8_t **buffer) +{ + X2AP_PDU_t *pdu; + pdu = (X2AP_PDU_t *)calloc(1, sizeof(X2AP_PDU_t)); + + uint32_t len; + + char *XML_file = "sample_x2_setup_response.xml"; + + x2ap_fetch_pdu_from_XML(&pdu, XML_file); + + if(asn1_xer_print) + xer_fprint(stdout, &asn_DEF_X2AP_PDU, (void *)pdu); + + if(X2AP_ASN_encode(pdu, buffer, &len) < 0) + { + fprintf(stderr, "Failed to APER encode X2 Setup Request\n"); + return -1; + } + + return len; + +} diff --git a/simulators/e2sim/src/X2AP/x2ap_generate_messages.h b/simulators/e2sim/src/X2AP/x2ap_generate_messages.h new file mode 100644 index 0000000..53998b7 --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_generate_messages.h @@ -0,0 +1,31 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef X2AP_ENB_GENERATE_MESSAGES_H_ +#define X2AP_ENB_GENERATE_MESSAGES_H_ + +#include "X2AP-PDU.h" + +void x2ap_fetch_pdu_from_XML(X2AP_PDU_t **pdu, char *filename); + +uint32_t x2ap_generate_x2_setup_request(uint8_t **buffer); + +uint32_t x2ap_generate_x2_setup_response(uint8_t **buffer); + +#endif diff --git a/simulators/e2sim/src/X2AP/x2ap_message_handler.c b/simulators/e2sim/src/X2AP/x2ap_message_handler.c new file mode 100644 index 0000000..4fa635e --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_message_handler.c @@ -0,0 +1,139 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include + +#include "x2ap_message_handler.h" + +typedef int (*x2ap_message_decoded_handler)(X2AP_PDU_t *pdu, sctp_data_t *response); + +static int handle_x2_setup_request(X2AP_PDU_t *pdu, sctp_data_t *response); + +static int handle_x2_setup_response(X2AP_PDU_t *pdu, sctp_data_t *response); + +static int handle_x2_setup_failure(X2AP_PDU_t *pdu, sctp_data_t *response); + +/* Handlers matrix. Only eNB related procedure present here +/* rowID = procedureCode (start with 0) +*/ +x2ap_message_decoded_handler x2ap_messages_handler[][3] = { + { 0, 0, 0 }, /* handoverPreparation */ + { 0, 0, 0 }, /* handoverCancel */ + { 0, 0, 0 }, /* loadIndication */ + { 0, 0, 0 }, /* errorIndication */ + { 0, 0, 0 }, /* snStatusTransfer */ + { 0, 0, 0 }, /* uEContextRelease */ + { handle_x2_setup_request, handle_x2_setup_response, handle_x2_setup_failure }, /* x2Setup */ + { 0, 0, 0 }, /* reset */ + { 0, 0, 0 }, /* eNBConfigurationUpdate */ + { 0, 0, 0 }, /* resourceStatusReportingInitiation */ + { 0, 0, 0 }, /* resourceStatusReporting */ + { 0, 0, 0 }, /* privateMessage */ + { 0, 0, 0 }, /* mobilitySettingsChange */ + { 0, 0, 0 }, /* rLFIndication */ + { 0, 0, 0 }, /* handoverReport */ + { 0, 0, 0 }, /* cellActivation */ + { 0, 0, 0 }, /* x2Release */ + { 0, 0, 0 }, /* x2APMessageTransfer */ + { 0, 0, 0 }, /* x2Removal */ + { 0, 0, 0 }, /* seNBAdditionPreparation */ + { 0, 0, 0 }, /* seNBReconfigurationCompletion */ + { 0, 0, 0 }, /* meNBinitiatedSeNBModificationPreparation */ + { 0, 0, 0 }, /* seNBinitiatedSeNBModification */ + { 0, 0, 0 }, /* meNBinitiatedSeNBRelease */ + { 0, 0, 0 }, /* seNBinitiatedSeNBRelease */ + { 0, 0, 0 }, /* seNBCounterCheck */ + { 0, 0, 0 } /* retrieveUEContext */ +}; + +char *x2ap_direction2String(int x2ap_dir) +{ + static char *x2ap_direction_String[] = { + "", /* Nothing */ + "Originating message", /* originating message */ + "Successfull outcome", /* successfull outcome */ + "UnSuccessfull outcome", /* successfull outcome */ + }; + return(x2ap_direction_String[x2ap_dir]); +} + +int x2ap_eNB_handle_message(const uint8_t *const data, const int data_len, sctp_data_t* response) +{ + X2AP_PDU_t pdu; + int ret; + + memset(&pdu, 0, sizeof(pdu)); + + //printf("Decode the PDU \n"); + + if (X2AP_ASN_decode(&pdu, data, data_len) < 0){ + return -1; + } + + /* Checking procedure Code and direction of message */ + if (pdu.choice.initiatingMessage.procedureCode > sizeof(x2ap_messages_handler) + / (3 * sizeof(x2ap_message_decoded_handler)) + || (pdu.present > X2AP_PDU_PR_unsuccessfulOutcome)) { + + fprintf(stderr, "Either procedureCode %ld or direction %d exceed expected\n", + pdu.choice.initiatingMessage.procedureCode, pdu.present); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_PDU, &pdu); + return -1; + } + + if (x2ap_messages_handler[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1] == NULL) + { + fprintf(stderr, "No handler for procedureCode %ld in direction %s\n", + pdu.choice.initiatingMessage.procedureCode, + x2ap_direction2String(pdu.present - 1)); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_PDU, &pdu); + return -1; + } + + /*calling the appropriate handler */ + ret = (*x2ap_messages_handler[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1])(&pdu, response); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_X2AP_PDU, &pdu); + return ret; +} + +int handle_x2_setup_request(X2AP_PDU_t *pdu, sctp_data_t* response) +{ + fprintf(stderr, "Received X2 SETUP REQUEST\n"); + + /* Todo: when to generate X2 Setup Failure??? + */ + + response->len = x2ap_generate_x2_setup_response(&response->data); + + return 0; +} + +int handle_x2_setup_response(X2AP_PDU_t *pdu, sctp_data_t* response) +{ + fprintf(stderr, "Received X2 SETUP RESPONSE\n"); + return 0; +} + +int handle_x2_setup_failure(X2AP_PDU_t *pdu, sctp_data_t* response) +{ + fprintf(stderr, "Received X2 SETUP FAILURE\n"); + return 0; +} diff --git a/simulators/e2sim/src/X2AP/x2ap_message_handler.cpp b/simulators/e2sim/src/X2AP/x2ap_message_handler.cpp new file mode 100644 index 0000000..f818304 --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_message_handler.cpp @@ -0,0 +1,128 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#include "x2ap_message_handler.hpp" + + +void x2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data) +{ + //decode the data into X2AP-PDU + x2ap_pdu_t* pdu = new_x2ap_pdu(); + + x2ap_decode_pdu(pdu, data.buffer, data.len); + + x2ap_print_pdu(pdu); + + int index = x2ap_get_index(pdu); + int procedureCode = x2ap_get_procedureCode(pdu); + + switch(procedureCode) + { + case 6: //X2Setup + switch(index) + { + case 1: //initiatingMessage + LOG_D("[X2AP] Received X2 SETUP REQUEST"); + x2ap_handle_X2SetupRequest(pdu, socket_fd); + break; + + case 2: //successfulOutcome + LOG_D("[X2AP] Received X2 SETUP RESPONSE"); + //x2ap_handle_X2SetupResponse(pdu, socket_fd); + break; + + case 3: + LOG_D("[X2AP] Received X2 SETUP FAILURE"); + break; + + default: + LOG_E("[X2AP] Invalid message index=%d in X2AP-PDU", index); + break; + } + break; + + case 36: //ENDCX2Setup + switch(index) + { + case 1: //initiatingMessage + LOG_D("[X2AP] Received ENDC X2 SETUP REQUEST"); + x2ap_handle_ENDCX2SetupRequest(pdu, socket_fd); + break; + + case 2: //successfulOutcome + LOG_D("[X2AP] Received ENDC X2 SETUP RESPONSE"); + //x2ap_handle_X2SetupResponse(pdu, socket_fd); + break; + + case 3: + LOG_D("[X2AP] Received ENDC X2 SETUP FAILURE"); + break; + + default: + LOG_E("[X2AP] Invalid message index=%d in X2AP-PDU", index); + break; + } + break; + + default: + LOG_E("[X2AP] No available handler for procedureCode=%d", procedureCode); + break; + } +} + +void x2ap_handle_X2SetupRequest(x2ap_pdu_t* pdu, int &socket_fd) +{ + /* + Simply send back X2SetupResponse + Todo: add more handling options (failure, duplicated request, etc.) + */ + + x2ap_pdu_t* res_pdu = new_x2ap_pdu(); + eNB_config cfg; + + x2ap_create_X2SetupResponse(res_pdu, cfg); + LOG_D("[X2AP] Created X2 SETUP RESPONSE") + + x2ap_print_pdu(res_pdu); + + //encode response pdu into buffer + sctp_buffer_t res_data; + x2ap_encode_pdu(res_pdu, res_data.buffer, sizeof(res_data.buffer), res_data.len); + + //send response data over sctp + if(sctp_send_data(socket_fd, res_data) > 0) { + LOG_D("[SCTP] Sent X2 SETUP RESPONSE"); + } else { + LOG_D("[SCTP] Unable to send X2 SETUP RESPONSE to peer"); + } +} + +void x2ap_handle_X2SetupResponse(x2ap_pdu_t* pdu, int &socket_fd) +{ + ; +} + + +void x2ap_handle_ENDCX2SetupRequest(x2ap_pdu_t* pdu, int &socket_fd) +{ + /* + Simply send back ENDCX2SetupResponse + Todo: add more handling options (failure, duplicated request, etc.) + */ + ; +} diff --git a/simulators/e2sim/src/X2AP/x2ap_message_handler.h b/simulators/e2sim/src/X2AP/x2ap_message_handler.h new file mode 100644 index 0000000..9c9d6ff --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_message_handler.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef X2AP_ENB_HANDLER_H_ +#define X2AP_ENB_HANDLER_H_ + +#include "x2ap_asn_codec.h" +#include "X2AP-PDU.h" +#include "e2sim_defs.h" +#include "x2ap_generate_messages.h" + +int x2ap_eNB_handle_message(const uint8_t *const data, const int data_len, sctp_data_t* response); + +#endif diff --git a/simulators/e2sim/src/X2AP/x2ap_message_handler.hpp b/simulators/e2sim/src/X2AP/x2ap_message_handler.hpp new file mode 100644 index 0000000..b3146c7 --- /dev/null +++ b/simulators/e2sim/src/X2AP/x2ap_message_handler.hpp @@ -0,0 +1,35 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ +#ifndef X2AP_MESSAGE_HANDLER_HPP +#define X2AP_MESSAGE_HANDLER_HPP + +#include "e2sim_defs.h" +#include "e2sim_sctp.hpp" +#include "asn_x2ap.hpp" +#include "x2ap_asn_codec.hpp" + +void x2ap_handle_sctp_data(int &socket_fd, sctp_buffer_t &data); + +void x2ap_handle_X2SetupRequest(x2ap_pdu_t* pdu, int &socket_fd); + +void x2ap_handle_X2SetupResponse(x2ap_pdu_t* pdu, int &socket_fd); + +void x2ap_handle_ENDCX2SetupRequest(x2ap_pdu_t* pdu, int &socket_fd); + +#endif diff --git a/simulators/e2sim/src/e2agent.cpp b/simulators/e2sim/src/e2agent.cpp new file mode 100644 index 0000000..07d52cd --- /dev/null +++ b/simulators/e2sim/src/e2agent.cpp @@ -0,0 +1,74 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include +#include +#include +#include + +#include "e2sim_defs.h" +#include "e2sim_sctp.hpp" +#include "asn_e2ap.hpp" +#include "e2ap_message_handler.hpp" + +using namespace std; + +void test(void) +{ + e2ap_pdu_t* pdu = new_e2ap_pdu(); + + gNB_config gnb_cfg; + + e2ap_create_ENDCX2SetupResponse(pdu, gnb_cfg); + + e2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + e2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + +} + +int main(int argc, char* argv[]){ + + LOG_I("E2 Agent (E2 Simulator) Version %s", VERSION); + + // test(); + // return 0; + + options_t ops = read_input_options(argc, argv); + + int server_fd = sctp_start_server(ops.server_ip, ops.server_port); + int client_fd = sctp_accept_connection(ops.server_ip, server_fd); + + sctp_buffer_t recv_buf; + + LOG_I("[SCTP] Waiting for SCTP data"); + while(1) //constantly looking for data on SCTP interface + { + if(sctp_receive_data(client_fd, recv_buf) <= 0) + break; + + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + + e2ap_handle_sctp_data(client_fd, recv_buf); + } + + return 0; +} diff --git a/simulators/e2sim/src/e2sim.c b/simulators/e2sim/src/e2sim.c new file mode 100644 index 0000000..2f49bea --- /dev/null +++ b/simulators/e2sim/src/e2sim.c @@ -0,0 +1,241 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + +#include +#include +#include +#include +#include +#include //for close() +#include //for inet_ntop() + +#include "e2sim_defs.h" +#include "e2sim_sctp.h" +#include "x2ap_message_handler.h" + +//OSN 2019 +#include "Pendulum_asn_codec.h" +#include "adruino_serial.h" + +//rmr +#include +#include +#include +#include "rmr_wrapper.h" + +static void pendulum_control_E2_agent(int client_fd) +{ + printf("--------------------------------------\n"); + printf("E2 AGENT - START PENDULUM CONTROL\n"); + printf("--------------------------------------\n"); + + uint8_t *buffer; + uint32_t len; + clock_t begin; + double rtt; //ms + + uint8_t recv_buf[MAX_SCTP_BUFFER]; + int recv_len; + + double angle; + double torque; + long sqn; + int count = 0; + + //serial + int serial_fd; + char serial_buffer[MAX_SERIAL_BUFFER]; + serial_fd = start_serial_inferface(DEFAULT_BAUDRATE, DEFAULT_SERIAL_PORT); + + int MSG_NUM = 10; + + // printf("Enter number of messages: "); + // scanf("%d", &MSG_NUM); + // + // //fgets(serial_buffer, MAX_SERIAL_BUFFER, stdin); + // serialport_write(serial_fd, serial_buffer); + + serialport_write(serial_fd, "hello arduino\n"); + + // for(int i = 0; i < MSG_NUM; i++) + while(1) + { + + printf("----------------\n"); + count += 1; + buffer = NULL; + len = 0; + + //1.Read from serial + serial_readline(serial_fd, serial_buffer, MAX_SERIAL_BUFFER); + if(serial_buffer[0] == '\n') + { + //printf("RECEIVED EOL\n"); + continue; + } + //printf("[Adruino] %s", serial_buffer); + + begin = clock(); + + //2. Encode pendulum angle to ASN1 message + len = pendulum_create_asn_msg(&buffer, 0, 0, 0, serial_buffer); + + //3. Send ASN1 message to socket + if(sctp_send_to_socket(client_fd, buffer, (size_t)len) > 0){ + printf("Sent ASN1 message to E2 Termination\n"); + } + + // 4. Receive response from E2 Termination + memset(recv_buf, 0, sizeof(recv_buf)); + recv_len = 0; + recv_len = recv(client_fd, &recv_buf, sizeof(recv_buf), 0); + if(recv_len == -1) + { + perror("recv()"); + return; + } + + char *recv_str; + recv_str = pendulum_get_strval(recv_buf, recv_len); + printf("Received response message #%d from xApp: %s\n", count, recv_str); + + // 5. TODO: Send response to serial + serial_writeline(serial_fd, recv_str); + + //serialport_write(serial_fd, "hello\n"); + + begin = clock() - begin; + rtt = 1000*((double)begin)/CLOCKS_PER_SEC; // in ms + printf("E2Agent-RIC-E2Agent RTT = %f ms\n", rtt); + } + + + close(client_fd); +} + +int main(int argc, char *argv[]) +{ + printf("E2 Simulator. Version %s\n", VERSION); + // test_rmr(); return 0; + // test_adruino_serial(); return 0; + + char* server_ip = DEFAULT_SCTP_IP; + int server_port = X2AP_SCTP_PORT; + + int server_fd; + int client_fd; + struct sockaddr client_addr; + socklen_t client_addr_size; + + //read input + if(argc == 3) //user provided IP and PORT + { + server_ip = argv[1]; + server_port = atoi(argv[2]); + if(server_port < 1 || server_port > 65535) { + printf("Invalid port number (%d). Valid values are between 1 and 65535.\n" , server_port); + return -1; + } + } + else if(argc == 2) //user provided only IP + { + server_ip = argv[1]; + } + else if(argc == 1) + { + server_ip = DEFAULT_SCTP_IP; + } + else + { + printf("Unrecognized option.\n"); + printf("Usage: %s [SERVER IP ADDRESS] [SERVER PORT]\n", argv[0]); + return -1; + } + + server_fd = sctp_start_server(server_ip, server_port); + + printf("Waiting for connection...\n"); + client_fd = accept(server_fd, &client_addr, &client_addr_size); + if(client_fd == -1){ + perror("accept()"); + close(client_fd); + return -1; + } + + //Todo: retrieve client ip addr + struct sockaddr_in* client_ipv4 = (struct sockaddr_in*)&client_addr; + char client_ip_addr[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &(client_ipv4->sin_addr), client_ip_addr, INET_ADDRSTRLEN); + + printf("New client connected from %s\n", client_ip_addr); + + // while(1) //put while loop if want to receive from multiple clients + // { + uint8_t recv_buf[MAX_SCTP_BUFFER]; + int recv_len = 0; + + memset(recv_buf, 0, sizeof(recv_buf)); + + printf("------------------------\n"); + recv_len = recv(client_fd, &recv_buf, sizeof(recv_buf), 0); + if(recv_len == -1) + { + perror("recv()"); + return -1; + } + else if(recv_len == 0) + { + printf("\nConnection from %s closed by remote peer\n", client_ip_addr); + if(close(client_fd) == -1) + { + perror("close"); + } + return -1; + } + + //printf("Received a message of size %d\n", recv_len); + + //TODO: check PPID here before calling x2ap handler + + sctp_data_t response = {NULL, 0}; + x2ap_eNB_handle_message(recv_buf, recv_len, &response); + + //======================================================================= + //reply to client + assert(response.data != NULL); + if(sctp_send_to_socket(client_fd, response.data, (size_t)response.len) > 0){ + printf("Sent X2 SETUP RESPONSE \n"); + } else{ + perror("send to socket"); + return -1; + } + + printf("X2 Setup Completed \n"); + + //========================================================================= + // Pendulum interaction + // Send pendulum state to E2 Termination and receive response + pendulum_control_E2_agent(client_fd); + // } //end while + + close(client_fd); + + return 0; +} diff --git a/simulators/e2sim/src/e2sim_closedloop.c b/simulators/e2sim/src/e2sim_closedloop.c new file mode 100644 index 0000000..613ce57 --- /dev/null +++ b/simulators/e2sim/src/e2sim_closedloop.c @@ -0,0 +1,263 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + +#include +#include +#include +#include +#include +#include //for close() +#include //for inet_ntop() + +#include "e2sim_defs.h" +#include "e2sim_sctp.h" +#include "x2ap_message_handler.h" + +//OSN 2019 +#include "Pendulum_asn_codec.h" +#include "adruino_serial.h" + +//rmr +#include +#include +#include +#include "rmr_wrapper.h" + +static void pendulum_control_E2_agent(int client_fd) +{ + fprintf(stderr, "--------------------------------------\n"); + fprintf(stderr, "E2 AGENT - START PENDULUM CONTROL\n"); + fprintf(stderr, "--------------------------------------\n"); + + uint8_t *buffer; + uint32_t len; + clock_t begin; + double rtt; //ms + + uint8_t recv_buf[MAX_SCTP_BUFFER]; + int recv_len; + + double angle; + double torque; + long sqn; + int count = 0; + + //serial + // int serial_fd; + char serial_buffer[MAX_SERIAL_BUFFER]; + // serial_fd = start_serial_inferface(DEFAULT_BAUDRATE, DEFAULT_SERIAL_PORT); + // + // char *delay_str_prev = "$0#\n"; + // //char *delay_str_new; + // + // int MSG_NUM = 10; + // + // //Always start with 0 delay + // serialport_write(serial_fd, "$0#\n"); + + // for(int i = 0; i < MSG_NUM; i++) + while(1) + { + + fprintf(stderr, "----------------\n"); + count += 1; + buffer = NULL; + len = 0; + + // //1.Read from serial + // serial_readline(serial_fd, serial_buffer, MAX_SERIAL_BUFFER); + // if(serial_buffer[0] == '\n') + // { + // //fprintf(stderr, "RECEIVED EOL\n"); + // continue; + // } + // //fprintf(stderr, "[Adruino] %s", serial_buffer); + usleep(5*1000); + + snprintf(serial_buffer, sizeof(serial_buffer)-1, "E2 AGENT PING"); + + begin = clock(); + + //2. Encode pendulum angle to ASN1 message + + len = pendulum_create_asn_msg(&buffer, 0, 0, 0, serial_buffer); + + //3. Send ASN1 message to socket + if(sctp_send_to_socket(client_fd, buffer, (size_t)len) > 0){ + fprintf(stderr, "Sent ASN1 message to E2 Termination\n"); + } + + // 4. Receive response from E2 Termination + memset(recv_buf, 0, sizeof(recv_buf)); + recv_len = 0; + recv_len = recv(client_fd, &recv_buf, sizeof(recv_buf), 0); + if(recv_len == -1) + { + perror("recv()"); + return; + } + + char *recv_str; + recv_str = pendulum_get_strval(recv_buf, recv_len); + fprintf(stderr, "Received response message #%d from xApp: %s\n", count, recv_str); + + // 5. TODO: Send response to serial + // Compare if delay has changed: + // if(strcmp(delay_str_prev, recv_str) != 0) { + // serial_writeline(serial_fd, recv_str); + // } + + //serial_writeline(serial_fd, recv_str); + + //Write to a file + FILE *f; + f = fopen("arduino_delay.txt", "w"); + fprintf(f, "%s", recv_str); + fclose(f); + + begin = clock() - begin; + rtt = 1000*((double)begin)/CLOCKS_PER_SEC; // in ms + fprintf(stderr, "E2Agent-RIC-E2Agent RTT = %f ms\n", rtt); + + } + + close(client_fd); +} + +int main(int argc, char *argv[]) +{ + fprintf(stderr, "E2 AGENT - PENDULUM CONTROL. Version %s\n", VERSION); + + // char *recv_str = "9"; + // int delay; + // + // printf("delay = %d\n", atoi(recv_str)); + // + // long delay = 22.5; + // + // printf("delay = %d\n", (int)delay); + // return 0; + + // test_rmr(); return 0; + // test_adruino_serial(); return 0; + + char* server_ip = DEFAULT_SCTP_IP; + int server_port = X2AP_SCTP_PORT; + + int server_fd; + int client_fd; + struct sockaddr client_addr; + socklen_t client_addr_size; + + //read input + if(argc == 3) //user provided IP and PORT + { + server_ip = argv[1]; + server_port = atoi(argv[2]); + if(server_port < 1 || server_port > 65535) { + fprintf(stderr, "Invalid port number (%d). Valid values are between 1 and 65535.\n" , server_port); + return -1; + } + } + else if(argc == 2) //user provided only IP + { + server_ip = argv[1]; + } + else if(argc == 1) + { + server_ip = DEFAULT_SCTP_IP; + } + else + { + fprintf(stderr, "Unrecognized option.\n"); + fprintf(stderr, "Usage: %s [SERVER IP ADDRESS] [SERVER PORT]\n", argv[0]); + return -1; + } + + server_fd = sctp_start_server(server_ip, server_port); + + fprintf(stderr, "Waiting for connection...\n"); + client_fd = accept(server_fd, &client_addr, &client_addr_size); + if(client_fd == -1){ + perror("accept()"); + close(client_fd); + return -1; + } + + //Todo: retrieve client ip addr + struct sockaddr_in* client_ipv4 = (struct sockaddr_in*)&client_addr; + char client_ip_addr[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &(client_ipv4->sin_addr), client_ip_addr, INET_ADDRSTRLEN); + + fprintf(stderr, "New client connected from %s\n", client_ip_addr); + + // while(1) //put while loop if want to receive from multiple clients + // { + uint8_t recv_buf[MAX_SCTP_BUFFER]; + int recv_len = 0; + + memset(recv_buf, 0, sizeof(recv_buf)); + + fprintf(stderr, "------------------------\n"); + recv_len = recv(client_fd, &recv_buf, sizeof(recv_buf), 0); + if(recv_len == -1) + { + perror("recv()"); + return -1; + } + else if(recv_len == 0) + { + fprintf(stderr, "\nConnection from %s closed by remote peer\n", client_ip_addr); + if(close(client_fd) == -1) + { + perror("close"); + } + return -1; + } + + //fprintf(stderr, "Received a message of size %d\n", recv_len); + + //TODO: check PPID here before calling x2ap handler + + sctp_data_t response = {NULL, 0}; + x2ap_eNB_handle_message(recv_buf, recv_len, &response); + + //======================================================================= + //reply to client + assert(response.data != NULL); + if(sctp_send_to_socket(client_fd, response.data, (size_t)response.len) > 0){ + fprintf(stderr, "Sent X2 SETUP RESPONSE \n"); + } else{ + perror("send to socket"); + return -1; + } + + fprintf(stderr, "X2 Setup Completed \n"); + + //========================================================================= + // Pendulum interaction + // Send pendulum state to E2 Termination and receive response + pendulum_control_E2_agent(client_fd); + // } //end while + + close(client_fd); + + return 0; +} diff --git a/simulators/e2sim/src/e2sim_defs.cpp b/simulators/e2sim/src/e2sim_defs.cpp new file mode 100644 index 0000000..f80977d --- /dev/null +++ b/simulators/e2sim/src/e2sim_defs.cpp @@ -0,0 +1,107 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include "e2sim_defs.h" +#include + +options_t read_input_options_old(int argc, char* argv[]) +{ + options_t options; + + options.server_ip = (char*)DEFAULT_SCTP_IP; + options.server_port = X2AP_SCTP_PORT; + + // Parse command line options + static struct option long_options[] = + { + {"ipv4", required_argument, 0, 'i'}, + {"ipv6", required_argument, 0, 'I'}, + {"port", required_argument, 0, 'p'}, + {"verbose", no_argument, 0, 'v'}, + }; + + while(1) + { + int option_index = 0; + + char c = getopt_long(argc, argv, "i:I:p:", long_options, &option_index); + + if(c == -1) + break; + + switch(c) + { + case 'i': + options.server_ip = optarg; + break; + case 'I': + break; + case 'p': + options.server_port = atoi(optarg); + if(options.server_port < 1 || options.server_port > 65535) + { + LOG_E("Invalid port number (%d). Valid values are between 1 and 65535.\n", + options.server_port); + exit(1); + } + break; + + default: + LOG_E("Error: unknown input option: %c\n", optopt); + exit(1); + } + } + + return options; +} + +options_t read_input_options(int argc, char *argv[]) +{ + options_t options; + + options.server_ip = (char*)DEFAULT_SCTP_IP; + options.server_port = X2AP_SCTP_PORT; + + if(argc == 3) //user provided IP and PORT + { + options.server_ip = argv[1]; + options.server_port = atoi(argv[2]); + if(options.server_port < 1 || options.server_port > 65535) { + LOG_E("Invalid port number (%d). Valid values are between 1 and 65535.\n", + options.server_port); + exit(1); + } + } + else if(argc == 2) //user provided only IP + { + options.server_ip = argv[1]; + } + else if(argc == 1) + { + options.server_ip = (char*)DEFAULT_SCTP_IP; + } + else + { + LOG_I("Unrecognized option.\n"); + LOG_I("Usage: %s [SERVER IP ADDRESS] [SERVER PORT]\n", argv[0]); + exit(1); + } + + return options; +} diff --git a/simulators/e2sim/src/e2sim_defs.h b/simulators/e2sim/src/e2sim_defs.h new file mode 100644 index 0000000..30a0165 --- /dev/null +++ b/simulators/e2sim/src/e2sim_defs.h @@ -0,0 +1,53 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef E2SIM_DEFS_H +#define E2SIM_DEFS_H + +#include + +#define VERSION "1.2.0" //May 2019 +#define DEFAULT_SCTP_IP "127.0.0.1" +#define X2AP_SCTP_PORT 36422 +#define MAX_SCTP_BUFFER 1024 +#define WORKDIR_ENV "E2SIM_DIR" //environment variable + +#define LOG_I(...) {printf(__VA_ARGS__); printf("\n");} +#define LOG_E(...) {printf(__VA_ARGS__); printf("\n");} +#define LOG_D(...) {printf(__VA_ARGS__); printf("\n");} + +typedef struct SCTP_DATA { + unsigned char *data; + int len; +} sctp_data_t; + +typedef struct { + unsigned char buffer[MAX_SCTP_BUFFER]; + int len; +} sctp_buffer_t; + +typedef struct { + char* server_ip; + int server_port; + //... extend as needed +} options_t; + +options_t read_input_options(int argc, char *argv[]); + +#endif diff --git a/simulators/e2sim/src/e2sim_serial.c b/simulators/e2sim/src/e2sim_serial.c new file mode 100644 index 0000000..33fa0ba --- /dev/null +++ b/simulators/e2sim/src/e2sim_serial.c @@ -0,0 +1,56 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include +#include "e2sim_defs.h" +#include + +#include "adruino_serial.h" + +int main(int argc, char *argv[]) +{ + int fd; + char buf[MAX_SERIAL_BUFFER]; + + fd = start_serial_inferface(DEFAULT_BAUDRATE, DEFAULT_SERIAL_PORT); + + while(1) + { + //usleep(5*1000); //sleep 5ms between read + sleep(1); + + FILE *f; + f = fopen("arduino_delay.txt", "r"); + assert(f); + + fread(buf, 1, sizeof(buf), f); + + printf("delay content = %s \n", buf); + + serial_writeline(fd, buf); + + fclose(f); + } + + return 0; +} diff --git a/simulators/e2sim/src/e2sim_test_client.c b/simulators/e2sim/src/e2sim_test_client.c new file mode 100644 index 0000000..b178ff7 --- /dev/null +++ b/simulators/e2sim/src/e2sim_test_client.c @@ -0,0 +1,378 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include //for close() +#include +#include +#include +#include +#include //for inet_ntop() +#include + +#include "e2sim_defs.h" +#include "e2sim_sctp.h" +#include "x2ap_message_handler.h" + +#include "x2ap_generate_messages.h" + +//OSN 2019 +#include "Pendulum_asn_codec.h" + +//rmr +#include +#include +#include +#include "rmr_wrapper.h" + +//time +#include + +//these are the metrics being sent to the a1 mediator +int ave_ric_rtt_last_epoch=0; +int ave_msg_rate_last_epoch=0; +int ave_pendulum_msg_rate_last_epoch=0; + +int total_rtt_current_epoch=0; +int total_messages_current_epoch=0; +int total_pendulum_messages_current_epoch=0; + +int total_rtt_entries_current_epoch=0; + +int epoch_duration = 1;//in seconds + +long rtt_epoch_start_time =0; + +long msg_rate_epoch_start_time =0; +long pendulum_msg_rate_epoch_start_time = 0; + +long current_timestamp_in_us(){ + struct timeval currentTime; + gettimeofday(¤tTime, NULL); + return currentTime.tv_sec * (int)1e6 + currentTime.tv_usec; +} +void update_rtt_metrics(long rtt){//called every time there is a new rtt measurement + if(rtt_epoch_start_time == 0) + rtt_epoch_start_time = current_timestamp_in_us(); //start of a new epoch + + total_rtt_current_epoch = total_rtt_current_epoch+rtt; + total_rtt_entries_current_epoch++; + + if((current_timestamp_in_us() - rtt_epoch_start_time) > (epoch_duration*1000000)){//an epoch has passed + ave_ric_rtt_last_epoch = total_rtt_current_epoch/total_rtt_entries_current_epoch; + total_rtt_current_epoch =0; + rtt_epoch_start_time = 0; + } +} + +void update_msg_rate_metrics(){ + if(msg_rate_epoch_start_time == 0) + msg_rate_epoch_start_time= current_timestamp_in_us(); //start of a new epoch + total_messages_current_epoch++; + if((current_timestamp_in_us() - msg_rate_epoch_start_time) > (epoch_duration*1000000)){//an epoch has passed + ave_msg_rate_last_epoch = total_messages_current_epoch; + total_messages_current_epoch =0; + msg_rate_epoch_start_time =0; + } +} + +void update_pendulum_control_rate() +{ + if(pendulum_msg_rate_epoch_start_time == 0) + pendulum_msg_rate_epoch_start_time = current_timestamp_in_us(); //start of a new epoch + total_pendulum_messages_current_epoch++; + + if((current_timestamp_in_us() - pendulum_msg_rate_epoch_start_time) > (epoch_duration*1000000)){//an epoch has passed + ave_pendulum_msg_rate_last_epoch = total_pendulum_messages_current_epoch; + total_pendulum_messages_current_epoch = 0; + pendulum_msg_rate_epoch_start_time = 0; + } + +} + +void send_metrics_to_a1_med(struct rmr_context *rmr_c){ + int mtype=103; + char* metrics= malloc(1024); + int time_int = current_timestamp_in_us()/1000000; + //int ave_msg_rate_last_epoch=500; + snprintf(metrics, 1024, "{%s:%d, %s:%d, %s:%d, %s:%d}", \ + "\"latency\"", ave_ric_rtt_last_epoch/1000, \ + "\"ricload\"",ave_msg_rate_last_epoch, \ + "\"load\"",ave_pendulum_msg_rate_last_epoch, \ + "\"time\"",time_int); + rmr_send_wrapper(rmr_c, mtype, metrics); + printf("Sent message of type:%d to a1_med with content:%s\n",mtype,metrics); +} + +void forward_to_load_consumer(struct rmr_context *rmr_c){//the content does not matter + int mtype=105; + char* load_message="dummy load"; + rmr_send_wrapper(rmr_c, mtype, load_message); + printf("Sent message of type:%d to load consumer with content:%s\n",mtype,load_message); +} + +static void pendulum_control_E2_Termination(int client_fd) +{ + printf("--------------------------------------\n"); + printf("E2 TERMINATION - START PENDULUM CONTROL\n"); + printf("--------------------------------------\n"); + + uint8_t *send_buffer; + uint8_t recv_buffer[1024]; + uint32_t send_len; + uint32_t recv_len; + + clock_t begin = clock(); + double rtt; + double rtt_stats[100000]; + long recv_count = 0; + long fail_count = -1; //ignore the first message (see adruino code) + + long sqn; + int count = 0; + + //================================= + + //Setup context + struct rmr_context *rmr_c; //obtain our enhanced rmr_context + int mtype = 0; // we can loop through several message types + char* lport = "43086"; // default listen port + long rcount = 0; // number of acks received + + if( (eparm = getenv( "E2TERM_RMR_RCV_PORT" )) != NULL ) { + lport = strdup( eparm ); + } + + rmr_c = rmr_init_wrapper(lport); + + while( ! rmr_ready( rmr_c->mrc ) ) { + fprintf( stderr, " waiting for RMR to indicate ready\n" ); + sleep( 1 ); + } + fprintf( stderr, "[OK] initialisation complete\n" ); + + + //================================== + long loop_start_time = 0; + while(1){ + printf("----------------\n"); + count += 1; + loop_start_time = current_timestamp_in_us(); + //0. Receiving ASN message from E2 Agent + memset(recv_buffer, 0, sizeof(recv_buffer)); + printf("Time to receive asn message after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + recv_len = 0; + + printf(" 1Time to receive asn message after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + //long time_of_message_from_e2agent = current_timestamp_in_us(); + + if((recv_len = recv(client_fd, &recv_buffer, sizeof(recv_buffer), 0)) == -1) { + perror("recv"); + return; + } + + long time_of_message_from_e2agent = current_timestamp_in_us(); + + printf(" 2Time to receive asn message after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + if(recv_len == 0) { + rmr_close_wrapper(rmr_c); + + printf("Connection from closed by remote peer.\n"); + if(close(client_fd) == -1) { + perror("close"); + } + return; + } + + printf(" 3Time to receive asn message after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + // begin = clock() - begin; + // rtt = 1000*((double)begin)/CLOCKS_PER_SEC; // in ms + //printf("E2Term-Adruino-E2Term = %f ms\n", rtt); + + //2. Decode ASN message and Extract pendulum angle + char *recv_str; + recv_str = pendulum_get_strval(recv_buffer, recv_len); + // if( (strcmp(recv_str, "-1") == 0) || (strcmp(recv_str, "") == 0) ) + + if(strcmp(recv_str, "\n") == 0) + { + printf("RECEIVED EOL\n"); + } + + printf(" 4Time to receive asn message after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + // if(atof(recv_str) <= 0) + // { + // printf("FAILLLLLL\n"); + // fail_count += 1; + // } + // else { + // rtt_stats[recv_count] = atof(recv_str); + // recv_count++; + // } + + printf("Time to receive angle message from arduino after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); + printf("Received message #%d from Adruino: %s\n", count, recv_str); + //printf("Last reported RTT (Adruino-RIC-Adruino): %f ms, fail_count = %ld\n", + // atof(recv_str)/1000, fail_count); + + // 3. [BHARATH] send_to_xApp(&pendulum_state, &response) + // while(1) { + // usleep( 10 ); + // char* message = "foo 111"; + char reply[1024]; + int got_pend_control=0; + rmr_send_wrapper(rmr_c, mtype, recv_str ); + printf("Sent message of type:%d to pendulum xApp with content:%s\n",mtype,recv_str); + long angle_receive_time =0; + while (got_pend_control == 0){ + if(rmr_poll_for_message(rmr_c) == 1) { + update_msg_rate_metrics(); + switch(rmr_c->rbuf->mtype) { + case 33 : + angle_receive_time = current_timestamp_in_us(); + got_pend_control=1; + update_pendulum_control_rate(); //add this + strcpy(reply,rmr_c->rbuf->payload); + printf("Received control message from pendulum xapp with message type: %d and content %s\n",rmr_c->rbuf->mtype, reply); + break; + case 102 : + printf("Received METRIC request from A1 mediator with message type: %d and content %s\n",rmr_c->rbuf->mtype,rmr_c->rbuf->payload); + send_metrics_to_a1_med(rmr_c); + break; + case 104 : + printf("***************************Received load from load generator****************************"); + forward_to_load_consumer(rmr_c); + break; + default : + continue; + } + } + + } + printf("Time to receive control message from xapp after starting main loop: %ld microseconds \n",current_timestamp_in_us() - loop_start_time); +// snprintf(reply, 1024, "$%d#\n", (int)ave_ric_rtt_last_epoch/1000); + send_len = pendulum_create_asn_msg(&send_buffer, 0, 0, 0, reply); + printf("Time to create asn message after receiving angle: %ld microseconds\n",current_timestamp_in_us() - angle_receive_time); + begin = clock(); + + //6. Send ASN1 message to socket + if(sctp_send_to_socket(client_fd, send_buffer, (size_t)send_len) > 0){ + printf("Sent ASN1 response to E2 Agent\n"); + } + long time_of_reply_to_e2agent = current_timestamp_in_us(); + printf("Time to send asn message after receiving angle: %ld microseconds \n",current_timestamp_in_us() - angle_receive_time); + long rtt = (time_of_reply_to_e2agent - time_of_message_from_e2agent); + ave_ric_rtt_last_epoch = rtt; + printf("RIC RTT is %lf milliseconds\n", rtt/1000.0); + //update_rtt_metrics(rtt); + } + + rmr_close_wrapper(rmr_c); + +} + +int main(int argc, char* argv[]) +{ + // test_rmr(); return 0; + + const char* server_ip = DEFAULT_SCTP_IP; + int server_port = X2AP_SCTP_PORT; + + //read input + if(argc == 3) //user provided IP and PORT + { + server_ip = argv[1]; + server_port = atoi(argv[2]); + if(server_port < 1 || server_port > 65535) { + printf("Invalid port number (%d). Valid values are between 1 and 65535.\n", server_port); + return 1; + } + } + else if(argc == 2) //user provided only IP + { + server_ip = argv[1]; + } + else if(argc == 1) + { + server_ip = DEFAULT_SCTP_IP; + } + else + { + printf("Unrecognized option.\n"); + printf("Usage: %s [SERVER IP ADDRESS] [SERVER PORT]\n", argv[0]); + return 0; + } + + int client_fd; + client_fd = sctp_start_client(server_ip, server_port); + + uint8_t *buffer; + uint32_t len; + + //Note: put a while(1) loop here if want client to stay + // for(int i = 0; i < 3; i++) + // { + buffer = NULL; + len = 0; + + printf("------------------------\n"); + clock_t begin; + begin = clock(); + + //Create pdu for x2 message and send to socket + len = x2ap_generate_x2_setup_request(&buffer); + if(sctp_send_to_socket(client_fd, buffer, (size_t)len) > 0){ + printf("Sent X2 SETUP REQUEST\n"); + } + + //======================================================================= + //printf("waiting for server response\n"); + uint8_t recv_buf[MAX_SCTP_BUFFER]; + int recv_len = 0; + + //sctp_recv_from_socket(client_fd, recv_buf, sizeof(recv_buf)); + memset(recv_buf, 0, sizeof(recv_buf)); + recv_len = recv(client_fd, &recv_buf, sizeof(recv_buf), 0); + if(recv_len == -1) + { + perror("recv()"); + return -1; + } + + //printf("Received a message of size %d\n", recv_len); + x2ap_eNB_handle_message(recv_buf, recv_len, NULL); + + begin = clock() - begin; + double time_taken = 1000*((double)begin)/CLOCKS_PER_SEC; // in ms + printf("Close-loop time: %f ms \n", time_taken); + printf("X2 Setup Completed \n"); + + // } //end iteration + + //========================================================================= + // Pendulum interaction + // Receive pendulum state from E2 Agent and send response + pendulum_control_E2_Termination(client_fd); + + close(client_fd); + + return 0; +} diff --git a/simulators/e2sim/src/e2termination_test.cpp b/simulators/e2sim/src/e2termination_test.cpp new file mode 100644 index 0000000..b65ac65 --- /dev/null +++ b/simulators/e2sim/src/e2termination_test.cpp @@ -0,0 +1,223 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include +#include +#include +#include + + +#include "e2sim_defs.h" +#include "asn_e2ap.hpp" +#include "e2sim_sctp.hpp" +#include "e2ap_message_handler.hpp" +#include "e2ap_asn_codec.hpp" + +using namespace std; + +void test_send_X2Setup(int &client_fd) +{ + //Create X2SetupRequest message + e2ap_pdu_t* pdu = new_e2ap_pdu(); + eNB_config cfg; + + e2ap_create_X2SetupRequest(pdu, cfg); + e2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + e2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + + //Send to sctp + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent X2 SETUP REQUEST"); + + //wait to receive response + sctp_buffer_t recv_buf; + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + e2ap_handle_sctp_data(client_fd, recv_buf); + } + + } + +void test_send_ENDCX2Setup(int &client_fd) +{ + //Create ENDCX2SetupRequest message + e2ap_pdu_t* pdu = new_e2ap_pdu(); + eNB_config cfg; + + e2ap_create_ENDCX2SetupRequest(pdu, cfg); + e2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + e2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + + //Send to sctp + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent ENDC X2 SETUP REQUEST"); + + //wait to receive response + sctp_buffer_t recv_buf; + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + e2ap_handle_sctp_data(client_fd, recv_buf); + } + +} + +void test_send_RICSubscriptionRequest(int &client_fd) +{ + LOG_I("Test RIC SUBSCRIPTION"); + + /* Create RIC SUBSCRITION REQUEST */ + e2ap_pdu_t* pdu = new_e2ap_pdu(); + + RICsubscription_params_t params; + params.request_id = 2; + params.seq_number = 200; + params.ran_func_id = 0; + params.event_trigger_def = "hello world"; + + RIC_action_t action1(1, RICactionType_report); + // RIC_action_t action2(3, RICactionType_insert); + // RIC_action_t action3(5, RICactionType_insert); + // RIC_action_t action4(7, RICactionType_insert); + params.actionList.push_back(action1); + // params.actionList.push_back(action2); + // params.actionList.push_back(action3); + // params.actionList.push_back(action4); + + e2ap_create_RICsubscriptionRequest(pdu, params); + e2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + e2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + + //Send to sctp + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent RIC SUBSCRIPTION REQUEST"); + + //wait to receive response and indication (if any) + sctp_buffer_t recv_buf; + LOG_I("[SCTP] Waiting for SCTP data"); + while(1) + { + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + e2ap_handle_sctp_data(client_fd, recv_buf); + } + else + break; + + } + + + return; + //========================================================================== + + //decode + e2ap_pdu_t* pdu2 = new_e2ap_pdu(); + + e2ap_decode_pdu(pdu2, data.buffer, data.len); + + RICsubscription_params_t params2; + e2ap_parse_RICsubscriptionRequest(pdu2, params2); + printf("request_id = %d\n", params2.request_id); + printf("seq_number = %d\n", params2.seq_number); + printf("ran_func_id = %d\n", params2.ran_func_id); + printf("event = %s\n", ¶ms2.event_trigger_def[0]); + + for( auto const &a : params.actionList) + { + printf("action id = %d, action type = %d\n", (int)a.action_id, (int)a.action_type); + } + + + LOG_I("================= RESPONSE ==========================="); + for(size_t i = 0; i < params2.actionList.size(); i++) + { + //example logic: admit every other action + if(i%2 == 0) { + params2.actionList[i].isAdmitted = true; + } else { + params2.actionList[i].isAdmitted = false; + params2.actionList[i].notAdmitted_cause = RICcause_radioNetwork; + params2.actionList[i].notAdmitted_subCause = 5; + } + } + + e2ap_pdu_t* res_pdu = new_e2ap_pdu(); + e2ap_create_RICsubscriptionResponse(res_pdu, params2); + + e2ap_print_pdu(res_pdu); + + //Encode into buffer + sctp_buffer_t data_resp; + e2ap_encode_pdu(res_pdu, data_resp.buffer, sizeof(data_resp.buffer), data_resp.len); + + LOG_I("================= FAILURE ==========================="); + e2ap_pdu_t* fail_pdu = new_e2ap_pdu(); + + RICsubscription_params_t params3; + e2ap_parse_RICsubscriptionRequest(pdu2, params3); + + for(size_t i = 0; i < params3.actionList.size(); i++) + { + params3.actionList[i].isAdmitted = false; + params3.actionList[i].notAdmitted_cause = RICcause_radioNetwork; + params3.actionList[i].notAdmitted_subCause = 5; + } + + e2ap_create_RICsubscriptionFailure(fail_pdu, params3); + e2ap_print_pdu(fail_pdu); + + //Encode into buffer + sctp_buffer_t data_fail; + e2ap_encode_pdu(fail_pdu, data_fail.buffer, sizeof(data_fail.buffer), data_fail.len); + +} + +int main(int argc, char* argv[]){ + + LOG_I("E2 Termination Test"); + + // test_send_RICSubscriptionRequest(); + // return 0; + + options_t ops = read_input_options(argc, argv); + int client_fd = sctp_start_client(ops.server_ip, ops.server_port); + + //--------------------------------------------------- + // test_send_X2Setup(client_fd); + test_send_ENDCX2Setup(client_fd); + test_send_RICSubscriptionRequest(client_fd); + + //--------------------------------------------------- + + close(client_fd); + LOG_I("[SCTP] Connection closed."); + + return 0; +} diff --git a/simulators/e2sim/src/rmr_interface/README b/simulators/e2sim/src/rmr_interface/README new file mode 100644 index 0000000..9e5a197 --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/README @@ -0,0 +1,13 @@ +This is just a basic version of the README that the author of the E2 simulator can augment as he/she sees fit. + +Building rmr + +- Call the rmr_install.sh + + +# Running the sender and receiver + +- Create a route generate (.rt) file that is common to both the sender and receiver and place it in $HOME/global_rmr_files/global_rmr_routes.rt +- Build the receiver in the /tests/pendulum_xapp folder by invoking build_recvr.sh. Run it using bash run_receiver +- Build the sender in the /tests/sender folder by invoking build_sender.sh. Run it using bash run_sender. +- You can see packets being exchanged. diff --git a/simulators/e2sim/src/rmr_interface/rmr_install.sh b/simulators/e2sim/src/rmr_interface/rmr_install.sh new file mode 100644 index 0000000..786a07e --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/rmr_install.sh @@ -0,0 +1,28 @@ +#!/bin/bash -eu +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +#git clone https://gerrit.oran-osc.org/r/ric-plt/lib/rmr && (cd rmr && curl -kLo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit.oran-osc.org/r/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg && git checkout 6735f136906ce2 ) + +cd rmr/ +mkdir $HOME/usr +mkdir .build +cd .build +cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/usr +make install diff --git a/simulators/e2sim/src/rmr_interface/tests/receiver/build_and_run_recvr.sh b/simulators/e2sim/src/rmr_interface/tests/receiver/build_and_run_recvr.sh new file mode 100755 index 0000000..602046f --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/tests/receiver/build_and_run_recvr.sh @@ -0,0 +1,30 @@ +#!/bin/bash -eu +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc rmr_rcvr.c -g -o rmr_rcvr -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm + +export PENDULUM_XAPP_RMR_RCV_PORT=5560 +export DEMO_SENDER_PTO=1 # poll timeout listening for replies + +export PRINT_FREQ=10000 #frequency at which test stats will be printed + +RMR_RCV_ACK=1 ./rmr_rcvr $PRINT_FREQ; # receiver that will ack every sender message diff --git a/simulators/e2sim/src/rmr_interface/tests/receiver/rmr_rcvr.c b/simulators/e2sim/src/rmr_interface/tests/receiver/rmr_rcvr.c new file mode 100644 index 0000000..2d8e7fd --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/tests/receiver/rmr_rcvr.c @@ -0,0 +1,163 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// :vim ts=4 sw=4 noet: +/* + Mnemonic: rmr_rcvr2.c + Abstract: Very simple test listener built on RMr libraries. It does nothing + but return the message it recevied back to the sender. + + Define these environment variables to have some control: + RMR_SEED_RT -- path to the static routing table + RMR_RTG_SVC -- host:port of the route table generator + + One command line parm is accepted: stats frequency. This is a number, n, + which causes stats to be generated after every n messages. If set to 0 + each message is written when received and no stats (msg rate) is generated. + + Date: 11 February 2018 + Author: E. Scott Daniels + + Mods: 18 Mar 2019 -- simplified for demo base. +*/ + +#include +#include +#include +#include +#include + +#include + +typedef struct { + int32_t mtype; // message type ("long" network integer) + int32_t plen; // payload length + unsigned char xid[RMR_MAX_XID]; // space for user transaction id or somesuch + unsigned char sid[RMR_MAX_SID]; // sender ID for return to sender needs + unsigned char src[RMR_MAX_SRC]; // name of the sender (source) + struct timespec ts; // timestamp ??? +} mhdr_t; + + +int main( int argc, char** argv ) { + void* mrc; // msg router context + rmr_mbuf_t* msg = NULL; // message received + int i; + char* listen_port; + char* tok; + int must_ack = 1; // flag -- if set we rts all messages + mhdr_t* hdr; + int last_seq = 0; // sequence number from last message + int this_seq; // sequence number on this message + int count = 0; // count of msg since last status + long long tcount = 0; // total count of messages + time_t ts; + time_t lts; + int stat_freq = 20000; // write stats after reciving this many messages + int first_seq = -1; // first sequence number we got to report total received + int max_rt = 1000; // max times we'll retry an ack + + if( (tok = getenv( "RMR_RCV_ACK" )) != NULL ) { + must_ack = atoi( tok ); + } + + if( (listen_port = getenv( "PENDULUM_XAPP_RMR_RCV_PORT" )) == NULL ) { + listen_port = "4560"; + } + + if( argc > 1 ) { + stat_freq = atoi( argv[1] ); + } + fprintf( stderr, " stats will be reported every %d messages\n", stat_freq ); + + mrc = rmr_init( listen_port, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // start your engines! + if( mrc == NULL ) { + fprintf( stderr, " ABORT: unable to initialise RMr\n" ); + exit( 1 ); + } + + while( ! rmr_ready( mrc ) ) { + fprintf( stderr, " waiting for RMr to show ready\n" ); + sleep( 1 ); + } + fprintf( stderr, " RMr now shows ready\n" ); + + lts = time( NULL ); + fprintf( stderr, " listening on %s acking %s\n", listen_port, must_ack != 0 ? "on" : "off" ); + + //rmr_set_stimeout( mrc, 50 ); + while( 1 ) { + sleep (2 ); + msg = rmr_rcv_msg( mrc, msg ); // block until one arrives + if( msg == NULL ) { + continue; // shouldn't happen, but don't crash if we get nothing + } + if( msg->mtype < 0 || msg->state != RMR_OK ) { + fprintf( stderr, "[WRN] bad msg: state=%d errno=%d\n", msg->state, errno ); + continue; // just loop to receive another + } + + if( stat_freq == 0 ) { // mechanism to dump all received messages for quick testing + fprintf( stdout, " msg received: type = %d len = %d (%s)\n", msg->mtype, msg->len, msg->payload ); // assume a nil term string in payload + } + + count++; // messages received for stats output + tcount++; + + //if( stat_freq >= 1000 ) { + if(1) { + //if( (count % stat_freq) == 0 ) { + if(1) { + ts = time( NULL ); + if( ts - lts ) { + + fprintf( stderr, " %7lld received %5lld msg/s over the last %3lld seconds mrt=%d, with content=%s\n", + (long long) last_seq - first_seq, (long long) (count / (ts-lts)), (long long) ts-lts, max_rt,msg->payload ); + lts = ts; + count = 0; + } + } + } + + if( must_ack ) { // send back a response + //fprintf( stdout, " msg: type = %d len = %d; acking\n", msg->mtype, msg->len ); + //msg->len = snprintf( msg->payload, 1024, "bar %lld", tcount ); // ack with bar and counter + msg->len = snprintf( msg->payload, 1024, "Reply hello back to Arduino!\n"); + // msg->len = snprintf( msg->payload, 1024, "OK\n"); + + + //msg->mtype = 999; //only to be used if rts is not possible + + //msg = rmr_send_msg (mrc, msg); //only to be used if rts is not possible + + msg = rmr_rts_msg( mrc, msg ); // this is a retur to sender; preferred + //if( (msg = rmr_send_msg( mrc, msg )) != NULL ) { // this is a routed send; not preferred, but possible + if( (msg = rmr_rts_msg( mrc, msg )) != NULL ) { + //----- checking too many times here has been problematic and causes what appears to be race condidtions in NNG threads; for now max_rt should be small + max_rt = 2; + while( max_rt > 0 && msg->state != RMR_OK && errno == EAGAIN ) { // NNG likes to refuse sends, just keep trying on eagain + max_rt--; + rmr_rts_msg( mrc, msg ); + //rmr_send_msg (mrc, msg); + } + } + } + + } +} diff --git a/simulators/e2sim/src/rmr_interface/tests/sender/build_and_run_sender.sh b/simulators/e2sim/src/rmr_interface/tests/sender/build_and_run_sender.sh new file mode 100755 index 0000000..c4eb8fc --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/tests/sender/build_and_run_sender.sh @@ -0,0 +1,29 @@ +#!/bin/bash -eu +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +export C_INCLUDE_PATH=$HOME/usr/include +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/usr/lib +export RMR_SEED_RT=$HOME/global_rmr_files/global_rmr_routes.rt +gcc rmr_sender.c -g -o rmr_sender -L $HOME/usr/lib -lrmr_nng -lnng -lpthread -lm + +export DUMMY_SENDER_RMR_RCV_PORT=38086 +export DEMO_SENDER_PTO=1 # poll timeout listening for replies +export DEMO_MAX_PAYLOAD_BYTES=240 # max_size of payload + +./rmr_sender; diff --git a/simulators/e2sim/src/rmr_interface/tests/sender/rmr_sender.c b/simulators/e2sim/src/rmr_interface/tests/sender/rmr_sender.c new file mode 100644 index 0000000..724b0d1 --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/tests/sender/rmr_sender.c @@ -0,0 +1,96 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + + +// :vim ts=4 sw=4 noet: + +/* + Mnemonic: rmr_sender2.c + Abstract: Very simple test sender that polls and deals with responses + in between sends (from a single process). + + Date: 18 February 2018 + Author: E. Scott Daniels + + Modified: 18 Mar 2019 - changes to support demo +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "rmr_wrapper.h" + + +void usage( char* argv0 ) { + fprintf( stderr, "usage: %s [mtype-max]\n", argv0 ); + fprintf( stderr, "Sender will send messages with rotating msg types from 0 through mtype-max (if supplied)\n" ); + fprintf( stderr, "if not supplied, only mtype 0 is sent\n" ); + fprintf( stderr, "The default listen port for return messages is 43086; this can be changed by setting DUMMY_SENDER_RMR_RCV_PORT in the environment.\n" ); + fprintf( stderr, "The sender will send forever unless DEMO_SENDER_MAX is set in the environment which causes termination after max messages.\n" ); + fprintf( stderr, "The sender will poll for received messages after each send. The amount of time waited is controlled with DEMO_SENDER_PTO (ms) in the env. Use 0 for non-blocking poll.\n" ); +} + +int main( int argc, char** argv ) { + struct rmr_context *rmr_c; //obtain our enhanced rmr_context + int mtype = 0; // we can loop through several message types + long count = 0; + char* lport = "43086"; // default listen port + long rcount = 0; // number of acks received + + if( (eparm = getenv( "DUMMY_SENDER_RMR_RCV_PORT" )) != NULL ) { + lport = strdup( eparm ); + } + + rmr_c = rmr_init_wrapper(lport); + + while( ! rmr_ready( rmr_c->mrc ) ) { + fprintf( stderr, " waiting for RMr to indicate ready\n" ); + sleep( 1 ); + } + fprintf( stderr, "[OK] initialisation complete\n" ); + + while( 1 ) { + usleep( 10 ); // simulate some work being done + char* message = "foo 111"; + + if(rmr_send_wrapper (rmr_c, mtype, message ) == 1) { + //message successfully received in the receive buffer + char reply[1024]; + strcpy(reply,rmr_c->rbuf->payload); + fprintf( stderr, "Acknowledgment received with content:%s\n",rmr_c->rbuf->payload); + rcount++; + } + count++; + + if( (count % 5000) == 0 ) { + fprintf( stdout, "[INFO] total sent: %ld total received: %ld drops=%ld\n", count, rcount, count - rcount ); + } + + } + + fprintf( stderr, "[INFO] sender is terminating having sent %ld messages\n", count ); + rmr_close_wrapper(rmr_c); + + return 0; +} diff --git a/simulators/e2sim/src/rmr_interface/tests/sender/rmr_wrapper.h b/simulators/e2sim/src/rmr_interface/tests/sender/rmr_wrapper.h new file mode 100644 index 0000000..446d20d --- /dev/null +++ b/simulators/e2sim/src/rmr_interface/tests/sender/rmr_wrapper.h @@ -0,0 +1,142 @@ +/* + * + * Copyright 2019 AT&T Intellectual Property + * Copyright 2019 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +int epoll_to = 1;// global default epoll timout -- 1ms +char* eparm; // generic env pointer + +struct rmr_context { + void* mrc; + int rcv_fd; // pollable fd + struct epoll_event epe; // event definition for event to listen to + struct epoll_event events[10]; // wait on 10 possible events + int ep_fd; + int max_payload_size; // ++SCOTT + rmr_mbuf_t* sbuf; // send buffer + rmr_mbuf_t* rbuf; // received buffer +}; + + +struct rmr_context * rmr_init_wrapper(char* lport){ + + struct rmr_context *rmr_c = malloc(sizeof (struct rmr_context)); + fprintf( stderr, "[INFO] glistening for replies on %s\n", lport ); + + + rmr_c->mrc = rmr_init(lport, RMR_MAX_RCV_BYTES, RMRFL_NONE ); // setup RMr and get a context (rmr_c.mrc) + rmr_c->ep_fd=-1; + + //polling related initializations + rmr_c->rcv_fd = rmr_get_rcvfd( rmr_c->mrc );// get the fd to poll for messages received + if( rmr_c->rcv_fd < 0 ) { + fprintf( stderr, "[FAIL] unable to set up polling fd\n" ); + exit( 1 ); + } + + if( (rmr_c->ep_fd = epoll_create1( 0 )) < 0 ) { + fprintf( stderr, "[FAIL] unable to create epoll fd: %d\n", errno ); + exit( 1 ); + } + rmr_c->epe.events = EPOLLIN; + rmr_c->epe.data.fd = rmr_c->rcv_fd; + + if( epoll_ctl( rmr_c->ep_fd, EPOLL_CTL_ADD, rmr_c->rcv_fd, &rmr_c->epe ) != 0 ) { + fprintf( stderr, "[FAIL] epoll_ctl status not 0 : %s\n", strerror( errno ) ); + exit( 1 ); + } + //end of polling related initializations + + //++SCOTT------ next lines until !!SCOTT + rmr_c->max_payload_size = 240; //default + if( (eparm = getenv( "DEMO_MAX_PAYLOAD_BYTES" )) != NULL ) { + rmr_c->max_payload_size = atoi(eparm); // override with env + } + //!!SCOTT + + //~~SCOTT next line + rmr_c->sbuf = rmr_alloc_msg( rmr_c->mrc, rmr_c->max_payload_size ); // allocate largest payload to send + rmr_c->rbuf = NULL; + + return rmr_c; +} + +void rmr_send_wrapper (struct rmr_context *rmr_c, int mtype, char* message) { + //--SCOTT int max_payload_size = 240; //default + //--SCOTT if( (eparm = getenv( "DEMO_MAX_PAYLOAD_BYTES" )) != NULL ) { + //--SCOTT max_payload_size = atoi(eparm); + //--SCOTT } + + //~~SCOTT next line + snprintf( rmr_c->sbuf->payload, rmr_c->max_payload_size, "%s", message); // simple send message -- replace with real content + + rmr_c->sbuf->mtype = mtype; // fill in message meta data + rmr_c->sbuf->len = strlen( rmr_c->sbuf->payload ) + 1; // actual length of payload (count the nil end of string) + rmr_c->sbuf->state = 0; + + //retry send for a few times before giving up + long natter = 0; // natter on for errors only once in a while + if( (rmr_c->sbuf = rmr_send_msg( rmr_c->mrc, rmr_c->sbuf )) != NULL ) {// unlikely, but might get a null pointer back if NNG really is buggered + if( rmr_c->sbuf->state != RMR_OK ) { + if( errno == EAGAIN ) { + while( rmr_c->sbuf->state != RMR_OK && errno == EAGAIN ) {// NNG likes to refuse sends, just keep trying on eagain + rmr_send_msg( rmr_c->mrc, rmr_c->sbuf ); + } + } else {// most likely connection refused, don't natter on + if( time( NULL ) > natter ) { + fprintf( stderr, "[WARN] send failed, pausing (%s)\n", strerror( errno ) ); + natter = time( NULL ) + 2; + } + sleep( 1 ); + } + } + } else { + if( time( NULL ) > natter ) { + fprintf( stderr, "[WARN] send failed, pausing (%s)\n", strerror( errno ) ); + natter = time( NULL ) + 2; + } + sleep( 1 ); + } + +} + +int rmr_poll_for_message(struct rmr_context *rmr_c){ + int nready; + int i; + int return_type =0; + //start polling the channel to read the acknowledgment + //~~SCOTT next line + + nready = epoll_wait( rmr_c->ep_fd, rmr_c->events, 10, epoll_to ); // wait up to epoll_to ms for a response + for( i = 0; i < nready && i < 10; i++ ) { // loop through to find what is ready + if( rmr_c->events[i].data.fd == rmr_c->rcv_fd ) { // RMr has something + errno = 0; + rmr_c->rbuf = rmr_rcv_msg( rmr_c->mrc, rmr_c->rbuf ); // something ready; this should not block + if( rmr_c->rbuf ) { + // fprintf( stderr, " acknowledgment received:%s\n",rmr_c->rbuf->payload); + return_type = 1; //the message has been acknowledged + } + } + } + return return_type; +} + +void rmr_close_wrapper (struct rmr_context *rmr_c){ + + rmr_close( rmr_c->mrc ); + free(rmr_c); +} diff --git a/simulators/e2sim/src/x2agent.cpp b/simulators/e2sim/src/x2agent.cpp new file mode 100644 index 0000000..db279a3 --- /dev/null +++ b/simulators/e2sim/src/x2agent.cpp @@ -0,0 +1,41 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include +#include +#include + +#include "e2sim_defs.h" +#include "asn_x2ap.hpp" +#include "e2sim_sctp.hpp" + +using namespace std; + +int main(int argc, char* argv[]){ + + LOG_I("X2 Agent. Version %s", VERSION); + + options_t ops = read_input_options(argc, argv); + + int server_fd = sctp_start_server(ops.server_ip, ops.server_port); + int client_fd = sctp_accept_connection(server_fd); + + + return 0; +} diff --git a/simulators/e2sim/src/x2termination_test.cpp b/simulators/e2sim/src/x2termination_test.cpp new file mode 100644 index 0000000..c6c9138 --- /dev/null +++ b/simulators/e2sim/src/x2termination_test.cpp @@ -0,0 +1,119 @@ +/***************************************************************************** +# * +# Copyright 2019 AT&T Intellectual Property * +# Copyright 2019 Nokia * +# * +# Licensed under the Apache License, Version 2.0 (the "License"); * +# you may not use this file except in compliance with the License. * +# You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, software * +# distributed under the License is distributed on an "AS IS" BASIS, * +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * +# See the License for the specific language governing permissions and * +# limitations under the License. * +# * +******************************************************************************/ + +#include +#include +#include + +#include "e2sim_defs.h" +#include "asn_x2ap.hpp" +#include "e2sim_sctp.hpp" +#include "x2ap_message_handler.hpp" +#include "x2ap_asn_codec.hpp" + +using namespace std; + +void test_X2Setup(int &client_fd) +{ + //Create X2SetupRequest message + x2ap_pdu_t* pdu = new_x2ap_pdu(); + eNB_config cfg; + + x2ap_create_X2SetupRequest(pdu, cfg); + x2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + x2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + + //Send to sctp + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent X2 SETUP REQUEST"); + + //expect X2 SETUP RESPONSE + sctp_buffer_t recv_buf; + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + x2ap_handle_sctp_data(client_fd, recv_buf); + } + + //Send again, expect X2 SETUP FAILURE + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent X2 SETUP REQUEST"); + + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + x2ap_handle_sctp_data(client_fd, recv_buf); + } + +} + +void test_ENDCX2Setup(int &client_fd) +{ + //Create ENDCX2SetupRequest message + x2ap_pdu_t* pdu = new_x2ap_pdu(); + eNB_config cfg; + + x2ap_create_ENDCX2SetupRequest(pdu, cfg); + x2ap_print_pdu(pdu); + + //Encode into buffer + sctp_buffer_t data; + x2ap_encode_pdu(pdu, data.buffer, sizeof(data.buffer), data.len); + + //Send to sctp + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent ENDC X2 SETUP REQUEST"); + + //expect ENDC X2 SETUP RESPONSE + sctp_buffer_t recv_buf; + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + x2ap_handle_sctp_data(client_fd, recv_buf); + } + + //Send again, expect ENDC X2 SETUP FAILURE + sctp_send_data(client_fd, data); + LOG_I("[SCTP] Sent ENDC X2 SETUP REQUEST"); + + if(sctp_receive_data(client_fd, recv_buf) > 0) + { + LOG_I("[SCTP] Received new data of size %d", recv_buf.len); + x2ap_handle_sctp_data(client_fd, recv_buf); + } + +} + +int main(int argc, char* argv[]){ + + LOG_I("X2 Termination Test"); + + options_t ops = read_input_options(argc, argv); + + int client_fd = sctp_start_client(ops.server_ip, ops.server_port); + + // test_X2Setup(client_fd); + test_ENDCX2Setup(client_fd); + + + return 0; +} diff --git a/simulators/e2sim/tools/build_helper.bash b/simulators/e2sim/tools/build_helper.bash new file mode 100644 index 0000000..647d597 --- /dev/null +++ b/simulators/e2sim/tools/build_helper.bash @@ -0,0 +1,92 @@ +# +# +# Copyright 2019 AT&T Intellectual Property +# Copyright 2019 Nokia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +####################################### +# Helper Func +###################################### + +black='\E[30m' +red='\E[31m' +green='\E[32m' +yellow='\E[33m' +blue='\E[34m' +magenta='\E[35m' +cyan='\E[36m' +white='\E[37m' +reset_color='\E[00m' + +cecho() # Color-echo. arg1 = message, arg2 = color +{ + local default_msg="No Message." + message=${1:-$default_msg} + color=${2:-$green} + echo -e -n "$color$message$reset_color" + echo + return +} + +echo_error() { + local my_string="" + until [ -z "$1" ] + do + my_string="$my_string$1" + shift + done + cecho "$my_string" $red +} + +echo_fatal() { + local my_string="" + until [ -z "$1" ] + do + my_string="$my_string$1" + shift + done + echo_error "$my_string" + exit -1 +} + +echo_warning() { + local my_string="" + until [ -z "$1" ] + do + my_string="$my_string$1" + shift + done + cecho "$my_string" $yellow +} + +echo_success() { + local my_string="" + until [ -z "$1" ] + do + my_string="$my_string$1" + shift + done + cecho "$my_string" $green +} + +echo_info() { + local my_string="" + until [ -z "$1" ] + do + my_string="$my_string$1" + shift + done + cecho "$my_string" $blue +} diff --git a/simulators/ns3_plugins/test.txt b/simulators/ns3_plugins/test.txt new file mode 100644 index 0000000..765a3e8 --- /dev/null +++ b/simulators/ns3_plugins/test.txt @@ -0,0 +1 @@ +Cant add empty folder diff --git a/simulators/workload_generator/Makefile b/simulators/workload_generator/Makefile new file mode 100644 index 0000000..cbad37a --- /dev/null +++ b/simulators/workload_generator/Makefile @@ -0,0 +1,34 @@ +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== + +CC= gcc +CFLAGS= -Wunused-variable +LIBS= -lrmr_nng -lnng -lpthread -lm + +WG_G= src/ric_generator.c +WG_R= src/ric_receiver.c + +all: ric_generator ric_receiver + +ric_generator: $(WG_G) + $(CC) -o $@ $^ $(LIBS) $(CFLAGS) $(CPPFLAGS) + +ric_receiver: $(WG_R) + $(CC) -o $@ $^ $(LIBS) $(CFLAGS) $(CPPFLAGS) + +clean: + rm ric_generator ric_receiver diff --git a/simulators/workload_generator/PDU/pdu1.per b/simulators/workload_generator/PDU/pdu1.per new file mode 100644 index 0000000..cd2fa8d --- /dev/null +++ b/simulators/workload_generator/PDU/pdu1.per @@ -0,0 +1 @@ +this is an example PDU file 1 diff --git a/simulators/workload_generator/PDU/pdu2.per b/simulators/workload_generator/PDU/pdu2.per new file mode 100644 index 0000000..8de44a7 --- /dev/null +++ b/simulators/workload_generator/PDU/pdu2.per @@ -0,0 +1 @@ +this is an example PDU file 2 diff --git a/simulators/workload_generator/README.md b/simulators/workload_generator/README.md new file mode 100644 index 0000000..e816ccf --- /dev/null +++ b/simulators/workload_generator/README.md @@ -0,0 +1,102 @@ +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== + +RIC workload_generator is a tool to test the performanc of xAPPs in RIC. It works by generating PDU messages at a specified rate, receiving the reply messages and caculating performance counters including but not limited to latency and throughput. RIC workload_generator currently consists of two applications: ric_generator and ric_receiver. + +ric_generator sends PDU messages to the xAPP. ric_receiver receives messages and computes performance counters. + +workload_generator test setup +============================================ + + ------------- ----------- + | RIC | t1 | |<-- - t1: sending time + | generator |---->----| |---> | t2: receiving time + | | | | | | latency = t2 - t1 + | | | xAPP | v ^ + | | | | | | + | RIC |----<----| |<-- | + | receiver | t2 | |-----> + | | | | + ------------- ----------- + + +workload_generator directory structure +============================================== +ric_receiver: receiver executable +ric_generator: generator executable +run.sh: script to run workload_generator +back2back_test.sh: script to run workload_generator in back2back test mode (i.e generator is connected directly to receiver) +Makefile: Makefile to build the source +src: source code +report: detailed report generated after each run +PDU: example PDU files (.per) +seed.rt: RMR routing table +test.srt: RMR routing table for back to back testing + +Build workload_generator using +================================= +1. Install RMR + +2. after checking out workload_generator in directory (for example at /opt/workload_generator, and this readme will use this directory afterwards) do following +1) cd /opt/workload_generator +2) make + +Configuration +=============================== +1. Configure seed.rt on the workload generator machine. + +workload_generator can run on baremetal servers, VMs and containers. + +workload_generator is built upon RMR. It reads the seed.rt file to figure out the destination of messages based on message types. Currently workload_generator only supports two message types numbered as 0 and 1, so in seed.rt you need to specify the destination IP address of the xAPP. For instance if your xAPP's ip address and port number are IP1:PORT1, the seed.rt would look like +" +newrt|start + rte|0|IP1:PORT1 + rte|1|IP1:PORT1 +newrt|end +" + + +2. Configure RMR routing information on the xAPP machine. + +RIC xAPP which is built upon RMR can work with workload_generator. It requires that xAPP should know how to send the message back to the receiver. That means the routing table, either statical like seed.rt or dynamic using rt service (please refer to RMR Manual if you need to know more about rt service) should include a route entry for reply message. For example, if the reply message has a type number 3 and the address of the workload_generator is IP2:PORT2. The routing table on xAPP machine (say it is named as xAPP_seed.rt) may look like + +" +newrt|start + rte|3|IP2:PORT2 +newrt|end +" + +3. Setup PDU files + +You can put up to 2 PDU files in the PDU directory. By default, the workload generator reads pdu1.per and pdu2.per in this directory. + +Execution +========================= + +1. run back to back test +/opt/workload_generator/back2back_test.sh + +2. run xAPP test +/opt/workload_generator/run.sh [rate] + +workload_generator stops automatically, after sending 1000 messages. +A report will be generated as /opt/workload_generator/report/xAPP_counters.csv + +Uninstall workload_generator +========================= +cd /opt/workload_generator +make clean diff --git a/simulators/workload_generator/back2back_test.sh b/simulators/workload_generator/back2back_test.sh new file mode 100755 index 0000000..39031a4 --- /dev/null +++ b/simulators/workload_generator/back2back_test.sh @@ -0,0 +1,27 @@ +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== + +set RMR_SEED_RT=./test.rt +unset RMR_RTG_SVC +printf "start receiver\n" +./ric_receiver & +printf "start generator\n" +printf "sending msgs\n" +./ric_generator 100 +printf "\nback2back test done!\n" +pkill -f ric_receiver +head -n 1 report/xAPP_counters.csv diff --git a/simulators/workload_generator/report/xAPP_counters.csv b/simulators/workload_generator/report/xAPP_counters.csv new file mode 100644 index 0000000..150e177 --- /dev/null +++ b/simulators/workload_generator/report/xAPP_counters.csv @@ -0,0 +1,101 @@ +average latency 0.402millisec +0 1.508millisec +1 0.444millisec +2 0.513millisec +3 0.401millisec +4 0.504millisec +5 0.487millisec +6 0.418millisec +7 0.415millisec +8 0.420millisec +9 0.385millisec +10 0.405millisec +11 0.399millisec +12 0.436millisec +13 0.372millisec +14 0.470millisec +15 0.408millisec +16 0.451millisec +17 0.378millisec +18 0.356millisec +19 0.435millisec +20 0.366millisec +21 0.344millisec +22 0.420millisec +23 0.415millisec +24 0.438millisec +25 0.367millisec +26 0.458millisec +27 0.401millisec +28 0.469millisec +29 0.281millisec +30 0.370millisec +31 0.315millisec +32 0.283millisec +33 0.461millisec +34 0.340millisec +35 0.309millisec +36 0.447millisec +37 0.526millisec +38 0.384millisec +39 0.415millisec +40 0.402millisec +41 0.328millisec +42 0.446millisec +43 0.405millisec +44 0.358millisec +45 0.452millisec +46 0.400millisec +47 0.408millisec +48 0.418millisec +49 0.412millisec +50 0.400millisec +51 0.489millisec +52 0.390millisec +53 0.319millisec +54 0.374millisec +55 0.327millisec +56 0.361millisec +57 0.332millisec +58 0.409millisec +59 0.368millisec +60 0.345millisec +61 0.407millisec +62 0.464millisec +63 0.453millisec +64 0.387millisec +65 0.371millisec +66 0.384millisec +67 0.365millisec +68 0.290millisec +69 0.401millisec +70 0.306millisec +71 0.461millisec +72 0.371millisec +73 0.382millisec +74 0.395millisec +75 0.429millisec +76 0.301millisec +77 0.359millisec +78 0.443millisec +79 0.408millisec +80 0.435millisec +81 0.369millisec +82 0.311millisec +83 0.511millisec +84 0.414millisec +85 0.453millisec +86 0.333millisec +87 0.350millisec +88 0.328millisec +89 0.293millisec +90 0.321millisec +91 0.302millisec +92 0.385millisec +93 0.317millisec +94 0.316millisec +95 0.367millisec +96 0.372millisec +97 0.402millisec +98 0.365millisec +99 0.372millisec diff --git a/simulators/workload_generator/run.sh b/simulators/workload_generator/run.sh new file mode 100755 index 0000000..c99a711 --- /dev/null +++ b/simulators/workload_generator/run.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== + +RATE=$1 +set RMR_SEED_RT=./seed.rt +unset RMR_RTG_SVC +printf "start receiver\n" +./ric_receiver & +printf "start generator\n" +printf "sending msgs\n" +./ric_generator $RATE +printf "\ndone!\n" +pkill -f ric_receiver +head -n 1 report/xAPP_counters.csv diff --git a/simulators/workload_generator/seed.rt b/simulators/workload_generator/seed.rt new file mode 100644 index 0000000..37a038c --- /dev/null +++ b/simulators/workload_generator/seed.rt @@ -0,0 +1,20 @@ +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== +newrt|start + rte|0|localhost:4560 + rte|1|localhost:4560 +newrt|end diff --git a/simulators/workload_generator/src/ric_generator.c b/simulators/workload_generator/src/ric_generator.c new file mode 100644 index 0000000..ede2dad --- /dev/null +++ b/simulators/workload_generator/src/ric_generator.c @@ -0,0 +1,127 @@ +/* +====================================================================== + Copyright (c) 2019 Nokia + Copyright (c) 2018-2019 AT&T Intellectual Property. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions andlimitations under the License. +====================================================================== +*/ + +#include +#include +#include +#include +#include +#include +#include + +#define UTA_COMPAT +#include "ric_wg.h" +#include + +struct timespec ts_start_tx; + +int read_pdu(const char* filename, unsigned char* buffer) { + + FILE* f = fopen(filename, "r"); + + if(f == NULL) { + fprintf(stderr, "abort: unable to open PDU file: %s\n", + strerror(errno)); + return -1; + } + + return fread(buffer, sizeof(unsigned char), 2048, f); +} + + +int main(int argc, char** argv) { + void* mr; + char* proto_port = "tcp:4545"; + rmr_mbuf_t* msg; + // data portion (payload) of the message + msg_t* msg_data; + // total count of msgs sent + int count = 0; + // cyced count used to generate type + int cyc_count = 0; + // number of msgs per second + int rate = argc < 2 ? 10 : atoi(argv[1]); + // the number of msg types depends on the number of xAPPs + int type_n = 2; + // rate in mu-seconds/message + double v = (1.0/(double)rate) * SEC2MUS; + // delay between messages + int delay = (int) v; + // PDU buffer to be copied to each msg + unsigned char pdu_li[2048]; + unsigned char pdu_rs[2048]; + char* pdufile1 = "PDU/pdu1.per"; + char* pdufile2 = "PDU/pdu2.per"; + + struct timespec ts; + long long elapse; + double elapse_s; + + int pdu_li_size = read_pdu(pdufile1, pdu_li); + int pdu_rs_size = read_pdu(pdufile2, pdu_rs); + + if((mr = uta_init(proto_port, 4096, UTAFL_NONE)) == NULL) { + fprintf(stderr, "abort: unable to initialise the lib: %s\n", + strerror(errno)); + exit(1); + } + // get an initial send buffer + msg = uta_alloc_msg(mr, sizeof(msg_t)); + if( msg == NULL ) { + fprintf(stderr, "abort: couldn't allocate initial message\n"); + exit(1); + } + //record starting time + clock_gettime(CLOCK_REALTIME, &ts_start_tx); + while(count < MAX_TX) { + //sleep to have an average msg/sec send rate + usleep(delay); + msg->mtype = cyc_count; + msg_data = (msg_t *) msg->payload; + msg_data->time_counter = count; + + snprintf(msg->xaction, UTA_MAX_XID, "x%05d", count); + + if(msg->mtype == 0) { + msg_data->pdu_length = pdu_li_size; + memcpy(msg_data->payload, pdu_li, sizeof(msg_data->payload)); + } + + if(msg->mtype == 1) { + msg_data->pdu_length = pdu_rs_size; + memcpy(msg_data->payload, pdu_rs, sizeof(msg_data->payload)); + } + msg->len = sizeof(msg_t); + // set timestamp at the absolute last point + clock_gettime(CLOCK_REALTIME, &msg_data->ts); + + msg = uta_send_msg(mr, msg); + + count++; + clock_gettime(CLOCK_REALTIME, &ts); + elapse = (ts.tv_sec - ts_start_tx.tv_sec) * 1000000000 + + ts.tv_nsec - ts_start_tx.tv_nsec; + elapse_s = (double) elapse / 1000000000; + + fprintf(stderr, "\rsent %d msgs", count); + cyc_count = cyc_count < type_n - 1 ? cyc_count + 1 : 0; + } + + return 0; +} diff --git a/simulators/workload_generator/src/ric_receiver.c b/simulators/workload_generator/src/ric_receiver.c new file mode 100644 index 0000000..4daf649 --- /dev/null +++ b/simulators/workload_generator/src/ric_receiver.c @@ -0,0 +1,114 @@ +/* +====================================================================== + Copyright (c) 2019 Nokia + Copyright (c) 2018-2019 AT&T Intellectual Property. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions andlimitations under the License. +====================================================================== +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define UTA_COMPAT +#include +#include "ric_wg.h" + +//array to save ts for each transaction +time_t ts_array[MAX_TRANS]; +//array to save tns for each transaction +long int tns_array[MAX_TRANS]; +//array to save latency for each transaction +double latency_array[MAX_TRANS]={0}; +//array to save time passed for each transaction +double elapse_array[MAX_TRANS]={0}; +//array to save typeid for each transaction +int type_array[MAX_TRANS]={0}; + +//they are used to track time in order to get msg rate +time_t ts_start_rcv; +long int tns_start_rcv; + +int main( int argc, char** argv ) { + + void* mr; + char* proto_port = "tcp:4560"; + uta_mbuf_t* msg = NULL; + msg_t* pm; + struct timespec ts; + long long delta; + long long elapse; + double ms_delta; + double ms_elapse; + double total_ms_delta = 0.0; + double ave_latency = 0.0; + double rcv_rate = 0.0; + long long rcv_count = 0; + + if((mr = uta_init( proto_port, + UTA_MAX_RCV_BYTES, UTAFL_NONE )) == NULL) { + fprintf(stderr, + "abort: unable to initialize the message lib: %s\n", + strerror(errno)); + exit(1); + } + + while(rcv_count <= MAX_RCV_COUNT) { + + msg = uta_rcv_msg(mr, msg); + + if(msg) { + type_array[rcv_count] = msg->mtype; + pm = (msg_t *) msg->payload; + clock_gettime(CLOCK_REALTIME, &ts); + //record the time when the first msg is recieved + if(rcv_count == 0) { + ts_start_rcv = ts.tv_sec; + tns_start_rcv = ts.tv_nsec; + } + + delta = (ts.tv_sec - (pm->ts).tv_sec) * 1000000000 + + ts.tv_nsec - (pm->ts).tv_nsec; + + ms_delta = (double) delta / 1000000; + elapse = (ts.tv_sec - ts_start_rcv) * 1000000000 + + ts.tv_nsec - tns_start_rcv; + ms_elapse = (double) elapse / 1000000; + elapse_array[rcv_count] = ms_elapse; + total_ms_delta += ms_delta; + latency_array[rcv_count] = ms_delta; + rcv_count++; + } + + } + //when test ends dump memory into file + total_ms_delta -= latency_array[rcv_count - 1]; + ms_elapse = elapse_array[rcv_count - 2]; + rcv_count--; + ave_latency = total_ms_delta/rcv_count; + rcv_rate = (rcv_count/ms_elapse)*1000.0; + char fname[256]; + snprintf(fname, sizeof fname, "report/xAPP_counters.csv"); + FILE *fptr = fopen(fname, "w"); + fprintf(fptr, "average latency %.3fmillisec\n", ave_latency); + for(int i = 0; i < rcv_count; i++) + fprintf(fptr, "%d %.3fmillisec \n", i, latency_array[i]); + return 0; +} + diff --git a/simulators/workload_generator/src/ric_wg.h b/simulators/workload_generator/src/ric_wg.h new file mode 100644 index 0000000..4371010 --- /dev/null +++ b/simulators/workload_generator/src/ric_wg.h @@ -0,0 +1,36 @@ +/* +====================================================================== + Copyright (c) 2019 Nokia + Copyright (c) 2018-2019 AT&T Intellectual Property. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. See the License for the specific language governing + permissions andlimitations under the License. +====================================================================== +*/ + +#define SEC2MUS 1000000 +#define MAX_TRANS 10000 +#define MAX_RCV_COUNT 100 +#define MAX_TX 1000 + +typedef struct msg { + //counter for messages, first message has time_counter 0; + long long time_counter; + //transaction id + long long tid; + //timestamp for latency measure + struct timespec ts; + //the length of the PDU + int pdu_length; + + unsigned char payload[2048]; +} msg_t; diff --git a/simulators/workload_generator/test.srt b/simulators/workload_generator/test.srt new file mode 100644 index 0000000..37a038c --- /dev/null +++ b/simulators/workload_generator/test.srt @@ -0,0 +1,20 @@ +# ====================================================================== +# Copyright (c) 2019 Nokia +# Copyright (c) 2018-2019 AT&T Intellectual Property. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions andlimitations under the License. +# ====================================================================== +newrt|start + rte|0|localhost:4560 + rte|1|localhost:4560 +newrt|end diff --git a/test_scripts/e2adapter/e2adapter.conf b/test_scripts/e2adapter/e2adapter.conf new file mode 100644 index 0000000..b332be7 --- /dev/null +++ b/test_scripts/e2adapter/e2adapter.conf @@ -0,0 +1,7 @@ +e2adapter = { + log_level = 2; + sctp = { + bind_address = "::1"; + bind_port = 49999; + }; +}; diff --git a/test_scripts/e2adapter/e2adapter.conf.default b/test_scripts/e2adapter/e2adapter.conf.default new file mode 100644 index 0000000..8906c1c --- /dev/null +++ b/test_scripts/e2adapter/e2adapter.conf.default @@ -0,0 +1,17 @@ +e2adapter = { + // ZMQ Management endpoint: + // zmq_mgmt_endpoint = "tcp://localhost:5555"; + // zmq_data_endpoint = "tcp://localhost:5556"; + // zmq_cli_endpoint = "tcp://0.0.0.0:9001"; + // log_level = 2; + // endcx2SetupResponse = + // "20 24 00 3f 00 00 01 00 f6 00 38 40 00 02" + // "00 fc 00 08 00 42 f4 90 00 00 00 04 00 fd 00" + // "25 00 00 04 00 00 00 42 f4 90 00 00 07 ff f0" + // "00 00 42 f4 90 41 00 09 eb 48 00 00 4d 00 2a" + // "80 06 18 11 3e 60 04 84"; + sctp = { + // bind_address = "::"; + // bind_port = 49999; + }; +}; diff --git a/test_scripts/e2adapter/run_e2adapter_interactive b/test_scripts/e2adapter/run_e2adapter_interactive new file mode 100644 index 0000000..78c75e2 --- /dev/null +++ b/test_scripts/e2adapter/run_e2adapter_interactive @@ -0,0 +1,6 @@ +docker run --rm -it \ + -v /etc/e2adapter:/etc/e2adapter `# Bind-mount the configuration directory` \ + -v /var/log/e2adapter:/var/log/e2adapter `# Bind-mount the log directory` \ + --network host `# Get all sockets working the "easy" way` \ + --name e2adapter \ + ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2adapter:1.0.0 sh -c "/bin/bash" diff --git a/test_scripts/e2adapter/start_e2adapter b/test_scripts/e2adapter/start_e2adapter new file mode 100644 index 0000000..19dc731 --- /dev/null +++ b/test_scripts/e2adapter/start_e2adapter @@ -0,0 +1,6 @@ +docker run -d \ + -v ${PWD}:/etc/e2adapter `# Bind-mount the configuration directory` \ + -v ${PWD}:/var/log/e2adapter `# Bind-mount the log directory` \ + --network host `# Get all sockets working the "easy" way` \ + --name e2adapter \ + ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2adapter:1.0.0 diff --git a/test_scripts/e2adapter/stop_e2adapter b/test_scripts/e2adapter/stop_e2adapter new file mode 100644 index 0000000..1e159ce --- /dev/null +++ b/test_scripts/e2adapter/stop_e2adapter @@ -0,0 +1,3 @@ +docker stop e2adapter +docker rm e2adapter + diff --git a/test_scripts/endc_x2_setup/exec_e2agent b/test_scripts/endc_x2_setup/exec_e2agent new file mode 100644 index 0000000..bcb29e5 --- /dev/null +++ b/test_scripts/endc_x2_setup/exec_e2agent @@ -0,0 +1 @@ +docker run --rm --net host -it e2agent diff --git a/test_scripts/endc_x2_setup/exec_e2mgr b/test_scripts/endc_x2_setup/exec_e2mgr new file mode 100644 index 0000000..4323345 --- /dev/null +++ b/test_scripts/endc_x2_setup/exec_e2mgr @@ -0,0 +1 @@ +kubectl -n ricplt exec -it r0-e2mgr-84b4649cdd-4xj2q -- /bin/bash diff --git a/test_scripts/endc_x2_setup/exec_e2term b/test_scripts/endc_x2_setup/exec_e2term new file mode 100644 index 0000000..c48587a --- /dev/null +++ b/test_scripts/endc_x2_setup/exec_e2term @@ -0,0 +1 @@ +kubectl -n ricplt exec -it r0-e2term-5d8bc97f84-sfpgd -- /bin/bash diff --git a/test_scripts/endc_x2_setup/query_rnib b/test_scripts/endc_x2_setup/query_rnib new file mode 100755 index 0000000..57528f0 --- /dev/null +++ b/test_scripts/endc_x2_setup/query_rnib @@ -0,0 +1,11 @@ +#!/bin/bash + + +#curl -X POST http://10.2.0.28:30004/v1/nodeb/endc-setup -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"ranIp": "10.2.0.28","ranPort": 36422, "ranName":"AAAA123457"}' + +#curl -X POST http://ricplt-entry:30080/e2mgr/v1/nodeb/endc-setup -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"ranIp": "10.2.0.28","ranPort": 36422, "ranName":"AAAA123457"}' + +#curl -X GET http://ricplt-entry:30080/e2mgr/v1/nodeb/AAAA000003 + +curl -X GET http://ricplt-entry:30080/e2mgr/v1/nodeb/$1 + diff --git a/test_scripts/endc_x2_setup/run_e2agent b/test_scripts/endc_x2_setup/run_e2agent new file mode 100644 index 0000000..9bca87d --- /dev/null +++ b/test_scripts/endc_x2_setup/run_e2agent @@ -0,0 +1 @@ +docker run --rm --net host -it e2agent sh -c "./build/e2agent 10.2.0.28 36455" diff --git a/test_scripts/endc_x2_setup/run_gNBsim b/test_scripts/endc_x2_setup/run_gNBsim new file mode 100644 index 0000000..16192ad --- /dev/null +++ b/test_scripts/endc_x2_setup/run_gNBsim @@ -0,0 +1,4 @@ +#sudo docker run --net host --rm -it gnb:latest sh -c "./gnbe2_simu --gNBipv4 10.2.0.28 --gNBport 36422 --verbose" + +sudo docker run --net host --rm -it gnb:latest sh -c "./gnbe2_simu --gNBipv4 127.0.0.1 --gNBport 36422 --verbose --ricMaxRandomRate 5000000000 --cnxReportFileModel /opt/gnbe2simu/etc/SgNBReconfigurationComplete.xml --dcnxReportFileModel /opt/gnbe2simu/etc/UEContextRelease.xml --insertFileModel /opt/gnbe2simu/etc/SgNBAdditionRequest.xml --nbue 1" + diff --git a/test_scripts/endc_x2_setup/show_log_e2mgr b/test_scripts/endc_x2_setup/show_log_e2mgr new file mode 100755 index 0000000..5d94423 --- /dev/null +++ b/test_scripts/endc_x2_setup/show_log_e2mgr @@ -0,0 +1,7 @@ +#!/bin/bash + +#kubectl -n ricplt logs r0-e2mgr-766fc459cb-c5m8n | grep -E --color 'gnb|10.2.0.22|successfulOutcome|initiatingMessage|e2agent|' + +#kubectl -n ricplt logs r0-e2mgr-59f98778b7-8vbv2 + +kubectl -n ricplt logs $(kubectl -n ricplt get pods | grep -o 'deployment-r0-e2mgr[^ ]*') $1 | grep -E --color '|successfulOutcome_t|initiatingMessage_t|saved to rNib|' diff --git a/test_scripts/endc_x2_setup/show_log_e2term b/test_scripts/endc_x2_setup/show_log_e2term new file mode 100755 index 0000000..ef420dc --- /dev/null +++ b/test_scripts/endc_x2_setup/show_log_e2term @@ -0,0 +1,7 @@ +#!/bin/bash + +#kubectl -n ricplt logs r0-e2term-6d8776978f-zf6br | grep -E --color 'gnb|10.2.0.22|successfulOutcome|initiatingMessage|e2agent|' + +#kubectl -n ricplt logs r0-e2term-74d595d7f7-b8dmc + +kubectl -n ricplt logs $(kubectl -n ricplt get pods | grep -o 'deployment-r0-e2term[^ ]*') $1 diff --git a/test_scripts/endc_x2_setup/test_endc_x2setup b/test_scripts/endc_x2_setup/test_endc_x2setup new file mode 100755 index 0000000..cffb7c3 --- /dev/null +++ b/test_scripts/endc_x2_setup/test_endc_x2setup @@ -0,0 +1,7 @@ +#!/bin/bash + + +#curl -X POST http://10.2.0.28:30004/v1/nodeb/endc-setup -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"ranIp": "10.2.0.28","ranPort": 36422, "ranName":"AAAA123457"}' + +curl -X POST http://ricplt-entry:30080/e2mgr/v1/nodeb/endc-setup -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"ranIp": "10.2.0.28","ranPort": 36422, "ranName":"AAAA123457"}' + diff --git a/test_scripts/one_click_ric/test.txt b/test_scripts/one_click_ric/test.txt new file mode 100644 index 0000000..b14654d --- /dev/null +++ b/test_scripts/one_click_ric/test.txt @@ -0,0 +1 @@ +cannot add empty folder diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/.helmignore b/test_scripts/subscription/test-subscription-helmchart-1.0.3/.helmignore new file mode 100755 index 0000000..50af031 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/Chart.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/Chart.yaml new file mode 100755 index 0000000..f520665 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart to test subscription flow by sending subscription requests +name: test-subscription-helmchart +version: 1.0.3 diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/exec_xapp b/test_scripts/subscription/test-subscription-helmchart-1.0.3/exec_xapp new file mode 100644 index 0000000..4d7d2ab --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/exec_xapp @@ -0,0 +1,2 @@ +kubectl -n ricplt exec -it $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') -- /bin/bash + diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/log_xapp b/test_scripts/subscription/test-subscription-helmchart-1.0.3/log_xapp new file mode 100644 index 0000000..e2d492d --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/log_xapp @@ -0,0 +1 @@ +kubectl -n ricplt logs $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') $1 diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/restart_xapp b/test_scripts/subscription/test-subscription-helmchart-1.0.3/restart_xapp new file mode 100644 index 0000000..85aa556 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/restart_xapp @@ -0,0 +1,2 @@ +kubectl -n ricplt delete pod $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') + diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/send_subsciption b/test_scripts/subscription/test-subscription-helmchart-1.0.3/send_subsciption new file mode 100644 index 0000000..4e6eb21 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/send_subsciption @@ -0,0 +1,3 @@ +#kubectl -n ricplt logs $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') $1 + +/usr/local/bin/e2e-test-client -x 1 -g AAAA000006 -p 4560 diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_subscription b/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_subscription new file mode 100644 index 0000000..5323f75 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_subscription @@ -0,0 +1 @@ +kubectl -n ricplt exec -it $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') -- /usr/local/bin/e2e-test-client -x 1 -g AAAA123457 -p 4560 diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_xapp b/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_xapp new file mode 100644 index 0000000..011cb9c --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/start_xapp @@ -0,0 +1,7 @@ +#!/bin/bash + +helm install --name r0-adm-xapp --namespace ricplt ./ + +#sleep 3 + +#kubectl -n ricplt exec -it $(kubectl -n ricplt get pods | grep -o 'adm-ctrl-xapp[^ ]*') -- /bin/bash diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/stop_xapp b/test_scripts/subscription/test-subscription-helmchart-1.0.3/stop_xapp new file mode 100644 index 0000000..83e134c --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/stop_xapp @@ -0,0 +1,3 @@ +#!/bin/bash + +helm delete --purge r0-adm-xapp diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/NOTES.txt b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/NOTES.txt new file mode 100755 index 0000000..30f0478 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/NOTES.txt @@ -0,0 +1,21 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range $.Values.ingress.paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "adm-ctrl-xapp.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "adm-ctrl-xapp.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "adm-ctrl-xapp.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "adm-ctrl-xapp.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/_helpers.tpl b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/_helpers.tpl new file mode 100755 index 0000000..36780de --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "adm-ctrl-xapp.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "adm-ctrl-xapp.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "adm-ctrl-xapp.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/configmap.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/configmap.yaml new file mode 100755 index 0000000..1b9a089 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/configmap.yaml @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: rmr-configmap-xapp +data : + uta_rtg.test : | + newrt|start + rte|12010|service-r0-e2term-e2term:38000 + rte|12020|service-r0-e2term-e2term:38000 + newrt|end diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/deployment.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/deployment.yaml new file mode 100755 index 0000000..31ee4ff --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/deployment.yaml @@ -0,0 +1,106 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: adm-ctrl-xapp + labels: + app: adm-ctrl-xapp + app.kubernetes.io/name: adm-ctrl-xapp + app.kubernetes.io/instance: {{ .Release.Name }} + #app.kubernetes.io/managed-by: {{ .Release.Service }} + #helm.sh/chart: {{ include "adm-ctrl-xapp.chart" . }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: adm-ctrl-xapp + # app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + # app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app: adm-ctrl-xapp + #app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + #app.kubernetes.io/instance: {{ .Release.Name }} + spec: + hostname: adm-ctrl-xapp + imagePullSecrets: + - name: {{ .Values.imageCredentials.name }} + containers: + - name: sub-client + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + restartPolicy: Never + ports: + - name: xapp-port + containerPort: {{ .Values.service.xapp_port}} + protocol: TCP + - name: rmr-port + containerPort: {{ .Values.service.rmr_port}} + protocol: TCP + + resources: + {{- toYaml .Values.resources | nindent 12 }} + #command: ["{{ .Values.xapp.env.run_command }}"] + #args: ["-p", "{{ .Values.service.xapp_port}}", "-g", "{{ .Values.xapp.env.gNodeB}}" , "-r", "{{ .Values.xapp.env.start_request_id }}", "-x", "{{ .Values.xapp.env.requests }}", "-t", "{{ .Values.xapp.env.interval }}"] + command: [ "/bin/bash", "-c", "--" ] + args: [ "while true; do sleep 30; done;" ] + env: + - name: "RMR_RTG_SVC" + value: "127.0.0.1:9995" + - name: "THREADS" + value: "{{ .Values.xapp.env.threads}}" + - name: "RMR_SEED_RT" + value: {{ printf "%s/%s" .Values.xapp.env.route_path .Values.xapp.env.route_file }} + - name: "DELETE_MODE" + value: "{{ .Values.xapp.env.deleteMode}}" + - name: "RAN_FUNCTION_ID" + value: "{{ .Values.xapp.env.ranFunctionId}}" + - name: "ACTION_ID" + value: "{{ .Values.xapp.env.actionId }}" + - name: "ACTION_TYPE" + value: "{{ .Values.xapp.env.actionType }}" + - name: "TRIGGER_DEF" + value: "{{ .Values.xapp.env.triggerDef }}" + + volumeMounts: + - name : rmr-route-info + mountPath: {{ .Values.xapp.env.route_path }} + + volumes: + - name: rmr-route-info + configMap: + name: rmr-configmap-xapp + items: + - key : {{ .Values.xapp.env.route_file }} + path: {{ .Values.xapp.env.route_file }} + + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/imagePullSecret.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/imagePullSecret.yaml new file mode 100755 index 0000000..c036840 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/imagePullSecret.yaml @@ -0,0 +1,3 @@ +{{- define "imagePullSecret" }} +{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.imageCredentials.registry (printf "%s:%s" .Values.imageCredentials.username .Values.imageCredentials.password | b64enc) | b64enc }} +{{- end }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/ingress.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/ingress.yaml new file mode 100755 index 0000000..fe861fe --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/ingress.yaml @@ -0,0 +1,40 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "adm-ctrl-xapp.fullname" . -}} +{{- $ingressPaths := .Values.ingress.paths -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + helm.sh/chart: {{ include "adm-ctrl-xapp.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . | quote }} + http: + paths: + {{- range $ingressPaths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: http + {{- end }} + {{- end }} +{{- end }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/secrets.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/secrets.yaml new file mode 100755 index 0000000..6a58cb1 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/secrets.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.imageCredentials.name }} +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ template "imagePullSecret" . }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/service.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/service.yaml new file mode 100755 index 0000000..49d51ca --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/service.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: Service +metadata: + name: adm-ctrl-xapp + labels: + app: adm-ctrl-xapp + #app.kubernetes.io/instance: {{ .Release.Name }} + #app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + #helm.sh/chart: {{ include "adm-ctrl-xapp.chart" . }} + #app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + #clusterIP: None + ports: + - name : xapp-port + port: {{ .Values.service.xapp_port }} + targetPort: {{ .Values.service.xapp_port }} + protocol: TCP + + - name : rmr-port + port: {{ .Values.service.rmr_port }} + targetPort: {{ .Values.service.rmr_port }} + protocol: TCP + + selector: + app: adm-ctrl-xapp + #app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + #app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/tests/test-connection.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/tests/test-connection.yaml new file mode 100755 index 0000000..63ebb3e --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/templates/tests/test-connection.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "adm-ctrl-xapp.fullname" . }}-test-connection" + labels: + app.kubernetes.io/name: {{ include "adm-ctrl-xapp.name" . }} + helm.sh/chart: {{ include "adm-ctrl-xapp.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "adm-ctrl-xapp.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/test_scripts/subscription/test-subscription-helmchart-1.0.3/values.yaml b/test_scripts/subscription/test-subscription-helmchart-1.0.3/values.yaml new file mode 100755 index 0000000..ccf2ee7 --- /dev/null +++ b/test_scripts/subscription/test-subscription-helmchart-1.0.3/values.yaml @@ -0,0 +1,82 @@ +# Default values for adm-ctrl-xapp. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + #repository: localhost:5000/ric-app-admin + #tag: 0.0.2 + #repository: nexus3.o-ran-sc.org:10004/ric-app-admin + #tag: latest + repository: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2e-xapp + tag: 1.0.0 + pullPolicy: IfNotPresent + +imageCredentials: + name: lf-docker-nexus-xapp + #registry: nexus3.o-ran-sc.org:10004 + registry: snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001 + username: docker + password: docker + + +xapp: + env: + rtmgr: "ric-full-rtmgr.ricplatform" + threads: "1" + route_path: "/tmp/test" + route_file: "uta_rtg.test" + run_command: "/usr/local/bin/e2e-test-client" + gNodeB: "NYC1234" # Change to reflect sctp connection ID + deleteMode: "TRUE" # Change to FALSE if xapp should NOT send a subscription delete request + ranFunctionId: "0" + actionType: "0" + actionIdD: "1" + triggerDef: "E2ETest" + interval : "5" + start_request_id: "100" + requests: "1" # 1 means send a request and then wait till we get a response + # -1 means keep sending requests continously + # > 1 means send specific number of requests and then stop + + +nameOverride: "adm-ctrl-xapp" +fullnameOverride: "adm-ctrl-xapp" + +service: + type: ClusterIP + xapp_port: 4560 + rmr_port : 4561 + + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + paths: [] + hosts: + - chart-example.local + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/test_scripts/x2_setup/exec_e2agent b/test_scripts/x2_setup/exec_e2agent new file mode 100644 index 0000000..bcb29e5 --- /dev/null +++ b/test_scripts/x2_setup/exec_e2agent @@ -0,0 +1 @@ +docker run --rm --net host -it e2agent diff --git a/test_scripts/x2_setup/exec_e2mgr b/test_scripts/x2_setup/exec_e2mgr new file mode 100644 index 0000000..3213da0 --- /dev/null +++ b/test_scripts/x2_setup/exec_e2mgr @@ -0,0 +1 @@ +kubectl -n ricplt exec -it r0-e2mgr-766fc459cb-595dm -- /bin/bash diff --git a/test_scripts/x2_setup/exec_e2term b/test_scripts/x2_setup/exec_e2term new file mode 100644 index 0000000..1404ef3 --- /dev/null +++ b/test_scripts/x2_setup/exec_e2term @@ -0,0 +1 @@ +kubectl -n ricplt exec -it r0-e2term-69dcfc8958-mk8ln -- /bin/bash diff --git a/test_scripts/x2_setup/show_log_e2mgr b/test_scripts/x2_setup/show_log_e2mgr new file mode 100755 index 0000000..308039e --- /dev/null +++ b/test_scripts/x2_setup/show_log_e2mgr @@ -0,0 +1,6 @@ +#!/bin/bash + +#kubectl -n ricplt logs ric-full-e2mgr-586bc79896-sgw2h | grep -E --color 'gnb|135.207.143.102|successfulOutcome|e2agent|135.207.143.117|' + +kubectl -n ricplt logs r0-e2mgr-766fc459cb-595dm + diff --git a/test_scripts/x2_setup/show_log_e2term b/test_scripts/x2_setup/show_log_e2term new file mode 100755 index 0000000..92cf0d8 --- /dev/null +++ b/test_scripts/x2_setup/show_log_e2term @@ -0,0 +1,3 @@ +#!/bin/bash + +kubectl -n ricplt logs r0-e2term-69dcfc8958-mk8ln diff --git a/test_scripts/x2_setup/test.txt b/test_scripts/x2_setup/test.txt new file mode 100644 index 0000000..b14654d --- /dev/null +++ b/test_scripts/x2_setup/test.txt @@ -0,0 +1 @@ +cannot add empty folder diff --git a/test_scripts/xapp_deploy_undeploy/deploy_xapp b/test_scripts/xapp_deploy_undeploy/deploy_xapp new file mode 100644 index 0000000..3720297 --- /dev/null +++ b/test_scripts/xapp_deploy_undeploy/deploy_xapp @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X POST http://10.102.211.206:8080/ric/v1/xapps -d '{"name": "xapp-admin"}' diff --git a/test_scripts/xapp_deploy_undeploy/list_xapp b/test_scripts/xapp_deploy_undeploy/list_xapp new file mode 100644 index 0000000..aec0a09 --- /dev/null +++ b/test_scripts/xapp_deploy_undeploy/list_xapp @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X GET http://10.108.213.66:8080/ric/v1/xapps diff --git a/test_scripts/xapp_deploy_undeploy/test.txt b/test_scripts/xapp_deploy_undeploy/test.txt new file mode 100644 index 0000000..b14654d --- /dev/null +++ b/test_scripts/xapp_deploy_undeploy/test.txt @@ -0,0 +1 @@ +cannot add empty folder diff --git a/test_scripts/xapp_deploy_undeploy/undeploy_xapp b/test_scripts/xapp_deploy_undeploy/undeploy_xapp new file mode 100644 index 0000000..93878f3 --- /dev/null +++ b/test_scripts/xapp_deploy_undeploy/undeploy_xapp @@ -0,0 +1 @@ +curl -H "Content-Type: application/json" -X DELETE http://10.98.201.250:8080/ric/v1/xapps/xapp-admin -- 2.16.6